public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Manfred Hollstein <manfred@s-direktnet.de>
To: Daniel.Egger@t-online.de
Cc: egcs@cygnus.com
Subject: Re: Debugging flags
Date: Thu, 25 Jun 1998 09:19:00 -0000	[thread overview]
Message-ID: <13714.16736.633341.977475@slsvhmt> (raw)
In-Reply-To: <98062416490700.07595@z2.n2480.f898.fidonet.org>

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

  reply	other threads:[~1998-06-25  9:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-24 17:23 Daniel Egger
1998-06-25  9:19 ` Manfred Hollstein [this message]
1998-06-25 12:07   ` Joe Buck
1998-06-26 13:32   ` Daniel Egger
1998-06-26 22:48     ` Mumit Khan
1998-06-27  7:22     ` Manfred Hollstein
1998-06-28 12:37       ` Daniel Egger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13714.16736.633341.977475@slsvhmt \
    --to=manfred@s-direktnet.de \
    --cc=Daniel.Egger@t-online.de \
    --cc=egcs@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).