Skip to contentSkip to conversation

lvm2: disable PIE on ARC

PATCH New Alexey Brodkin 2 participants 2 messages Jul 1, 2015 – Jul 2, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lvm2: 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 first fixes http://autobuild.buildroot.net/results/988/9888a7a30538c9851f4910c16674d8dbb8edeb8f/
and also prevents execution of non-supported PIE binary in runtime.

Cc Thomas Petazzoni <[email protected]>
---
 package/lvm2/lvm2.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/lvm2/lvm2.mk +4 -0
index a2db504..6939389 100644
@@ -43,4 +43,8 @@ else
 LVM2_CONF_OPTS += --disable-applib
 endif
 
+ifeq ($(BR2_arc),y)
+LVM2_CONF_ENV += ac_cv_flag_HAVE_PIE=no
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.4.3
#1 lore raw

PATCH 1/1 lvm2: 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 first fixes http://autobuild.buildroot.net/results/988/9888a7a30538c9851f4910c16674d8dbb8edeb8f/
and also prevents execution of non-supported PIE binary in runtime.

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