From: Florian Fainelli Date: Tue, 5 Aug 2008 19:06:33 +0000 (+0000) Subject: fPIC fixes for 64-bits targets X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9185436af1d15e5b503eca9a1d461e9d0523a4fd;p=openwrt%2Fsvn-archive%2Fpackages.git fPIC fixes for 64-bits targets SVN-Revision: 12151 --- diff --git a/libs/libnotimpl/Makefile b/libs/libnotimpl/Makefile index 6c3aabe6d..cf793eefe 100644 --- a/libs/libnotimpl/Makefile +++ b/libs/libnotimpl/Makefile @@ -21,8 +21,12 @@ define Package/libnotimpl TITLE:=Implements functions missing from uClibc endef +ifeq ($(ARCH),x86_64) + FPIC:=-fPIC +endif + define cc - $(TARGET_CC) $(TARGET_CFLAGS) -Wall -c src/$(1).c -o $(PKG_BUILD_DIR)/$(1).o + $(TARGET_CC) $(TARGET_CFLAGS) $(FPIC) -Wall -c src/$(1).c -o $(PKG_BUILD_DIR)/$(1).o endef define Build/Prepare diff --git a/libs/openh323/Makefile b/libs/openh323/Makefile index 9600b0a78..7b14548eb 100644 --- a/libs/openh323/Makefile +++ b/libs/openh323/Makefile @@ -27,6 +27,10 @@ define Package/libopenh323 URL:=http://openh323.sourceforge.net/ endef +ifeq ($(ARCH),x86_64) + FPIC:=-fPIC +endif + CONFIGURE_ARGS += \ --enable-minsize \ --enable-audio \ @@ -36,8 +40,8 @@ CONFIGURE_VARS += \ CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti" \ MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS)" \ - CCFLAGS="$(TARGET_CFLAGS)" \ + CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ + CCFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ optnoshared define Build/InstallDev diff --git a/libs/pwlib/Makefile b/libs/pwlib/Makefile index 8e0b99415..e960aba95 100644 --- a/libs/pwlib/Makefile +++ b/libs/pwlib/Makefile @@ -33,6 +33,10 @@ define Package/pwlib/description System. endef +ifeq ($(ARCH),x86_64) + FPIC:=-fPIC +endif + CONFIGURE_ARGS += \ --enable-minsize \ --enable-openh323 \ @@ -78,7 +82,7 @@ CONFIGURE_ARGS += \ --disable-xmlrpc \ CONFIGURE_VARS += \ - CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti" \ + STDCXXFLAGS="$(TARGET_CFLAGS) $(FPIC) -fno-builtin" \ MAKE_FLAGS += optnoshared