Skip to contentSkip to conversation

libsodium: 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 libsodium: 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/be4/be46b621ce5443788b0a1bc9fab614c4ca5d0859
and also prevents execution of non-supported PIE binary in runtime.

Cc Thomas Petazzoni <[email protected]>
---
 package/libsodium/libsodium.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/libsodium/libsodium.mk +4 -0
index c032863..18035f3 100644
@@ -10,4 +10,8 @@ LIBSODIUM_LICENSE = ISC
 LIBSODIUM_LICENSE_FILES = LICENSE
 LIBSODIUM_INSTALL_STAGING = YES
 
+ifeq ($(BR2_arc),y)
+LIBSODIUM_CONF_OPTS += --disable-pie
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.4.3
#1 lore raw

PATCH 1/1 libsodium: 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/be4/be46b621ce5443788b0a1bc9fab614c4ca5d0859
and also prevents execution of non-supported PIE binary in runtime.

Quoted 5 lines
Cc Thomas Petazzoni <[email protected]>
---
 package/libsodium/libsodium.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