diff options
Diffstat (limited to 'Toolchain')
-rw-r--r-- | Toolchain/Patches/binutils.patch | 29 | ||||
-rw-r--r-- | Toolchain/Patches/gcc.patch | 19 |
2 files changed, 38 insertions, 10 deletions
diff --git a/Toolchain/Patches/binutils.patch b/Toolchain/Patches/binutils.patch index 5f0560ab14..eadc7ee056 100644 --- a/Toolchain/Patches/binutils.patch +++ b/Toolchain/Patches/binutils.patch @@ -1,8 +1,8 @@ diff --git a/bfd/config.bfd b/bfd/config.bfd -index 30087e3b..7658cf30 100644 +index 30087e3b..8b192b2e 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd -@@ -223,7 +223,24 @@ esac +@@ -223,7 +223,29 @@ esac case "${targ}" in # START OF targmatch.h @@ -23,6 +23,11 @@ index 30087e3b..7658cf30 100644 + targ_selvecs= + targ64_selvecs= + ;; ++ aarch64-*-serenity*) ++ targ_defvec=aarch64_elf64_le_vec ++ targ_selvecs= ++ want64=true ++ ;; + aarch64-*-darwin*) targ_defvec=aarch64_mach_o_vec @@ -40,15 +45,16 @@ index 7384e919..aa02c3f6 100755 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ diff --git a/gas/configure.tgt b/gas/configure.tgt -index 338892ad..0cac7829 100644 +index 338892ad..3c03ee8b 100644 --- a/gas/configure.tgt +++ b/gas/configure.tgt -@@ -123,6 +123,8 @@ esac +@@ -123,6 +123,9 @@ esac generic_target=${cpu_type}-$vendor-$os # Note: This table is alpha-sorted, please try to keep it that way. case ${generic_target} in + i386-*-serenity*) fmt=elf;; + arm-*-serenity*) fmt=elf;; ++ aarch64-*-serenity*) fmt=elf;; aarch64*-*-elf*) fmt=elf;; aarch64*-*-fuchsia*) fmt=elf;; aarch64*-*-genode*) fmt=elf;; @@ -93,10 +99,10 @@ index ef2e99e0..657d24a2 100644 ei386pep.c \ emmo.c diff --git a/ld/configure.tgt b/ld/configure.tgt -index 6205d7c9..390c10d7 100644 +index 6205d7c9..00d97c37 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt -@@ -43,6 +43,19 @@ targ64_extra_libpath= +@@ -43,6 +43,23 @@ targ64_extra_libpath= # Please try to keep this table more or less in alphabetic order - it # makes it much easier to lookup a specific archictecture. case "${targ}" in @@ -113,6 +119,10 @@ index 6205d7c9..390c10d7 100644 + targ_emul=armelf_serenity + targ_extra_emuls="armelf_serenity armelf" + ;; ++aarch64-*-serenity*) ++ targ_emul=aarch64elf ++ targ_extra_emuls= ++ ;; aarch64_be-*-elf) targ_emul=aarch64elfb targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" ;; @@ -129,6 +139,13 @@ index 00000000..517cd626 + +unset STACK_ADDR +unset EMBEDDED +diff --git a/ld/emulparams/elf_aarch64_serenity.sh b/ld/emulparams/elf_aarch64_serenity.sh +new file mode 100644 +index 00000000..45a05bf4 +--- /dev/null ++++ b/ld/emulparams/elf_aarch64_serenity.sh +@@ -0,0 +1 @@ ++. ${srcdir}/emulparams/elf_aarch64.sh diff --git a/ld/emulparams/elf_i386_serenity.sh b/ld/emulparams/elf_i386_serenity.sh new file mode 100644 index 00000000..342d5298 diff --git a/Toolchain/Patches/gcc.patch b/Toolchain/Patches/gcc.patch index 26c6e088a5..0c65e45a1e 100644 --- a/Toolchain/Patches/gcc.patch +++ b/Toolchain/Patches/gcc.patch @@ -46,7 +46,7 @@ index a75b44ee4..6fab7c3ca 100644 + ; This comment is to ensure we retain the blank line above. diff --git a/gcc/config.gcc b/gcc/config.gcc -index 357b0bed0..c6c23044d 100644 +index 357b0bed0..18d099584 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -686,6 +686,12 @@ x86_cpus="generic intel" @@ -62,7 +62,7 @@ index 357b0bed0..c6c23044d 100644 *-*-darwin*) tmake_file="t-darwin " tm_file="${tm_file} darwin.h" -@@ -1084,6 +1090,15 @@ case ${target} in +@@ -1084,6 +1090,18 @@ case ${target} in esac case ${target} in @@ -75,6 +75,9 @@ index 357b0bed0..c6c23044d 100644 +arm-*-serenity*) + tm_file="dbxelf.h elfos.h arm/elf.h arm/aout.h glibc-stdint.h arm/serenity-elf.h ${tm_file} serenity.h" + ;; ++aarch64-*-serenity*) ++ tm_file="${tm_file} dbxelf.h elfos.h aarch64/aarch64-elf.h glibc-stdint.h serenity.h" ++ ;; aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h" tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-elf-raw.h" @@ -267,10 +270,10 @@ index 9b28369e3..6821ed4ba 100755 if test x$gcc_cv_target_dl_iterate_phdr = xyes; then diff --git a/libgcc/config.host b/libgcc/config.host -index 50f000622..dc20e672a 100644 +index 50f000622..fa30ef089 100644 --- a/libgcc/config.host +++ b/libgcc/config.host -@@ -1504,6 +1504,22 @@ nvptx-*) +@@ -1504,6 +1504,30 @@ nvptx-*) tmake_file="$tmake_file nvptx/t-nvptx" extra_parts="crt0.o" ;; @@ -290,6 +293,14 @@ index 50f000622..dc20e672a 100644 + unwind_header=config/arm/unwind-arm.h + extra_parts="$extra_parts crti.o crtn.o" + ;; ++aarch64-*-serenity*) ++ extra_parts="$extra_parts crti.o crtbegin.o crtend.o crtn.o" ++ extra_parts="$extra_parts crtfastmath.o" ++ tmake_file="$tmake_file ${cpu_type}/t-aarch64" ++ tmake_file="$tmake_file ${cpu_type}/t-lse t-slibgcc-libgcc" ++ tmake_file="$tmake_file ${cpu_type}/t-softfp t-softp t-crtfm" ++ md_unwind_header=aarch64/aarch64-unwind.h ++ ;; *) echo "*** Configuration ${host} not supported" 1>&2 exit 1 |