fix php4 compile on arm, add fpic while we're at it
authorFelix Fietkau <nbd@openwrt.org>
Sun, 10 Aug 2008 11:50:14 +0000 (11:50 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 10 Aug 2008 11:50:14 +0000 (11:50 +0000)
SVN-Revision: 12265

lang/php4/Makefile
lang/php4/patches/100-compile_fix.patch [new file with mode: 0644]

index a2a99c8f3a9e3fecd9a9793e35e450fbc3f56655..5c8bab0512c8785871117538661bdf71f4b74a53 100644 (file)
@@ -250,6 +250,8 @@ endif
 define Build/Configure
 endef
 
 define Build/Configure
 endef
 
+TARGET_CFLAGS += $(if $(CONFIG_BIG_ENDIAN),-DIEEE_BIG_ENDIAN,-DIEEE_LITTLE_ENDIAN) $(FPIC)
+
 ifneq ($(CONFIG_PACKAGE_php4-cli),)
   define Build/Compile/php4-cli
        -$(MAKE) -C $(PKG_BUILD_DIR) clean
 ifneq ($(CONFIG_PACKAGE_php4-cli),)
   define Build/Compile/php4-cli
        -$(MAKE) -C $(PKG_BUILD_DIR) clean
diff --git a/lang/php4/patches/100-compile_fix.patch b/lang/php4/patches/100-compile_fix.patch
new file mode 100644 (file)
index 0000000..b62e21f
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/Zend/zend_strtod.c
++++ b/Zend/zend_strtod.c
+@@ -117,6 +117,7 @@
+ # endif
+ #endif
++#if !defined(IEEE_BIG_ENDIAN) && !defined(IEEE_LITTLE_ENDIAN)
+ #ifdef WORDS_BIGENDIAN
+ #define IEEE_BIG_ENDIAN
+ #else
+@@ -141,6 +142,7 @@
+ #define uint32_t unsigned __int32
+ #define IEEE_LITTLE_ENDIAN
+ #endif
++#endif /* !defined(IEEE_BIG_ENDIAN) && !defined(IEEE_LITTLE_ENDIAN) */
+ #define Long  int32_t
+ #define ULong uint32_t