[Buildroot] Analysis of build results for 2016-02-21
thomas.petazzoni at free-electrons.com
Tue Feb 23 08:11:46 UTC 2016
On Tue, 23 Feb 2016 09:34:31 +0200, Olivier Schonken wrote:
> The suggestion from Romain to disable -fPIE as below works for both
> architectures. Can I submit a patch for this? Or do you want to wait for a
> response from Alexey and Waldemar?
> # Remove -fPIE -pie from CFLAGS
> ifeq ($(BR2_STATIC_LIBS),y)
> CUPS_CONF_OPTS += LSB_BUILD=y
Unfortunately, I don't like this, for several reasons:
1/ LSB_BUILD=y will also disable stack protection support.
2/ Only uClibc in static library build is affected by the problem, not
musl for example.
3/ It is not fixing the real problem.
The real fixes are:
1/ Use AC_CACHE_VAL() in the configure.ac script to be able to force
disable PIE, and then use that to disable it on ARC. Or
alternatively, change the configure.ac to use:
++AX_CHECK_COMPILE_FLAG([-fPIE -DPIE], [PIE_CFLAGS="-fPIE -DPIE"])
++AX_CHECK_LINK_FLAG([-pie], [PIE_LDFLAGS="$PIE_LDFLAGS -pie"])
Which also provide cache variables to override their results. See
2/ Fix the uClibc static case by fixing the toolchain build process or
uClibc itself (depending on which one is broken).
Of course, this requires effort than the quick hack of LSB_BUILD=y, but
those are IMO the real fixes, while LSB_BUILD=y is papering over the
Note that there are other classes of cups-2.1.2 build failures visible
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
More information about the buildroot