python-sip: Compile with -fpic

git-svn-id: svn://svn.openwrt.org/openwrt/packages@23484 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
mb 2010-10-16 20:26:35 +00:00
parent 78c3db7f28
commit 9669b4762e
2 changed files with 15 additions and 6 deletions

View File

@ -34,6 +34,12 @@ define Package/python-sip
URL:=http://www.riverbankcomputing.co.uk/software/sip/download
endef
# ===> TARGET <===
EXTRA_CFLAGS:=\
$(FPIC)
define Build/Configure
$(INSTALL_DIR) "$(PYTHON_SIP_CONFIG_TEMPLATE_DIR)"; \
$(CP) ./files/sipconfig.macros.template "$(PYTHON_SIP_CONFIG_TEMPLATE)"; \
@ -62,8 +68,8 @@ define Build/Compile
CC="$(TARGET_CROSS)gcc" \
CXX="$(TARGET_CROSS)g++" \
LINK="$(TARGET_CROSS)g++" \
CFLAGS="$(TARGET_CFLAGS)" \
CXXFLAGS="$(TARGET_CFLAGS)"
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)"
endef
define Build/InstallDev
@ -76,8 +82,8 @@ define Build/Install
CC="$(TARGET_CROSS)gcc" \
CXX="$(TARGET_CROSS)g++" \
LINK="$(TARGET_CROSS)g++" \
CFLAGS="$(TARGET_CFLAGS)" \
CXXFLAGS="$(TARGET_CFLAGS)" \
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
DESTDIR="" \
install
endef
@ -88,6 +94,9 @@ define Package/python-sip/install
$(CP) $(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)/* $(1)/$(PYTHON_PKG_DIR)
endef
# ===> HOST <===
define Host/Configure
( cd "$(HOST_BUILD_DIR)"; \
export PYTHONDONTWRITEBYTECODE=1; \

View File

@ -13,7 +13,7 @@ CFLAGS_MT_DLLDBG
CFLAGS_RELEASE
CFLAGS_RTTI_OFF
CFLAGS_RTTI_ON
CFLAGS_SHLIB -fPIC
CFLAGS_SHLIB
CFLAGS_STL_OFF
CFLAGS_STL_ON
CFLAGS_THREAD -D_REENTRANT
@ -35,7 +35,7 @@ CXXFLAGS_MT_DLLDBG
CXXFLAGS_RELEASE
CXXFLAGS_RTTI_OFF
CXXFLAGS_RTTI_ON
CXXFLAGS_SHLIB -fPIC
CXXFLAGS_SHLIB
CXXFLAGS_STL_OFF
CXXFLAGS_STL_ON
CXXFLAGS_THREAD -D_REENTRANT