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)

Reply via email to