Toolchain: Update the binutils patch file to match the port

Previously the toolchain's binutils would not have been able to
build binaries on 32-bit host systems (not that this would be
much of an issue nowadays) because one of the #ifdefs was in
the wrong place.

I moved the #ifdef in the port's patch and this now updates
the toolchain's patch file to match the port's patch.
This commit is contained in:
Gunnar Beutner 2021-04-27 20:32:13 +02:00 committed by Andreas Kling
parent 797cb8858a
commit 19064eaaca

View file

@ -1,24 +1,21 @@
diff --git a/bfd/config.bfd b/bfd/config.bfd diff -Naur binutils-2.36.1/bfd/config.bfd binutils-2.36.1.serenity/bfd/config.bfd
index e7b55b0d..27c54fa4 100644 --- binutils-2.36.1/bfd/config.bfd 2021-01-09 11:47:33.000000000 +0100
--- a/bfd/config.bfd +++ binutils-2.36.1.serenity/bfd/config.bfd 2021-04-27 20:27:28.646876773 +0200
+++ b/bfd/config.bfd @@ -224,7 +224,24 @@
@@ -225,6 +225,26 @@ esac
case "${targ}" in case "${targ}" in
# START OF targmatch.h # START OF targmatch.h
#ifdef BFD64
+ +
+ i[3-7]86-*-serenity*) + i[3-7]86-*-serenity*)
+ targ_defvec=i386_elf32_vec + targ_defvec=i386_elf32_vec
+ targ_selvecs= + targ_selvecs=
+ targ64_selvecs=x86_64_elf64_vec
+ ;; + ;;
+#ifdef BFD64 #ifdef BFD64
+ x86_64-*-serenity*) + x86_64-*-serenity*)
+ targ_defvec=x86_64_elf64_vec + targ_defvec=x86_64_elf64_vec
+ targ_selvecs=i386_elf32_vec + targ_selvecs=i386_elf32_vec
+ want64=true + want64=true
+ ;; + ;;
+#endif
+ +
+ arm-*-serenity*) + arm-*-serenity*)
+ targ_defvec=arm_elf32_le_vec + targ_defvec=arm_elf32_le_vec
@ -29,11 +26,10 @@ index e7b55b0d..27c54fa4 100644
aarch64-*-darwin*) aarch64-*-darwin*)
targ_defvec=aarch64_mach_o_vec targ_defvec=aarch64_mach_o_vec
targ_selvecs="arm_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec" targ_selvecs="arm_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
diff --git a/config.sub b/config.sub diff -Naur binutils-2.36.1/config.sub binutils-2.36.1.serenity/config.sub
index b0f84923..41eb9993 100755 --- binutils-2.36.1/config.sub 2021-01-09 11:47:33.000000000 +0100
--- a/config.sub +++ binutils-2.36.1.serenity/config.sub 2021-04-27 20:23:15.975422803 +0200
+++ b/config.sub @@ -1693,6 +1693,7 @@
@@ -1693,6 +1693,7 @@ case $os in
# The portable systems comes first. # The portable systems comes first.
# Each alternative MUST end in a * to match a version number. # Each alternative MUST end in a * to match a version number.
gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
@ -41,11 +37,10 @@ index b0f84923..41eb9993 100755
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
diff --git a/gas/configure.tgt b/gas/configure.tgt diff -Naur binutils-2.36.1/gas/configure.tgt binutils-2.36.1.serenity/gas/configure.tgt
index 6f46e0a6..a563a572 100644 --- binutils-2.36.1/gas/configure.tgt 2021-01-09 11:47:33.000000000 +0100
--- a/gas/configure.tgt +++ binutils-2.36.1.serenity/gas/configure.tgt 2021-04-27 20:23:15.975422803 +0200
+++ b/gas/configure.tgt @@ -123,6 +123,8 @@
@@ -123,6 +123,8 @@ esac
generic_target=${cpu_type}-$vendor-$os generic_target=${cpu_type}-$vendor-$os
# Note: This table is alpha-sorted, please try to keep it that way. # Note: This table is alpha-sorted, please try to keep it that way.
case ${generic_target} in case ${generic_target} in
@ -54,51 +49,10 @@ index 6f46e0a6..a563a572 100644
aarch64*-*-elf*) fmt=elf;; aarch64*-*-elf*) fmt=elf;;
aarch64*-*-fuchsia*) fmt=elf;; aarch64*-*-fuchsia*) fmt=elf;;
aarch64*-*-linux*) fmt=elf em=linux aarch64*-*-linux*) fmt=elf em=linux
diff --git a/ld/Makefile.am b/ld/Makefile.am diff -Naur binutils-2.36.1/ld/configure.tgt binutils-2.36.1.serenity/ld/configure.tgt
index 2c9a4873..1e1c97c2 100644 --- binutils-2.36.1/ld/configure.tgt 2021-01-09 11:47:34.000000000 +0100
--- a/ld/Makefile.am +++ binutils-2.36.1.serenity/ld/configure.tgt 2021-04-27 20:23:15.975422803 +0200
+++ b/ld/Makefile.am @@ -43,6 +43,19 @@
@@ -174,6 +174,7 @@ ALL_EMULATION_SOURCES = \
earmelf_nbsd.c \
earmelf_phoenix.c \
earmelf_vxworks.c \
+ earmelf_serenity.c \
earmelfb.c \
earmelfb_fbsd.c \
earmelfb_fuchsia.c \
diff --git a/ld/Makefile.in b/ld/Makefile.in
index b41941c8..a5be52e8 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -663,6 +663,7 @@ ALL_EMULATION_SOURCES = \
earmelf_nbsd.c \
earmelf_phoenix.c \
earmelf_vxworks.c \
+ earmelf_serenity.c \
earmelfb.c \
earmelfb_fbsd.c \
earmelfb_fuchsia.c \
@@ -780,6 +781,7 @@ ALL_EMULATION_SOURCES = \
eelf_i386_vxworks.c \
eelf_iamcu.c \
eelf_s390.c \
+ eelf_i386_serenity.c \
eh8300elf.c \
eh8300elf_linux.c \
eh8300helf.c \
@@ -945,6 +947,7 @@ ALL_64_EMULATION_SOURCES = \
eelf_x86_64_cloudabi.c \
eelf_x86_64_fbsd.c \
eelf_x86_64_sol2.c \
+ eelf_x86_64_serenity.c \
ehppa64linux.c \
ei386pep.c \
emmo.c
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 0c780b24..d7c187e1 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -43,6 +43,19 @@ targ64_extra_libpath=
# Please try to keep this table more or less in alphabetic order - it # Please try to keep this table more or less in alphabetic order - it
# makes it much easier to lookup a specific archictecture. # makes it much easier to lookup a specific archictecture.
case "${targ}" in case "${targ}" in
@ -118,11 +72,9 @@ index 0c780b24..d7c187e1 100644
aarch64_be-*-elf) targ_emul=aarch64elfb aarch64_be-*-elf) targ_emul=aarch64elfb
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf"
;; ;;
diff --git a/ld/emulparams/armelf_serenity.sh b/ld/emulparams/armelf_serenity.sh diff -Naur binutils-2.36.1/ld/emulparams/armelf_serenity.sh binutils-2.36.1.serenity/ld/emulparams/armelf_serenity.sh
new file mode 100644 --- binutils-2.36.1/ld/emulparams/armelf_serenity.sh 1970-01-01 01:00:00.000000000 +0100
index 00000000..517cd626 +++ binutils-2.36.1.serenity/ld/emulparams/armelf_serenity.sh 2021-04-27 20:23:15.975422803 +0200
--- /dev/null
+++ b/ld/emulparams/armelf_serenity.sh
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
+. ${srcdir}/emulparams/armelf.sh +. ${srcdir}/emulparams/armelf.sh
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
@ -131,19 +83,53 @@ index 00000000..517cd626
+ +
+unset STACK_ADDR +unset STACK_ADDR
+unset EMBEDDED +unset EMBEDDED
diff --git a/ld/emulparams/elf_i386_serenity.sh b/ld/emulparams/elf_i386_serenity.sh diff -Naur binutils-2.36.1/ld/emulparams/elf_i386_serenity.sh binutils-2.36.1.serenity/ld/emulparams/elf_i386_serenity.sh
new file mode 100644 --- binutils-2.36.1/ld/emulparams/elf_i386_serenity.sh 1970-01-01 01:00:00.000000000 +0100
index 00000000..342d5298 +++ binutils-2.36.1.serenity/ld/emulparams/elf_i386_serenity.sh 2021-04-27 20:23:15.975422803 +0200
--- /dev/null
+++ b/ld/emulparams/elf_i386_serenity.sh
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
+. ${srcdir}/emulparams/elf_i386.sh +. ${srcdir}/emulparams/elf_i386.sh
+GENERATE_SHLIB_SCRIPT=yes +GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes
diff --git a/ld/emulparams/elf_x86_64_serenity.sh b/ld/emulparams/elf_x86_64_serenity.sh diff -Naur binutils-2.36.1/ld/emulparams/elf_x86_64_serenity.sh binutils-2.36.1.serenity/ld/emulparams/elf_x86_64_serenity.sh
new file mode 100644 --- binutils-2.36.1/ld/emulparams/elf_x86_64_serenity.sh 1970-01-01 01:00:00.000000000 +0100
index 00000000..a2af90a6 +++ binutils-2.36.1.serenity/ld/emulparams/elf_x86_64_serenity.sh 2021-04-27 20:23:15.975422803 +0200
--- /dev/null
+++ b/ld/emulparams/elf_x86_64_serenity.sh
@@ -0,0 +1 @@ @@ -0,0 +1 @@
+. ${srcdir}/emulparams/elf_x86_64.sh +. ${srcdir}/emulparams/elf_x86_64.sh
diff -Naur binutils-2.36.1/ld/Makefile.am binutils-2.36.1.serenity/ld/Makefile.am
--- binutils-2.36.1/ld/Makefile.am 2021-01-09 11:47:34.000000000 +0100
+++ binutils-2.36.1.serenity/ld/Makefile.am 2021-04-27 20:23:15.975422803 +0200
@@ -174,6 +174,7 @@
earmelf_nbsd.c \
earmelf_phoenix.c \
earmelf_vxworks.c \
+ earmelf_serenity.c \
earmelfb.c \
earmelfb_fbsd.c \
earmelfb_fuchsia.c \
diff -Naur binutils-2.36.1/ld/Makefile.in binutils-2.36.1.serenity/ld/Makefile.in
--- binutils-2.36.1/ld/Makefile.in 2021-02-06 10:03:32.000000000 +0100
+++ binutils-2.36.1.serenity/ld/Makefile.in 2021-04-27 20:23:15.975422803 +0200
@@ -663,6 +663,7 @@
earmelf_nbsd.c \
earmelf_phoenix.c \
earmelf_vxworks.c \
+ earmelf_serenity.c \
earmelfb.c \
earmelfb_fbsd.c \
earmelfb_fuchsia.c \
@@ -780,6 +781,7 @@
eelf_i386_vxworks.c \
eelf_iamcu.c \
eelf_s390.c \
+ eelf_i386_serenity.c \
eh8300elf.c \
eh8300elf_linux.c \
eh8300helf.c \
@@ -945,6 +947,7 @@
eelf_x86_64_cloudabi.c \
eelf_x86_64_fbsd.c \
eelf_x86_64_sol2.c \
+ eelf_x86_64_serenity.c \
ehppa64linux.c \
ei386pep.c \
emmo.c