fPIC fixes for 64-bits targets
authorFlorian Fainelli <florian@openwrt.org>
Tue, 5 Aug 2008 19:06:33 +0000 (19:06 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 5 Aug 2008 19:06:33 +0000 (19:06 +0000)
SVN-Revision: 12151

libs/libnotimpl/Makefile
libs/openh323/Makefile
libs/pwlib/Makefile

index 6c3aabe6d898ffc5394d700535cf89ee5fe82c5a..cf793eefe4ae719fd35debc24ac4add9088e6816 100644 (file)
@@ -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
index 9600b0a78e8d29cc1bbff9c2d2219dfa9c82f9a2..7b14548eb260721051853a530fbb3d6b21f88bca 100644 (file)
@@ -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
index 8e0b99415fc95a86a79ecbce8073892cf5705639..e960aba95c7d7a74c5c3af998da4e190d567f774 100644 (file)
@@ -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