[Bug other/59365] Configure script does not pass CFLAGS/CXXFLAGS down to subtargets @ stage1
djfd at mail dot ru
gcc-bugzilla@gcc.gnu.org
Mon Dec 2 10:45:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59365
--- Comment #7 from djfd at mail dot ru ---
just noticed. there is ./config/mt-ospace file with the contents
# Build libraries optimizing for space, not speed.
CFLAGS_FOR_TARGET = -g -Os
CXXFLAGS_FOR_TARGET = -g -Os
it is resulting to next lines in Makefile:
#### host and target specific makefile fragments come in here.
CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE
# Build libraries optimizing for space, not speed.
CFLAGS_FOR_TARGET = -g -Os
CXXFLAGS_FOR_TARGET = -g -Os
###
BUT at that moment we have already C(XX)?FLAGS_for target set earlier:
CFLAGS_FOR_TARGET = -g --sysroot=/
CXXFLAGS_FOR_TARGET = -g --sysroot=/
thus, when we choose to optimize target libraries for size, our custom flags
will be overwritten. Maybe it would be better to have ./config/mt-ospace like
this:
# Build libraries optimizing for space, not speed.
CFLAGS_FOR_TARGET += -g -Os
CXXFLAGS_FOR_TARGET += -g -Os
(append instead of replace)
More information about the Gcc-bugs
mailing list