summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-06-01 21:41:53 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-06 19:52:26 +0100
commitd554d90da3bd4bc5812c4242be8fa359a21932ef (patch)
tree350118f996f547c26116122ba3a5cfee4c3da84b
parent84b3d8b33caeb1d8930531f96e06958f13456568 (diff)
downloadpoky-d554d90da3bd4bc5812c4242be8fa359a21932ef.tar.gz
setuptoools.bbclass: Do not use -pie with hardening
Fix build when PIE is turned on. It tries to build .so file using -pie and -shared flags together because its doing compile and link in same step CFLAGS and LDFLAGS are combined and does not work, ending in errors e.g. | /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/python-pygpgme/0.3-r0/recipe-sysroot/usr/l ib/Scrt1.o: In function `_start_c': | /usr/src/debug/musl/1.1.16+gitAUTOINC+179766aa2e-r0/git/crt/crt1.c:17: undefined reference to `main' | collect2: error: ld returned 1 exit status This error while cryptic is due to the fact that we are building a shared library but also pass -pie flag to the link step after specify LDHSARED ( which is -shared linker flags ) we can not use -pie when doing shared libs. This is true for all the python modules inheriting setup tools Disable the pie flags thusly for all modules using setuptools since this setting is done in setuptools makefiles which are then used during module compiles (From OE-Core rev: dc1c16e9df365871b2c40998f63f304ffa610447) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/setuptools.bbclass2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/setuptools.bbclass b/meta/classes/setuptools.bbclass
index 56343b1c73..7d0c5267d7 100644
--- a/meta/classes/setuptools.bbclass
+++ b/meta/classes/setuptools.bbclass
@@ -6,3 +6,5 @@ DISTUTILS_INSTALL_ARGS = "--root=${D} \
6 --prefix=${prefix} \ 6 --prefix=${prefix} \
7 --install-lib=${PYTHON_SITEPACKAGES_DIR} \ 7 --install-lib=${PYTHON_SITEPACKAGES_DIR} \
8 --install-data=${datadir}" 8 --install-data=${datadir}"
9
10SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"