unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6538: Removal of C_DEBUG_SWITCH changes CFLAGS
@ 2010-06-30  3:00 Glenn Morris
  2010-06-30  5:56 ` Dan Nicolaescu
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2010-06-30  3:00 UTC (permalink / raw)
  To: 6538

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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6538: Removal of C_DEBUG_SWITCH changes CFLAGS
  2010-06-30  3:00 bug#6538: Removal of C_DEBUG_SWITCH changes CFLAGS Glenn Morris
@ 2010-06-30  5:56 ` Dan Nicolaescu
  2010-06-30  6:37   ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Nicolaescu @ 2010-06-30  5:56 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 6538-done

Glenn Morris <rgm@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6538: Removal of C_DEBUG_SWITCH changes CFLAGS
  2010-06-30  5:56 ` Dan Nicolaescu
@ 2010-06-30  6:37   ` Glenn Morris
  2010-06-30  7:27     ` Dan Nicolaescu
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2010-06-30  6:37 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 6538

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...





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6538: Removal of C_DEBUG_SWITCH changes CFLAGS
  2010-06-30  6:37   ` Glenn Morris
@ 2010-06-30  7:27     ` Dan Nicolaescu
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Nicolaescu @ 2010-06-30  7:27 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 6538

Glenn Morris <rgm@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...






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-30  7:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-30  3:00 bug#6538: Removal of C_DEBUG_SWITCH changes CFLAGS Glenn Morris
2010-06-30  5:56 ` Dan Nicolaescu
2010-06-30  6:37   ` Glenn Morris
2010-06-30  7:27     ` Dan Nicolaescu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).