This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFA]: New configure option disabling target optimization


On 20/10/09 03:07 PM, Corinna Vinschen wrote:
On Oct 20 12:46, Jeff Johnston wrote:
I think there is a simpler answer.  Just remove the setting of the -O2 flag
in configure.host.  The optimization flag gets set by default in the
top-level so there is no need to duplicate it.  That way you could just use
CFLAG settings to accomplish what you want.

Try the attached patch.

That looks good as long as one build from the top level. If I build newlib later on in it's own build directory because I just want to test a single change, CFLAGS is not correct, since CFLAGS is always empty for some reason.

Assuming I configure from the toplevel and build with `make CFLAGS=-g
CFLAGS_FOR_TARGET=-g'.  When the build is finished, newlib's CFLAGS
setting is empty:

CFLAGS =

In other directories the setting of CFLAGS reflects what I had set
in the make run, for instance libiberty/Makefile:

CFLAGS = -g

or Cygwin's Makefile:

CFLAGS=-g

Why is that so?


I think I found the problem. It has to do with our own version of AC_PROG_CC. I have checked in a patch including the configure.host fix. Let me know if you have any problems.


-- Jeff J.




Corinna




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]