]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
systemd: disable link time optimization
authorEric Le Bihan <eric.le.bihan.dev@free.fr>
Tue, 12 Aug 2014 20:28:27 +0000 (22:28 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 15 Aug 2014 20:31:25 +0000 (22:31 +0200)
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>
package/systemd/systemd.mk

index 9729276fc552a85f8a6647de1586e6caca331201..edde998c580534c538b94cdccacd19886832cc16 100644 (file)
@@ -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)