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 6c3aabe..cf793ee 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 9600b0a..7b14548 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 8e0b994..e960aba 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