generic-poky/meta
Khem Raj 7a04ee8941 distutils-base.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

Backport notes:
In master, this commit is reverted in master in favor of using GCCPIE =
"--enable-default-pie" in security_flags.inc. However, backporting that change
introduces many merge conflicts and will be a serious maintenance issue, so I
think it's safest to just backport this small change, which fixes build failures
in python-cffi and likely other recipes.

For completeness, this is the list of commits in OE-core master that will
supersede this change:

- 1c7e195c94764d680a12a49b870f04cd58860f81
  "gcc: Introduce a knob to configure gcc to default to PIE"
- e93765ffb5718b0fce84f0b8123963176dea95e4
  "security_flags.inc: Delete pinnings for SECURITY_NO_PIE_CFLAGS"
- fcfe6d4ab4460f8358e13023022a5e909941ca93
  distutils,setuptools: Delete use of SECURITY_NO_PIE_CFLAGS

(From OE-Core rev: 739c69e8eb464d184ef652e7e7a4d4b234a5b5f9)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:58 +00:00
..
classes distutils-base.bbclass: Do not use -pie with hardening 2018-03-04 11:11:58 +00:00
conf bitbake.conf: add bzr to HOSTTOOLS_NONFATAL 2017-09-13 22:13:00 +01:00
files ext-sdk-prepare.py: use quiet mode when preparing sysroot 2017-04-19 10:38:37 +01:00
lib lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk repos don't conflict 2018-01-22 10:40:08 +00:00
recipes-bsp grub: Fix device mapper dependency 2018-03-04 11:11:58 +00:00
recipes-connectivity portmaper: checkuri fails. 2018-01-07 17:07:57 +00:00
recipes-core ovmf: Fix build with gcc7 2018-01-07 17:07:57 +00:00
recipes-devtools python3-nose: rename ${bindir}/nosetests into ${bindir}/nosetests3 2018-03-04 11:11:58 +00:00
recipes-extended tzdata: update to 2018c 2018-03-04 11:11:57 +00:00
recipes-gnome gtk+3: Update the patches to work with old versions of patch 2017-08-31 17:57:11 +01:00
recipes-graphics weston: add patch to set pitch correctly for subsampled textures 2017-12-11 22:02:59 +00:00
recipes-kernel linux-firmware: Add reference to iwlwifi-8000C firmware 2018-03-04 11:11:57 +00:00
recipes-lsb4 libpng12: Use rm instead of unlink 2017-03-10 14:50:11 +00:00
recipes-multimedia tiff: Security fix for CVE-2017-7593 2017-11-05 22:39:49 +00:00
recipes-rt meta: remove True option to getVar calls 2016-12-16 10:23:23 +00:00
recipes-sato webkitgtk: update to 2.18.5 (includes Spectre mitigations; see commit description) 2018-01-14 22:10:21 +00:00
recipes-support libunwind: Disable documentation explicitly 2018-01-14 22:10:21 +00:00
site siteinfo.bbclass: Add mipsisa{32, 64}r6{el, } support 2016-10-07 16:43:57 +01:00
COPYING.GPLv2 Fix license notices for OE-Core 2014-01-02 12:58:54 +00:00
COPYING.MIT
recipes.txt qt4: remove recipes and classes 2016-01-07 13:40:14 +00:00