Hi, I think there's a typo in gcc/Makefile.in, where lto-wrapper is linked using $(ALL_COMPILERFLAGS) while it should be $(ALL_LINKERFLAGS).
I noticed this while playing with linker flags, and not seeing them when linking lto-wrapper. It seems obvious, but maybe I'm missing something? OK for trunk? Thanks, Christophe
gcc/ChangeLog: 2018-02-19 Christophe Lyon <christophe.l...@linaro.org> * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 6c37e46..c91499d 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -2151,7 +2151,7 @@ CFLAGS-collect2.o += -DTARGET_MACHINE=\"$(target_noncanonical)\" \ LTO_WRAPPER_OBJS = lto-wrapper.o collect-utils.o ggc-none.o lto-wrapper$(exeext): $(LTO_WRAPPER_OBJS) libcommon-target.a $(LIBDEPS) - +$(LINKER) $(ALL_COMPILERFLAGS) $(LDFLAGS) -o T$@ \ + +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o T$@ \ $(LTO_WRAPPER_OBJS) libcommon-target.a $(LIBS) mv -f T$@ $@