From bd22afc64c277725e59c1d39c1ca4d34d09bb9bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michael=20B=C3=BCsch?= Date: Sat, 16 Oct 2010 20:26:35 +0000 Subject: [PATCH] python-sip: Compile with -fpic SVN-Revision: 23484 --- lang/python-sip/Makefile | 17 +++++++++++++---- lang/python-sip/files/sipconfig.macros.template | 4 ++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lang/python-sip/Makefile b/lang/python-sip/Makefile index c80d97e44..6f50adfa0 100644 --- a/lang/python-sip/Makefile +++ b/lang/python-sip/Makefile @@ -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; \ diff --git a/lang/python-sip/files/sipconfig.macros.template b/lang/python-sip/files/sipconfig.macros.template index a4e326287..ae9e1a646 100644 --- a/lang/python-sip/files/sipconfig.macros.template +++ b/lang/python-sip/files/sipconfig.macros.template @@ -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 -- 2.30.2