Skip to contentSkip to conversation

tinc: disable PIE on ARC

PATCH New Alexey Brodkin 2 participants 2 messages Aug 10, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tinc: disable PIE on ARC

Even though ARC gcc understands "-pie" option and attempts to generate PIE binaries as of today PIE is not really supported for user-space applications.

So we disable PIE detection if building for ARC.
That fixes http://autobuild.buildroot.net/results/2b1/2b1aa474fc432f3f79b03c4577d68642bb7e0f9c
and also prevents execution of non-supported PIE binary in runtime.

Cc Thomas Petazzoni <[email protected]>
---
 package/tinc/tinc.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/tinc/tinc.mk +4 -0
index b8d4ca7..73cceaf 100644
@@ -11,4 +11,8 @@ TINC_LICENSE = GPLv2+ with OpenSSL exception
 TINC_LICENSE_FILES = COPYING COPYING.README
 TINC_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=c99"
 
+ifeq ($(BR2_arc),y)
+TINC_CONF_ENV += ax_cv_check_cflags___fPIE=no ax_cv_check_ldflags___pie=no
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.4.3
#1 lore raw

PATCH 1/1 tinc: disable PIE on ARC

Dear Alexey Brodkin,

Quoted 8 lines · Alexey Brodkin

Even though ARC gcc understands "-pie" option and attempts to generate PIE binaries as of today PIE is not really supported for user-space applications.

So we disable PIE detection if building for ARC.
That fixes http://autobuild.buildroot.net/results/2b1/2b1aa474fc432f3f79b03c4577d68642bb7e0f9c
and also prevents execution of non-supported PIE binary in runtime.

Quoted 5 lines
Cc Thomas Petazzoni <[email protected]>
---
 package/tinc/tinc.mk | 4 ++++
 1 file changed, 4 insertions(+)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com