diff --git a/gcc/9/patches/0001-Changes-for-AmigaOS-version-of-gcc.patch b/gcc/9/patches/0001-Changes-for-AmigaOS-version-of-gcc.patch index 2fb3de7e..ecb3f2fe 100644 --- a/gcc/9/patches/0001-Changes-for-AmigaOS-version-of-gcc.patch +++ b/gcc/9/patches/0001-Changes-for-AmigaOS-version-of-gcc.patch @@ -1,7 +1,7 @@ From 9511ecf6645337c5cdc31e5c61a1cfb132f16ba4 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Tue, 17 Feb 2015 20:25:55 +0100 -Subject: [PATCH 01/31] Changes for AmigaOS version of gcc. +Subject: [PATCH 01/32] Changes for AmigaOS version of gcc. --- fixincludes/configure | 1 + diff --git a/gcc/9/patches/0002-Added-new-function-attribute-lineartags-and-pragma-a.patch b/gcc/9/patches/0002-Added-new-function-attribute-lineartags-and-pragma-a.patch index a4dd433e..6f2b31b6 100644 --- a/gcc/9/patches/0002-Added-new-function-attribute-lineartags-and-pragma-a.patch +++ b/gcc/9/patches/0002-Added-new-function-attribute-lineartags-and-pragma-a.patch @@ -1,7 +1,7 @@ From 892a378d609a1b622e6fd6259078d3cfca9c9717 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Fri, 14 Nov 2014 20:03:56 +0100 -Subject: [PATCH 02/31] Added new function attribute "lineartags" and pragma +Subject: [PATCH 02/32] Added new function attribute "lineartags" and pragma "amigaos tagtype". Functions that have the lineartags attribute are assumed to be functions diff --git a/gcc/9/patches/0003-Disable-.machine-directive-generation.patch b/gcc/9/patches/0003-Disable-.machine-directive-generation.patch index fe67e067..887c573c 100644 --- a/gcc/9/patches/0003-Disable-.machine-directive-generation.patch +++ b/gcc/9/patches/0003-Disable-.machine-directive-generation.patch @@ -1,7 +1,7 @@ From f80203a95b03a0ccfa6212ff7cf5cc742782e571 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Thu, 9 Jul 2015 06:54:37 +0200 -Subject: [PATCH 03/31] Disable .machine directive generation. +Subject: [PATCH 03/32] Disable .machine directive generation. It breaks manual args to the assembler with different flavor, e.g., -Wa,-m440. This is probably not the right fix. diff --git a/gcc/9/patches/0004-The-default-link-mode-is-static-for-AmigaOS.patch b/gcc/9/patches/0004-The-default-link-mode-is-static-for-AmigaOS.patch index d3aaa42f..8a235912 100644 --- a/gcc/9/patches/0004-The-default-link-mode-is-static-for-AmigaOS.patch +++ b/gcc/9/patches/0004-The-default-link-mode-is-static-for-AmigaOS.patch @@ -1,7 +1,7 @@ From f43ead8f261f824ad2f32a1115c206f4b6574e52 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Wed, 2 Dec 2015 20:56:33 +0100 -Subject: [PATCH 04/31] The default link mode is static for AmigaOS. +Subject: [PATCH 04/32] The default link mode is static for AmigaOS. Changed the g++ driver to reflect this. --- diff --git a/gcc/9/patches/0005-Disable-the-usage-of-dev-urandom-when-compiling-for-.patch b/gcc/9/patches/0005-Disable-the-usage-of-dev-urandom-when-compiling-for-.patch index d73fb382..0681a2cb 100644 --- a/gcc/9/patches/0005-Disable-the-usage-of-dev-urandom-when-compiling-for-.patch +++ b/gcc/9/patches/0005-Disable-the-usage-of-dev-urandom-when-compiling-for-.patch @@ -1,7 +1,7 @@ From 93b70f37543c86db068f00da18672cfdd96988b8 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Wed, 2 Dec 2015 21:39:42 +0100 -Subject: [PATCH 05/31] Disable the usage of /dev/urandom when compiling for +Subject: [PATCH 05/32] Disable the usage of /dev/urandom when compiling for AmigaOS. --- diff --git a/gcc/9/patches/0006-Expand-arg-zero-on-AmigaOS-using-the-PROGDIR-assign.patch b/gcc/9/patches/0006-Expand-arg-zero-on-AmigaOS-using-the-PROGDIR-assign.patch index 02a588dc..b49b2fe7 100644 --- a/gcc/9/patches/0006-Expand-arg-zero-on-AmigaOS-using-the-PROGDIR-assign.patch +++ b/gcc/9/patches/0006-Expand-arg-zero-on-AmigaOS-using-the-PROGDIR-assign.patch @@ -1,7 +1,7 @@ From d994439847182f153ca7a25f718e47eb9ecaa456 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Sat, 5 Dec 2015 13:17:26 +0100 -Subject: [PATCH 06/31] Expand arg zero on AmigaOS using the PROGDIR: assign. +Subject: [PATCH 06/32] Expand arg zero on AmigaOS using the PROGDIR: assign. This should make sure that the proper relative paths are computed during process_command(). diff --git a/gcc/9/patches/0007-Some-AmigaOS-4.x-compability-changes-for-posix-threa.patch b/gcc/9/patches/0007-Some-AmigaOS-4.x-compability-changes-for-posix-threa.patch index 4db3b326..7d10beca 100644 --- a/gcc/9/patches/0007-Some-AmigaOS-4.x-compability-changes-for-posix-threa.patch +++ b/gcc/9/patches/0007-Some-AmigaOS-4.x-compability-changes-for-posix-threa.patch @@ -1,7 +1,7 @@ From 8ba761c3761a87cdf6a5ece5b7fa5c225e001003 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Thu, 21 Jan 2016 20:46:59 +0100 -Subject: [PATCH 07/31] Some AmigaOS 4.x compability changes for posix thread +Subject: [PATCH 07/32] Some AmigaOS 4.x compability changes for posix thread support. --- diff --git a/gcc/9/patches/0008-Added-libstc-support-for-AmigaOS.patch b/gcc/9/patches/0008-Added-libstc-support-for-AmigaOS.patch index c79896ca..2d6d5445 100644 --- a/gcc/9/patches/0008-Added-libstc-support-for-AmigaOS.patch +++ b/gcc/9/patches/0008-Added-libstc-support-for-AmigaOS.patch @@ -1,7 +1,7 @@ From ad7ead8f8064e66ea8508f3dcba43f62a489a41b Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Fri, 22 Jan 2016 20:04:50 +0100 -Subject: [PATCH 08/31] Added libstc++ support for AmigaOS. +Subject: [PATCH 08/32] Added libstc++ support for AmigaOS. --- libstdc++-v3/config/os/amigaos/ctype_base.h | 59 +++++++ diff --git a/gcc/9/patches/0009-Enable-libatomic-for-ppc-amigaos.patch b/gcc/9/patches/0009-Enable-libatomic-for-ppc-amigaos.patch index d7d5574f..609a5747 100644 --- a/gcc/9/patches/0009-Enable-libatomic-for-ppc-amigaos.patch +++ b/gcc/9/patches/0009-Enable-libatomic-for-ppc-amigaos.patch @@ -1,7 +1,7 @@ From 330c0d98c44e822fbe5795bd7b203143358eefe1 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Fri, 3 Mar 2017 08:52:48 +0100 -Subject: [PATCH 09/31] Enable libatomic for ppc-amigaos. +Subject: [PATCH 09/32] Enable libatomic for ppc-amigaos. It is not really finished yet. --- diff --git a/gcc/9/patches/0010-Implement-libat_lock_n-and-libat_unlock_n.patch b/gcc/9/patches/0010-Implement-libat_lock_n-and-libat_unlock_n.patch index d22af59a..8fc1592a 100644 --- a/gcc/9/patches/0010-Implement-libat_lock_n-and-libat_unlock_n.patch +++ b/gcc/9/patches/0010-Implement-libat_lock_n-and-libat_unlock_n.patch @@ -1,7 +1,7 @@ From fb4f1673a62e828fd3fa74decd2771942ea709ac Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Wed, 23 May 2018 10:54:19 +0200 -Subject: [PATCH 10/31] Implement libat_lock_n() and libat_unlock_n(). +Subject: [PATCH 10/32] Implement libat_lock_n() and libat_unlock_n(). --- libatomic/config/amigaos/lock.c | 58 ++++++++++++++++++++++++++++++++--------- diff --git a/gcc/9/patches/0011-Pretend-C99-compatibility.patch b/gcc/9/patches/0011-Pretend-C99-compatibility.patch index 5a2aa31e..d8095e74 100644 --- a/gcc/9/patches/0011-Pretend-C99-compatibility.patch +++ b/gcc/9/patches/0011-Pretend-C99-compatibility.patch @@ -1,22 +1,20 @@ -From 7ddd0aa30703bee23ed45739d8e7bf464e2f8fca Mon Sep 17 00:00:00 2001 +From 4bcecd9e4df4f9cc0cc185e9170233dd7fa47e5f Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Sat, 4 Mar 2017 07:39:21 +0100 -Subject: [PATCH 11/31] Pretend C99 compatibility. +Subject: [PATCH 11/32] Pretend C99 compatibility. -At least newlib is not fully C99 compatible because it doesn't expose -various C99 function if __STRICT_ANSI__ is declared. Also it misses -strtold() (as clib2). +Disable missing strtold() and pretend that newlib is C99 compatible. --- - libstdc++-v3/config/os/amigaos/os_defines.h | 3 +++ + libstdc++-v3/config/os/amigaos/os_defines.h | 1 + libstdc++-v3/include/bits/basic_string.h | 3 +++ libstdc++-v3/include/c_global/cstdlib | 8 ++++++++ - 3 files changed, 14 insertions(+) + 3 files changed, 12 insertions(+) diff --git a/libstdc++-v3/config/os/amigaos/os_defines.h b/libstdc++-v3/config/os/amigaos/os_defines.h -index 346f063958cd7e80ebf97be4acee0bdf391cb811..6b67630b7be7102a9dfb7c104deac6293a13c017 100644 +index 346f063958cd7e80ebf97be4acee0bdf391cb811..647c560e6ff196234fda2e14073ee0b7074ad5da 100644 --- a/libstdc++-v3/config/os/amigaos/os_defines.h +++ b/libstdc++-v3/config/os/amigaos/os_defines.h -@@ -35,9 +35,12 @@ +@@ -35,9 +35,10 @@ // No ioctl() on AmigaOS #define _GLIBCXX_NO_IOCTL 1 @@ -24,8 +22,6 @@ index 346f063958cd7e80ebf97be4acee0bdf391cb811..6b67630b7be7102a9dfb7c104deac629 #ifdef __NEWLIB__ #define _GLIBCXX_USE_C99_STDINT_TR1 1 +#define _GLIBCXX_USE_C99 1 -+/* Temporary until newlib behaves properly */ -+#undef __STRICT_ANSI__ #endif #endif diff --git a/gcc/9/patches/0012-Add-amigaos-stdint.h-for-libatomic.patch b/gcc/9/patches/0012-Add-amigaos-stdint.h-for-libatomic.patch index 781d9a98..1f34e8b1 100644 --- a/gcc/9/patches/0012-Add-amigaos-stdint.h-for-libatomic.patch +++ b/gcc/9/patches/0012-Add-amigaos-stdint.h-for-libatomic.patch @@ -1,7 +1,7 @@ -From 32119abeec42cdc7617a8b4e13f3bd7d2d9532fa Mon Sep 17 00:00:00 2001 +From 34210e273debe6623bc1bf65fb33e154dfca287d Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Tue, 3 Apr 2018 19:52:01 +0200 -Subject: [PATCH 12/31] Add amigaos-stdint.h for libatomic. +Subject: [PATCH 12/32] Add amigaos-stdint.h for libatomic. --- gcc/config.gcc | 2 +- diff --git a/gcc/9/patches/0013-Rerun-make-maint-deps-in-libiberty.patch b/gcc/9/patches/0013-Rerun-make-maint-deps-in-libiberty.patch index 6f2027a0..210e07f0 100644 --- a/gcc/9/patches/0013-Rerun-make-maint-deps-in-libiberty.patch +++ b/gcc/9/patches/0013-Rerun-make-maint-deps-in-libiberty.patch @@ -1,7 +1,7 @@ -From f6986271e33195dc5448ba24c5acc88dd9244c1a Mon Sep 17 00:00:00 2001 +From 19c55bd286093fd84712b419225f529d1fe7de3d Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Wed, 4 Apr 2018 22:48:33 +0200 -Subject: [PATCH 13/31] Rerun make maint-deps in libiberty. +Subject: [PATCH 13/32] Rerun make maint-deps in libiberty. --- libiberty/Makefile.in | 36 ++++++++++++++++++++++-------------- diff --git a/gcc/9/patches/0014-Add-custom-implementation-of-various-env-related-fun.patch b/gcc/9/patches/0014-Add-custom-implementation-of-various-env-related-fun.patch index feae9843..2d465ce5 100644 --- a/gcc/9/patches/0014-Add-custom-implementation-of-various-env-related-fun.patch +++ b/gcc/9/patches/0014-Add-custom-implementation-of-various-env-related-fun.patch @@ -1,7 +1,7 @@ -From ac3c290c64a13ae833ae83c952d3eb4d437be46a Mon Sep 17 00:00:00 2001 +From de2b45b20db167b2bd7810ea923cbea3a223ecc0 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Wed, 4 Apr 2018 23:50:48 +0200 -Subject: [PATCH 14/31] Add custom implementation of various env-related +Subject: [PATCH 14/32] Add custom implementation of various env-related functions. No official clib does support unsetenv() but this is required by newer gcc. diff --git a/gcc/9/patches/0015-Define-va_startlinear-and-va_getlinearva.patch b/gcc/9/patches/0015-Define-va_startlinear-and-va_getlinearva.patch index 981d70b7..38606e21 100644 --- a/gcc/9/patches/0015-Define-va_startlinear-and-va_getlinearva.patch +++ b/gcc/9/patches/0015-Define-va_startlinear-and-va_getlinearva.patch @@ -1,7 +1,7 @@ -From 6e09fc8c45f87629dd31bcf61acae35afa0edee9 Mon Sep 17 00:00:00 2001 +From cf0300253083010d65d3a4e76abdcbef133b828a Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Thu, 5 Apr 2018 19:56:45 +0200 -Subject: [PATCH 15/31] Define va_startlinear and va_getlinearva. +Subject: [PATCH 15/32] Define va_startlinear and va_getlinearva. These were usually defined in the clibs' stdarg.h. As we have now changed the include path order, clibs' stdarg.h is never included. diff --git a/gcc/9/patches/0016-Fix-r2-restoring-in-the-epilog-of-baserel-restoring-.patch b/gcc/9/patches/0016-Fix-r2-restoring-in-the-epilog-of-baserel-restoring-.patch index 1025c6c7..8b87b0cc 100644 --- a/gcc/9/patches/0016-Fix-r2-restoring-in-the-epilog-of-baserel-restoring-.patch +++ b/gcc/9/patches/0016-Fix-r2-restoring-in-the-epilog-of-baserel-restoring-.patch @@ -1,7 +1,7 @@ -From 30ecab0d0356aab11461e6eae0de522b649f67fd Mon Sep 17 00:00:00 2001 +From dba274ab56638988963334aa91e5a5b8c3146570 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Tue, 17 Apr 2018 22:02:09 +0200 -Subject: [PATCH 16/31] Fix r2 restoring in the epilog of baserel-restoring +Subject: [PATCH 16/32] Fix r2 restoring in the epilog of baserel-restoring functions. --- diff --git a/gcc/9/patches/0017-Avoid-section-anchors-in-the-baserel-mode.patch b/gcc/9/patches/0017-Avoid-section-anchors-in-the-baserel-mode.patch index f62cf7ce..94cab1a1 100644 --- a/gcc/9/patches/0017-Avoid-section-anchors-in-the-baserel-mode.patch +++ b/gcc/9/patches/0017-Avoid-section-anchors-in-the-baserel-mode.patch @@ -1,7 +1,7 @@ -From 945d91a324e0201bfe89d0b261b416017d69d5ea Mon Sep 17 00:00:00 2001 +From 980ce6ab65694034063955dc4c417a1e0f625611 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Thu, 19 Apr 2018 21:00:30 +0200 -Subject: [PATCH 17/31] Avoid section anchors in the baserel mode. +Subject: [PATCH 17/32] Avoid section anchors in the baserel mode. --- gcc/config/rs6000/amigaos-protos.h | 1 + diff --git a/gcc/9/patches/0018-Respect-nostdinc-also-for-SDK-includes.patch b/gcc/9/patches/0018-Respect-nostdinc-also-for-SDK-includes.patch index eb58ae49..f9a23d1f 100644 --- a/gcc/9/patches/0018-Respect-nostdinc-also-for-SDK-includes.patch +++ b/gcc/9/patches/0018-Respect-nostdinc-also-for-SDK-includes.patch @@ -1,7 +1,7 @@ -From 468b1096ebe3abe0fbe27fc65463c97c0fc4ec03 Mon Sep 17 00:00:00 2001 +From aeb602f9822c8b8330d7ba46c2409ffbe4d939ea Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Fri, 20 Apr 2018 20:04:30 +0200 -Subject: [PATCH 18/31] Respect -nostdinc also for SDK includes. +Subject: [PATCH 18/32] Respect -nostdinc also for SDK includes. --- gcc/config/rs6000/amigaos.h | 4 +--- diff --git a/gcc/9/patches/0019-Add-_Static_warning.patch b/gcc/9/patches/0019-Add-_Static_warning.patch index 95ac703e..4ad3f3c1 100644 --- a/gcc/9/patches/0019-Add-_Static_warning.patch +++ b/gcc/9/patches/0019-Add-_Static_warning.patch @@ -1,7 +1,7 @@ -From 3d6faadb51e79eb97b4cd3273abb62648f0deb5c Mon Sep 17 00:00:00 2001 +From d6a2142ed3895ee8278f004c27118cff64a52cbd Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Tue, 24 Apr 2018 22:46:21 +0200 -Subject: [PATCH 19/31] Add _Static_warning(). +Subject: [PATCH 19/32] Add _Static_warning(). This acts very similar to _Static_assert() but produces a warning rather than an compiler error. diff --git a/gcc/9/patches/0020-Add-tagtype-attribute-that-can-be-passed-to-enum-con.patch b/gcc/9/patches/0020-Add-tagtype-attribute-that-can-be-passed-to-enum-con.patch index a8c7f4b2..29af8282 100644 --- a/gcc/9/patches/0020-Add-tagtype-attribute-that-can-be-passed-to-enum-con.patch +++ b/gcc/9/patches/0020-Add-tagtype-attribute-that-can-be-passed-to-enum-con.patch @@ -1,7 +1,7 @@ -From 6d8c18fa473b71fed3819df0c600c4c191d234eb Mon Sep 17 00:00:00 2001 +From b1b312298accd2720fadca0958b6f8364808ca11 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Tue, 24 Apr 2018 06:29:13 +0200 -Subject: [PATCH 20/31] Add tagtype attribute that can be passed to enum +Subject: [PATCH 20/32] Add tagtype attribute that can be passed to enum constants. The tagtype attribute can be applied to enum constants in order to annotate diff --git a/gcc/9/patches/0021-Rename-lineartags-to-checktags.patch b/gcc/9/patches/0021-Rename-lineartags-to-checktags.patch index cccb0e05..f6889cc2 100644 --- a/gcc/9/patches/0021-Rename-lineartags-to-checktags.patch +++ b/gcc/9/patches/0021-Rename-lineartags-to-checktags.patch @@ -1,7 +1,7 @@ -From 9a1d31fc7c22999393eba7b5e59169496007d982 Mon Sep 17 00:00:00 2001 +From f55990743900795334608ae69beee3d71746b6a6 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Fri, 27 Apr 2018 22:48:18 +0200 -Subject: [PATCH 21/31] Rename lineartags to checktags. +Subject: [PATCH 21/32] Rename lineartags to checktags. The name lineartags would imply linearvarargs but this is not implemented or necessary. diff --git a/gcc/9/patches/0022-Fix-order-of-AmigaOS-PPC-sections-in-the-documentati.patch b/gcc/9/patches/0022-Fix-order-of-AmigaOS-PPC-sections-in-the-documentati.patch index 0e417a84..e15bed8e 100644 --- a/gcc/9/patches/0022-Fix-order-of-AmigaOS-PPC-sections-in-the-documentati.patch +++ b/gcc/9/patches/0022-Fix-order-of-AmigaOS-PPC-sections-in-the-documentati.patch @@ -1,7 +1,7 @@ -From f5757ee85e0e366086bc5c470bef669b4dd2871c Mon Sep 17 00:00:00 2001 +From f2926304ed58ecea614a304e0c648d162b86b4b4 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Sat, 28 Apr 2018 08:09:58 +0200 -Subject: [PATCH 22/31] Fix order of AmigaOS PPC sections in the documentation. +Subject: [PATCH 22/32] Fix order of AmigaOS PPC sections in the documentation. --- gcc/doc/invoke.texi | 264 ++++++++++++++++++++++++++-------------------------- diff --git a/gcc/9/patches/0023-Provide-a-documentation-for-checktags-and-tagtype-at.patch b/gcc/9/patches/0023-Provide-a-documentation-for-checktags-and-tagtype-at.patch index 831e5c85..7a23d31d 100644 --- a/gcc/9/patches/0023-Provide-a-documentation-for-checktags-and-tagtype-at.patch +++ b/gcc/9/patches/0023-Provide-a-documentation-for-checktags-and-tagtype-at.patch @@ -1,7 +1,7 @@ -From 8a759fb742db32812c3c89550ee11bb1ee42232d Mon Sep 17 00:00:00 2001 +From d06dd047cb743eb18c193bdc043190dcdcf3e940 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Sun, 29 Apr 2018 00:08:22 +0200 -Subject: [PATCH 23/31] Provide a documentation for checktags and tagtype +Subject: [PATCH 23/32] Provide a documentation for checktags and tagtype attributes. --- diff --git a/gcc/9/patches/0024-Adapt-libssp-for-AmigaOS.patch b/gcc/9/patches/0024-Adapt-libssp-for-AmigaOS.patch index 729c3793..7176c4ae 100644 --- a/gcc/9/patches/0024-Adapt-libssp-for-AmigaOS.patch +++ b/gcc/9/patches/0024-Adapt-libssp-for-AmigaOS.patch @@ -1,7 +1,7 @@ -From 8656b55b825bdeec1f3aaf9ceffbe5c5e5fda6bf Mon Sep 17 00:00:00 2001 +From 5c0f8009749dd7bcfa2a9fb668266a241306874f Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Tue, 22 May 2018 23:14:01 +0200 -Subject: [PATCH 24/31] Adapt libssp for AmigaOS. +Subject: [PATCH 24/32] Adapt libssp for AmigaOS. --- libssp/ssp.c | 8 +++++--- diff --git a/gcc/9/patches/0025-Add-amigaos-thread-model.patch b/gcc/9/patches/0025-Add-amigaos-thread-model.patch index 60ef35df..e5b1e452 100644 --- a/gcc/9/patches/0025-Add-amigaos-thread-model.patch +++ b/gcc/9/patches/0025-Add-amigaos-thread-model.patch @@ -1,7 +1,7 @@ -From 8e7a06d914e05861cf8e03a2a822a5d0bc6ae4c0 Mon Sep 17 00:00:00 2001 +From 22d80193c9e54186439f5e961e4d65ad979bc383 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Fri, 4 May 2018 18:22:24 +0200 -Subject: [PATCH 25/31] Add amigaos thread model. +Subject: [PATCH 25/32] Add amigaos thread model. It is work in progress. --- @@ -16,12 +16,12 @@ It is work in progress. libgcc/config/rs6000/t-amigaos | 5 + libgcc/configure | 1 + libgcc/gthr-amigaos-asserts.h | 8 + - libgcc/gthr-amigaos-native.c | 1013 ++++++++++++++++++++++++++++++++++++++++ + libgcc/gthr-amigaos-native.c | 1017 ++++++++++++++++++++++++++++++++++++++++ libgcc/gthr-amigaos-posix.c | 233 +++++++++ libgcc/gthr-amigaos-single.c | 141 ++++++ libgcc/gthr-amigaos.h | 347 ++++++++++++++ libstdc++-v3/configure | 15 +- - 16 files changed, 1808 insertions(+), 12 deletions(-) + 16 files changed, 1812 insertions(+), 12 deletions(-) create mode 100644 gcc/config/rs6000/x-amigaos create mode 100644 libgcc/gthr-amigaos-asserts.h create mode 100644 libgcc/gthr-amigaos-native.c @@ -295,10 +295,10 @@ index 0000000000000000000000000000000000000000..bb6005cd52ef75cc7bfbc276d5d56ec5 +#endif diff --git a/libgcc/gthr-amigaos-native.c b/libgcc/gthr-amigaos-native.c new file mode 100644 -index 0000000000000000000000000000000000000000..41adbdc3324156bee31731da8f0da92e819ffdd8 +index 0000000000000000000000000000000000000000..3806359eed9a80027a7b37e79d148cded12ce7b9 --- /dev/null +++ b/libgcc/gthr-amigaos-native.c -@@ -0,0 +1,1013 @@ +@@ -0,0 +1,1017 @@ +/** + * This is the native implementation of gcc threads abstraction. The advantage + * over the pthreads one is that no pthreads.library is needed. @@ -729,6 +729,7 @@ index 0000000000000000000000000000000000000000..41adbdc3324156bee31731da8f0da92e + iexec->ReleaseSemaphore (&mx->u.i.sem); + return EBUSY; + } ++ mx->u.i.acquired++; + return 0; + } + return EBUSY; @@ -996,6 +997,9 @@ index 0000000000000000000000000000000000000000..41adbdc3324156bee31731da8f0da92e + /* Initialize libs */ + __gthread_once (&libs_once, init_libs); + ++ /* Initialize our private threadstore, but only once */ ++ __gthread_once (&threadstore_once, init_threadstore); ++ + task = iexec->FindTask(NULL); + iexec->ObtainSemaphoreShared (&threadstore->sem); + if ((thr = find_threadentry_by_process ((struct Process *)task))) diff --git a/gcc/9/patches/0026-Add-aregparam-attribute-for-functions-for-the-m68k-b.patch b/gcc/9/patches/0026-Add-aregparam-attribute-for-functions-for-the-m68k-b.patch index abe15119..64bc87d9 100644 --- a/gcc/9/patches/0026-Add-aregparam-attribute-for-functions-for-the-m68k-b.patch +++ b/gcc/9/patches/0026-Add-aregparam-attribute-for-functions-for-the-m68k-b.patch @@ -1,7 +1,7 @@ -From 78501d5d0a714a1616e53e6f19ed6ea28a3b5a87 Mon Sep 17 00:00:00 2001 +From 48d2d3a0c949a93cc54958ffac4fe80bdb07d0ad Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Sat, 27 Oct 2018 08:06:21 +0200 -Subject: [PATCH 26/31] Add aregparam attribute for functions for the m68k +Subject: [PATCH 26/32] Add aregparam attribute for functions for the m68k backend. These can be used to pass arguments to directly named registers. diff --git a/gcc/9/patches/0027-gcc9-Don-t-use-poisoned-define.patch b/gcc/9/patches/0027-gcc9-Don-t-use-poisoned-define.patch index 30592e41..f1c9489a 100644 --- a/gcc/9/patches/0027-gcc9-Don-t-use-poisoned-define.patch +++ b/gcc/9/patches/0027-gcc9-Don-t-use-poisoned-define.patch @@ -1,7 +1,7 @@ -From 5b3765448ca16c222d070007932e8ae0512c277e Mon Sep 17 00:00:00 2001 +From a023f94400572f7ae5d4052a09dd6a86622c2507 Mon Sep 17 00:00:00 2001 From: "ola.soder@axis.com" Date: Tue, 29 Dec 2020 21:19:57 +0100 -Subject: [PATCH 27/31] gcc9: Don't use poisoned define. +Subject: [PATCH 27/32] gcc9: Don't use poisoned define. --- gcc/config/rs6000/amigaos.h | 3 --- diff --git a/gcc/9/patches/0028-gcc9-Fix-unused-value.patch b/gcc/9/patches/0028-gcc9-Fix-unused-value.patch index ed669bef..aefefe37 100644 --- a/gcc/9/patches/0028-gcc9-Fix-unused-value.patch +++ b/gcc/9/patches/0028-gcc9-Fix-unused-value.patch @@ -1,7 +1,7 @@ -From e904a6ed5ffaf63151307171bad9b94530e065dd Mon Sep 17 00:00:00 2001 +From ae3522d074b5affa1de95c8bd82b871170612f90 Mon Sep 17 00:00:00 2001 From: "ola.soder@axis.com" Date: Tue, 29 Dec 2020 21:24:26 +0100 -Subject: [PATCH 28/31] gcc9: Fix unused value. +Subject: [PATCH 28/32] gcc9: Fix unused value. --- gcc/c/c-parser.c | 2 +- diff --git a/gcc/9/patches/0029-gcc9-Correct-documentation-section-order-naming.patch b/gcc/9/patches/0029-gcc9-Correct-documentation-section-order-naming.patch index 0b1b942a..18845b2f 100644 --- a/gcc/9/patches/0029-gcc9-Correct-documentation-section-order-naming.patch +++ b/gcc/9/patches/0029-gcc9-Correct-documentation-section-order-naming.patch @@ -1,7 +1,7 @@ -From 5c22aeb4ca116e2b41badac7f53190b448e3723d Mon Sep 17 00:00:00 2001 +From 3ccc0437faebfc4888ec4d04362152db1747ab18 Mon Sep 17 00:00:00 2001 From: "ola.soder@axis.com" Date: Tue, 29 Dec 2020 21:28:04 +0100 -Subject: [PATCH 29/31] gcc9: Correct documentation section order / naming. +Subject: [PATCH 29/32] gcc9: Correct documentation section order / naming. --- gcc/doc/extend.texi | 4 +-- diff --git a/gcc/9/patches/0030-gcc9-Define-CC1_SPEC.patch b/gcc/9/patches/0030-gcc9-Define-CC1_SPEC.patch index fb744c80..55b67a92 100644 --- a/gcc/9/patches/0030-gcc9-Define-CC1_SPEC.patch +++ b/gcc/9/patches/0030-gcc9-Define-CC1_SPEC.patch @@ -1,7 +1,7 @@ -From 379d4088453768dc7a3cd04c1f2bae0ab07fb09f Mon Sep 17 00:00:00 2001 +From dadd40c3b01970756cfe3d1a5bad5e7050baa958 Mon Sep 17 00:00:00 2001 From: "ola.soder@axis.com" Date: Tue, 29 Dec 2020 21:47:26 +0100 -Subject: [PATCH 30/31] gcc9: Define CC1_SPEC. +Subject: [PATCH 30/32] gcc9: Define CC1_SPEC. --- gcc/config/rs6000/amigaos.h | 13 +++++++++++++ diff --git a/gcc/9/patches/0031-gcc9-Disable-c-17.patch b/gcc/9/patches/0031-gcc9-Disable-c-17.patch deleted file mode 100644 index 0527391f..00000000 --- a/gcc/9/patches/0031-gcc9-Disable-c-17.patch +++ /dev/null @@ -1,165 +0,0 @@ -From 094a640cbd9f486f29f8b58ae201880bed7611dc Mon Sep 17 00:00:00 2001 -From: "ola.soder@axis.com" -Date: Tue, 29 Dec 2020 22:48:18 +0100 -Subject: [PATCH 31/31] gcc9: Disable c++17. - -C++17 needs to be disabled due to limitations in clib2. Please refer -to libstdc++-v3/include/c_global/cstddef for more details. - ---- - libstdc++-v3/acinclude.m4 | 2 +- - libstdc++-v3/src/Makefile.am | 9 +++------ - libstdc++-v3/src/Makefile.in | 11 ++++------- - 3 files changed, 8 insertions(+), 14 deletions(-) - -diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 -index 84258d87a337ba9c802c845b8fac9c1e1da8e71b..0aea27e9243423f1222bb7f7854ac9b08b548b88 100644 ---- a/libstdc++-v3/acinclude.m4 -+++ b/libstdc++-v3/acinclude.m4 -@@ -46,13 +46,13 @@ dnl - default settings for all AM_CONFITIONAL test variables - dnl - lots of tools, like CC and CXX - dnl - AC_DEFUN([GLIBCXX_CONFIGURE], [ - # Keep these sync'd with the list in Makefile.am. The first provides an - # expandable list at autoconf time; the second provides an expandable list - # (i.e., shell variable) at configure time. -- m4_define([glibcxx_SUBDIRS],[include libsupc++ src src/c++98 src/c++11 src/c++17 src/filesystem doc po testsuite python]) -+ m4_define([glibcxx_SUBDIRS],[include libsupc++ src src/c++98 src/c++11 src/filesystem doc po testsuite python]) - SUBDIRS='glibcxx_SUBDIRS' - - # These need to be absolute paths, yet at the same time need to - # canonicalize only relative paths, because then amd will not unmount - # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. - glibcxx_builddir=`${PWDCMD-pwd}` -diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am -index 436c2c56f132e45ac41e0aadf2907de87021e333..60976bd0965e7cc77d9de1c4c24072ecf588b094 100644 ---- a/libstdc++-v3/src/Makefile.am -+++ b/libstdc++-v3/src/Makefile.am -@@ -26,13 +26,13 @@ if ENABLE_FILESYSTEM_TS - filesystem_dir = filesystem - else - filesystem_dir = - endif - - ## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE. --SUBDIRS = c++98 c++11 c++17 $(filesystem_dir) -+SUBDIRS = c++98 c++11 $(filesystem_dir) - - # Cross compiler support. - if VTV_CYGMIN - toolexeclib_LTLIBRARIES = libvtv.la libstdc++.la - else - toolexeclib_LTLIBRARIES = libstdc++.la -@@ -56,13 +56,12 @@ libvtv_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(libvtv_la_AM_CXXFLAGS) \ - $(CXXFLAGS) $(libvtv_la_LDFLAGS) $(LDFLAGS) -o $@ - endif - - vpath % $(top_srcdir)/src/c++98 - vpath % $(top_srcdir)/src/c++11 --vpath % $(top_srcdir)/src/c++17 - if ENABLE_FILESYSTEM_TS - vpath % $(top_srcdir)/src/filesystem - endif - - if GLIBCXX_LDBL_COMPAT - ldbl_compat_sources = compatibility-ldbl.cc -@@ -91,21 +90,19 @@ cxx11_sources = \ - libstdc___la_SOURCES = $(cxx98_sources) $(cxx11_sources) - - libstdc___la_LIBADD = \ - $(GLIBCXX_LIBS) \ - $(top_builddir)/libsupc++/libsupc++convenience.la \ - $(top_builddir)/src/c++98/libc++98convenience.la \ -- $(top_builddir)/src/c++11/libc++11convenience.la \ -- $(top_builddir)/src/c++17/libc++17convenience.la -+ $(top_builddir)/src/c++11/libc++11convenience.la - - libstdc___la_DEPENDENCIES = \ - ${version_dep} \ - $(top_builddir)/libsupc++/libsupc++convenience.la \ - $(top_builddir)/src/c++98/libc++98convenience.la \ -- $(top_builddir)/src/c++11/libc++11convenience.la \ -- $(top_builddir)/src/c++17/libc++17convenience.la -+ $(top_builddir)/src/c++11/libc++11convenience.la - - libstdc___la_LDFLAGS = \ - -version-info $(libtool_VERSION) ${version_arg} -lm - - libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) - -diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in -index 1283b2720785acdcbb3047d84b57b6ba421096f6..1eaea91a79f2bbb97d26944bb83ac3f77177cd68 100644 ---- a/libstdc++-v3/src/Makefile.in -+++ b/libstdc++-v3/src/Makefile.in -@@ -230,13 +230,13 @@ am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags --DIST_SUBDIRS = c++98 c++11 c++17 filesystem -+DIST_SUBDIRS = c++98 c++11 filesystem - ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ - ACLOCAL = @ACLOCAL@ - ALLOCATOR_H = @ALLOCATOR_H@ - ALLOCATOR_NAME = @ALLOCATOR_NAME@ - AMTAR = @AMTAR@ - AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -@@ -459,13 +459,13 @@ WARN_CXXFLAGS = \ - - - # -I/-D flags to pass when compiling. - AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) - @ENABLE_FILESYSTEM_TS_FALSE@filesystem_dir = - @ENABLE_FILESYSTEM_TS_TRUE@filesystem_dir = filesystem --SUBDIRS = c++98 c++11 c++17 $(filesystem_dir) -+SUBDIRS = c++98 c++11 $(filesystem_dir) - @VTV_CYGMIN_FALSE@toolexeclib_LTLIBRARIES = libstdc++.la - - # Cross compiler support. - @VTV_CYGMIN_TRUE@toolexeclib_LTLIBRARIES = libvtv.la libstdc++.la - @VTV_CYGMIN_TRUE@libvtv_la_SOURCES = vtv_stubs.cc - @VTV_CYGMIN_TRUE@libvtv_la_LDFLAGS = $(lt_host_flags) -@@ -499,21 +499,19 @@ cxx11_sources = \ - - libstdc___la_SOURCES = $(cxx98_sources) $(cxx11_sources) - libstdc___la_LIBADD = \ - $(GLIBCXX_LIBS) \ - $(top_builddir)/libsupc++/libsupc++convenience.la \ - $(top_builddir)/src/c++98/libc++98convenience.la \ -- $(top_builddir)/src/c++11/libc++11convenience.la \ -- $(top_builddir)/src/c++17/libc++17convenience.la -+ $(top_builddir)/src/c++11/libc++11convenience.la - - libstdc___la_DEPENDENCIES = \ - ${version_dep} \ - $(top_builddir)/libsupc++/libsupc++convenience.la \ - $(top_builddir)/src/c++98/libc++98convenience.la \ -- $(top_builddir)/src/c++11/libc++11convenience.la \ -- $(top_builddir)/src/c++17/libc++17convenience.la -+ $(top_builddir)/src/c++11/libc++11convenience.la - - libstdc___la_LDFLAGS = \ - -version-info $(libtool_VERSION) ${version_arg} -lm - - libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) - -@@ -951,13 +949,12 @@ uninstall-am: uninstall-toolexeclibLTLIBRARIES - @VTV_CYGMIN_TRUE@vtv_stubs.cc: - @VTV_CYGMIN_TRUE@ rm -f $@ - @VTV_CYGMIN_TRUE@ $(LN_S) $(toplevel_srcdir)/libstdc++-v3/libsupc++/vtv_stubs.cc $@ - - vpath % $(top_srcdir)/src/c++98 - vpath % $(top_srcdir)/src/c++11 --vpath % $(top_srcdir)/src/c++17 - @ENABLE_FILESYSTEM_TS_TRUE@vpath % $(top_srcdir)/src/filesystem - - # Use special rules for compatibility-ldbl.cc compilation, as we need to - # pass -mlong-double-64. - @GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.lo: compatibility-ldbl.cc - @GLIBCXX_LDBL_COMPAT_TRUE@ $(LTCXXCOMPILE) $(LONG_DOUBLE_COMPAT_FLAGS) -c $< --- -2.11.0 - diff --git a/gcc/9/patches/0031-gcc9-Expose-max_align_t-when-using-clib2.patch b/gcc/9/patches/0031-gcc9-Expose-max_align_t-when-using-clib2.patch new file mode 100644 index 00000000..be46499f --- /dev/null +++ b/gcc/9/patches/0031-gcc9-Expose-max_align_t-when-using-clib2.patch @@ -0,0 +1,55 @@ +From 24b9813cba87693593d7d78aa8194bff77d3a507 Mon Sep 17 00:00:00 2001 +From: "ola.soder@axis.com" +Date: Wed, 6 Jan 2021 20:06:54 +0100 +Subject: [PATCH 31/32] gcc9: Expose max_align_t when using clib2. + +--- + libstdc++-v3/include/c_global/cstddef | 3 --- + libstdc++-v3/include/c_std/cstddef | 3 --- + 2 files changed, 6 deletions(-) + +diff --git a/libstdc++-v3/include/c_global/cstddef b/libstdc++-v3/include/c_global/cstddef +index d4881da7ea8811e34e9f680287c3be6ef90eed2c..8c779ec354d84a18d91f1bb4bbb35892d1db2592 100644 +--- a/libstdc++-v3/include/c_global/cstddef ++++ b/libstdc++-v3/include/c_global/cstddef +@@ -51,17 +51,14 @@ + + extern "C++" + { + #if __cplusplus >= 201103L + namespace std + { +-/* Needed as clib2 on AmigaOS has no C11 support yet */ +-#if __STDC_VERSION__ >= 201112L + // We handle size_t, ptrdiff_t, and nullptr_t in c++config.h. + using ::max_align_t; +-#endif + } + #endif // C++11 + + #if __cplusplus >= 201703L + namespace std + { +diff --git a/libstdc++-v3/include/c_std/cstddef b/libstdc++-v3/include/c_std/cstddef +index 4f665fbbf77b2285bb8edd61c38441bc27cc9c62..8d3ba8b28d491903391540d9d70b561a4dd240d3 100644 +--- a/libstdc++-v3/include/c_std/cstddef ++++ b/libstdc++-v3/include/c_std/cstddef +@@ -44,15 +44,12 @@ + #include + #include + + #if __cplusplus >= 201103L + namespace std + { +-/* Needed as clib2 on AmigaOS has no C11 support yet */ +-#if __STDC_VERSION__ >= 201112L + // We handle size_t, ptrdiff_t, and nullptr_t in c++config.h. + using ::max_align_t; +-#endif + } + #endif + + #endif // _GLIBCXX_CSTDDEF +-- +2.11.0 + diff --git a/gcc/9/patches/0032-gcc9-Don-t-define-__STRICT_ANSI__.patch b/gcc/9/patches/0032-gcc9-Don-t-define-__STRICT_ANSI__.patch new file mode 100644 index 00000000..c46a0d78 --- /dev/null +++ b/gcc/9/patches/0032-gcc9-Don-t-define-__STRICT_ANSI__.patch @@ -0,0 +1,39 @@ +From 7824bd01bf24f618536fa4618d61e76ad7b71edc Mon Sep 17 00:00:00 2001 +From: "ola.soder@axis.com" +Date: Wed, 27 Jan 2021 18:56:32 +0100 +Subject: [PATCH 32/32] gcc9: Don't define __STRICT_ANSI__. + +Doing so hides C99 features when configuring libstdc++. +--- + libstdc++-v3/config/os/amigaos/os_defines.h | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/libstdc++-v3/config/os/amigaos/os_defines.h b/libstdc++-v3/config/os/amigaos/os_defines.h +index 647c560e6ff196234fda2e14073ee0b7074ad5da..10b56638f418baec6fea0c91888882c65a994d85 100644 +--- a/libstdc++-v3/config/os/amigaos/os_defines.h ++++ b/libstdc++-v3/config/os/amigaos/os_defines.h +@@ -38,7 +38,21 @@ + + #ifdef __NEWLIB__ + #define _GLIBCXX_USE_C99_STDINT_TR1 1 + #define _GLIBCXX_USE_C99 1 + #endif + ++#undef __STRICT_ANSI__ ++/* GCC defines this macro if, and only if, the -ansi switch, or a ++ * -std switch specifying strict conformance to some version of ISO C ++ * or ISO C++, was specified when GCC was invoked. This macro exists ++ * primarily to direct GNU libc's header files to restrict their ++ * definitions to the minimal set found in the 1989 C standard. If -std ++ * is set to C++ >98 when building with clib2 or newlib, configure will ++ * be tricked into believing that existing C99 features are missing. ++ * ++ * Please note that this is a temporary workaround. The real solution ++ * would be to figure out why this is set during configuration in the ++ * first place. ++ */ ++ + #endif +-- +2.11.0 + diff --git a/native-build/makefile b/native-build/makefile index 26d508ad..379ae9a0 100644 --- a/native-build/makefile +++ b/native-build/makefile @@ -46,8 +46,8 @@ COREUTILS_VERSION=5.2.1 # Distribution version, used as middle part of a distribution archive DIST_VERSION=$(shell date +%Y%m%d)-$(shell git rev-list --count HEAD) -CLIB2_URL=https://github.com/sba1/clib2-1 -CLIB2_SHA1=b874ff71deb55016a20f87483beb1ecbe226c55e +CLIB2_URL=https://github.com/sodero/clib2 +CLIB2_SHA1=125d92486da69d45fd18489d3226071d4be9ed9d CLIB2_RELEASE_ARCHIVE_NAME=adtools-os4-clib2-$(DIST_VERSION).lha CROSS_PREFIX?=$(ROOT_DIR)/root-cross