python-sip: Compile with -fpic
authorMichael Büsch <mb@bu3sch.de>
Sat, 16 Oct 2010 20:26:35 +0000 (20:26 +0000)
committerMichael Büsch <mb@bu3sch.de>
Sat, 16 Oct 2010 20:26:35 +0000 (20:26 +0000)
SVN-Revision: 23484

lang/python-sip/Makefile
lang/python-sip/files/sipconfig.macros.template

index c80d97e..6f50adf 100644 (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; \
index a4e3262..ae9e1a6 100644 (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