From: Peter Korsgaard Date: Fri, 3 May 2013 11:10:23 +0000 (+0200) Subject: libjson: ensure shared lib is built with -fPIC X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=80e7419680d5eb57da0b0b34248e49dcd81619a8;p=buildroot.git libjson: ensure shared lib is built with -fPIC Fixes http://autobuild.buildroot.net/results/72e6c260c9028dd636965b8bf76bb7ba216aa1a4/build-end.log Signed-off-by: Peter Korsgaard --- diff --git a/package/libjson/libjson.mk b/package/libjson/libjson.mk index deca0f845d..9b1aca3bf7 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)