[Buildroot] [git commit] setools: fix build on SPARC64

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Mar 26 17:49:41 UTC 2016


commit: https://git.buildroot.net/buildroot/commit/?id=8a2e75633f136f021692354434ac0b2d9a81e38c
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

To build shared libraries on SPARC64, -fPIC must be used instead of
just -fpic. This commit fixes the setools package, which allows to get
rid of the following autobuilder failure:

  http://autobuild.buildroot.net/results/ba1e473178bb66ebc43897b20e534606d2577ee3/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
---
 package/setools/setools.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/setools/setools.mk b/package/setools/setools.mk
index deb421f..87a19cf 100644
--- a/package/setools/setools.mk
+++ b/package/setools/setools.mk
@@ -31,6 +31,10 @@ SETOOLS_CONF_OPTS = \
 	--with-sepol-devel="$(STAGING_DIR)/usr" \
 	--with-selinux-devel="$(STAGING_DIR)/usr"
 
+ifeq ($(BR2_sparc64):$(BR2_STATIC_LIBS),y:)
+SETOOLS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -fPIC"
+endif
+
 HOST_SETOOLS_DEPENDENCIES = host-libselinux host-libsepol host-sqlite \
 	host-libxml2 host-bzip2 host-bison
 


More information about the buildroot mailing list