[Buildroot] [git commit] 4th: build with -fPIC when shared library build is enabled
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Thu Jul 7 08:03:34 UTC 2016
commit: https://git.buildroot.net/buildroot/commit/?id=3991b22121b7a0f26753ecc2c3ec7877978dd0ec
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Fixes:
http://autobuild.buildroot.net/results/1e288dabbdd0c5131c18e1426ed6ceedce046b9c/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
---
package/4th/4th.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/package/4th/4th.mk b/package/4th/4th.mk
index d920eb0..071c2d4 100644
--- a/package/4th/4th.mk
+++ b/package/4th/4th.mk
@@ -14,16 +14,19 @@
4TH_DEPENDENCIES = host-4th
4TH_INSTALL_STAGING = YES
+4TH_CFLAGS = $(TARGET_CFLAGS) -DUNIX -fsigned-char
+
ifeq ($(BR2_STATIC_LIBS),y)
4TH_MAKE_ENV = STATIC=1
else
4TH_MAKE_ENV = SHARED=1
+4TH_CFLAGS += -fPIC
endif
define 4TH_BUILD_CMDS
$(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources all \
CROSS="$(TARGET_CROSS)" \
- CFLAGS="$(TARGET_CFLAGS) -DUNIX -fsigned-char" \
+ CFLAGS="$(4TH_CFLAGS)" \
FOURTH=$(HOST_DIR)/usr/bin/4th
endef
More information about the buildroot
mailing list