OSDN Git Service

Fix PIC default to be -fPIC
authorPavel Chupin <pavel.v.chupin@intel.com>
Wed, 2 Jul 2014 09:52:21 +0000 (13:52 +0400)
committerPavel Chupin <pavel.v.chupin@intel.com>
Wed, 2 Jul 2014 09:52:21 +0000 (13:52 +0400)
commit3a8d2bf39213c5b88c3d4889e33e0ed6d3ce99e3
tree78964f0c43ee200e53555a071f660e189770af31
parentb0c6ea9f290261c12b6cb127b7bcd53f8ecc2d60
Fix PIC default to be -fPIC

-fPIC is more restrictive than -fPIE, but when "-fPIC -fPIE" used together
the latter overrides. It may lead to issues when building DSO where
-fPIC and not -fPIE is required.

For executables -fPIE -pie shoudld be added and it's fine to override
-fPIC as it is done now.

The reason why we don't have these issues so far is probably related to
-Bsymbolic added by default. But any attempt to remove it reveals these
problems:
https://android-review.googlesource.com/#/c/98061/

Change-Id: If0f10628b7cc41e564221a7a37298f7d65f859a8
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
core/combo/TARGET_linux-x86.mk
core/combo/TARGET_linux-x86_64.mk