diff --git a/repos/base/etc/tools.conf b/repos/base/etc/tools.conf index f0182612f7..cd957963f5 100644 --- a/repos/base/etc/tools.conf +++ b/repos/base/etc/tools.conf @@ -19,19 +19,19 @@ # package build tool. # ifeq ($(filter-out $(SPECS),x86_32),) -CROSS_DEV_PREFIX ?= /usr/local/genode/tool/19.05/bin/genode-x86- +CROSS_DEV_PREFIX ?= /usr/local/genode/tool/21.05/bin/genode-x86- endif ifeq ($(filter-out $(SPECS),x86_64),) -CROSS_DEV_PREFIX ?= /usr/local/genode/tool/19.05/bin/genode-x86- +CROSS_DEV_PREFIX ?= /usr/local/genode/tool/21.05/bin/genode-x86- endif ifeq ($(filter-out $(SPECS),arm_64),) -CROSS_DEV_PREFIX ?= /usr/local/genode/tool/19.05/bin/genode-aarch64- +CROSS_DEV_PREFIX ?= /usr/local/genode/tool/21.05/bin/genode-aarch64- endif ifeq ($(filter-out $(SPECS),arm),) -CROSS_DEV_PREFIX ?= /usr/local/genode/tool/19.05/bin/genode-arm- +CROSS_DEV_PREFIX ?= /usr/local/genode/tool/21.05/bin/genode-arm- endif ifeq ($(filter-out $(SPECS),riscv),) -CROSS_DEV_PREFIX ?= /usr/local/genode/tool/19.05/bin/genode-riscv- +CROSS_DEV_PREFIX ?= /usr/local/genode/tool/21.05/bin/genode-riscv- endif # diff --git a/repos/ports/ports/gcc.hash b/repos/ports/ports/gcc.hash index 7a8ea14071..0bd58d8ebc 100644 --- a/repos/ports/ports/gcc.hash +++ b/repos/ports/ports/gcc.hash @@ -1 +1 @@ -57d18597369498f11d7081072ad146bc506211ba +bc8a730adbf377de2c449d222a0df0ba7096a4b8 diff --git a/repos/ports/ports/gcc.port b/repos/ports/ports/gcc.port index d901692f04..f569312ad8 100644 --- a/repos/ports/ports/gcc.port +++ b/repos/ports/ports/gcc.port @@ -1,9 +1,9 @@ LICENSE := GPLv3 -VERSION := 8.3.0 +VERSION := 10.3.0 DOWNLOADS := gcc.archive URL(gcc) := ftp://ftp.fu-berlin.de/gnu/gcc/gcc-$(VERSION)/gcc-$(VERSION).tar.xz -SHA(gcc) := 64baadfe6cc0f4947a84cb12d7f0dfaf45bb58b7e92461639596c21e02d97d2c +SHA(gcc) := 64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344 SIG(gcc) := ${URL(gcc)}.sig KEY(gcc) := GNU DIR(gcc) := src/noux-pkg/gcc @@ -14,7 +14,9 @@ PATCH_OPT := -p1 -d ${DIR(gcc)} HASH_INPUT += $(REP_DIR)/${DIR(gcc)}/patches/series -AUTOCONF := autoconf2.64 +# Required version is 2.69, but there is no versioned binary name on +# Ubuntu right now like there has been for version 2.64. +AUTOCONF := autoconf $(call check_tool,$(AUTOCONF)) $(call check_tool,autogen) diff --git a/repos/ports/recipes/src/gcc_x86/used_apis b/repos/ports/recipes/src/gcc_x86/used_apis index 65ef6bdb2e..67681cea98 100644 --- a/repos/ports/recipes/src/gcc_x86/used_apis +++ b/repos/ports/recipes/src/gcc_x86/used_apis @@ -1,7 +1,4 @@ -gmp libc -mpc -mpfr noux posix stdcxx diff --git a/repos/ports/run/tool_chain_auto.run b/repos/ports/run/tool_chain_auto.run index eed5e169f7..4c2d662b84 100644 --- a/repos/ports/run/tool_chain_auto.run +++ b/repos/ports/run/tool_chain_auto.run @@ -244,7 +244,7 @@ install_config { # Boot modules # -append boot_modules { bash_profile genode.tar gmp.lib.so mpfr.lib.so mpc.lib.so } +append boot_modules { bash_profile genode.tar } lappend boot_modules "$binutils.tar" "$gcc.tar" lappend boot_modules libc.lib.so vfs.lib.so vfs_pipe.lib.so vfs diff --git a/repos/ports/src/noux-pkg/gcc/patches/aarch64.patch b/repos/ports/src/noux-pkg/gcc/patches/aarch64.patch index a2fd58fcd2..24ad7387a6 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/aarch64.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/aarch64.patch @@ -1,5 +1,17 @@ + + +From: Christian Prochaska + + +--- + gcc/config.host | 2 +- + gcc/config/aarch64/aarch64.h | 12 ++++++++++++ + gcc/config/aarch64/t-aarch64 | 2 +- + libgcc/config.host | 3 ++- + 4 files changed, 16 insertions(+), 3 deletions(-) + diff --git a/gcc/config.host b/gcc/config.host -index b5a4eb1..64a85dc 100644 +index a14d7086e..3f5a781e1 100644 --- a/gcc/config.host +++ b/gcc/config.host @@ -99,7 +99,7 @@ case ${host} in @@ -12,12 +24,12 @@ index b5a4eb1..64a85dc 100644 aarch64*-*-*) host_extra_gcc_objs="driver-aarch64.o" diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h -index 976f9af..3c150d1 100644 +index 1ce23c687..f9d1f5c89 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h -@@ -1061,4 +1061,20 @@ extern poly_uint16 aarch64_sve_vg; - - #define REGMODE_NATURAL_SIZE(MODE) aarch64_regmode_natural_size (MODE) +@@ -1257,4 +1257,16 @@ extern poly_uint16 aarch64_sve_vg; + STACK_BOUNDARY / BITS_PER_UNIT) \ + : (crtl->outgoing_args_size + STACK_POINTER_OFFSET)) +/* genode.h */ + @@ -30,17 +42,26 @@ index 976f9af..3c150d1 100644 +#define LINK_SPEC \ + "%(shared:-shared) \ + %{!static:--eh-frame-hdr}" -+ -+/* Don't assume anything about the header files. */ -+/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57699 */ -+#define NO_IMPLICIT_EXTERN_C + #endif /* GCC_AARCH64_H */ +diff --git a/gcc/config/aarch64/t-aarch64 b/gcc/config/aarch64/t-aarch64 +index 11d20b7be..2568aa887 100644 +--- a/gcc/config/aarch64/t-aarch64 ++++ b/gcc/config/aarch64/t-aarch64 +@@ -136,7 +136,7 @@ aarch64-speculation.o: $(srcdir)/config/aarch64/aarch64-speculation.cc \ + $(TARGET_H) \ + $(RTL_BASE_H) \ + $(TREE_PASS_H) +- $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_SPPFLAGS) $(INCLUDES) \ ++ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ + $(srcdir)/config/aarch64/aarch64-speculation.cc + + falkor-tag-collision-avoidance.o: \ diff --git a/libgcc/config.host b/libgcc/config.host -index 5e9cfa8..58af2f0 100644 +index 1907fb871..c2cfdb151 100644 --- a/libgcc/config.host +++ b/libgcc/config.host -@@ -334,8 +334,9 @@ esac +@@ -360,8 +360,9 @@ esac case ${host} in aarch64*-*-elf | aarch64*-*-rtems*) @@ -49,5 +70,5 @@ index 5e9cfa8..58af2f0 100644 extra_parts="$extra_parts crtfastmath.o" + tmake_file="$tmake_file t-freebsd t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" 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-softfp t-crtfm" - md_unwind_header=aarch64/aarch64-unwind.h diff --git a/repos/ports/src/noux-pkg/gcc/patches/arm.patch b/repos/ports/src/noux-pkg/gcc/patches/arm.patch index a391df255f..5024b9bdd8 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/arm.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/arm.patch @@ -9,10 +9,10 @@ From: Christian Prochaska 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h -index da8196f..c36b8ee 100644 +index 72503dcab..e5f23add3 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h -@@ -862,7 +862,7 @@ extern int arm_arch_cmse; +@@ -945,7 +945,7 @@ extern const int arm_arch_cde_coproc_bits[]; #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (SImode, ARM_EH_STACKADJ_REGNUM) #ifndef ARM_TARGET2_DWARF_FORMAT @@ -21,7 +21,7 @@ index da8196f..c36b8ee 100644 #endif /* ttype entries (the only interesting data references used) -@@ -2196,10 +2196,7 @@ extern const char *arm_target_thumb_only (int argc, const char **argv); +@@ -2343,10 +2343,7 @@ extern const char *arm_target_thumb_only (int argc, const char **argv); /* -mcpu=native handling only makes sense with compiler running on an ARM chip. */ #if defined(__arm__) @@ -34,13 +34,13 @@ index da8196f..c36b8ee 100644 " %{march=native:% -Date: Sat Feb 23 10:04:23 2019 +0000 - - re PR ada/89349 (segfault when building GCC 7 & 8 branch with GCC master) - - PR ada/89349 - Backport from mainline - 2018-05-25 Arnaud Charlet - - * osint.ads (Unknown_Attributes): No longer pretend this is a constant. - (No_File_Info_Cache): Initialize separately. - * osint.adb (No_File_Info_Cache): Update initializer. - - From-SVN: r269153 - -diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog -index e4127e472aa..626c590a6ab 100644 ---- a/gcc/ada/ChangeLog -+++ b/gcc/ada/ChangeLog -@@ -1,3 +1,13 @@ -+2019-02-23 Eric Botcazou -+ -+ PR ada/89349 -+ Backport from mainline -+ 2018-05-25 Arnaud Charlet -+ -+ * osint.ads (Unknown_Attributes): No longer pretend this is a constant. -+ (No_File_Info_Cache): Initialize separately. -+ * osint.adb (No_File_Info_Cache): Update initializer. -+ - 2019-02-22 Release Manager - - * GCC 8.3.0 released. -diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb -index 0c23761b6dc..896fbc7ee37 100644 ---- a/gcc/ada/osint.adb -+++ b/gcc/ada/osint.adb -@@ -250,8 +250,7 @@ package body Osint is - Attr : aliased File_Attributes; - end record; - -- No_File_Info_Cache : constant File_Info_Cache := -- (No_File, Unknown_Attributes); -+ No_File_Info_Cache : constant File_Info_Cache := (No_File, (others => 0)); - - package File_Name_Hash_Table is new GNAT.HTable.Simple_HTable ( - Header_Num => File_Hash_Num, -diff --git a/gcc/ada/osint.ads b/gcc/ada/osint.ads -index 65a87fe4ce3..6c75b521456 100644 ---- a/gcc/ada/osint.ads -+++ b/gcc/ada/osint.ads -@@ -255,10 +255,26 @@ package Osint is - -- from the disk and then cached in the File_Attributes parameter (possibly - -- along with other values). - -- type File_Attributes is private; -- Unknown_Attributes : constant File_Attributes; -+ File_Attributes_Size : constant Natural := 32; -+ -- This should be big enough to fit a "struct file_attributes" on any -+ -- system. It doesn't cause any malfunction if it is too big (which avoids -+ -- the need for either mapping the struct exactly or importing the sizeof -+ -- from C, which would result in dynamic code). However, it does waste -+ -- space (e.g. when a component of this type appears in a record, if it is -+ -- unnecessarily large). Note: for runtime units, use System.OS_Constants. -+ -- SIZEOF_struct_file_attributes instead, which has the exact value. -+ -+ type File_Attributes is -+ array (1 .. File_Attributes_Size) -+ of System.Storage_Elements.Storage_Element; -+ for File_Attributes'Alignment use Standard'Maximum_Alignment; -+ -+ Unknown_Attributes : File_Attributes; - -- A cache for various attributes for a file (length, accessibility,...) -- -- This must be initialized to Unknown_Attributes prior to the first call. -+ -- Will be initialized properly at elaboration (for efficiency later on, -+ -- avoid function calls every time we want to reset the attributes) prior -+ -- to the first usage. We cannot make it constant since the compiler may -+ -- put it in a read-only section. - - function Is_Directory - (Name : C_File_Name; -@@ -754,22 +770,4 @@ private - -- detected, the file being written is deleted, and a fatal error is - -- signalled. - -- File_Attributes_Size : constant Natural := 32; -- -- This should be big enough to fit a "struct file_attributes" on any -- -- system. It doesn't cause any malfunction if it is too big (which avoids -- -- the need for either mapping the struct exactly or importing the sizeof -- -- from C, which would result in dynamic code). However, it does waste -- -- space (e.g. when a component of this type appears in a record, if it is -- -- unnecessarily large). Note: for runtime units, use System.OS_Constants. -- -- SIZEOF_struct_file_attributes instead, which has the exact value. -- -- type File_Attributes is -- array (1 .. File_Attributes_Size) -- of System.Storage_Elements.Storage_Element; -- for File_Attributes'Alignment use Standard'Maximum_Alignment; -- -- Unknown_Attributes : constant File_Attributes := (others => 0); -- -- Will be initialized properly at elaboration (for efficiency later on, -- -- avoid function calls every time we want to reset the attributes). -- - end Osint; diff --git a/repos/ports/src/noux-pkg/gcc/patches/config.patch b/repos/ports/src/noux-pkg/gcc/patches/config.patch index 813d19d3c3..42df127774 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/config.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/config.patch @@ -1,12 +1,23 @@ config.patch From: Sebastian Sumpf + + --- + gcc/config.gcc | 2 +- + gcc/config/arm/arm.h | 4 ++-- + gcc/config/arm/unknown-elf.h | 13 +++++++++++++ + gcc/config/i386/x86-64.h | 19 +++++++++++++++++-- + gcc/config/riscv/elf.h | 2 ++ + gcc/config/riscv/riscv.h | 17 +++++++++++++++-- + libgcc/config.host | 16 ++++++++++++---- + 7 files changed, 62 insertions(+), 11 deletions(-) + diff --git a/gcc/config.gcc b/gcc/config.gcc -index 7af8e028..3c87dfb0 100644 +index 6a349965c..d0e8646c0 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc -@@ -1184,7 +1184,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*) +@@ -1310,7 +1310,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*) case ${target} in arm*-*-eabi*) tm_file="$tm_file newlib-stdint.h" @@ -16,10 +27,10 @@ index 7af8e028..3c87dfb0 100644 ;; arm*-*-fuchsia*) diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h -index 942bb4ca..c36b8eea 100644 +index 30e1d6dc9..de4e7b7d9 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h -@@ -668,11 +668,11 @@ extern int arm_arch_cmse; +@@ -746,11 +746,11 @@ extern const int arm_arch_cde_coproc_bits[]; #define MAX_FIXED_MODE_SIZE 64 #ifndef SIZE_TYPE @@ -34,13 +45,15 @@ index 942bb4ca..c36b8eea 100644 /* AAPCS requires that structure alignment is affected by bitfields. */ diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h -index 12dd0931..ec0a72e7 100644 +index 9ad294750..cb5575a75 100644 --- a/gcc/config/arm/unknown-elf.h +++ b/gcc/config/arm/unknown-elf.h -@@ -94,3 +94,19 @@ +@@ -93,4 +93,17 @@ + udivmoddi4, which will depend on the exception unwind routines, which will depend on abort, which is defined in libc. */ #undef LINK_GCC_C_SEQUENCE_SPEC - #define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group" ++ + #define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %{!nolibc:%L} --end-group" + +/* genode.h */ + @@ -53,12 +66,8 @@ index 12dd0931..ec0a72e7 100644 +#define LINK_SPEC \ + "%(shared:-shared) \ + %{!static:--eh-frame-hdr}" -+ -+/* Don't assume anything about the header files. */ -+/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57699 */ -+#define NO_IMPLICIT_EXTERN_C diff --git a/gcc/config/i386/x86-64.h b/gcc/config/i386/x86-64.h -index e2a8306c..1c5e2e15 100644 +index 88db428f5..2d2adc627 100644 --- a/gcc/config/i386/x86-64.h +++ b/gcc/config/i386/x86-64.h @@ -37,10 +37,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see @@ -74,7 +83,7 @@ index e2a8306c..1c5e2e15 100644 #undef WCHAR_TYPE #define WCHAR_TYPE "int" -@@ -106,3 +106,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +@@ -102,3 +102,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #undef TARGET_SECTION_TYPE_FLAGS #define TARGET_SECTION_TYPE_FLAGS x86_64_elf_section_type_flags @@ -93,12 +102,8 @@ index e2a8306c..1c5e2e15 100644 + %{m32:-m elf_i386} \ + %{shared:-shared} \ + %{!static:--eh-frame-hdr}" -+ -+/* Don't assume anything about the header files. */ -+/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57699 */ -+#define NO_IMPLICIT_EXTERN_C diff --git a/gcc/config/riscv/elf.h b/gcc/config/riscv/elf.h -index a8357bb6..cd33bb28 100644 +index 4e2d6464d..72399e5a8 100644 --- a/gcc/config/riscv/elf.h +++ b/gcc/config/riscv/elf.h @@ -17,10 +17,12 @@ You should have received a copy of the GNU General Public License @@ -115,10 +120,10 @@ index a8357bb6..cd33bb28 100644 /* Link against Newlib libraries, because the ELF backend assumes Newlib. Handle the circular dependence between libc and libgloss. */ diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h -index 62279ff2..fdf77645 100644 +index 567c23380..1b75709b8 100644 --- a/gcc/config/riscv/riscv.h +++ b/gcc/config/riscv/riscv.h -@@ -819,10 +819,10 @@ while (0) +@@ -851,10 +851,10 @@ while (0) #define ASM_COMMENT_START "#" #undef SIZE_TYPE @@ -129,11 +134,11 @@ index 62279ff2..fdf77645 100644 -#define PTRDIFF_TYPE (POINTER_SIZE == 64 ? "long int" : "int") +#define PTRDIFF_TYPE (POINTER_SIZE == 64 ? "long int" : "long int") - /* The maximum number of bytes copied by one iteration of a movmemsi loop. */ + /* The maximum number of bytes copied by one iteration of a cpymemsi loop. */ -@@ -902,4 +902,17 @@ extern unsigned riscv_stack_boundary; - #define SWSP_REACH (4LL << C_SxSP_BITS) - #define SDSP_REACH (8LL << C_SxSP_BITS) +@@ -935,4 +935,17 @@ extern void riscv_remove_unneeded_save_restore_calls (void); + + #define HARD_REGNO_RENAME_OK(FROM, TO) riscv_hard_regno_rename_ok (FROM, TO) + /* genode.h */ + @@ -150,10 +155,10 @@ index 62279ff2..fdf77645 100644 + #endif /* ! GCC_RISCV_H */ diff --git a/libgcc/config.host b/libgcc/config.host -index 11b4acaf..5e9cfa86 100644 +index c529cc40f..1907fb871 100644 --- a/libgcc/config.host +++ b/libgcc/config.host -@@ -312,7 +312,7 @@ case ${host} in +@@ -328,7 +328,7 @@ case ${host} in tmake_file=t-vxworks ;; *-*-elf) @@ -162,7 +167,7 @@ index 11b4acaf..5e9cfa86 100644 ;; esac -@@ -449,8 +449,12 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*) +@@ -498,8 +498,12 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*) tm_file="$tm_file arm/bpabi-lib.h" case ${host} in arm*-*-eabi* | arm*-*-rtems*) @@ -176,7 +181,7 @@ index 11b4acaf..5e9cfa86 100644 ;; arm*-*-symbianelf*) tmake_file="${tmake_file} arm/t-symbian t-slibgcc-nolc-override" -@@ -610,6 +614,10 @@ i[34567]86-*-elf*) +@@ -701,6 +705,10 @@ i[34567]86-*-elf*) tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic" ;; x86_64-*-elf* | x86_64-*-rtems*) @@ -185,9 +190,9 @@ index 11b4acaf..5e9cfa86 100644 + # needed for the exception handling on Genode in the presence of shared libraries. + tmake_file="$tmake_file t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic" - ;; - x86_64-*-fuchsia*) -@@ -1133,8 +1141,8 @@ riscv*-*-freebsd*) + case ${host} in + x86_64-*-rtems*) +@@ -1268,8 +1276,8 @@ riscv*-*-freebsd*) extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o crtendS.o crtbeginT.o" ;; riscv*-*-*) diff --git a/repos/ports/src/noux-pkg/gcc/patches/emutls.patch b/repos/ports/src/noux-pkg/gcc/patches/emutls.patch index 13917f4e30..6bb8e54976 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/emutls.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/emutls.patch @@ -9,10 +9,10 @@ From: Christian Prochaska 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in -index 8cae772c8..7e4cbd0ea 100644 +index 5417143b5..9dce2966c 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in -@@ -428,9 +428,12 @@ LIB2ADD += enable-execute-stack.c +@@ -433,9 +433,12 @@ LIB2ADD += enable-execute-stack.c # While emutls.c has nothing to do with EH, it is in LIB2ADDEH* # instead of LIB2ADD because that's the way to be sure on some targets # (e.g. *-*-darwin*) only one copy of it is linked. @@ -29,10 +29,10 @@ index 8cae772c8..7e4cbd0ea 100644 # Library members defined in libgcc2.c. lib2funcs = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _cmpdi2 _ucmpdi2 \ diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac -index 7d7279b06..84d8c6650 100644 +index 9217e7390..5bf179de9 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac -@@ -367,6 +367,9 @@ else +@@ -385,6 +385,9 @@ else AC_DEFINE(HAVE_TANL) AC_DEFINE(HAVE_TANHL) fi diff --git a/repos/ports/src/noux-pkg/gcc/patches/frame_pointer.patch b/repos/ports/src/noux-pkg/gcc/patches/frame_pointer.patch new file mode 100644 index 0000000000..766a76c764 --- /dev/null +++ b/repos/ports/src/noux-pkg/gcc/patches/frame_pointer.patch @@ -0,0 +1,22 @@ +frame_pointer.patch + +From: Christian Prochaska + + +--- + gcc/configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 1d58d9c07..545a6367e 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -2054,7 +2054,7 @@ linux* | gnu* | darwin[[8912]]* | cygwin* | mingw*) + enable_frame_pointer=no + ;; + *) +- enable_frame_pointer=yes ++ enable_frame_pointer=no + ;; + esac + ]) diff --git a/repos/ports/src/noux-pkg/gcc/patches/go_libbacktrace.patch b/repos/ports/src/noux-pkg/gcc/patches/go_libbacktrace.patch index d84e951c71..3b58f99bf7 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/go_libbacktrace.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/go_libbacktrace.patch @@ -8,7 +8,7 @@ Remove the dependency on libbacktrace, which needs a libc. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/go/config-lang.in b/gcc/go/config-lang.in -index 79ee2e2..22eed3f 100644 +index 4e8aabbd0..92ff23753 100644 --- a/gcc/go/config-lang.in +++ b/gcc/go/config-lang.in @@ -28,7 +28,7 @@ language="go" diff --git a/repos/ports/src/noux-pkg/gcc/patches/host_target_combination.patch b/repos/ports/src/noux-pkg/gcc/patches/host_target_combination.patch index 5bddcc0080..2d6f5b034b 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/host_target_combination.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/host_target_combination.patch @@ -14,11 +14,11 @@ compiler as much as possible. 1 file changed, 1 deletion(-) diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 -index cb6e3af..a1cc79a 100644 +index fe1828835..3c7bdb87d 100644 --- a/libstdc++-v3/crossconfig.m4 +++ b/libstdc++-v3/crossconfig.m4 -@@ -292,7 +292,6 @@ case "${host}" in - AC_DEFINE(HAVE_TANHF) +@@ -306,7 +306,6 @@ dnl # long_double_math_on_this_cpu in configure.ac, right after + dnl # the expansion of the present macro. ;; *) - AC_MSG_ERROR([No support for this host/target combination.]) diff --git a/repos/ports/src/noux-pkg/gcc/patches/libgcc_s.patch b/repos/ports/src/noux-pkg/gcc/patches/libgcc_s.patch index 87f7c8a4fe..9dffa7cf9d 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/libgcc_s.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/libgcc_s.patch @@ -8,10 +8,10 @@ From: Christian Prochaska 1 file changed, 6 insertions(+) diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in -index dd8cee9..8cae772 100644 +index 851e7657d..5417143b5 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in -@@ -948,7 +948,11 @@ all: libunwind.a +@@ -957,7 +957,11 @@ all: libunwind.a endif ifeq ($(enable_shared),yes) @@ -23,7 +23,7 @@ index dd8cee9..8cae772 100644 ifneq ($(LIBUNWIND),) all: libunwind$(SHLIB_EXT) libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1154,9 +1158,11 @@ install-shared: +@@ -1163,9 +1167,11 @@ install-shared: chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a diff --git a/repos/ports/src/noux-pkg/gcc/patches/libstdcxx_without_libc.patch b/repos/ports/src/noux-pkg/gcc/patches/libstdcxx_without_libc.patch index 62de00b0c4..78c741db87 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/libstdcxx_without_libc.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/libstdcxx_without_libc.patch @@ -8,10 +8,10 @@ From: Christian Prochaska 1 file changed, 6 insertions(+) diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac -index 60152a5..7d7279b 100644 +index 18659a216..9217e7390 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac -@@ -89,9 +89,11 @@ CXXFLAGS="$save_CXXFLAGS" +@@ -90,9 +90,11 @@ AC_SYS_LARGEFILE GLIBCXX_CONFIGURE # Libtool setup. @@ -23,7 +23,7 @@ index 60152a5..7d7279b 100644 AM_PROG_LIBTOOL ACX_LT_HOST_FLAGS AC_SUBST(enable_shared) -@@ -209,7 +211,9 @@ AC_CHECK_HEADERS(fenv.h complex.h) +@@ -211,7 +213,9 @@ AC_CHECK_HEADERS(fenv.h complex.h) GLIBCXX_CHECK_C99_TR1 # For the EOF, SEEK_CUR, and SEEK_END integer constants. @@ -33,7 +33,7 @@ index 60152a5..7d7279b 100644 # For gettimeofday support. GLIBCXX_CHECK_GETTIMEOFDAY -@@ -370,7 +374,9 @@ GCC_CHECK_UNWIND_GETIPINFO +@@ -388,7 +392,9 @@ GCC_CHECK_UNWIND_GETIPINFO GCC_LINUX_FUTEX([AC_DEFINE(HAVE_LINUX_FUTEX, 1, [Define if futex syscall is available.])]) diff --git a/repos/ports/src/noux-pkg/gcc/patches/libsupcxx_demangle.patch b/repos/ports/src/noux-pkg/gcc/patches/libsupcxx_demangle.patch index d1ba2065c2..81dd9c3688 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/libsupcxx_demangle.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/libsupcxx_demangle.patch @@ -10,7 +10,7 @@ From: Christian Prochaska 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/include/libiberty.h b/include/libiberty.h -index dc09e79..2726453 100644 +index 141cb886a..0a8b54db5 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -46,7 +46,11 @@ extern "C" { @@ -26,7 +26,7 @@ index dc09e79..2726453 100644 /* If the OS supports it, ensure that the supplied stream is setup to avoid any multi-threaded locking. Otherwise leave the FILE pointer diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c -index 3f2a097..0d4a83d 100644 +index cbfb2f937..a58820ae5 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -106,7 +106,9 @@ @@ -39,7 +39,7 @@ index 3f2a097..0d4a83d 100644 #ifdef HAVE_STDLIB_H #include -@@ -6309,7 +6311,7 @@ d_demangle (const char *mangled, int options, size_t *palc) +@@ -6390,7 +6392,7 @@ d_demangle (const char *mangled, int options, size_t *palc) return dgs.buf; } @@ -49,10 +49,10 @@ index 3f2a097..0d4a83d 100644 extern char *__cxa_demangle (const char *, char *, size_t *, int *); diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in -index 37644e8..1ec97bb 100644 +index a0a500eab..8c37ec251 100644 --- a/libstdc++-v3/libsupc++/Makefile.in +++ b/libstdc++-v3/libsupc++/Makefile.in -@@ -131,7 +131,11 @@ am__objects_1 = array_type_info.lo atexit_arm.lo atexit_thread.lo \ +@@ -168,7 +168,11 @@ am__objects_1 = array_type_info.lo atexit_arm.lo atexit_thread.lo \ del_opvsa.lo pbase_type_info.lo pmem_type_info.lo \ pointer_type_info.lo pure.lo si_class_type_info.lo tinfo.lo \ tinfo2.lo vec.lo vmi_class_type_info.lo vterminate.lo @@ -64,7 +64,7 @@ index 37644e8..1ec97bb 100644 @ENABLE_VTABLE_VERIFY_TRUE@@VTV_CYGMIN_FALSE@am__objects_3 = \ @ENABLE_VTABLE_VERIFY_TRUE@@VTV_CYGMIN_FALSE@ vtv_stubs.lo am_libsupc___la_OBJECTS = $(am__objects_1) $(am__objects_2) \ -@@ -404,8 +408,14 @@ bits_HEADERS = \ +@@ -491,8 +495,14 @@ bits_HEADERS = \ exception_defines.h exception_ptr.h hash_bytes.h nested_exception.h exception.h cxxabi_init_exception.h headers = $(std_HEADERS) $(bits_HEADERS) @@ -80,7 +80,7 @@ index 37644e8..1ec97bb 100644 sources = \ array_type_info.cc \ -@@ -856,10 +866,17 @@ uninstall-am: uninstall-bitsHEADERS uninstall-stdHEADERS \ +@@ -951,10 +961,17 @@ uninstall-am: uninstall-bitsHEADERS uninstall-stdHEADERS \ cp-demangle.c: rm -f $@ $(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@ diff --git a/repos/ports/src/noux-pkg/gcc/patches/misc.patch b/repos/ports/src/noux-pkg/gcc/patches/misc.patch index f966c78079..a7103d396d 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/misc.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/misc.patch @@ -9,7 +9,7 @@ Changes lacking documentation 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libgcc/config/t-libunwind-elf b/libgcc/config/t-libunwind-elf -index 5172135..9fe9808 100644 +index e277ab93a..b9bb01781 100644 --- a/libgcc/config/t-libunwind-elf +++ b/libgcc/config/t-libunwind-elf @@ -32,7 +32,7 @@ SHLIBUNWIND_SONAME = @shlib_base_name@.so.$(SHLIBUNWIND_SOVERSION) @@ -22,7 +22,7 @@ index 5172135..9fe9808 100644 if [ -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) ]; then \ mv -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) \ diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc -index 7e60b62..0753b0b 100644 +index c99755344..d6abb8877 100644 --- a/libgcc/config/t-slibgcc +++ b/libgcc/config/t-slibgcc @@ -26,7 +26,7 @@ SHLIB_MAP = @shlib_map_file@ diff --git a/repos/ports/src/noux-pkg/gcc/patches/new_opa.patch b/repos/ports/src/noux-pkg/gcc/patches/new_opa.patch index 15f16bfed2..41c0998d24 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/new_opa.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/new_opa.patch @@ -8,7 +8,7 @@ From: Christian Prochaska 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/libsupc++/new_opa.cc b/libstdc++-v3/libsupc++/new_opa.cc -index 68eac5b..5e647ff 100644 +index b935936e1..9efd29598 100644 --- a/libstdc++-v3/libsupc++/new_opa.cc +++ b/libstdc++-v3/libsupc++/new_opa.cc @@ -25,7 +25,7 @@ @@ -18,9 +18,9 @@ index 68eac5b..5e647ff 100644 -#include +#include /* stdint.h would call 'include_next' */ #include + #include #include "new" - -@@ -39,6 +39,8 @@ extern "C" void *memalign(std::size_t boundary, std::size_t size); +@@ -40,6 +40,8 @@ extern "C" void *memalign(std::size_t boundary, std::size_t size); # endif #endif diff --git a/repos/ports/src/noux-pkg/gcc/patches/no_short_enums.patch b/repos/ports/src/noux-pkg/gcc/patches/no_short_enums.patch index 40f2340883..0f80337f01 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/no_short_enums.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/no_short_enums.patch @@ -8,10 +8,10 @@ Ensure -fno-short-enums as default. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h -index 2476cb3..da8196f 100644 +index de4e7b7d9..72503dcab 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h -@@ -361,7 +361,7 @@ extern int arm_fpu_attr; +@@ -417,7 +417,7 @@ extern int arm_fpu_attr; /* AAPCS based ABIs use short enums by default. */ #ifndef ARM_DEFAULT_SHORT_ENUMS #define ARM_DEFAULT_SHORT_ENUMS \ diff --git a/repos/ports/src/noux-pkg/gcc/patches/noux_build.patch b/repos/ports/src/noux-pkg/gcc/patches/noux_build.patch index b6ccc40cc4..590df43b1e 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/noux_build.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/noux_build.patch @@ -13,10 +13,10 @@ From: Christian Prochaska 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Makefile.def b/Makefile.def -index 4b9f757..f67015f 100644 +index 36fd26b03..04797e3af 100644 --- a/Makefile.def +++ b/Makefile.def -@@ -284,6 +284,7 @@ flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; }; +@@ -292,6 +292,7 @@ flags_to_pass = { flag= GDCFLAGS_FOR_TARGET ; }; flags_to_pass = { flag= LD_FOR_TARGET ; }; flags_to_pass = { flag= LIPO_FOR_TARGET ; }; flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; }; @@ -25,7 +25,7 @@ index 4b9f757..f67015f 100644 flags_to_pass = { flag= LIBCXXFLAGS_FOR_TARGET ; }; flags_to_pass = { flag= NM_FOR_TARGET ; }; diff --git a/Makefile.tpl b/Makefile.tpl -index 1f23b79..0ed8b02 100644 +index efed15117..6ba0228c5 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -156,6 +156,8 @@ BUILD_EXPORTS = \ @@ -37,7 +37,7 @@ index 1f23b79..0ed8b02 100644 GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ GOC="$(GOC_FOR_BUILD)"; export GOC; \ GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \ -@@ -171,6 +173,7 @@ BUILD_EXPORTS = \ +@@ -173,6 +175,7 @@ BUILD_EXPORTS = \ # built for the build system to override those in BASE_FLAGS_TO_PASS. EXTRA_BUILD_FLAGS = \ CFLAGS="$(CFLAGS_FOR_BUILD)" \ @@ -45,7 +45,7 @@ index 1f23b79..0ed8b02 100644 LDFLAGS="$(LDFLAGS_FOR_BUILD)" # This is the list of directories to built for the host system. -@@ -193,6 +196,8 @@ HOST_EXPORTS = \ +@@ -195,6 +198,8 @@ HOST_EXPORTS = \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ CXX="$(CXX)"; export CXX; \ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ @@ -53,8 +53,8 @@ index 1f23b79..0ed8b02 100644 + LIBS="$(LIBS)"; export LIBS; \ GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \ GOC="$(GOC)"; export GOC; \ - AR="$(AR)"; export AR; \ -@@ -278,6 +283,7 @@ BASE_TARGET_EXPORTS = \ + GDC="$(GDC)"; export GDC; \ +@@ -292,6 +297,7 @@ BASE_TARGET_EXPORTS = \ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \ @@ -62,7 +62,7 @@ index 1f23b79..0ed8b02 100644 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \ GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \ -@@ -664,6 +670,7 @@ EXTRA_TARGET_FLAGS = \ +@@ -701,6 +707,7 @@ EXTRA_TARGET_FLAGS = \ -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \ $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ @@ -71,7 +71,7 @@ index 1f23b79..0ed8b02 100644 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ diff --git a/fixincludes/Makefile.in b/fixincludes/Makefile.in -index 1937dca..60e2b27 100644 +index 1937dcaa3..60e2b2793 100644 --- a/fixincludes/Makefile.in +++ b/fixincludes/Makefile.in @@ -28,6 +28,7 @@ STAMP = echo timestamp > @@ -97,10 +97,10 @@ index 1937dca..60e2b27 100644 $(AF): $(FIXOBJ) $(LIBIBERTY) diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index 20bee04..7df7092 100644 +index 5d05e8e0d..0919e579a 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in -@@ -800,7 +800,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@ +@@ -804,7 +804,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@ BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@ BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG) BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ @@ -109,7 +109,7 @@ index 20bee04..7df7092 100644 # Actual name to use when installing a native compiler. GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') -@@ -1056,8 +1056,8 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) +@@ -1061,8 +1061,8 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) # How to link with both our special library facilities # and the system's installed libraries. @@ -118,26 +118,26 @@ index 20bee04..7df7092 100644 +LIBS = libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \ + $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS) @LIBS@ BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ - $(ZLIB) + $(ZLIB) $(ZSTD_LIB) # Any system libraries needed just for GNAT. diff --git a/gcc/config.host b/gcc/config.host -index c65569d..b5a4eb1 100644 +index 84f0433e2..a14d7086e 100644 --- a/gcc/config.host +++ b/gcc/config.host @@ -107,7 +107,7 @@ case ${host} in ;; esac ;; -- arm*-*-freebsd* | arm*-*-linux* | arm*-*-fuchsia*) +- arm*-*-freebsd* | arm*-*-netbsd* | arm*-*-linux* | arm*-*-fuchsia*) + arm*-*-*) case ${target} in arm*-*-*) host_extra_gcc_objs="driver-arm.o" diff --git a/gcc/configure.ac b/gcc/configure.ac -index b066cc6..fa1d2f0 100644 +index 715fcba04..d57e6aea1 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac -@@ -1707,8 +1707,8 @@ else +@@ -1897,8 +1897,8 @@ else # system.h from including gmp.h. CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ @@ -147,4 +147,4 @@ index b066cc6..fa1d2f0 100644 + GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ ${realsrcdir}/configure \ --enable-languages=${enable_languages-all} \ - --target=$target_alias --host=$build_alias --build=$build_alias + ${enable_obsolete+--enable-obsolete="$enable_obsolete"} \ diff --git a/repos/ports/src/noux-pkg/gcc/patches/prefer_pic.patch b/repos/ports/src/noux-pkg/gcc/patches/prefer_pic.patch index ba7a917c23..bf994402b4 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/prefer_pic.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/prefer_pic.patch @@ -13,10 +13,10 @@ nothing rather than '-prefer-pic'. 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac -index 0ef9627..60152a5 100644 +index 699e55fd8..18659a216 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac -@@ -115,16 +115,16 @@ fi +@@ -116,16 +116,16 @@ fi # Use glibcxx_compiler_pic_flag to designate a compile-time flags for # creating position-independent objects. This varies with the target # hardware and operating system, but is often: -DPIC -fPIC. diff --git a/repos/ports/src/noux-pkg/gcc/patches/revert_gcov_path_mangling.patch b/repos/ports/src/noux-pkg/gcc/patches/revert_gcov_path_mangling.patch new file mode 100644 index 0000000000..7e254326da --- /dev/null +++ b/repos/ports/src/noux-pkg/gcc/patches/revert_gcov_path_mangling.patch @@ -0,0 +1,192 @@ +revert_gcov_name_mangling.patch + +From: Christian Prochaska + + +--- + gcc/coverage.c | 28 ++-------------------------- + gcc/gcov-io.c | 49 ------------------------------------------------- + gcc/gcov-io.h | 1 - + gcc/gcov.c | 49 +++++++++++++++++++++++++++++++++++++++++-------- + 4 files changed, 43 insertions(+), 84 deletions(-) + +diff --git a/gcc/coverage.c b/gcc/coverage.c +index 7d82e44c1..8bb46e8f0 100644 +--- a/gcc/coverage.c ++++ b/gcc/coverage.c +@@ -1215,32 +1215,8 @@ coverage_init (const char *filename) + g->get_passes ()->get_pass_profile ()->static_pass_number; + g->get_dumps ()->dump_start (profile_pass_num, NULL); + +- if (!IS_ABSOLUTE_PATH (filename)) +- { +- /* When a profile_data_prefix is provided, then mangle full path +- of filename in order to prevent file path clashing. */ +- if (profile_data_prefix) +- { +- filename = concat (getpwd (), separator, filename, NULL); +- if (profile_prefix_path) +- { +- if (!strncmp (filename, profile_prefix_path, +- strlen (profile_prefix_path))) +- { +- filename += strlen (profile_prefix_path); +- while (*filename == *separator) +- filename++; +- } +- else +- warning (0, "filename %qs does not start with profile " +- "prefix %qs", filename, profile_prefix_path); +- } +- filename = mangle_path (filename); +- len = strlen (filename); +- } +- else +- profile_data_prefix = getpwd (); +- } ++ if (!profile_data_prefix && !IS_ABSOLUTE_PATH (filename)) ++ profile_data_prefix = getpwd (); + + if (profile_data_prefix) + prefix_len = strlen (profile_data_prefix); +diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c +index ac60f9baf..4aefeac05 100644 +--- a/gcc/gcov-io.c ++++ b/gcc/gcov-io.c +@@ -538,55 +538,6 @@ gcov_read_counter (void) + return value; + } + +-/* Mangle filename path of BASE and output new allocated pointer with +- mangled path. */ +- +-char * +-mangle_path (char const *base) +-{ +- /* Convert '/' to '#', convert '..' to '^', +- convert ':' to '~' on DOS based file system. */ +- const char *probe; +- char *buffer = (char *)xmalloc (strlen (base) + 1); +- char *ptr = buffer; +- +-#if HAVE_DOS_BASED_FILE_SYSTEM +- if (base[0] && base[1] == ':') +- { +- ptr[0] = base[0]; +- ptr[1] = '~'; +- ptr += 2; +- base += 2; +- } +-#endif +- for (; *base; base = probe) +- { +- size_t len; +- +- for (probe = base; *probe; probe++) +- if (*probe == '/') +- break; +- len = probe - base; +- if (len == 2 && base[0] == '.' && base[1] == '.') +- *ptr++ = '^'; +- else +- { +- memcpy (ptr, base, len); +- ptr += len; +- } +- if (*probe) +- { +- *ptr++ = '#'; +- probe++; +- } +- } +- +- /* Terminate the string. */ +- *ptr = '\0'; +- +- return buffer; +-} +- + /* We need to expose the below function when compiling for gcov-tool. */ + + #if !IN_LIBGCOV || defined (IN_GCOV_TOOL) +diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h +index 4391d6d50..552c90dcd 100644 +--- a/gcc/gcov-io.h ++++ b/gcc/gcov-io.h +@@ -340,7 +340,6 @@ GCOV_LINKAGE void gcov_read_summary (struct gcov_summary *) ATTRIBUTE_HIDDEN; + GCOV_LINKAGE const char *gcov_read_string (void); + GCOV_LINKAGE void gcov_sync (gcov_position_t /*base*/, + gcov_unsigned_t /*length */); +-char *mangle_path (char const *base); + + #if !IN_GCOV + /* Available outside gcov */ +diff --git a/gcc/gcov.c b/gcc/gcov.c +index a291bac3e..9bf31d5e3 100644 +--- a/gcc/gcov.c ++++ b/gcc/gcov.c +@@ -2560,9 +2560,6 @@ make_gcov_file_name (const char *input_name, const char *src_name) + return result; + } + +-/* Mangle BASE name, copy it at the beginning of PTR buffer and +- return address of the \0 character of the buffer. */ +- + static char * + mangle_name (char const *base, char *ptr) + { +@@ -2570,13 +2567,49 @@ mangle_name (char const *base, char *ptr) + + /* Generate the source filename part. */ + if (!flag_preserve_paths) +- base = lbasename (base); ++ { ++ base = lbasename (base); ++ len = strlen (base); ++ memcpy (ptr, base, len); ++ ptr += len; ++ } + else +- base = mangle_path (base); ++ { ++ /* Convert '/' to '#', convert '..' to '^', ++ convert ':' to '~' on DOS based file system. */ ++ const char *probe; + +- len = strlen (base); +- memcpy (ptr, base, len); +- ptr += len; ++#if HAVE_DOS_BASED_FILE_SYSTEM ++ if (base[0] && base[1] == ':') ++ { ++ ptr[0] = base[0]; ++ ptr[1] = '~'; ++ ptr += 2; ++ base += 2; ++ } ++#endif ++ for (; *base; base = probe) ++ { ++ size_t len; ++ ++ for (probe = base; *probe; probe++) ++ if (*probe == '/') ++ break; ++ len = probe - base; ++ if (len == 2 && base[0] == '.' && base[1] == '.') ++ *ptr++ = '^'; ++ else ++ { ++ memcpy (ptr, base, len); ++ ptr += len; ++ } ++ if (*probe) ++ { ++ *ptr++ = '#'; ++ probe++; ++ } ++ } ++ } + + return ptr; + } diff --git a/repos/ports/src/noux-pkg/gcc/patches/series b/repos/ports/src/noux-pkg/gcc/patches/series index e590a0c799..1d4030889d 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/series +++ b/repos/ports/src/noux-pkg/gcc/patches/series @@ -1,4 +1,3 @@ -bug89349.patch config.patch misc.patch no_short_enums.patch @@ -14,3 +13,5 @@ arm.patch new_opa.patch aarch64.patch emutls.patch +frame_pointer.patch +revert_gcov_path_mangling.patch diff --git a/repos/ports/src/noux-pkg/gcc/patches/target_libbacktrace.patch b/repos/ports/src/noux-pkg/gcc/patches/target_libbacktrace.patch index 422a843cee..44c77ee225 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/target_libbacktrace.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/target_libbacktrace.patch @@ -8,10 +8,10 @@ Don't build libbacktrace, which needs a libc. 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac -index c343333..87428a5 100644 +index c78d9cbea..2a25449de 100644 --- a/configure.ac +++ b/configure.ac -@@ -146,7 +146,6 @@ host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb +@@ -145,7 +145,6 @@ host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb # the host libraries and the host tools (which may be a cross compiler) # Note that libiberty is not a target library. target_libraries="target-libgcc \ diff --git a/tool/builddir/build.mk b/tool/builddir/build.mk index 9df18257c5..6b6f2e2e54 100644 --- a/tool/builddir/build.mk +++ b/tool/builddir/build.mk @@ -148,7 +148,7 @@ check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.)) # Empty DST_DIRS is interpreted as a tool-chain agnostic target, e.g., clean. # ifneq ($(DST_DIRS),) -REQUIRED_GCC_VERSION ?= 8.3.0 +REQUIRED_GCC_VERSION ?= 10.3.0 GCC_VERSION := $(filter $(REQUIRED_GCC_VERSION) ,$(shell $(CUSTOM_CXX) --version)) ifneq ($(GCC_VERSION), $(REQUIRED_GCC_VERSION)) $(error "$(CUSTOM_CXX) version $(REQUIRED_GCC_VERSION) is required") diff --git a/tool/tool_chain b/tool/tool_chain index 94fc892796..791b9ba724 100755 --- a/tool/tool_chain +++ b/tool/tool_chain @@ -54,8 +54,8 @@ GENODE_DIR ?= $(realpath $(dir $(firstword $(MAKEFILE_LIST)))/..) # version numbers # -TOOL_CHAIN_VERSION = 19.05 -GCC_VERSION = 8.3.0 +TOOL_CHAIN_VERSION = 21.05 +GCC_VERSION = 10.3.0 BINUTILS_VERSION = 2.32 # @@ -93,7 +93,10 @@ SUDO ?= sudo # # Check if 'autoconf' is installed # -AUTOCONF_VERSION = 2.64 +# Required version is 2.69, but there is no versioned binary name on Ubuntu +# right now like there has been for version 2.64. +# +AUTOCONF_VERSION = AUTOCONF_VERSION_STRING = "autoconf (GNU Autoconf) $(AUTOCONF_VERSION)" ifeq ($(shell autoconf -V | grep $(AUTOCONF_VERSION_STRING)),) @@ -476,5 +479,5 @@ install: build_all $(VERBOSE)$(SUDO) cp -a --remove-destination --no-target-directory $(LOCAL_INSTALL_LOCATION) $(INSTALL_LOCATION) $(VERBOSE)$(LIB_GCC) ifeq ($(INSTALL_LOCATION),$(DEFAULT_INSTALL_LOCATION)) - $(VERBOSE)$(SUDO) ln -snf $(TOOL_CHAIN_VERSION) $(dir $(INSTALL_LOCATION))/current + $(VERBOSE)$(SUDO) ln -snf $(TOOL_CHAIN_VERSION) $(dir $(INSTALL_LOCATION))current endif