summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/gmp/Makefile1
-rw-r--r--package/ipkg/Makefile1
-rw-r--r--package/iptables/Makefile2
-rw-r--r--package/libnl/Makefile2
-rw-r--r--package/libpcap/Makefile2
-rw-r--r--package/lua/Makefile12
-rw-r--r--package/ncurses/Makefile2
-rw-r--r--package/nvram/Makefile2
-rw-r--r--package/openssl/Makefile2
-rw-r--r--package/opkg/Makefile1
-rw-r--r--package/uci/Makefile1
-rw-r--r--package/zlib/Makefile2
12 files changed, 18 insertions, 12 deletions
diff --git a/package/gmp/Makefile b/package/gmp/Makefile
index 846b997b6..59a826bdb 100644
--- a/package/gmp/Makefile
+++ b/package/gmp/Makefile
@@ -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 \
diff --git a/package/ipkg/Makefile b/package/ipkg/Makefile
index 209069122..d6e2271ce 100644
--- a/package/ipkg/Makefile
+++ b/package/ipkg/Makefile
@@ -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
diff --git a/package/iptables/Makefile b/package/iptables/Makefile
index 5b43dfefb..b6be986a4 100644
--- a/package/iptables/Makefile
+++ b/package/iptables/Makefile
@@ -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) \
diff --git a/package/libnl/Makefile b/package/libnl/Makefile
index 88776a07e..c763526f8 100644
--- a/package/libnl/Makefile
+++ b/package/libnl/Makefile
@@ -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)
diff --git a/package/libpcap/Makefile b/package/libpcap/Makefile
index ed048a4ed..cf0304b4c 100644
--- a/package/libpcap/Makefile
+++ b/package/libpcap/Makefile
@@ -30,6 +30,8 @@ define Package/libpcap/description
packet capture.
endef
+TARGET_CFLAGS += $(FPIC)
+
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
diff --git a/package/lua/Makefile b/package/lua/Makefile
index d29b3235d..189435868 100644
--- a/package/lua/Makefile
+++ b/package/lua/Makefile
@@ -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
diff --git a/package/ncurses/Makefile b/package/ncurses/Makefile
index 51a5a0a1a..a27334b3e 100644
--- a/package/ncurses/Makefile
+++ b/package/ncurses/Makefile
@@ -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)
diff --git a/package/nvram/Makefile b/package/nvram/Makefile
index 7e31bcf8b..ec20de2cb 100644
--- a/package/nvram/Makefile
+++ b/package/nvram/Makefile
@@ -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/
diff --git a/package/openssl/Makefile b/package/openssl/Makefile
index 2937368b1..f19551df3 100644
--- a/package/openssl/Makefile
+++ b/package/openssl/Makefile
@@ -89,6 +89,8 @@ define Build/Configure
)
endef
+TARGET_CFLAGS += $(FPIC)
+
define Build/Compile
rm -rf $(PKG_INSTALL_DIR)
mkdir -p $(PKG_INSTALL_DIR)
diff --git a/package/opkg/Makefile b/package/opkg/Makefile
index 6a275ca81..76729db7b 100644
--- a/package/opkg/Makefile
+++ b/package/opkg/Makefile
@@ -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
diff --git a/package/uci/Makefile b/package/uci/Makefile
index d5e0ecf13..c24ce04ed 100644
--- a/package/uci/Makefile
+++ b/package/uci/Makefile
@@ -47,6 +47,7 @@ endef
define Build/Configure
endef
+TARGET_CFLAGS += $(FPIC)
UCI_MAKEOPTS = \
$(TARGET_CONFIGURE_OPTS) \
COPTS="$(TARGET_CFLAGS)" \
diff --git a/package/zlib/Makefile b/package/zlib/Makefile
index 9cf92197b..9c8058bfa 100644
--- a/package/zlib/Makefile
+++ b/package/zlib/Makefile
@@ -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 \