summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Le Bihan <eric.le.bihan.dev@free.fr>2014-08-12 22:28:27 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-08-15 22:31:25 +0200
commitd9054017cfc25c8f89225e1d18c71f112d25f9a0 (patch)
tree1ff70ca3cbc8ce0b284d4a4253633925aa7679ca
parentc0da68a90c934a7c54a37e2168f0b5c53353b4a6 (diff)
downloadbuildroot-d9054017cfc25c8f89225e1d18c71f112d25f9a0.tar.gz
buildroot-d9054017cfc25c8f89225e1d18c71f112d25f9a0.zip
systemd: disable link time optimization
As reported in https://bugs.busybox.net/show_bug.cgi?id=7286, systemd fails to build with BR2_OPTIMIZE_2=y. This mode activates the GCC options -flto and -ffat-lto-objects, which do not mix well with the GCC tricks used in src/compat-libs/linkwarning.h to build the compatibility libraries. As a temporary workaround, this patch disables link time optimization for systemd. Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/systemd/systemd.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 9729276fc5..edde998c58 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -49,8 +49,11 @@ SYSTEMD_CONF_OPT += \
--disable-dbus \
--without-python
+SYSTEMD_CFLAGS = $(TARGET_CFLAGS) -fno-lto
+
# Override path to kmod, used in kmod-static-nodes.service
SYSTEMD_CONF_ENV = \
+ CFLAGS="$(SYSTEMD_CFLAGS)" \
ac_cv_path_KMOD=/usr/bin/kmod
ifeq ($(BR2_PACKAGE_SYSTEMD_COMPAT),y)
OpenPOWER on IntegriCloud