setools: fix build on SPARC64
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 26 Mar 2016 17:49:41 +0000 (18:49 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 26 Mar 2016 17:49:41 +0000 (18:49 +0100)
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@free-electrons.com>
package/setools/setools.mk

index deb421fe6555ce7f3fd47f31d01a51c1b9bce7f7..87a19cf5ae79e2af6f6d8630dd6b5c11883e90cd 100644 (file)
@@ -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