package/glibc: force -fno-lto
glibc requires compilation barriers between files, and will fail with LTO enabled. So force LTO off by appending -fno-lto to the flags, but only if the GCC version is recent enough that an LTO build would be possible. Signed-off-by: Norbert Lange <nolange79@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
parent
f35a4b4ae2
commit
b7a00b39bc
@ -53,6 +53,11 @@ ifeq ($(BR2_ENABLE_DEBUG),y)
|
|||||||
GLIBC_EXTRA_CFLAGS += -g
|
GLIBC_EXTRA_CFLAGS += -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# glibc explicitly requires compile barriers between files
|
||||||
|
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_7),y)
|
||||||
|
GLIBC_EXTRA_CFLAGS += -fno-lto
|
||||||
|
endif
|
||||||
|
|
||||||
# The stubs.h header is not installed by install-headers, but is
|
# The stubs.h header is not installed by install-headers, but is
|
||||||
# needed for the gcc build. An empty stubs.h will work, as explained
|
# needed for the gcc build. An empty stubs.h will work, as explained
|
||||||
# in http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html. The same trick
|
# in http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html. The same trick
|
||||||
|
Loading…
Reference in New Issue
Block a user