use $(FPIC) in a few places where it matters
authorFelix Fietkau <nbd@openwrt.org>
Wed, 6 Aug 2008 22:10:29 +0000 (22:10 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 6 Aug 2008 22:10:29 +0000 (22:10 +0000)
SVN-Revision: 12225

12 files changed:
package/gmp/Makefile
package/ipkg/Makefile
package/iptables/Makefile
package/libnl/Makefile
package/libpcap/Makefile
package/lua/Makefile
package/ncurses/Makefile
package/nvram/Makefile
package/openssl/Makefile
package/opkg/Makefile
package/uci/Makefile
package/zlib/Makefile

index 846b997b6d7e7a49eedf36f685c346fa323b40c7..59a826bdb0d1abb61392ea6001f00937d0ad077a 100644 (file)
@@ -30,6 +30,7 @@ define Package/libgmp/description
        signed integers, rational numbers, and floating point numbers.
 endef
 
+TARGET_CFLAGS += $(FPIC)
 CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
 CONFIGURE_ARGS += \
        --enable-shared \
index 209069122bbf500d317c834c35d518a453be80e6..d6e2271ceab3e8583de553d8207c1a73906023dd 100644 (file)
@@ -38,6 +38,7 @@ define Package/ipkg/description
  ipkg knows how to install both .ipk and .deb packages.
 endef
 
+TARGET_CFLAGS += $(FPIC)
 CONFIGURE_ARGS += $(DISABLE_LARGEFILE)
 
 define Build/Compile
index 5b43dfefb7cf85e1969deee3a7afd9dc68333877..b6be986a4058b762c1069fa4246dd3d7ab81859d 100644 (file)
@@ -217,6 +217,8 @@ define Build/Configure
                clean
 endef
 
+TARGET_CFLAGS += $(FPIC)
+
 define Build/Compile
        mkdir -p $(PKG_INSTALL_DIR)
        $(MAKE) -C $(PKG_BUILD_DIR) \
index 88776a07e92c57b6812ab910e6af7652e0830674..c763526f8a400f65da9b055526dd149bfc70f8ca 100644 (file)
@@ -29,7 +29,7 @@ define Package/libnl/description
  This package contains a library for applications dealing with netlink sockets
 endef
 
-TARGET_CFLAGS += -ffunction-sections
+TARGET_CFLAGS += -ffunction-sections $(FPIC)
 
 define Build/Compile
        $(call Build/Compile/Default)
index ed048a4ed3d2dcc14f1bf929e2ee77bec5cbf4aa..cf0304b4cf8b20e0ccc40a878faa4915b8a61d7c 100644 (file)
@@ -30,6 +30,8 @@ define Package/libpcap/description
  packet capture.
 endef
 
+TARGET_CFLAGS += $(FPIC)
+
 CONFIGURE_ARGS += \
        --enable-shared \
        --enable-static \
index d29b3235d52153d3fb98a769e024c532ca965987..1894358682823089432dd5a0d5dd82c87e8c8243 100644 (file)
@@ -24,14 +24,6 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
 include $(INCLUDE_DIR)/package.mk
 
-ifeq ($(ARCH),powerpc)
-  FPIC:=-fPIC
-endif
-ifeq ($(ARCH),x86_64)
-  FPIC:=-fPIC
-endif
-
-
 define Package/lua/Default
   SUBMENU:=LUA
   SECTION:=lang
@@ -95,7 +87,7 @@ endef
 define Build/Configure
 endef
 
-TARGET_CFLAGS += -DLUA_USE_LINUX
+TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC)
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
@@ -104,7 +96,7 @@ define Build/Compile
                AR="$(TARGET_CROSS)ar rcu" \
                RANLIB="$(TARGET_CROSS)ranlib" \
                INSTALL_ROOT=/usr \
-               CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(FPIC)" \
+               CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
                MYLDFLAGS="$(TARGET_LDFLAGS)" \
                PKG_VERSION=$(PKG_VERSION) \
                all linux 
index 51a5a0a1abb0cbf83eced11ce5e19b1f2d229313..a27334b3e1ff654959ec75d34888639fe87901ce 100644 (file)
@@ -28,6 +28,8 @@ endef
 define Build/Configure
 endef
 
+TARGET_CFLAGS += $(FPIC)
+
 define Build/Compile
        rm -rf $(PKG_INSTALL_DIR)
        mkdir -p $(PKG_INSTALL_DIR)
index 7e31bcf8bb64b9ff081830664b988468253bc327..ec20de2cb42ffc7d06e0f976b5eb73296d896c40 100644 (file)
@@ -29,6 +29,8 @@ define Build/Prepare
        $(CP) ./src/* $(PKG_BUILD_DIR)
 endef
 
+TARGET_CFLAGS += $(FPIC)
+
 define Build/InstallDev
        mkdir -p $(1)/usr/lib
        $(CP) $(PKG_BUILD_DIR)/libnvram*.so $(1)/usr/lib/
index 2937368b15a6f46c4d6b9fb25f468a2454d52615..f19551df3dfcada90cc9396e1e5ad6e14ef244e0 100644 (file)
@@ -89,6 +89,8 @@ define Build/Configure
        )
 endef
 
+TARGET_CFLAGS += $(FPIC)
+
 define Build/Compile
        rm -rf $(PKG_INSTALL_DIR)
        mkdir -p $(PKG_INSTALL_DIR)
index 6a275ca810bd222e8d87d3413e40fc102ae80631..76729db7b1271c447bb27d0da1870edb73c2af0b 100644 (file)
@@ -36,6 +36,7 @@ define Package/opkg/description
   opkg knows how to install both .ipk and .deb packages.
 endef
 
+TARGET_CFLAGS += $(FPIC)
 EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/lib
 EXTRA_LDFLAGS+=-L$(STAGING_DIR)/usr/lib -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
 
index d5e0ecf13dbb6c64b3c274d3161f4862b93afa4b..c24ce04ed7f47c79383fb2e69fd6a13087d0b327 100644 (file)
@@ -47,6 +47,7 @@ endef
 define Build/Configure
 endef
 
+TARGET_CFLAGS += $(FPIC)
 UCI_MAKEOPTS = \
                $(TARGET_CONFIGURE_OPTS) \
                COPTS="$(TARGET_CFLAGS)" \
index 9cf92197b7b8c5099e009ebfd3f3267ebf8b80da..9c8058bfa5e93fab2b4780e9e5277fc83e69a47e 100644 (file)
@@ -29,7 +29,7 @@ define Build/Configure
        (cd $(PKG_BUILD_DIR); \
                $(TARGET_CONFIGURE_OPTS) \
                LDSHARED="$(TARGET_CC) -shared -Wl,-soname,libz.so.1" \
-               CFLAGS="$(TARGET_CFLAGS) -fPIC $(CFLAGS_LARGEFILE)" \
+               CFLAGS="$(TARGET_CFLAGS) $(FPIC) $(CFLAGS_LARGEFILE)" \
                UNAME_S="Linux" \
                ./configure \
                        --prefix=/usr \