From a7b6e851a98ac94ba654c2372a3b1b1d0775bbde Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 3 May 2007 07:32:10 +0000 Subject: gcc 4.1.2: fix 800-arm-bigendian.patch --- packages/gcc/gcc-4.1.2/800-arm-bigendian.patch | 70 ++++++++++++++++++++++++-- packages/gcc/gcc-cross_4.1.2.bb | 2 +- packages/gcc/gcc_4.1.2.bb | 3 +- 3 files changed, 67 insertions(+), 8 deletions(-) diff --git a/packages/gcc/gcc-4.1.2/800-arm-bigendian.patch b/packages/gcc/gcc-4.1.2/800-arm-bigendian.patch index 1fa5ae1cd2..0a9417419e 100644 --- a/packages/gcc/gcc-4.1.2/800-arm-bigendian.patch +++ b/packages/gcc/gcc-4.1.2/800-arm-bigendian.patch @@ -3,8 +3,10 @@ Adds support for arm*b-linux* big-endian ARM targets See http://gcc.gnu.org/PR16350 ---- gcc-4.1.0/gcc/config/arm/linux-elf.h -+++ gcc-4.1.0/gcc/config/arm/linux-elf.h +Index: gcc-4.1.1/gcc/config/arm/linux-elf.h +=================================================================== +--- gcc-4.1.1.orig/gcc/config/arm/linux-elf.h ++++ gcc-4.1.1/gcc/config/arm/linux-elf.h @@ -28,19 +28,33 @@ #undef TARGET_VERSION #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr); @@ -51,9 +53,11 @@ See http://gcc.gnu.org/PR16350 SUBTARGET_EXTRA_LINK_SPEC #undef LINK_SPEC ---- gcc-4.1.0/gcc/config.gcc -+++ gcc-4.1.0/gcc/config.gcc -@@ -672,6 +672,11 @@ +Index: gcc-4.1.1/gcc/config.gcc +=================================================================== +--- gcc-4.1.1.orig/gcc/config.gcc ++++ gcc-4.1.1/gcc/config.gcc +@@ -672,6 +672,11 @@ arm*-*-netbsd*) ;; arm*-*-linux*) # ARM GNU/Linux with ELF tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" @@ -65,3 +69,59 @@ See http://gcc.gnu.org/PR16350 tmake_file="${tmake_file} t-linux arm/t-arm" case ${target} in arm*-*-linux-gnueabi) +Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h +=================================================================== +--- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h ++++ gcc-4.1.1/gcc/config/arm/linux-eabi.h +@@ -20,6 +20,17 @@ + the Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#undef TARGET_LINKER_EMULATION ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_LINKER_EMULATION "armelfb_linux_eabi" ++#else ++#define TARGET_LINKER_EMULATION "armelf_linux_eabi" ++#endif ++ + /* On EABI GNU/Linux, we want both the BPABI builtins and the + GNU/Linux builtins. */ + #undef TARGET_OS_CPP_BUILTINS +@@ -48,7 +59,7 @@ + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi + + #undef SUBTARGET_EXTRA_LINK_SPEC +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi" ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION + + /* Use ld-linux.so.3 so that it will be possible to run "classic" + GNU/Linux binaries on an EABI system. */ +Index: gcc-4.1.1/gcc/config/arm/bpabi.h +=================================================================== +--- gcc-4.1.1.orig/gcc/config/arm/bpabi.h ++++ gcc-4.1.1/gcc/config/arm/bpabi.h +@@ -33,9 +33,19 @@ + #undef FPUTYPE_DEFAULT + #define FPUTYPE_DEFAULT FPUTYPE_VFP + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END ++#else ++#define TARGET_ENDIAN_DEFAULT 0 ++#endif ++ + /* EABI targets should enable interworking by default. */ + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT MASK_INTERWORK ++#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT) + + /* The ARM BPABI functions return a boolean; they use no special + calling convention. */ diff --git a/packages/gcc/gcc-cross_4.1.2.bb b/packages/gcc/gcc-cross_4.1.2.bb index 657e5afaca..b11259676e 100644 --- a/packages/gcc/gcc-cross_4.1.2.bb +++ b/packages/gcc/gcc-cross_4.1.2.bb @@ -5,7 +5,7 @@ inherit cross FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}" # NOTE: split PR. If the main .oe changes something that affects its *build* # remember to increment this one too. -PR = "r2" +PR = "r3" DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native" PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" diff --git a/packages/gcc/gcc_4.1.2.bb b/packages/gcc/gcc_4.1.2.bb index 2e6036d119..bd205f68eb 100644 --- a/packages/gcc/gcc_4.1.2.bb +++ b/packages/gcc/gcc_4.1.2.bb @@ -1,4 +1,4 @@ -PR = "r1" +PR = "r2" DESCRIPTION = "The GNU cc and gcc C compilers." HOMEPAGE = "http://www.gnu.org/software/gcc/" SECTION = "devel" @@ -20,7 +20,6 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.2/gcc-4.1.2.tar.bz2 \ file://602-sdk-libstdc++-includes.patch;patch=1 \ file://740-sh-pr24836.patch;patch=1 \ file://800-arm-bigendian.patch;patch=1 \ - file://801-arm-bigendian-eabi.patch;patch=1 \ file://arm-nolibfloat.patch;patch=1 \ file://arm-softfloat.patch;patch=1 \ file://gcc41-configure.in.patch;patch=1 \ -- cgit v1.2.3