GNU bug report logs - #6538
Removal of C_DEBUG_SWITCH changes CFLAGS

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Wed, 30 Jun 2010 03:01:02 UTC

Severity: normal

Done: Dan Nicolaescu <dann <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6538 in the body.
You can then email your comments to 6538 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6538; Package emacs. (Wed, 30 Jun 2010 03:01:02 GMT) Full text and rfc822 format available.

Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: submit <at> debbugs.gnu.org
Subject: Removal of C_DEBUG_SWITCH changes CFLAGS
Date: Tue, 29 Jun 2010 23:00:09 -0400
Package: emacs

Configuring Emacs 23.2 on Solaris 2.10 with a non-GNU cc, one gets
generated Makefiles containing:

CFLAGS=-g -O 

Configuring the current trunk, one gets

CFLAGS=

The cause appears to be the removal of C_DEBUG_SWITCH.

It is possible other platforms are affected, I did not check (likewise
with LIBS_DEBUG).


The configure logic (faithfully inherited from cpp) is weird. Eg
C_OPTIMIZE_SWITCH goes unused with non-GNU compilers.




Reply sent to Dan Nicolaescu <dann <at> gnu.org>:
You have taken responsibility. (Wed, 30 Jun 2010 05:57:02 GMT) Full text and rfc822 format available.

Notification sent to Glenn Morris <rgm <at> gnu.org>:
bug acknowledged by developer. (Wed, 30 Jun 2010 05:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 6538-done <at> debbugs.gnu.org (full text, mbox):

From: Dan Nicolaescu <dann <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 6538-done <at> debbugs.gnu.org
Subject: Re: bug#6538: Removal of C_DEBUG_SWITCH changes CFLAGS
Date: Wed, 30 Jun 2010 01:56:47 -0400
Glenn Morris <rgm <at> gnu.org> writes:

> Package: emacs
>
> Configuring Emacs 23.2 on Solaris 2.10 with a non-GNU cc, one gets
> generated Makefiles containing:
>
> CFLAGS=-g -O 
>
> Configuring the current trunk, one gets
>
> CFLAGS=
>
> The cause appears to be the removal of C_DEBUG_SWITCH.

> It is possible other platforms are affected, I did not check (likewise
> with LIBS_DEBUG).

LIBS_DEBUG was just -lg, it can be safely ignored.

>
> The configure logic (faithfully inherited from cpp) is weird. Eg
> C_OPTIMIZE_SWITCH goes unused with non-GNU compilers.

Not anymore.  
C_DEBUG_SWITCH was weird, it used to specify optimization flags too,
that's probably why C_OPTIMIZE_SWITCH is unused.
C_DEBUG_SWITCH was just -g -O for all platforms that bothered to set it.  
We get that anyway for non-GCC compilers.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6538; Package emacs. (Wed, 30 Jun 2010 06:38:02 GMT) Full text and rfc822 format available.

Message #11 received at 6538 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Dan Nicolaescu <dann <at> gnu.org>
Cc: 6538 <at> debbugs.gnu.org
Subject: Re: bug#6538: Removal of C_DEBUG_SWITCH changes CFLAGS
Date: Wed, 30 Jun 2010 02:37:14 -0400
Dan Nicolaescu wrote:

> C_DEBUG_SWITCH was weird, it used to specify optimization flags too,
> that's probably why C_OPTIMIZE_SWITCH is unused.

Yes, it was all very weird...

> C_DEBUG_SWITCH was just -g -O for all platforms that bothered to set it.  

What about irix6-5: "-g3 -O -OPT:Olimit=3500".

> We get that anyway for non-GCC compilers.

I noticed that AC_PROG_CC tests for -g, and adds it to CFLAGS if
supported. It also adds -O2 when using gcc. Perhaps this could be used
to further simplify configure.in...




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6538; Package emacs. (Wed, 30 Jun 2010 07:28:02 GMT) Full text and rfc822 format available.

Message #14 received at 6538 <at> debbugs.gnu.org (full text, mbox):

From: Dan Nicolaescu <dann <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 6538 <at> debbugs.gnu.org
Subject: Re: bug#6538: Removal of C_DEBUG_SWITCH changes CFLAGS
Date: Wed, 30 Jun 2010 03:27:51 -0400
Glenn Morris <rgm <at> gnu.org> writes:

> Dan Nicolaescu wrote:
>
>> C_DEBUG_SWITCH was just -g -O for all platforms that bothered to set it.  
>
> What about irix6-5: "-g3 -O -OPT:Olimit=3500".

IMO it's not worth the complication.

>> We get that anyway for non-GCC compilers.
>
> I noticed that AC_PROG_CC tests for -g, and adds it to CFLAGS if
> supported. It also adds -O2 when using gcc. Perhaps this could be used
> to further simplify configure.in...





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 28 Jul 2010 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 336 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.