Skip to contentSkip to conversation

Disabling trousers package for ARC

PATCH New Lada Trimasova 2 participants 4 messages Jan 14, 2016

lore
Share & tools
lore
#0 lore raw

cover Disabling trousers package for ARC

This patch series disables trousers package and TPM tools package for ARC. Because ARC gcc doesn't really support PIE option for user-space applications. and trousers configure scripts don't provide any options which can disable pie usage.

Lada Trimasova (2):
Disabling trousers package for ARC
Disabling TPM TOOLS for ARC

 package/tpm-tools/Config.in | 1 +
 package/trousers/Config.in  | 1 +
 2 files changed, 2 insertions(+)
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/2 Disabling trousers package for 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. Trousers configure scripts don't provide any options which can disable pie usage. So there is no easy way to prevent linking with -pie on ARC. The easiest solution is just to make the trousers package not available on ARC.

Cc Alexey Brodkin <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/trousers/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/trousers/Config.in +1 -0
index 6ab74bf..837c69f 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_TROUSERS
 	bool "trousers"
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
+	depends on !BR2_arc # requires pie
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	# doesn't build properly in static only configurations
 	depends on !BR2_STATIC_LIBS
Signature · 1 line
2.5.0
#2 lore raw

PATCH 1/2 Disabling trousers package for arc

Lada,

Quoted 11 lines · Lada Trimasova

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. Trousers configure scripts don't provide any options which can disable pie usage. So there is no easy way to prevent linking with -pie on ARC. The easiest solution is just to make the trousers package not available on ARC.

Cc Alexey Brodkin <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>

Rather than doing this, what about adding an option to make the pie usage optional? You can take some inspiration from
http://www.spinics.net/lists/linux-cifs/msg06418.html for example.

Best regards,

Thomas

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

PATCH 2/2 Disabling TPM tools for ARC

In reply to Lada Trimasova

TPM tools selects trousers package which is not available for ARC. So this package should be disabled for ARC too.

Cc Alexey Brodkin <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/tpm-tools/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/tpm-tools/Config.in +1 -0
index dd59aaa..77e43fd 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_TPM_TOOLS
 	select BR2_PACKAGE_TROUSERS
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	depends on !BR2_arc # trousers
 	depends on BR2_TOOLCHAIN_HAS_THREADS # trousers
 	depends on !BR2_STATIC_LIBS # trousers
 	help
Signature · 1 line
2.5.0