From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manfred Hollstein To: Daniel.Egger@t-online.de Cc: egcs@cygnus.com Subject: Re: Debugging flags Date: Thu, 25 Jun 1998 09:19:00 -0000 Message-id: <13714.16736.633341.977475@slsvhmt> References: <98062416490700.07595@z2.n2480.f898.fidonet.org> X-SW-Source: 1998-06/msg00901.html On Wed, 24 June 1998, 16:17:17, Daniel.Egger@t-online.de wrote: > Hiho! > > I don't know exactly how but my defined CFLAGS are overridden by > the made Makefiles in gcc and subdirs. Behause of the inheritance of > variables that are defined in Makefiles it should be enough to define > them in the topdir of the tree but they are defined in every single subdir. But, it doesn't hurt, as they are passed down via FLAGS_TO_PASS. You could even re-define CFLAGS/CXXFLAGS on the "make ..." command line. > > Further we have a nice autoconfig screict which figures out what > options to use to compile the whole thing. But they will be only used > if we substitute all CFLAGS and CXXFLAGS with @CFLAGS@ and > @CXXFLAGS@. This will also allow to remove the whole debugging > thing simply by a added option to the autoconf script which will follow > in the next days. This is not true. If you actually look at the configure machinery (I admit it's quite complicated ;-), you'll see that the "hardcoded" *FLAGS will be substituted using sed by whatever you've defined when calling configure. If your only intention is to avoid `-g' in CFLAGS and probably want stripped executables by default, simply do it this way: $ env CC="{your_preferred_C_compiler}" CFLAGS="-O2" LDFLAGS=-s \ ${path_to_egcs_directory}/configure ... and then simply call: $ make bootstrap; make check; make install It's really that simple. And, don't omit `-g' from CXXFLAGS as this will prevent you from being able to use your favourite debugger looking at C++ objects whose type definitions originate from one of those C++ libs. > But first here's the patch to remove hardcoded CFLAGS: > [patch removed as it is not necessary] manfred