www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/11/02/12:34:15

From: Nate Eldredge <neldredge AT hmc DOT edu>
Organization: Harvey Mudd College
To: djgpp-workers AT delorie DOT com
Subject: Re: -g vs -s
Date: Wed, 1 Jan 1997 09:04:10 -0800
X-Mailer: KMail [version 1.0.28]
References: <Pine DOT SUN DOT 3 DOT 91 DOT 991102154604 DOT 21750A-100000 AT is>
In-Reply-To: <Pine.SUN.3.91.991102154604.21750A-100000@is>
MIME-Version: 1.0
Message-Id: <97010109065100.00246@mercury>
Reply-To: djgpp-workers AT delorie DOT com

On Tue, 02 Nov 1999, Eli Zaretskii wrote:
> On Tue, 2 Nov 1999 pavenis AT lanet DOT lv wrote:
> 
> > Let's assume we have too files foo.c and bar.c in project. Rhide will 
> > generate commands like (if options -g and -O2 are requested in project)
> > 	gcc -g -O2 -c foo.c -o foo.o
> > 	gcc -g -O2 -c bar.c -o bar.o
> > 	gcc foo.o bar.o -o foo.exe
> 
> This can be handled by changing the relevant RHIDE_* macros so that it 
> passes -g or -g0 to the linker.
> 
> > We'll have similar problem also with many makefiles.
> 
> Most Makefile's I saw put -g into CFLAGS, so linking is done with -g as 
> well.

Except that in my experience, Makefiles don't use CFLAGS when linking, they use
LDFLAGS instead.  And LDFLAGS rarely includes -g by default.

I also vote against this change.  GCC has a well-defined default behavior that
people expect, and I don't think we should change it.

My $0.02.

 -- 

Nate Eldredge
neldredge AT hmc DOT edu

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019