update the gcc 8 and 11 patches aswell

This commit is contained in:
Kalamatee 2023-04-11 23:16:32 +01:00 committed by deadwood
parent b82a892745
commit cf4c685879
2 changed files with 213 additions and 16 deletions

View File

@ -491,8 +491,8 @@ diff -ruN gcc-11.2.0/gcc/config/aros-stdint.h gcc-11.2.0.aros/gcc/config/aros-st
+#define UINTPTR_TYPE (LONG_TYPE_SIZE == 64 ? UINT64_TYPE : UINT32_TYPE)
diff -ruN gcc-11.2.0/gcc/config/aros.h gcc-11.2.0.aros/gcc/config/aros.h
--- gcc-11.2.0/gcc/config/aros.h 1970-01-01 00:00:00.000000000 +0000
+++ gcc-11.2.0.aros/gcc/config/aros.h 2020-12-27 16:58:14.310000000 +0000
@@ -0,0 +1,112 @@
+++ gcc-11.2.0.aros/gcc/config/aros.h 2023-04-11 22:08:41.424740829 +0000
@@ -0,0 +1,123 @@
+/* Definitions for AROS
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Contributed by Fabio Alemagna
@ -554,7 +554,7 @@ diff -ruN gcc-11.2.0/gcc/config/aros.h gcc-11.2.0.aros/gcc/config/aros.h
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ "startup%O%s %{detach:detach%O%s} %{nix:nixmain%O%s} %{static-libstdc++:static-cxx-ops%O%s static-cxx-personality%O%s static-cxx-cxa-pure-virtual%O%s}"
+ "startup%O%s %{detach:detach%O%s} %{nix:nixmain%O%s}"
+
+/* Provide a ENDFILE_SPEC appropriate for AROS. */
+
@ -589,15 +589,26 @@ diff -ruN gcc-11.2.0/gcc/config/aros.h gcc-11.2.0.aros/gcc/config/aros.h
+
+#undef LIB_SPEC
+#define LIB_SPEC \
+ "--start-group -lmui -larossupport -lamiga %{!nostartfiles:%{!static:%{!nostdc:%{!noposixc:%{!deferposixc:-lposixc}} -lstdcio %{!noposixc:%{deferposixc:-lposixc}} -lstdc}}%{static:%{!nostdc:-lstdc.static}}} -lcodesets -lkeymap -lexpansion -lcommodities -ldiskfont -lasl -lmuimaster -ldatatypes -lcybergraphics -lworkbench -licon -lintuition -lgadtools -llayers -laros -lpartition -liffparse -lgraphics -llocale -ldos -lutility -loop %{!nosysbase:-lexec} -lautoinit -llibinit %{nostartfiles:%{static:-lstdc.static}} --end-group"
+ "-lmui -larossupport -lamiga %{!nostartfiles:%{!static:%{!nostdc:%{!noposixc:%{!deferposixc:-lposixc}} -lstdcio %{!noposixc:%{deferposixc:-lposixc}} -lstdc}}%{static:%{!nostdc:-lstdc.static}}} -lcodesets -lkeymap -lexpansion -lcommodities -ldiskfont -lasl -lmuimaster -ldatatypes -lcybergraphics -lworkbench -licon -lintuition -lgadtools -llayers -laros -lpartition -liffparse -lgraphics -llocale -ldos -lutility -loop %{!nosysbase:-lexec} -lautoinit -llibinit %{nostartfiles:%{!static:%{!noposixc:-lposixc} -lstdcio %{!nostdc:-lstdc}}%{static:%{!nostdc:-lstdc.static}}} --end-group"
+
+#undef LIBSTDCXX_STATIC
+#define LIBSTDCXX_STATIC "pthread"
+#define LIBSTDCXX_STATIC "supc++"
+
+#undef LIBSTDCXX_PTHREAD
+#define LIBSTDCXX_PTHREAD "pthread"
+
+#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR)
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#endif
+
+#define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \
+ "--start-group %G %{!nolibc:%L %G}"
+
+#undef LINK_GCC_C_SEQUENCE_SPEC
+#define LINK_GCC_C_SEQUENCE_SPEC GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC
+
+#define LIBSTDCXX_CIRCULAR
+
+/* AROS uses its own collect-like program for the moment. */
+#undef LINKER_NAME
+#define LINKER_NAME "collect-aros"
@ -1135,6 +1146,94 @@ diff -ruN gcc-11.2.0/gcc/config.host gcc-11.2.0.aros/gcc/config.host
*-*-*vms*)
host_xm_file="vms/xm-vms.h"
host_xmake_file=vms/x-vms
diff -ruN gcc-11.2.0/gcc/cp/g++spec.c gcc-11.2.0.aros/gcc/cp/g++spec.c
--- gcc-11.2.0/gcc/cp/g++spec.c 2021-07-28 06:55:07.196286073 +0000
+++ gcc-11.2.0.aros/gcc/cp/g++spec.c 2023-04-11 22:10:59.244740397 +0000
@@ -68,6 +68,9 @@
#ifndef LIBCXXABI_STATIC
#define LIBCXXABI_STATIC NULL
#endif
+#ifndef LIBSTDCXX_PTHREAD
+#define LIBSTDCXX_PTHREAD NULL
+#endif
/* The values used here must match those of the stdlib_kind enumeration
in c.opt. */
@@ -82,6 +85,10 @@
unsigned int *in_decoded_options_count,
int *in_added_libraries)
{
+#ifdef LIBSTDCXX_CIRCULAR
+ int started = 0;
+#endif
+
unsigned int i, j;
/* If nonzero, the user gave us the `-p' or `-pg' flag. */
@@ -222,6 +229,8 @@
case OPT_static_libstdc__:
library = library >= 0 ? 2 : library;
+ if (LIBSTDCXX_PTHREAD != NULL)
+ added += 1;
args[i] |= SKIPOPT;
break;
@@ -282,6 +291,10 @@
#ifndef ENABLE_SHARED_LIBGCC
shared_libgcc = 0;
#endif
+#ifdef LIBSTDCXX_CIRCULAR
+ if (library > 0)
+ added += 2;
+#endif
/* Add one for shared_libgcc or extra static library. */
num_args = argc + added + need_math + (library > 0) * 4 + 1;
@@ -357,6 +370,13 @@
/* Add `-lstdc++' if we haven't already done so. */
if (library > 0)
{
+#ifdef LIBSTDCXX_CIRCULAR
+ generate_option (OPT_Wl_, "--start-group", 1, CL_DRIVER,
+ &new_decoded_options[j]);
+ started = 1;
+ j++;
+#endif
+
#ifdef HAVE_LD_STATIC_DYNAMIC
if (library > 1 && !static_link)
{
@@ -394,6 +414,13 @@
added_libraries++;
j++;
}
+ if ((static_link || library > 1) && LIBSTDCXX_PTHREAD != NULL)
+ {
+ generate_option (OPT_l, LIBSTDCXX_PTHREAD, 1,
+ CL_DRIVER, &new_decoded_options[j]);
+ added_libraries++;
+ j++;
+ }
#ifdef HAVE_LD_STATIC_DYNAMIC
if (library > 1 && !static_link)
{
@@ -421,6 +448,15 @@
generate_option (OPT_shared_libgcc, NULL, 1, CL_DRIVER,
&new_decoded_options[j++]);
+#ifdef LIBSTDCXX_CIRCULAR
+ if (started)
+ {
+ generate_option (OPT_Wl_, "--end-group", 1, CL_DRIVER,
+ &new_decoded_options[j]);
+ j++;
+ }
+#endif
+
*in_decoded_options_count = j;
*in_decoded_options = new_decoded_options;
*in_added_libraries = added_libraries;
diff -ruN gcc-11.2.0/gcc/ginclude/aros/types/null.h gcc-11.2.0.aros/gcc/ginclude/aros/types/null.h
--- gcc-11.2.0/gcc/ginclude/aros/types/null.h 1970-01-01 00:00:00.000000000 +0000
+++ gcc-11.2.0.aros/gcc/ginclude/aros/types/null.h 2020-12-27 16:58:14.310000000 +0000
@ -2474,7 +2573,7 @@ diff -ruN gcc-11.2.0/libstdc++-v3/include/std/ratio gcc-11.2.0.aros/libstdc++-v3
static constexpr int __coshift = (__shift != 0) ? __coshift_ : 0;
diff -ruN gcc-11.2.0/libstdc++-v3/src/c++17/ryu/f2s_intrinsics.h gcc-11.2.0.aros/libstdc++-v3/src/c++17/ryu/f2s_intrinsics.h
--- gcc-11.2.0/libstdc++-v3/src/c++17/ryu/f2s_intrinsics.h 2021-07-28 06:55:09.336315933 +0000
+++ gcc-11.2.0.aros/libstdc++-v3/src/c++17/ryu/f2s_intrinsics.h 2022-04-03 13:33:31.899461700 +0000
+++ gcc-11.2.0.aros/libstdc++-v3/src/c++17/ryu/f2s_intrinsics.h 2020-12-27 16:58:14.310000000 +0000
@@ -89,7 +89,9 @@
#else // RYU_32_BIT_PLATFORM
const uint64_t sum = (bits0 >> 32) + bits1;

View File

@ -1,6 +1,6 @@
diff -ruN gcc-8.3.0/config.guess gcc-8.3.0.aros/config.guess
--- gcc-8.3.0/config.guess 2018-01-03 04:25:18.000000000 +0000
+++ gcc-8.3.0.aros/config.guess 2020-12-29 22:56:14.720000000 +0000
+++ gcc-8.3.0.aros/config.guess 2019-04-14 20:44:31.586676100 +0000
@@ -1395,8 +1395,8 @@
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
@ -80,7 +80,7 @@ diff -ruN gcc-8.3.0/fixincludes/configure.ac gcc-8.3.0.aros/fixincludes/configur
x86_64-*-mingw32* | \
diff -ruN gcc-8.3.0/fixincludes/fixincl.x gcc-8.3.0.aros/fixincludes/fixincl.x
--- gcc-8.3.0/fixincludes/fixincl.x 2018-02-22 16:12:26.000000000 +0000
+++ gcc-8.3.0.aros/fixincludes/fixincl.x 2020-12-29 23:00:37.000000000 +0000
+++ gcc-8.3.0.aros/fixincludes/fixincl.x 2019-04-14 20:44:31.586676100 +0000
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
@ -178,7 +178,7 @@ diff -ruN gcc-8.3.0/fixincludes/fixincl.x gcc-8.3.0.aros/fixincludes/fixincl.x
AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
diff -ruN gcc-8.3.0/fixincludes/inclhack.def gcc-8.3.0.aros/fixincludes/inclhack.def
--- gcc-8.3.0/fixincludes/inclhack.def 2018-02-22 16:12:26.000000000 +0000
+++ gcc-8.3.0.aros/fixincludes/inclhack.def 2020-12-29 22:57:41.710000000 +0000
+++ gcc-8.3.0.aros/fixincludes/inclhack.def 2019-04-14 20:44:31.586676100 +0000
@@ -103,6 +103,27 @@
};
@ -518,8 +518,8 @@ diff -ruN gcc-8.3.0/gcc/config/aros-stdint.h gcc-8.3.0.aros/gcc/config/aros-stdi
+#define UINTPTR_TYPE (LONG_TYPE_SIZE == 64 ? UINT64_TYPE : UINT32_TYPE)
diff -ruN gcc-8.3.0/gcc/config/aros.h gcc-8.3.0.aros/gcc/config/aros.h
--- gcc-8.3.0/gcc/config/aros.h 1970-01-01 00:00:00.000000000 +0000
+++ gcc-8.3.0.aros/gcc/config/aros.h 2019-04-14 20:44:31.586676100 +0000
@@ -0,0 +1,115 @@
+++ gcc-8.3.0.aros/gcc/config/aros.h 2023-04-11 22:14:54.404740054 +0000
@@ -0,0 +1,126 @@
+/* Definitions for AROS
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Contributed by Fabio Alemagna
@ -584,7 +584,7 @@ diff -ruN gcc-8.3.0/gcc/config/aros.h gcc-8.3.0.aros/gcc/config/aros.h
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ "startup%O%s %{detach:detach%O%s} %{nix:nixmain%O%s} %{static-stdc++:static-cxx-ops%O%s static-cxx-personality%O%s static-cxx-cxa-pure-virtual%O%s}"
+ "startup%O%s %{detach:detach%O%s} %{nix:nixmain%O%s}"
+
+/* Provide a ENDFILE_SPEC appropriate for AROS. */
+
@ -619,15 +619,26 @@ diff -ruN gcc-8.3.0/gcc/config/aros.h gcc-8.3.0.aros/gcc/config/aros.h
+
+#undef LIB_SPEC
+#define LIB_SPEC \
+ "--start-group -lmui -larossupport -lamiga %{!nostartfiles:%{!static:%{!nostdc:%{!noposixc:%{!deferposixc:-lposixc}} -lstdcio %{!noposixc:%{deferposixc:-lposixc}} -lstdc}}%{static:%{!nostdc:-lstdc.static}}} -lcodesets -lkeymap -lexpansion -lcommodities -ldiskfont -lasl -lmuimaster -ldatatypes -lcybergraphics -lworkbench -licon -lintuition -lgadtools -llayers -laros -lpartition -liffparse -lgraphics -llocale -ldos -lutility -loop %{!nosysbase:-lexec} -lautoinit -llibinit %{nostartfiles:%{static:-lstdc.static}} --end-group"
+ "-lmui -larossupport -lamiga %{!nostartfiles:%{!static:%{!nostdc:%{!noposixc:%{!deferposixc:-lposixc}} -lstdcio %{!noposixc:%{deferposixc:-lposixc}} -lstdc}}%{static:%{!nostdc:-lstdc.static}}} -lcodesets -lkeymap -lexpansion -lcommodities -ldiskfont -lasl -lmuimaster -ldatatypes -lcybergraphics -lworkbench -licon -lintuition -lgadtools -llayers -laros -lpartition -liffparse -lgraphics -llocale -ldos -lutility -loop %{!nosysbase:-lexec} -lautoinit -llibinit %{nostartfiles:%{!static:%{!noposixc:-lposixc} -lstdcio %{!nostdc:-lstdc}}%{static:%{!nostdc:-lstdc.static}}} --end-group"
+
+#undef LIBSTDCXX_STATIC
+#define LIBSTDCXX_STATIC "pthread"
+#define LIBSTDCXX_STATIC "supc++"
+
+#undef LIBSTDCXX_PTHREAD
+#define LIBSTDCXX_PTHREAD "pthread"
+
+#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR)
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#endif
+
+#define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \
+ "--start-group %G %{!nolibc:%L %G}"
+
+#undef LINK_GCC_C_SEQUENCE_SPEC
+#define LINK_GCC_C_SEQUENCE_SPEC GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC
+
+#define LIBSTDCXX_CIRCULAR
+
+/* AROS uses its own collect-like program for the moment. */
+#undef LINKER_NAME
+#define LINKER_NAME "collect-aros"
@ -1173,7 +1184,7 @@ diff -ruN gcc-8.3.0/gcc/config.gcc gcc-8.3.0.aros/gcc/config.gcc
extra_options="${extra_options} rs6000/sysv4.opt"
diff -ruN gcc-8.3.0/gcc/config.host gcc-8.3.0.aros/gcc/config.host
--- gcc-8.3.0/gcc/config.host 2018-01-03 10:03:58.000000000 +0000
+++ gcc-8.3.0.aros/gcc/config.host 2020-12-29 22:58:28.400000000 +0000
+++ gcc-8.3.0.aros/gcc/config.host 2019-04-14 20:44:31.586676100 +0000
@@ -107,7 +107,7 @@
;;
esac
@ -1194,6 +1205,93 @@ diff -ruN gcc-8.3.0/gcc/config.host gcc-8.3.0.aros/gcc/config.host
*-*-*vms*)
host_xm_file="vms/xm-vms.h"
host_xmake_file=vms/x-vms
diff -ruN gcc-8.3.0/gcc/cp/g++spec.c gcc-8.3.0.aros/gcc/cp/g++spec.c
--- gcc-8.3.0/gcc/cp/g++spec.c 2018-01-03 10:03:58.000000000 +0000
+++ gcc-8.3.0.aros/gcc/cp/g++spec.c 2023-04-11 22:14:05.834739906 +0000
@@ -54,12 +54,19 @@
#ifndef LIBSTDCXX_STATIC
#define LIBSTDCXX_STATIC NULL
#endif
+#ifndef LIBSTDCXX_PTHREAD
+#define LIBSTDCXX_PTHREAD NULL
+#endif
void
lang_specific_driver (struct cl_decoded_option **in_decoded_options,
unsigned int *in_decoded_options_count,
int *in_added_libraries)
{
+#ifdef LIBSTDCXX_CIRCULAR
+ int started = 0;
+#endif
+
unsigned int i, j;
/* If nonzero, the user gave us the `-p' or `-pg' flag. */
@@ -204,6 +211,8 @@
case OPT_static_libstdc__:
library = library >= 0 ? 2 : library;
+ if (LIBSTDCXX_PTHREAD != NULL)
+ added += 1;
args[i] |= SKIPOPT;
break;
@@ -260,6 +269,10 @@
#ifndef ENABLE_SHARED_LIBGCC
shared_libgcc = 0;
#endif
+#ifdef LIBSTDCXX_CIRCULAR
+ if (library > 0)
+ added += 2;
+#endif
/* Add one for shared_libgcc or extra static library. */
num_args = argc + added + need_math + (library > 0) * 4 + 1;
@@ -334,6 +347,13 @@
/* Add `-lstdc++' if we haven't already done so. */
if (library > 0)
{
+#ifdef LIBSTDCXX_CIRCULAR
+ generate_option (OPT_Wl_, "--start-group", 1, CL_DRIVER,
+ &new_decoded_options[j]);
+ started = 1;
+ j++;
+#endif
+
#ifdef HAVE_LD_STATIC_DYNAMIC
if (library > 1 && !static_link)
{
@@ -355,6 +375,13 @@
added_libraries++;
j++;
}
+ if ((static_link || library > 1) && LIBSTDCXX_PTHREAD != NULL)
+ {
+ generate_option (OPT_l, LIBSTDCXX_PTHREAD, 1,
+ CL_DRIVER, &new_decoded_options[j]);
+ added_libraries++;
+ j++;
+ }
#ifdef HAVE_LD_STATIC_DYNAMIC
if (library > 1 && !static_link)
{
@@ -389,6 +416,15 @@
generate_option (OPT_shared_libgcc, NULL, 1, CL_DRIVER,
&new_decoded_options[j++]);
+#ifdef LIBSTDCXX_CIRCULAR
+ if (started)
+ {
+ generate_option (OPT_Wl_, "--end-group", 1, CL_DRIVER,
+ &new_decoded_options[j]);
+ j++;
+ }
+#endif
+
*in_decoded_options_count = j;
*in_decoded_options = new_decoded_options;
*in_added_libraries = added_libraries;
diff -ruN gcc-8.3.0/gcc/ginclude/aros/types/null.h gcc-8.3.0.aros/gcc/ginclude/aros/types/null.h
--- gcc-8.3.0/gcc/ginclude/aros/types/null.h 1970-01-01 00:00:00.000000000 +0000
+++ gcc-8.3.0.aros/gcc/ginclude/aros/types/null.h 2019-04-14 20:44:31.586676100 +0000
@ -1282,7 +1380,7 @@ diff -ruN gcc-8.3.0/gcc/ginclude/stddef.h gcc-8.3.0.aros/gcc/ginclude/stddef.h
#endif /* __SIZE_T */
diff -ruN gcc-8.3.0/gcc/system.h gcc-8.3.0.aros/gcc/system.h
--- gcc-8.3.0/gcc/system.h 2018-02-16 09:05:35.000000000 +0000
+++ gcc-8.3.0.aros/gcc/system.h 2020-12-29 22:59:24.080000000 +0000
+++ gcc-8.3.0.aros/gcc/system.h 2019-04-14 20:44:31.586676100 +0000
@@ -21,6 +21,11 @@
#ifndef GCC_SYSTEM_H