mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-26 04:35:41 +03:00
Toolchain: Regenerate binutils.patch and gcc.patch
I locally modified Meta/serenity.sh to pass `--dev` to BuildIt.sh in build_toolchain(). Then I ran `Meta/serenity.sh rebuild-toolchain`, cd'd into Toolchain/Tarballs/binutils-2.37, `git add`ed unadded files in `git status`, and then ran `git diff > ../../Patches/binutils.patch`. Then I did the same for Toolchain/Tarballs/gcc-11.2.0 (and was careful not to `git add` serenity-kernel.h, since that's created by Toolchain/BuildIt.sh). No behavior change. This just rewrites the patch like git writes it.
This commit is contained in:
parent
21dafc11d5
commit
61b6f69947
Notes:
sideshowbarker
2024-07-18 05:09:23 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/61b6f69947c Pull-request: https://github.com/SerenityOS/serenity/pull/9652 Reviewed-by: https://github.com/linusg ✅
@ -1,7 +1,8 @@
|
|||||||
diff -Naur binutils-2.37/bfd/config.bfd binutils-2.37.serenity/bfd/config.bfd
|
diff --git a/bfd/config.bfd b/bfd/config.bfd
|
||||||
--- binutils-2.37/bfd/config.bfd 2021-07-08 13:37:19.000000000 +0200
|
index 30087e3b..7658cf30 100644
|
||||||
+++ binutils-2.37.serenity/bfd/config.bfd 2021-07-28 18:03:58.972705458 +0200
|
--- a/bfd/config.bfd
|
||||||
@@ -223,7 +223,24 @@
|
+++ b/bfd/config.bfd
|
||||||
|
@@ -223,7 +223,24 @@ esac
|
||||||
|
|
||||||
case "${targ}" in
|
case "${targ}" in
|
||||||
# START OF targmatch.h
|
# START OF targmatch.h
|
||||||
@ -26,10 +27,11 @@ diff -Naur binutils-2.37/bfd/config.bfd binutils-2.37.serenity/bfd/config.bfd
|
|||||||
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 -Naur binutils-2.37/config.sub binutils-2.37.serenity/config.sub
|
diff --git a/config.sub b/config.sub
|
||||||
--- binutils-2.37/config.sub 2021-07-08 13:37:19.000000000 +0200
|
index 7384e919..aa02c3f6 100755
|
||||||
+++ binutils-2.37.serenity/config.sub 2021-07-28 18:03:58.972705458 +0200
|
--- a/config.sub
|
||||||
@@ -1700,6 +1700,7 @@
|
+++ b/config.sub
|
||||||
|
@@ -1700,6 +1700,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* \
|
||||||
@ -37,10 +39,11 @@ diff -Naur binutils-2.37/config.sub binutils-2.37.serenity/config.sub
|
|||||||
| *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 -Naur binutils-2.37/gas/configure.tgt binutils-2.37.serenity/gas/configure.tgt
|
diff --git a/gas/configure.tgt b/gas/configure.tgt
|
||||||
--- binutils-2.37/gas/configure.tgt 2021-07-08 13:37:19.000000000 +0200
|
index 338892ad..0cac7829 100644
|
||||||
+++ binutils-2.37.serenity/gas/configure.tgt 2021-07-28 18:03:58.972705458 +0200
|
--- a/gas/configure.tgt
|
||||||
@@ -123,6 +123,8 @@
|
+++ b/gas/configure.tgt
|
||||||
|
@@ -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
|
||||||
@ -49,10 +52,51 @@ diff -Naur binutils-2.37/gas/configure.tgt binutils-2.37.serenity/gas/configure.
|
|||||||
aarch64*-*-elf*) fmt=elf;;
|
aarch64*-*-elf*) fmt=elf;;
|
||||||
aarch64*-*-fuchsia*) fmt=elf;;
|
aarch64*-*-fuchsia*) fmt=elf;;
|
||||||
aarch64*-*-genode*) fmt=elf;;
|
aarch64*-*-genode*) fmt=elf;;
|
||||||
diff -Naur binutils-2.37/ld/configure.tgt binutils-2.37.serenity/ld/configure.tgt
|
diff --git a/ld/Makefile.am b/ld/Makefile.am
|
||||||
--- binutils-2.37/ld/configure.tgt 2021-07-08 13:37:20.000000000 +0200
|
index f8e99325..bc55fd2b 100644
|
||||||
+++ binutils-2.37.serenity/ld/configure.tgt 2021-07-28 18:03:58.972705458 +0200
|
--- a/ld/Makefile.am
|
||||||
@@ -43,6 +43,19 @@
|
+++ b/ld/Makefile.am
|
||||||
|
@@ -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 ef2e99e0..657d24a2 100644
|
||||||
|
--- a/ld/Makefile.in
|
||||||
|
+++ b/ld/Makefile.in
|
||||||
|
@@ -664,6 +664,7 @@ ALL_EMULATION_SOURCES = \
|
||||||
|
earmelf_nbsd.c \
|
||||||
|
earmelf_phoenix.c \
|
||||||
|
earmelf_vxworks.c \
|
||||||
|
+ earmelf_serenity.c \
|
||||||
|
earmelfb.c \
|
||||||
|
earmelfb_fbsd.c \
|
||||||
|
earmelfb_fuchsia.c \
|
||||||
|
@@ -774,6 +775,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 6205d7c9..390c10d7 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
|
||||||
@ -72,9 +116,11 @@ diff -Naur binutils-2.37/ld/configure.tgt binutils-2.37.serenity/ld/configure.tg
|
|||||||
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 -Naur binutils-2.37/ld/emulparams/armelf_serenity.sh binutils-2.37.serenity/ld/emulparams/armelf_serenity.sh
|
diff --git a/ld/emulparams/armelf_serenity.sh b/ld/emulparams/armelf_serenity.sh
|
||||||
--- binutils-2.37/ld/emulparams/armelf_serenity.sh 1970-01-01 01:00:00.000000000 +0100
|
new file mode 100644
|
||||||
+++ binutils-2.37.serenity/ld/emulparams/armelf_serenity.sh 2021-07-28 18:03:58.972705458 +0200
|
index 00000000..517cd626
|
||||||
|
--- /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)"
|
||||||
@ -83,60 +129,27 @@ diff -Naur binutils-2.37/ld/emulparams/armelf_serenity.sh binutils-2.37.serenity
|
|||||||
+
|
+
|
||||||
+unset STACK_ADDR
|
+unset STACK_ADDR
|
||||||
+unset EMBEDDED
|
+unset EMBEDDED
|
||||||
diff -Naur binutils-2.37/ld/emulparams/elf_i386_serenity.sh binutils-2.37.serenity/ld/emulparams/elf_i386_serenity.sh
|
diff --git a/ld/emulparams/elf_i386_serenity.sh b/ld/emulparams/elf_i386_serenity.sh
|
||||||
--- binutils-2.37/ld/emulparams/elf_i386_serenity.sh 1970-01-01 01:00:00.000000000 +0100
|
new file mode 100644
|
||||||
+++ binutils-2.37.serenity/ld/emulparams/elf_i386_serenity.sh 2021-07-28 18:03:58.972705458 +0200
|
index 00000000..342d5298
|
||||||
|
--- /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 -Naur binutils-2.37/ld/emulparams/elf_x86_64_serenity.sh binutils-2.37.serenity/ld/emulparams/elf_x86_64_serenity.sh
|
diff --git a/ld/emulparams/elf_x86_64_serenity.sh b/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
|
new file mode 100644
|
||||||
+++ binutils-2.37.serenity/ld/emulparams/elf_x86_64_serenity.sh 2021-07-28 18:03:58.972705458 +0200
|
index 00000000..a2af90a6
|
||||||
|
--- /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.37/ld/Makefile.am binutils-2.37.serenity/ld/Makefile.am
|
diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c
|
||||||
--- binutils-2.37/ld/Makefile.am 2021-07-08 13:37:20.000000000 +0200
|
index df09b7b8..21566f5f 100644
|
||||||
+++ binutils-2.37.serenity/ld/Makefile.am 2021-07-28 18:03:58.972705458 +0200
|
--- a/libiberty/rust-demangle.c
|
||||||
@@ -174,6 +174,7 @@
|
+++ b/libiberty/rust-demangle.c
|
||||||
earmelf_nbsd.c \
|
@@ -75,10 +75,10 @@ struct rust_demangler
|
||||||
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;
|
int version;
|
||||||
|
|
||||||
/* Recursion depth. */
|
/* Recursion depth. */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
diff -Naur gcc-11.2.0/config.sub gcc-11.2.0.serenity/config.sub
|
diff --git a/config.sub b/config.sub
|
||||||
--- gcc-11.2.0/config.sub 2021-07-28 08:55:06.620278039 +0200
|
index 63c1f1c8b..a82d7fd08 100755
|
||||||
+++ gcc-11.2.0.serenity/config.sub 2021-07-28 18:28:53.251904345 +0200
|
--- a/config.sub
|
||||||
|
+++ b/config.sub
|
||||||
@@ -2,7 +2,7 @@
|
@@ -2,7 +2,7 @@
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright 1992-2021 Free Software Foundation, Inc.
|
# Copyright 1992-2021 Free Software Foundation, Inc.
|
||||||
@ -10,7 +11,7 @@ diff -Naur gcc-11.2.0/config.sub gcc-11.2.0.serenity/config.sub
|
|||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
@@ -1725,7 +1725,7 @@
|
@@ -1725,7 +1725,7 @@ case $os in
|
||||||
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
|
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
|
||||||
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
||||||
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
||||||
@ -19,10 +20,11 @@ diff -Naur gcc-11.2.0/config.sub gcc-11.2.0.serenity/config.sub
|
|||||||
;;
|
;;
|
||||||
# This one is extra strict with allowed versions
|
# This one is extra strict with allowed versions
|
||||||
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
||||||
diff -Naur gcc-11.2.0/fixincludes/mkfixinc.sh gcc-11.2.0.serenity/fixincludes/mkfixinc.sh
|
diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh
|
||||||
--- gcc-11.2.0/fixincludes/mkfixinc.sh 2021-07-28 08:55:06.644278372 +0200
|
index df90720b7..a45cdd0de 100755
|
||||||
+++ gcc-11.2.0.serenity/fixincludes/mkfixinc.sh 2021-07-28 18:28:53.251904345 +0200
|
--- a/fixincludes/mkfixinc.sh
|
||||||
@@ -11,6 +11,7 @@
|
+++ b/fixincludes/mkfixinc.sh
|
||||||
|
@@ -11,6 +11,7 @@ target=fixinc.sh
|
||||||
|
|
||||||
# Check for special fix rules for particular targets
|
# Check for special fix rules for particular targets
|
||||||
case $machine in
|
case $machine in
|
||||||
@ -30,10 +32,11 @@ diff -Naur gcc-11.2.0/fixincludes/mkfixinc.sh gcc-11.2.0.serenity/fixincludes/mk
|
|||||||
i?86-*-cygwin* | \
|
i?86-*-cygwin* | \
|
||||||
i?86-*-mingw32* | \
|
i?86-*-mingw32* | \
|
||||||
x86_64-*-mingw32* | \
|
x86_64-*-mingw32* | \
|
||||||
diff -Naur gcc-11.2.0/gcc/common.opt gcc-11.2.0.serenity/gcc/common.opt
|
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||||
--- gcc-11.2.0/gcc/common.opt 2021-07-28 08:55:06.996283283 +0200
|
index a75b44ee4..6fab7c3ca 100644
|
||||||
+++ gcc-11.2.0.serenity/gcc/common.opt 2021-07-28 18:28:53.285238207 +0200
|
--- a/gcc/common.opt
|
||||||
@@ -3490,4 +3490,8 @@
|
+++ b/gcc/common.opt
|
||||||
|
@@ -3490,4 +3490,8 @@ fipa-ra
|
||||||
Common Var(flag_ipa_ra) Optimization
|
Common Var(flag_ipa_ra) Optimization
|
||||||
Use caller save register across calls if possible.
|
Use caller save register across calls if possible.
|
||||||
|
|
||||||
@ -42,9 +45,44 @@ diff -Naur gcc-11.2.0/gcc/common.opt gcc-11.2.0.serenity/gcc/common.opt
|
|||||||
+-arch <name> Generate output for architecture <name>.
|
+-arch <name> Generate output for architecture <name>.
|
||||||
+
|
+
|
||||||
; This comment is to ensure we retain the blank line above.
|
; This comment is to ensure we retain the blank line above.
|
||||||
diff -Naur gcc-11.2.0/gcc/config/arm/serenity-elf.h gcc-11.2.0.serenity/gcc/config/arm/serenity-elf.h
|
diff --git a/gcc/config.gcc b/gcc/config.gcc
|
||||||
--- gcc-11.2.0/gcc/config/arm/serenity-elf.h 1970-01-01 01:00:00.000000000 +0100
|
index 357b0bed0..c6c23044d 100644
|
||||||
+++ gcc-11.2.0.serenity/gcc/config/arm/serenity-elf.h 2021-07-28 18:28:53.251904345 +0200
|
--- a/gcc/config.gcc
|
||||||
|
+++ b/gcc/config.gcc
|
||||||
|
@@ -686,6 +686,12 @@ x86_cpus="generic intel"
|
||||||
|
|
||||||
|
# Common parts for widely ported systems.
|
||||||
|
case ${target} in
|
||||||
|
+*-*-serenity*)
|
||||||
|
+ gas=yes
|
||||||
|
+ gnu_ld=yes
|
||||||
|
+ default_use_cxa_atexit=yes
|
||||||
|
+ extra_options="${extra_options} serenity.opt"
|
||||||
|
+ ;;
|
||||||
|
*-*-darwin*)
|
||||||
|
tmake_file="t-darwin "
|
||||||
|
tm_file="${tm_file} darwin.h"
|
||||||
|
@@ -1084,6 +1090,15 @@ case ${target} in
|
||||||
|
esac
|
||||||
|
|
||||||
|
case ${target} in
|
||||||
|
+i[34567]86-*-serenity*)
|
||||||
|
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h glibc-stdint.h i386/i386elf.h serenity.h"
|
||||||
|
+ ;;
|
||||||
|
+x86_64-*-serenity*)
|
||||||
|
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h glibc-stdint.h i386/i386elf.h i386/x86-64.h serenity.h"
|
||||||
|
+ ;;
|
||||||
|
+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*-*-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"
|
||||||
|
diff --git a/gcc/config/arm/serenity-elf.h b/gcc/config/arm/serenity-elf.h
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..24b29c3da
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gcc/config/arm/serenity-elf.h
|
||||||
@@ -0,0 +1,65 @@
|
@@ -0,0 +1,65 @@
|
||||||
+/* Definitions of target machine for GNU compiler, NetBSD/arm ELF version.
|
+/* Definitions of target machine for GNU compiler, NetBSD/arm ELF version.
|
||||||
+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
||||||
@ -111,9 +149,10 @@ diff -Naur gcc-11.2.0/gcc/config/arm/serenity-elf.h gcc-11.2.0.serenity/gcc/conf
|
|||||||
+
|
+
|
||||||
+#undef PTRDIFF_TYPE
|
+#undef PTRDIFF_TYPE
|
||||||
+#define PTRDIFF_TYPE "long int"
|
+#define PTRDIFF_TYPE "long int"
|
||||||
diff -Naur gcc-11.2.0/gcc/config/host-darwin.c gcc-11.2.0.serenity/gcc/config/host-darwin.c
|
diff --git a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c
|
||||||
--- gcc-11.2.0/gcc/config/host-darwin.c 2021-07-28 08:55:07.060284175 +0200
|
index 14a01fe71..3f8e44288 100644
|
||||||
+++ gcc-11.2.0.serenity/gcc/config/host-darwin.c 2021-07-28 18:28:53.285238207 +0200
|
--- a/gcc/config/host-darwin.c
|
||||||
|
+++ b/gcc/config/host-darwin.c
|
||||||
@@ -22,6 +22,10 @@
|
@@ -22,6 +22,10 @@
|
||||||
#include "coretypes.h"
|
#include "coretypes.h"
|
||||||
#include "diagnostic-core.h"
|
#include "diagnostic-core.h"
|
||||||
@ -125,9 +164,11 @@ diff -Naur gcc-11.2.0/gcc/config/host-darwin.c gcc-11.2.0.serenity/gcc/config/ho
|
|||||||
|
|
||||||
/* Yes, this is really supposed to work. */
|
/* Yes, this is really supposed to work. */
|
||||||
/* This allows for a pagesize of 16384, which we have on Darwin20, but should
|
/* This allows for a pagesize of 16384, which we have on Darwin20, but should
|
||||||
diff -Naur gcc-11.2.0/gcc/config/serenity.h gcc-11.2.0.serenity/gcc/config/serenity.h
|
diff --git a/gcc/config/serenity.h b/gcc/config/serenity.h
|
||||||
--- gcc-11.2.0/gcc/config/serenity.h 1970-01-01 01:00:00.000000000 +0100
|
new file mode 100644
|
||||||
+++ gcc-11.2.0.serenity/gcc/config/serenity.h 2021-07-28 18:28:53.251904345 +0200
|
index 000000000..d57aacca9
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gcc/config/serenity.h
|
||||||
@@ -0,0 +1,44 @@
|
@@ -0,0 +1,44 @@
|
||||||
+/* Useful if you wish to make target-specific GCC changes. */
|
+/* Useful if you wish to make target-specific GCC changes. */
|
||||||
+#undef TARGET_SERENITY
|
+#undef TARGET_SERENITY
|
||||||
@ -173,9 +214,11 @@ diff -Naur gcc-11.2.0/gcc/config/serenity.h gcc-11.2.0.serenity/gcc/config/seren
|
|||||||
+ builtin_assert ("system=unix"); \
|
+ builtin_assert ("system=unix"); \
|
||||||
+ builtin_assert ("system=posix"); \
|
+ builtin_assert ("system=posix"); \
|
||||||
+ } while(0);
|
+ } while(0);
|
||||||
diff -Naur gcc-11.2.0/gcc/config/serenity.opt gcc-11.2.0.serenity/gcc/config/serenity.opt
|
diff --git a/gcc/config/serenity.opt b/gcc/config/serenity.opt
|
||||||
--- gcc-11.2.0/gcc/config/serenity.opt 1970-01-01 01:00:00.000000000 +0100
|
new file mode 100644
|
||||||
+++ gcc-11.2.0.serenity/gcc/config/serenity.opt 2021-07-28 18:28:53.251904345 +0200
|
index 000000000..6ce2af2d7
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gcc/config/serenity.opt
|
||||||
@@ -0,0 +1,32 @@
|
@@ -0,0 +1,32 @@
|
||||||
+; SerenityOS options.
|
+; SerenityOS options.
|
||||||
+
|
+
|
||||||
@ -209,42 +252,11 @@ diff -Naur gcc-11.2.0/gcc/config/serenity.opt gcc-11.2.0.serenity/gcc/config/ser
|
|||||||
+Driver
|
+Driver
|
||||||
+
|
+
|
||||||
+; This comment is to ensure we retain the blank line above.
|
+; This comment is to ensure we retain the blank line above.
|
||||||
diff -Naur gcc-11.2.0/gcc/config.gcc gcc-11.2.0.serenity/gcc/config.gcc
|
diff --git a/gcc/configure b/gcc/configure
|
||||||
--- gcc-11.2.0/gcc/config.gcc 2021-07-28 08:55:07.000283339 +0200
|
index 9b28369e3..6821ed4ba 100755
|
||||||
+++ gcc-11.2.0.serenity/gcc/config.gcc 2021-07-28 18:28:53.251904345 +0200
|
--- a/gcc/configure
|
||||||
@@ -686,6 +686,12 @@
|
+++ b/gcc/configure
|
||||||
|
@@ -30992,6 +30992,9 @@ case "$target" in
|
||||||
# Common parts for widely ported systems.
|
|
||||||
case ${target} in
|
|
||||||
+*-*-serenity*)
|
|
||||||
+ gas=yes
|
|
||||||
+ gnu_ld=yes
|
|
||||||
+ default_use_cxa_atexit=yes
|
|
||||||
+ extra_options="${extra_options} serenity.opt"
|
|
||||||
+ ;;
|
|
||||||
*-*-darwin*)
|
|
||||||
tmake_file="t-darwin "
|
|
||||||
tm_file="${tm_file} darwin.h"
|
|
||||||
@@ -1084,6 +1090,15 @@
|
|
||||||
esac
|
|
||||||
|
|
||||||
case ${target} in
|
|
||||||
+i[34567]86-*-serenity*)
|
|
||||||
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h glibc-stdint.h i386/i386elf.h serenity.h"
|
|
||||||
+ ;;
|
|
||||||
+x86_64-*-serenity*)
|
|
||||||
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h glibc-stdint.h i386/i386elf.h i386/x86-64.h serenity.h"
|
|
||||||
+ ;;
|
|
||||||
+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*-*-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"
|
|
||||||
diff -Naur gcc-11.2.0/gcc/configure gcc-11.2.0.serenity/gcc/configure
|
|
||||||
--- gcc-11.2.0/gcc/configure 2021-07-28 08:55:07.172285739 +0200
|
|
||||||
+++ gcc-11.2.0.serenity/gcc/configure 2021-07-28 18:28:53.255237729 +0200
|
|
||||||
@@ -30992,6 +30992,9 @@
|
|
||||||
*-linux-musl*)
|
*-linux-musl*)
|
||||||
gcc_cv_target_dl_iterate_phdr=yes
|
gcc_cv_target_dl_iterate_phdr=yes
|
||||||
;;
|
;;
|
||||||
@ -254,30 +266,11 @@ diff -Naur gcc-11.2.0/gcc/configure gcc-11.2.0.serenity/gcc/configure
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
|
if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
|
||||||
diff -Naur gcc-11.2.0/libgcc/config/t-slibgcc gcc-11.2.0.serenity/libgcc/config/t-slibgcc
|
diff --git a/libgcc/config.host b/libgcc/config.host
|
||||||
--- gcc-11.2.0/libgcc/config/t-slibgcc 2021-07-28 08:55:08.804308510 +0200
|
index 50f000622..dc20e672a 100644
|
||||||
+++ gcc-11.2.0.serenity/libgcc/config/t-slibgcc 2021-07-28 18:28:53.258571117 +0200
|
--- a/libgcc/config.host
|
||||||
@@ -26,7 +26,6 @@
|
+++ b/libgcc/config.host
|
||||||
SHLIB_OBJS = @shlib_objs@
|
@@ -1504,6 +1504,22 @@ nvptx-*)
|
||||||
SHLIB_DIR = @multilib_dir@
|
|
||||||
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
|
|
||||||
-SHLIB_LC = -lc
|
|
||||||
SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
|
|
||||||
SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
|
|
||||||
$(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
|
|
||||||
@@ -34,7 +33,7 @@
|
|
||||||
SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
|
|
||||||
$(SHLIB_LDFLAGS) \
|
|
||||||
-o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
|
|
||||||
- $(SHLIB_OBJS) $(SHLIB_LC) && \
|
|
||||||
+ $(SHLIB_OBJS) && \
|
|
||||||
rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
|
|
||||||
if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
|
|
||||||
mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
|
|
||||||
diff -Naur gcc-11.2.0/libgcc/config.host gcc-11.2.0.serenity/libgcc/config.host
|
|
||||||
--- gcc-11.2.0/libgcc/config.host 2021-07-28 08:55:08.752307785 +0200
|
|
||||||
+++ gcc-11.2.0.serenity/libgcc/config.host 2021-07-28 18:28:53.258571117 +0200
|
|
||||||
@@ -1504,6 +1504,22 @@
|
|
||||||
tmake_file="$tmake_file nvptx/t-nvptx"
|
tmake_file="$tmake_file nvptx/t-nvptx"
|
||||||
extra_parts="crt0.o"
|
extra_parts="crt0.o"
|
||||||
;;
|
;;
|
||||||
@ -300,26 +293,49 @@ diff -Naur gcc-11.2.0/libgcc/config.host gcc-11.2.0.serenity/libgcc/config.host
|
|||||||
*)
|
*)
|
||||||
echo "*** Configuration ${host} not supported" 1>&2
|
echo "*** Configuration ${host} not supported" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
diff -Naur gcc-11.2.0/libgcc/unwind-dw2-fde-dip.c gcc-11.2.0.serenity/libgcc/unwind-dw2-fde-dip.c
|
diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc
|
||||||
--- gcc-11.2.0/libgcc/unwind-dw2-fde-dip.c 2021-07-28 08:55:08.812308622 +0200
|
index c59b43b7b..31c6eb5ad 100644
|
||||||
+++ gcc-11.2.0.serenity/libgcc/unwind-dw2-fde-dip.c 2021-07-28 18:28:53.258571117 +0200
|
--- a/libgcc/config/t-slibgcc
|
||||||
@@ -59,6 +59,12 @@
|
+++ b/libgcc/config/t-slibgcc
|
||||||
|
@@ -26,7 +26,6 @@ SHLIB_MAP = @shlib_map_file@
|
||||||
|
SHLIB_OBJS = @shlib_objs@
|
||||||
|
SHLIB_DIR = @multilib_dir@
|
||||||
|
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
|
||||||
|
-SHLIB_LC = -lc
|
||||||
|
SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
|
||||||
|
SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
|
||||||
|
$(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
|
||||||
|
@@ -34,7 +33,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
|
||||||
|
SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
|
||||||
|
$(SHLIB_LDFLAGS) \
|
||||||
|
-o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
|
||||||
|
- $(SHLIB_OBJS) $(SHLIB_LC) && \
|
||||||
|
+ $(SHLIB_OBJS) && \
|
||||||
|
rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
|
||||||
|
if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
|
||||||
|
mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
|
||||||
|
diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
|
||||||
|
index 5095b6830..d19942eee 100644
|
||||||
|
--- a/libgcc/unwind-dw2-fde-dip.c
|
||||||
|
+++ b/libgcc/unwind-dw2-fde-dip.c
|
||||||
|
@@ -57,6 +57,12 @@
|
||||||
|
# define USE_PT_GNU_EH_FRAME
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
||||||
&& defined(TARGET_DL_ITERATE_PHDR) \
|
+ && defined(TARGET_DL_ITERATE_PHDR) \
|
||||||
+ && defined(__serenity__)
|
+ && defined(__serenity__)
|
||||||
+# define USE_PT_GNU_EH_FRAME
|
+# define USE_PT_GNU_EH_FRAME
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
||||||
+ && defined(TARGET_DL_ITERATE_PHDR) \
|
&& defined(TARGET_DL_ITERATE_PHDR) \
|
||||||
&& defined(__linux__)
|
&& defined(__linux__)
|
||||||
# define USE_PT_GNU_EH_FRAME
|
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
|
||||||
#endif
|
index 326a279c5..6b76901dc 100755
|
||||||
diff -Naur gcc-11.2.0/libstdc++-v3/configure gcc-11.2.0.serenity/libstdc++-v3/configure
|
--- a/libstdc++-v3/configure
|
||||||
--- gcc-11.2.0/libstdc++-v3/configure 2021-07-28 08:55:09.228314429 +0200
|
+++ b/libstdc++-v3/configure
|
||||||
+++ gcc-11.2.0.serenity/libstdc++-v3/configure 2021-07-28 18:28:53.281904818 +0200
|
@@ -4219,15 +4219,7 @@ printf ("hello world\n");
|
||||||
@@ -4219,15 +4219,7 @@
|
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
# FIXME: Cleanup?
|
# FIXME: Cleanup?
|
||||||
@ -336,7 +352,7 @@ diff -Naur gcc-11.2.0/libstdc++-v3/configure gcc-11.2.0.serenity/libstdc++-v3/co
|
|||||||
if test x$gcc_no_link = xyes; then
|
if test x$gcc_no_link = xyes; then
|
||||||
# Setting cross_compile will disable run tests; it will
|
# Setting cross_compile will disable run tests; it will
|
||||||
# also disable AC_CHECK_FILE but that's generally
|
# also disable AC_CHECK_FILE but that's generally
|
||||||
@@ -29270,6 +29262,5986 @@
|
@@ -29270,6 +29262,5986 @@ else
|
||||||
|
|
||||||
# Base decisions on target environment.
|
# Base decisions on target environment.
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
@ -6323,10 +6339,11 @@ diff -Naur gcc-11.2.0/libstdc++-v3/configure gcc-11.2.0.serenity/libstdc++-v3/co
|
|||||||
arm*-*-symbianelf*)
|
arm*-*-symbianelf*)
|
||||||
# This is a freestanding configuration; there is nothing to do here.
|
# This is a freestanding configuration; there is nothing to do here.
|
||||||
;;
|
;;
|
||||||
diff -Naur gcc-11.2.0/libstdc++-v3/crossconfig.m4 gcc-11.2.0.serenity/libstdc++-v3/crossconfig.m4
|
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
|
||||||
--- gcc-11.2.0/libstdc++-v3/crossconfig.m4 2021-07-28 08:55:09.228314429 +0200
|
index ff44d5ae0..2ca1a4262 100644
|
||||||
+++ gcc-11.2.0.serenity/libstdc++-v3/crossconfig.m4 2021-07-28 18:28:53.275238049 +0200
|
--- a/libstdc++-v3/crossconfig.m4
|
||||||
@@ -5,6 +5,13 @@
|
+++ b/libstdc++-v3/crossconfig.m4
|
||||||
|
@@ -5,6 +5,13 @@ dnl
|
||||||
AC_DEFUN([GLIBCXX_CROSSCONFIG],[
|
AC_DEFUN([GLIBCXX_CROSSCONFIG],[
|
||||||
# Base decisions on target environment.
|
# Base decisions on target environment.
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
|
Loading…
Reference in New Issue
Block a user