source: scripts/patches/gcc-3.4.0-arm-bigendian.patch@ 5bd60e2

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 5bd60e2 was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[617118d]1By Lennert Buytenhek <buytenh@wantstofly.org>
2Adds support for arm*b-linux* big-endian ARM targets
3
4See http://gcc.gnu.org/PR16350
5
6diff -urN gcc-3.4.0.orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
7--- gcc-3.4.0.orig/gcc/config/arm/linux-elf.h 2004-01-31 07:18:11.000000000 +0100
8+++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-07-02 14:46:29.225443757 +0200
9@@ -30,17 +30,34 @@
10 /* Do not assume anything about header files. */
11 #define NO_IMPLICIT_EXTERN_C
12
13+/*
14+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
15+ * (big endian) configurations.
16+ */
17+#if TARGET_BIG_ENDIAN_DEFAULT
18+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
19+#define TARGET_ENDIAN_OPTION "mbig-endian"
20+#define TARGET_LINKER_EMULATION "armelfb_linux"
21+#else
22+#define TARGET_ENDIAN_DEFAULT 0
23+#define TARGET_ENDIAN_OPTION "mlittle-endian"
24+#define TARGET_LINKER_EMULATION "armelf_linux"
25+#endif
26+
27 /* Default is to use APCS-32 mode. */
28 #undef TARGET_DEFAULT
29-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
30+#define TARGET_DEFAULT \
31+ ( ARM_FLAG_APCS_32 | \
32+ ARM_FLAG_MMU_TRAPS | \
33+ TARGET_ENDIAN_DEFAULT )
34
35 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
36
37-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
38+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
39
40 #undef MULTILIB_DEFAULTS
41 #define MULTILIB_DEFAULTS \
42- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
43+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
44
45 #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
46
47@@ -89,7 +106,7 @@
48 %{rdynamic:-export-dynamic} \
49 %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
50 -X \
51- %{mbig-endian:-EB}" \
52+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
53 SUBTARGET_EXTRA_LINK_SPEC
54
55 #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
56diff -urN gcc-3.4.0.orig/gcc/config.gcc gcc-3.4.0/gcc/config.gcc
57--- gcc-3.4.0.orig/gcc/config.gcc 2004-04-17 04:28:24.000000000 +0200
58+++ gcc-3.4.0/gcc/config.gcc 2004-07-02 14:44:40.045822542 +0200
59@@ -666,6 +666,11 @@
60 ;;
61 arm*-*-linux*) # ARM GNU/Linux with ELF
62 tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
63+ case $target in
64+ arm*b-*)
65+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
66+ ;;
67+ esac
68 tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
69 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
70 gnu_ld=yes
Note: See TracBrowser for help on using the repository browser.