This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH/RFA]: New configure option disabling target optimization
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?
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat