From b97a563121ed98b6f96f45d3cb06d9dd2fdee7fb Mon Sep 17 00:00:00 2001 From: juhosg Date: Sun, 16 May 2010 06:58:53 +0000 Subject: [PATCH] packages/perl: fix target system endianness detection (closes #6900) git-svn-id: svn://svn.openwrt.org/openwrt/packages@21465 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- lang/perl/Makefile | 2 +- ...x-cross-compile-endianness-detection.patch | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 lang/perl/patches/101-fix-cross-compile-endianness-detection.patch diff --git a/lang/perl/Makefile b/lang/perl/Makefile index d3465c5bb..619550044 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 000000000..8fea9c0fb --- /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. + */