]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
uninative-flags.inc: Build binutils-native as pie
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 7 Apr 2017 16:39:43 +0000 (17:39 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 8 Apr 2017 21:48:07 +0000 (22:48 +0100)
Some distros (ubuntu 16.10, debian-testing) default to gcc configured with
--enable-default-pie (see gcc -v). This breaks e.g. prelink-native on a pie
default system if binutils-native was built on a system which is not pie default
We therefore enable pie unconditionally for native recipes where static libs are
used such as libiberty from binutils, for now, until our minimum distro set is
all default pie.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/uninative-flags.inc

index e9f82c39ea9cdd86da40662cddca29a5bdb172e6..b6a944ef63bae01f91aa375eb9a1fb86c05cffb3 100644 (file)
@@ -7,3 +7,11 @@ BUILD_CXXFLAGS_append = " -D_GLIBCXX_USE_CXX11_ABI=0"
 # icu configure defaults to CXX11 if no -std= option is passed in CXXFLAGS
 # therefore pass one
 BUILD_CXXFLAGS_append_pn-icu-native = " -std=c++98"
+
+# Some distros (ubuntu 16.10, debian-testing) default to gcc configured with
+# --enable-default-pie (see gcc -v). This breaks e.g. prelink-native on a pie
+# default system if binutils-native was built on a system which is not pie default
+# We therefore enable pie unconditionally for native recipes where static libs are
+# used such as libiberty from binutils, for now, until our minimum distro set is
+# all default pie.
+BUILD_CFLAGS_append_pn-binutils-native = " -pie -fpie"