On Fri, Jan 06, 2017 at 05:12:54PM +0100, Christophe Lyon wrote:
> This makes all my builds fail.
> (The *linux* ones are broken after Alexandre's pragma, and
> this commit breaks the remaining bare-metal configurations).
> make[2]: Entering directory
> `/tmp/3119026_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-linux-gnu/gcc1/libdecnumber'
> source='/tmp/3119026_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libdecnumber/decNumber.c'
> object='decNumber.o' libtool=no gcc -I/tmp/3
> 119026_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libdecnumber -I.
> -fno-lto -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissi
> ng-prototypes -Wold-style-definition -Wmissing-format-attribute
> -Wcast-qual -pedantic -Wno-long-long
> -I/tmp/3119026_6.tmpdir/aci-gcc-fs
> f/sources/gcc-fsf/gccsrc/libdecnumber -I. -fno-lto -c
> /tmp/3119026_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libdecnumber/decNumber.c
> cc1: error: unrecognized command line option "-fno-lto"
> cc1: error: unrecognized command line option "-fno-lto"
>
> Still using gcc-4.4.7 on RHEL6....
Actually, I'm surprised it is doing anything, because the toplevel
Makefile should be doing:
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
$(STAGE1_FLAGS_TO_PASS) \
$(TARGET-libdecnumber))
and both HOST_EXPORTS and BASE_FLAGS_TO_PASS include
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"LDFLAGS=$(LDFLAGS)" \
so it should override the libdecnumber/Makefile vars that way.
In any case, I think libdecnumber/configure* should check for whether
-fno-lto works and if yes, should substitute it into some var that is then
CFLAGS += $(NO_LTO)
CXXFLAGS += $(NO_LTO)
LDFLAGS += $(NO_LTO)
Jakub