diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2022-02-10 20:43:03 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-11 18:07:53 +0100 |
commit | 7ab6816b4916adb68faa4a2ae256d5d7328071ff (patch) | |
tree | 822766b987ff09fc1ade239f8b244afda9dcb460 | |
parent | 85780fafcd6a160595da0715394ea110f7291f4d (diff) | |
download | serenity-7ab6816b4916adb68faa4a2ae256d5d7328071ff.zip |
Ports: Update binutils to version 2.38
-rwxr-xr-x | Meta/lint-ports.py | 1 | ||||
-rw-r--r-- | Ports/AvailablePorts.md | 2 | ||||
-rwxr-xr-x | Ports/binutils/package.sh | 4 | ||||
-rw-r--r-- | Ports/binutils/patches/ReadMe.md | 9 | ||||
l---------[-rw-r--r--] | Ports/binutils/patches/binutils.patch | 141 |
5 files changed, 13 insertions, 144 deletions
diff --git a/Meta/lint-ports.py b/Meta/lint-ports.py index f9fac2664d..979da6cee5 100755 --- a/Meta/lint-ports.py +++ b/Meta/lint-ports.py @@ -32,7 +32,6 @@ IGNORE_FILES = { PORT_NAME_REGEX = re.compile(r'([ .()[\]{}\w-]+)\.patch') PORTS_MISSING_DESCRIPTIONS = { 'Another-World', - 'binutils', 'chester', 'cmatrix', 'c-ray', diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 74fb16bf12..1acd7203d0 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -9,7 +9,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^ | [`bash`](bash/) | GNU Bash | 5.1.16 | https://www.gnu.org/software/bash/ | | [`bass`](bass/) | Beneath a Steel Sky | cd-1.2 | https://www.scummvm.org/games | | [`bc`](bc/) | bc | 5.1.1 | https://github.com/gavinhoward/bc | -| [`binutils`](binutils/) | GNU Binutils | 2.37 | https://www.gnu.org/software/binutils/ | +| [`binutils`](binutils/) | GNU Binutils | 2.38 | https://www.gnu.org/software/binutils/ | | [`bison`](bison/) | GNU Bison | 1.25 | https://www.gnu.org/software/bison/ | | [`brogue`](brogue/) | BrogueCE | 1.9.3 | https://github.com/tmewett/BrogueCE | | [`byacc`](byacc/) | Berkeley Yacc | 20210808 | https://invisible-island.net/byacc/byacc.html | diff --git a/Ports/binutils/package.sh b/Ports/binutils/package.sh index cdedfece4e..04435f69ce 100755 --- a/Ports/binutils/package.sh +++ b/Ports/binutils/package.sh @@ -1,10 +1,10 @@ #!/usr/bin/env -S bash ../.port_include.sh port=binutils -version=2.37 +version=2.38 useconfigure=true use_fresh_config_sub=true configopts=("--target=${SERENITY_ARCH}-pc-serenity" "--with-sysroot=/" "--with-build-sysroot=${SERENITY_INSTALL_ROOT}" "--disable-werror" "--disable-gdb" "--disable-nls") -files="https://ftpmirror.gnu.org/gnu/binutils/binutils-${version}.tar.xz binutils-${version}.tar.xz 820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c" +files="https://ftpmirror.gnu.org/gnu/binutils/binutils-${version}.tar.xz binutils-${version}.tar.xz e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024" auth_type="sha256" auth_opts=("--keyring" "./gnu-keyring.gpg" "binutils-${version}.tar.xz.sig") export ac_cv_func_getrusage=no diff --git a/Ports/binutils/patches/ReadMe.md b/Ports/binutils/patches/ReadMe.md new file mode 100644 index 0000000000..46dc4ec81a --- /dev/null +++ b/Ports/binutils/patches/ReadMe.md @@ -0,0 +1,9 @@ +# Patches for Binutils on SerenityOS + +## `binutils.patch` + +Teaches the assembler, BFD, and the linker about the SerenityOS target triple. + +On x86_64, we override the default base address of non-PIE executables, because +the default (0x400000) is too close to the beginning of the address space, and +DynamicLoader often ends up allocating internal data at that address. diff --git a/Ports/binutils/patches/binutils.patch b/Ports/binutils/patches/binutils.patch index f91ee04915..fbb1ca3b40 100644..120000 --- a/Ports/binutils/patches/binutils.patch +++ b/Ports/binutils/patches/binutils.patch @@ -1,140 +1 @@ -diff -Naur binutils-2.37/bfd/config.bfd binutils-2.37.serenity/bfd/config.bfd ---- binutils-2.37/bfd/config.bfd 2021-07-08 13:37:19.000000000 +0200 -+++ binutils-2.37.serenity/bfd/config.bfd 2021-07-28 18:03:58.972705458 +0200 -@@ -223,7 +223,24 @@ - - case "${targ}" in - # START OF targmatch.h -+ -+ i[3-7]86-*-serenity*) -+ targ_defvec=i386_elf32_vec -+ targ_selvecs= -+ ;; - #ifdef BFD64 -+ x86_64-*-serenity*) -+ targ_defvec=x86_64_elf64_vec -+ targ_selvecs=i386_elf32_vec -+ want64=true -+ ;; -+ -+ arm-*-serenity*) -+ targ_defvec=arm_elf32_le_vec -+ targ_selvecs= -+ targ64_selvecs= -+ ;; -+ - aarch64-*-darwin*) - targ_defvec=aarch64_mach_o_vec - targ_selvecs="arm_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec" -diff -Naur binutils-2.37/gas/configure.tgt binutils-2.37.serenity/gas/configure.tgt ---- binutils-2.37/gas/configure.tgt 2021-07-08 13:37:19.000000000 +0200 -+++ binutils-2.37.serenity/gas/configure.tgt 2021-07-28 18:03:58.972705458 +0200 -@@ -123,6 +123,8 @@ - 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*-*-elf*) fmt=elf;; - aarch64*-*-fuchsia*) fmt=elf;; - aarch64*-*-genode*) fmt=elf;; -diff -Naur binutils-2.37/ld/configure.tgt binutils-2.37.serenity/ld/configure.tgt ---- binutils-2.37/ld/configure.tgt 2021-07-08 13:37:20.000000000 +0200 -+++ binutils-2.37.serenity/ld/configure.tgt 2021-07-28 18:03:58.972705458 +0200 -@@ -43,6 +43,19 @@ - # 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 -+i[3-7]86-*-serenity*) -+ targ_emul=elf_i386_serenity -+ targ_extra_emuls=elf_i386 -+ targ64_extra_emuls="elf_x86_64_serenity elf_x86_64" -+ ;; -+x86_64-*-serenity*) -+ targ_emul=elf_x86_64_serenity -+ targ_extra_emuls="elf_i386_serenity elf_x86_64 elf_i386" -+ ;; -+arm-*-serenity*) -+ targ_emul=armelf_serenity -+ targ_extra_emuls="armelf_serenity armelf" -+ ;; - aarch64_be-*-elf) targ_emul=aarch64elfb - targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" - ;; -diff -Naur binutils-2.37/ld/emulparams/armelf_serenity.sh binutils-2.37.serenity/ld/emulparams/armelf_serenity.sh ---- binutils-2.37/ld/emulparams/armelf_serenity.sh 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.37.serenity/ld/emulparams/armelf_serenity.sh 2021-07-28 18:03:58.972705458 +0200 -@@ -0,0 +1,7 @@ -+. ${srcdir}/emulparams/armelf.sh -+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" -+TEXT_START_ADDR=0x00008000 -+TARGET2_TYPE=got-rel -+ -+unset STACK_ADDR -+unset EMBEDDED -diff -Naur binutils-2.37/ld/emulparams/elf_i386_serenity.sh binutils-2.37.serenity/ld/emulparams/elf_i386_serenity.sh ---- binutils-2.37/ld/emulparams/elf_i386_serenity.sh 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.37.serenity/ld/emulparams/elf_i386_serenity.sh 2021-07-28 18:03:58.972705458 +0200 -@@ -0,0 +1,3 @@ -+. ${srcdir}/emulparams/elf_i386.sh -+GENERATE_SHLIB_SCRIPT=yes -+GENERATE_PIE_SCRIPT=yes -diff -Naur binutils-2.37/ld/emulparams/elf_x86_64_serenity.sh binutils-2.37.serenity/ld/emulparams/elf_x86_64_serenity.sh ---- binutils-2.37/ld/emulparams/elf_x86_64_serenity.sh 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.37.serenity/ld/emulparams/elf_x86_64_serenity.sh 2021-07-28 18:03:58.972705458 +0200 -@@ -0,0 +1 @@ -+. ${srcdir}/emulparams/elf_x86_64.sh -diff -Naur binutils-2.37/ld/Makefile.am binutils-2.37.serenity/ld/Makefile.am ---- binutils-2.37/ld/Makefile.am 2021-07-08 13:37:20.000000000 +0200 -+++ binutils-2.37.serenity/ld/Makefile.am 2021-07-28 18:03:58.972705458 +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.37/ld/Makefile.in binutils-2.37.serenity/ld/Makefile.in ---- binutils-2.37/ld/Makefile.in 2021-07-18 18:38:34.000000000 +0200 -+++ binutils-2.37.serenity/ld/Makefile.in 2021-07-28 18:03:58.972705458 +0200 -@@ -664,6 +664,7 @@ - earmelf_nbsd.c \ - earmelf_phoenix.c \ - earmelf_vxworks.c \ -+ earmelf_serenity.c \ - earmelfb.c \ - earmelfb_fbsd.c \ - earmelfb_fuchsia.c \ -@@ -774,6 +775,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 -diff -Naur binutils-2.37/libiberty/rust-demangle.c binutils-2.37.serenity/libiberty/rust-demangle.c ---- binutils-2.37/libiberty/rust-demangle.c 2021-07-15 16:19:46.000000000 +0200 -+++ binutils-2.37.serenity/libiberty/rust-demangle.c 2021-07-28 18:14:23.231031885 +0200 -@@ -75,10 +75,10 @@ - int version; - - /* Recursion depth. */ -- uint recursion; -+ unsigned int recursion; - /* Maximum number of times demangle_path may be called recursively. */ - #define RUST_MAX_RECURSION_COUNT 1024 --#define RUST_NO_RECURSION_LIMIT ((uint) -1) -+#define RUST_NO_RECURSION_LIMIT ((unsigned int) -1) - - uint64_t bound_lifetime_depth; - }; +../../../Toolchain/Patches/binutils.patch
\ No newline at end of file |