diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2013-05-03 13:10:23 +0200 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2013-05-03 13:10:23 +0200 |
commit | 80e7419680d5eb57da0b0b34248e49dcd81619a8 (patch) | |
tree | edae295ad23216015ce1decbf97b7a59ce9146c4 /package/libjson | |
parent | 97387cda09e234c6584f7edfd9ae4c504a0304b5 (diff) | |
download | buildroot-novena-80e7419680d5eb57da0b0b34248e49dcd81619a8.tar.gz buildroot-novena-80e7419680d5eb57da0b0b34248e49dcd81619a8.zip |
libjson: ensure shared lib is built with -fPIC
Fixes http://autobuild.buildroot.net/results/72e6c260c9028dd636965b8bf76bb7ba216aa1a4/build-end.log
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/libjson')
-rw-r--r-- | package/libjson/libjson.mk | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/package/libjson/libjson.mk b/package/libjson/libjson.mk index deca0f845..9b1aca3bf 100644 --- a/package/libjson/libjson.mk +++ b/package/libjson/libjson.mk @@ -11,8 +11,16 @@ LIBJSON_INSTALL_STAGING = YES LIBJSON_LICENSE = BSD-2c LIBJSON_LICENSE_FILES = License.txt -LIBJSON_MAKE_OPT = BUILD_TYPE= SHARED=$(if $(BR2_PREFER_STATIC_LIB),0,1) \ - CXXFLAGS="$(TARGET_CXXFLAGS) -DNDEBUG" +LIBJSON_CXXFLAGS = $(TARGET_CFLAGS) -DNDEBUG + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +LIBJSON_MAKE_OPT += SHARED=0 +else +LIBJSON_MAKE_OPT += SHARED=1 +LIBJSON_CXXFLAGS += -fPIC +endif + +LIBJSON_MAKE_OPT += BUILD_TYPE= CXXFLAGS="$(LIBJSON_CXXFLAGS)" define LIBJSON_EXTRACT_CMDS unzip -d $(@D) $(DL_DIR)/$(LIBJSON_SOURCE) |