From: Gabor Juhos Date: Sun, 16 May 2010 06:58:53 +0000 (+0000) Subject: packages/perl: fix target system endianness detection (closes #6900) X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=e99101cf1e7266c4bcfbe8590faff27145526954;p=openwrt%2Fsvn-archive%2Farchive.git packages/perl: fix target system endianness detection (closes #6900) SVN-Revision: 21465 --- diff --git a/lang/perl/Makefile b/lang/perl/Makefile index d3465c5bb9..6195500445 100644 --- a/lang/perl/Makefile +++ b/lang/perl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl PKG_VERSION:=5.10.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_MD5SUM:=d2c39b002ebfd2c3c5dba589365c5a71 PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \ diff --git a/lang/perl/patches/101-fix-cross-compile-endianness-detection.patch b/lang/perl/patches/101-fix-cross-compile-endianness-detection.patch new file mode 100644 index 0000000000..8fea9c0fb3 --- /dev/null +++ b/lang/perl/patches/101-fix-cross-compile-endianness-detection.patch @@ -0,0 +1,22 @@ +--- a/config_h.SH ++++ b/config_h.SH +@@ -53,6 +53,19 @@ sed <$CONFIG_H -e 's!^#und + #ifndef _config_h_ + #define _config_h_ + ++#if defined(USE_CROSS_COMPILE) && !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) ++# include ++# if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN) ++# if (__BYTE_ORDER == __LITTLE_ENDIAN) ++# define __LITTLE_ENDIAN__ ++# elif (__BYTE_ORDER == __BIG_ENDIAN) ++# define __BIG_ENDIAN__ ++# else ++# error Unknown endianness ++# endif ++# endif ++#endif ++ + /* LOC_SED: + * This symbol holds the complete pathname to the sed program. + */