aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2019-04-14 16:52:00 -0400
committerAnthony G. Basile <blueness@gentoo.org>2019-04-14 16:52:00 -0400
commit5e0db82084a8b77b39114b0f0e811f04b96c9fc6 (patch)
tree1740b0356a210029969c543ec5f0ea2697f30f87 /sys-devel
parentnet-libs/webkit-gtk: version bump to 2.24.1 (diff)
downloadmusl-5e0db82084a8b77b39114b0f0e811f04b96c9fc6.tar.gz
musl-5e0db82084a8b77b39114b0f0e811f04b96c9fc6.tar.bz2
musl-5e0db82084a8b77b39114b0f0e811f04b96c9fc6.zip
sys-devel/gcc: remove older versions
Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/gcc/Manifest10
-rw-r--r--sys-devel/gcc/files/4.9.4/boehm_gc.patch104
-rw-r--r--sys-devel/gcc/files/4.9.4/gthread.patch37
-rw-r--r--sys-devel/gcc/files/4.9.4/posix_memalign.patch29
-rw-r--r--sys-devel/gcc/files/5.4.0/cilkrts.patch46
-rw-r--r--sys-devel/gcc/files/5.4.0/linker_path.patch213
-rw-r--r--sys-devel/gcc/files/5.4.0/musl.patch502
-rw-r--r--sys-devel/gcc/files/5.4.0/ppc-secure_plt.patch59
-rw-r--r--sys-devel/gcc/files/6.3.0/musl.patch33
-rw-r--r--sys-devel/gcc/files/gcc-4.9.3-tree-vect-data-refs-correctness.patch11
-rw-r--r--sys-devel/gcc/files/gcc-5.4.0-pr68470.patch57
-rw-r--r--sys-devel/gcc/files/gcc-5.4.0-pr70473.patch43
-rw-r--r--sys-devel/gcc/files/gcc-5.4.0-pr71696-CVE-2016-6131.patch252
-rw-r--r--sys-devel/gcc/files/gcc-7.2.0-pr69728.patch26
-rw-r--r--sys-devel/gcc/files/gcc-configure-LANG.patch64
-rw-r--r--sys-devel/gcc/files/gcc-spec-env-r1.patch87
-rw-r--r--sys-devel/gcc/files/gcc-spec-env.patch42
-rw-r--r--sys-devel/gcc/gcc-6.4.0-r1.ebuild35
-rw-r--r--sys-devel/gcc/gcc-7.3.0-r3.ebuild31
-rw-r--r--sys-devel/gcc/gcc-7.3.0-r6.ebuild31
-rw-r--r--sys-devel/gcc/gcc-7.4.0.ebuild31
-rw-r--r--sys-devel/gcc/gcc-8.2.0-r5.ebuild29
-rw-r--r--sys-devel/gcc/metadata.xml3
23 files changed, 0 insertions, 1775 deletions
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 66937be..f5387fe 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -1,13 +1,3 @@
-DIST ecj-4.5.jar 1470676 BLAKE2B 793c10ba09fd8040c0e1181204141aea16780c9c9088e07126e00da2b510af2ad6f58d876357d7e98cbb02d783a3be434469d5de1df134ccb8cc508e45028d80 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e
-DIST gcc-6.4.0-patches-1.3.tar.bz2 13617 BLAKE2B 6bfb1d70397e6ca4359e5d190e36003c18c7a03a9be4f923461dcff11307601e6b3502a2e289585b53baeb919008d83c29ad24078f814aed9b331140e4687419 SHA512 91be7c8db0004cdd150fec0f8daa709374753d2f524c58087dcf45b6696dbd609972297e866f971fba1aa679464cf96a384dd111e104183c0939ab69add017b2
-DIST gcc-6.4.0-uclibc-patches-1.0.tar.bz2 1586 BLAKE2B 21f97a9e1c349b3d52def092a03e5a90533521da9af586be7ee527594f2d65745491ff8758d88c99a7ac215bde7ebf4e47a0a36cfcd7e66f70e0bebf2dadd922 SHA512 266dbe2bb53d892a24cd752d5c6833ea33f8df8b11b0471700ee53865243cd41f412f9bea8a369b474c9cd1435faff2e03902c7cb5638dd3ddcaa665aa2ec522
-DIST gcc-6.4.0.tar.xz 76156220 BLAKE2B 2018c338b28ea644cdd1b327cb0dfe7ee9aa2010357c93f7e71969f587c58d3fdfa2bb4c82a309490c48bc86924400022fa93f41dc6c4345878d1bc1d8204265 SHA512 02c60e54527c7adf584798d5251f8a0b80c93d5deafce82501b2c28e6692e0bd783927bbfc4bc527a863c0cccc025150a34740a9e29badb02d4b48e56a8aba90
-DIST gcc-7.3.0-patches-1.4.tar.bz2 8238 BLAKE2B 72a5dcb046558c8f5c3a75040fe24ce1106c43af7510d6febf667b4377cb9caea5ebe9e1287af90e4ebfffa3f3f22ca85f533acf57c2e2d896f92adc1659b9f5 SHA512 24ed0d82240426efb111bbf48913b96fdc824ae3aa5a653298a726ebe64a40791f484229bbab9cc58f73d658e0b4b83ccd13081cfbea6e1673ef1d076cca3b33
-DIST gcc-7.3.0-patches-1.8.tar.bz2 14435 BLAKE2B 3e5c1abad56ccd6e0aa7739cb7cd651ec07ef9bf25be554343f1fa0444f251de41bde5fe6f8bb9e85e3f7a5cf8b2b83515647d93d62f338fa7843581fcaff2f8 SHA512 4d9d76b3d47f1af4f23cae15278d165b22065a3d1512323d1e31b5e0cb47e4654733dc43fa11906a3bd18e827621c9a5ec62b73563f8e5ead663c29f7d0d7345
-DIST gcc-7.3.0.tar.xz 62462388 BLAKE2B dc8f132b21bd0543c3d9dd17557038aafe65675aa73c540954234a3c972b4c31c939149bd50183d072ab6c8d16919e19daeaaffd619ce2ccd62dbdf9a5bb3302 SHA512 ad41a7e4584e40e92cdf860bc0288500fbaf5dfb7e8c3fcabe9eba809c87bcfa85b46c19c19921b0cdf6d05483faede8287bb9ea120c0d1559449a70e602c8d4
-DIST gcc-7.4.0-patches-1.1.tar.bz2 8778 BLAKE2B 52b02b3c619b99912ee254599788abebe3963cf85e49b56166069318e340a8e271d767e82798e6062fc2a042a86a88da66ab95f2d9e42933ff17688d616a903f SHA512 02ec2eb2460e24cf46f7a04ca3b80ca120719389a54a740070e991d9c96b6fd55d1fa04eb4249fd3043edc9c0f6519b5babcce76036cd0146183512aaae2d573
-DIST gcc-7.4.0.tar.xz 62601888 BLAKE2B df91ec680d5389736d3a37a2d85cf2e12fbe87b642fdf4b332e67a043e00944aca00243cc6709f86abd92115cb5a78502146636395571d1ea4899531e15d5d0e SHA512 8864d8e4b97c2e1a4f17422f6e68120172ebefeab97b1757734f7185ca68a6b9a89011c6833c03fa454c17b0ac35b15e1d284881e6971035948ac6100f3aa45e
-DIST gcc-8.2.0-patches-1.6.tar.bz2 17138 BLAKE2B edbeba9c41972836de072955c0db51406603aaf0dbb5f84ac1c5d8d2d61a8df6d725356655b69e3678950a0dc6dacc1bc2bf56f3620d685fe5c32045b3893f96 SHA512 32e7bddb5ec288def1e5c79d58023d90e29d77e83b70e3f21a22f4da78061cc49184d92c43807bdfd56a5067cbb9a8cfbfcb514016662aa1a24d791c7bd87b6b
DIST gcc-8.2.0-patches-1.7.tar.bz2 18166 BLAKE2B 2aff918d253d76c9b7d76b2d82e85c42f2ab8717e73831965b3a0fcc92b1ceacd7aa0b433dd0c180ad16906cfe059c020b256d01271ef95a6e56b08d41f4acfe SHA512 5110b610a4c9116ecd91490f66e570c09217c6b4d18bf46af5e1a51ed043df188ce313bdae6ba670b8800842387c98c1b83b7e1e0c396cbce71e6726d81f589c
DIST gcc-8.2.0.tar.xz 63460876 BLAKE2B c5372b0bdfcd2729577dca287b294623b78c583491998404eb307768c573618bdaaedb7d9ae0e39ba41a62a14b9525dff0e3083285754b7f5bb9987ecf635185 SHA512 64898a165f67e136d802a92e7633bf1b06c85266027e52127ea025bf5fc2291b5e858288aac0bdba246e6cdf7c6ec88bc8e0e7f3f6f1985f4297710cafde56ed
DIST gcc-8.3.0-patches-1.0.tar.bz2 12278 BLAKE2B 793465c5de0af850c7f3017b3011e68f3bd1664e6ce3500a3dc3003d37c03fe81857698957770a135eadd395a7767fa804d354ecdcdeb1d83623280ca569d4ec SHA512 0efadd2481713992807fed2683666f1094b3757674754601c079569f3ef70cd7aed3cefc9f815f4e59a21d37e4e940c122df714e16f3878a5f966450c4273669
diff --git a/sys-devel/gcc/files/4.9.4/boehm_gc.patch b/sys-devel/gcc/files/4.9.4/boehm_gc.patch
deleted file mode 100644
index 75b921a..0000000
--- a/sys-devel/gcc/files/4.9.4/boehm_gc.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-diff -Naur gcc-4.9.4.orig/boehm-gc/dyn_load.c gcc-4.9.4/boehm-gc/dyn_load.c
---- gcc-4.9.4.orig/boehm-gc/dyn_load.c 2012-11-04 14:56:02.000000000 -0800
-+++ gcc-4.9.4/boehm-gc/dyn_load.c 2016-12-25 13:22:28.000677992 -0800
-@@ -459,10 +459,7 @@
- /* For glibc 2.2.4+. Unfortunately, it doesn't work for older */
- /* versions. Thanks to Jakub Jelinek for most of the code. */
-
--# if (defined(LINUX) || defined (__GLIBC__)) /* Are others OK here, too? */ \
-- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
-- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
--
-+#if defined(LINUX)
- /* We have the header files for a glibc that includes dl_iterate_phdr. */
- /* It may still not be available in the library on the target system. */
- /* Thus we also treat it as a weak symbol. */
-diff -Naur gcc-4.9.4.orig/boehm-gc/include/private/gcconfig.h gcc-4.9.4/boehm-gc/include/private/gcconfig.h
---- gcc-4.9.4.orig/boehm-gc/include/private/gcconfig.h 2013-12-21 12:42:39.000000000 -0800
-+++ gcc-4.9.4/boehm-gc/include/private/gcconfig.h 2016-12-25 13:22:28.001678000 -0800
-@@ -696,9 +696,7 @@
- # ifdef __ELF__
- # define DYNAMIC_LOADING
- # include <features.h>
--# if defined(__GLIBC__)&& __GLIBC__>=2
--# define SEARCH_FOR_DATA_START
--# else /* !GLIBC2 */
-+# if defined(__GLIBC__) && __GLIBC__ < 2
- extern char **__environ;
- # define DATASTART ((ptr_t)(&__environ))
- /* hideous kludge: __environ is the first */
-@@ -709,6 +707,8 @@
- /* would include .rodata, which may */
- /* contain large read-only data tables */
- /* that we'd rather not scan. */
-+# else
-+# define SEARCH_FOR_DATA_START
- # endif /* !GLIBC2 */
- extern int _end[];
- # define DATAEND (_end)
-@@ -1167,9 +1167,7 @@
- # define DATASTART ((ptr_t)((((word) (_etext)) + 0xfff) & ~0xfff))
- # endif
- # include <features.h>
--# if defined(__GLIBC__) && __GLIBC__ >= 2
--# define SEARCH_FOR_DATA_START
--# else
-+# if defined(__GLIBC__) && __GLIBC__ < 2
- extern char **__environ;
- # define DATASTART ((ptr_t)(&__environ))
- /* hideous kludge: __environ is the first */
-@@ -1180,6 +1178,8 @@
- /* would include .rodata, which may */
- /* contain large read-only data tables */
- /* that we'd rather not scan. */
-+# else
-+# define SEARCH_FOR_DATA_START
- # endif
- extern int _end[];
- # define DATAEND (_end)
-@@ -1387,10 +1387,10 @@
- # define HBLKSIZE 4096
- # endif
- # define USE_GENERIC_PUSH_REGS
--# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2 || __GLIBC__ > 2
--# define LINUX_STACKBOTTOM
--# else
-+# if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2 || __GLIBC__ < 2
- # define STACKBOTTOM 0x80000000
-+# else
-+# define LINUX_STACKBOTTOM
- # endif
- # endif /* Linux */
- # ifdef EWS4800
-@@ -1904,9 +1904,7 @@
- # ifdef __ELF__
- # define DYNAMIC_LOADING
- # include <features.h>
--# if defined(__GLIBC__) && __GLIBC__ >= 2
--# define SEARCH_FOR_DATA_START
--# else
-+# if defined(__GLIBC__) && __GLIBC__ < 2
- extern char **__environ;
- # define DATASTART ((ptr_t)(&__environ))
- /* hideous kludge: __environ is the first */
-@@ -1917,6 +1915,8 @@
- /* would include .rodata, which may */
- /* contain large read-only data tables */
- /* that we'd rather not scan. */
-+# else
-+# define SEARCH_FOR_DATA_START
- # endif
- extern int _end[];
- # define DATAEND (_end)
-diff -Naur gcc-4.9.4.orig/boehm-gc/os_dep.c gcc-4.9.4/boehm-gc/os_dep.c
---- gcc-4.9.4.orig/boehm-gc/os_dep.c 2013-03-06 07:08:58.000000000 -0800
-+++ gcc-4.9.4/boehm-gc/os_dep.c 2016-12-25 13:22:28.002678009 -0800
-@@ -26,7 +26,7 @@
- # define __KERNEL__
- # include <asm/signal.h>
- # undef __KERNEL__
--# else
-+# elif defined(__GLIBC__)
- /* Kernels prior to 2.1.1 defined struct sigcontext_struct instead of */
- /* struct sigcontext. libc6 (glibc2) uses "struct sigcontext" in */
- /* prototypes, so we have to include the top-level sigcontext.h to */
diff --git a/sys-devel/gcc/files/4.9.4/gthread.patch b/sys-devel/gcc/files/4.9.4/gthread.patch
deleted file mode 100644
index 48aeff1..0000000
--- a/sys-devel/gcc/files/4.9.4/gthread.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -Naur gcc-4.9.4.orig/libgfortran/acinclude.m4 gcc-4.9.4/libgfortran/acinclude.m4
---- gcc-4.9.4.orig/libgfortran/acinclude.m4 2016-12-24 16:16:53.481696091 -0800
-+++ gcc-4.9.4/libgfortran/acinclude.m4 2016-12-24 16:42:52.045622116 -0800
-@@ -100,7 +100,7 @@
- [Define to 1 if the target supports #pragma weak])
- fi
- case "$host" in
-- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
-+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
- AC_DEFINE(GTHREAD_USE_WEAK, 0,
- [Define to 0 if the target shouldn't use #pragma weak])
- ;;
-diff -Naur gcc-4.9.4.orig/libgfortran/configure gcc-4.9.4/libgfortran/configure
---- gcc-4.9.4.orig/libgfortran/configure 2016-12-24 16:16:53.557696818 -0800
-+++ gcc-4.9.4/libgfortran/configure 2016-12-24 16:43:06.557762874 -0800
-@@ -26355,7 +26355,7 @@
-
- fi
- case "$host" in
-- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
-+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
-
- $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
-
-diff -Naur gcc-4.9.4.orig/libstdc++-v3/config/os/generic/os_defines.h gcc-4.9.4/libstdc++-v3/config/os/generic/os_defines.h
---- gcc-4.9.4.orig/libstdc++-v3/config/os/generic/os_defines.h 2016-12-24 16:16:55.523715643 -0800
-+++ gcc-4.9.4/libstdc++-v3/config/os/generic/os_defines.h 2016-12-24 16:44:10.273380874 -0800
-@@ -33,4 +33,9 @@
- // System-specific #define, typedefs, corrections, etc, go here. This
- // file will come before all others.
-
-+// Disable the weak reference logic in gthr.h for os/generic because it
-+// is broken on every platform unless there is implementation specific
-+// workaround in gthr-posix.h and at link-time for static linking.
-+#define _GLIBCXX_GTHREAD_USE_WEAK 0
-+
- #endif
diff --git a/sys-devel/gcc/files/4.9.4/posix_memalign.patch b/sys-devel/gcc/files/4.9.4/posix_memalign.patch
deleted file mode 100644
index 716aad4..0000000
--- a/sys-devel/gcc/files/4.9.4/posix_memalign.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -Naur gcc-4.9.4.orig/gcc/config/i386/pmm_malloc.h gcc-4.9.4/gcc/config/i386/pmm_malloc.h
---- gcc-4.9.4.orig/gcc/config/i386/pmm_malloc.h 2016-12-24 16:17:07.001825547 -0800
-+++ gcc-4.9.4/gcc/config/i386/pmm_malloc.h 2016-12-24 16:20:25.242723710 -0800
-@@ -27,12 +27,13 @@
- #include <stdlib.h>
-
- /* We can't depend on <stdlib.h> since the prototype of posix_memalign
-- may not be visible. */
-+ may not be visible and we can't pollute the namespace either. */
- #ifndef __cplusplus
--extern int posix_memalign (void **, size_t, size_t);
-+extern int __gcc_posix_memalign (void **, size_t, size_t)
- #else
--extern "C" int posix_memalign (void **, size_t, size_t) throw ();
-+extern "C" int __gcc_posix_memalign (void **, size_t, size_t) throw ()
- #endif
-+__asm__("posix_memalign");
-
- static __inline void *
- _mm_malloc (size_t size, size_t alignment)
-@@ -42,7 +43,7 @@
- return malloc (size);
- if (alignment == 2 || (sizeof (void *) == 8 && alignment == 4))
- alignment = sizeof (void *);
-- if (posix_memalign (&ptr, alignment, size) == 0)
-+ if (__gcc_posix_memalign (&ptr, alignment, size) == 0)
- return ptr;
- else
- return NULL;
diff --git a/sys-devel/gcc/files/5.4.0/cilkrts.patch b/sys-devel/gcc/files/5.4.0/cilkrts.patch
deleted file mode 100644
index 8fed5c2..0000000
--- a/sys-devel/gcc/files/5.4.0/cilkrts.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -Naur gcc-5.4.0.orig/libcilkrts/runtime/os-unix.c gcc-5.4.0/libcilkrts/runtime/os-unix.c
---- gcc-5.4.0.orig/libcilkrts/runtime/os-unix.c 2014-05-21 04:08:58.000000000 -0700
-+++ gcc-5.4.0/libcilkrts/runtime/os-unix.c 2016-12-24 15:35:14.225647627 -0800
-@@ -51,6 +51,7 @@
- #if defined __linux__
- # include <sys/sysinfo.h>
- # include <sys/syscall.h>
-+# include <sched.h>
- #elif defined __APPLE__
- # include <sys/sysctl.h>
- // Uses sysconf(_SC_NPROCESSORS_ONLN) in verbose output
-@@ -400,28 +401,19 @@
-
- COMMON_SYSDEP void __cilkrts_yield(void)
- {
--#if __APPLE__ || __FreeBSD__ || __VXWORKS__
-- // On MacOS, call sched_yield to yield quantum. I'm not sure why we
-- // don't do this on Linux also.
-- sched_yield();
--#elif defined(__DragonFly__)
-- // On DragonFly BSD, call sched_yield to yield quantum.
-- sched_yield();
--#elif defined(__MIC__)
-+#if defined(__MIC__)
- // On MIC, pthread_yield() really trashes things. Arch's measurements
- // showed that calling _mm_delay_32() (or doing nothing) was a better
- // option. Delaying 1024 clock cycles is a reasonable compromise between
- // giving up the processor and latency starting up when work becomes
- // available
- _mm_delay_32(1024);
--#elif defined(__ANDROID__) || (defined(__sun__) && defined(__svr4__))
-- // On Android and Solaris, call sched_yield to yield quantum. I'm not
-- // sure why we don't do this on Linux also.
-- sched_yield();
--#else
-- // On Linux, call pthread_yield (which in turn will call sched_yield)
-- // to yield quantum.
-+#elif defined(__sun__) && !defined(__svr4__)
-+ // On old SunOS call pthread_yield to yield a quantum.
- pthread_yield();
-+#else
-+ // On other platforms call sched_yield to yield a quantum.
-+ sched_yield();
- #endif
- }
-
diff --git a/sys-devel/gcc/files/5.4.0/linker_path.patch b/sys-devel/gcc/files/5.4.0/linker_path.patch
deleted file mode 100644
index a2584d4..0000000
--- a/sys-devel/gcc/files/5.4.0/linker_path.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-diff -Naur gcc-5.4.0.orig/gcc/config/aarch64/aarch64-linux.h gcc-5.4.0/gcc/config/aarch64/aarch64-linux.h
---- gcc-5.4.0.orig/gcc/config/aarch64/aarch64-linux.h 2015-07-24 09:00:26.000000000 -0700
-+++ gcc-5.4.0/gcc/config/aarch64/aarch64-linux.h 2016-12-24 14:48:44.236623207 -0800
-@@ -23,6 +23,9 @@
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+
- #undef ASAN_CC1_SPEC
- #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
-
-diff -Naur gcc-5.4.0.orig/gcc/config/arm/linux-eabi.h gcc-5.4.0/gcc/config/arm/linux-eabi.h
---- gcc-5.4.0.orig/gcc/config/arm/linux-eabi.h 2016-12-24 15:27:49.152307307 -0800
-+++ gcc-5.4.0/gcc/config/arm/linux-eabi.h 2016-12-24 14:50:04.522429254 -0800
-@@ -77,6 +77,23 @@
- %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
- %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
-
-+/* For ARM musl currently supports four dynamic linkers:
-+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
-+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
-+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
-+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
-+ musl does not support the legacy OABI mode.
-+ All the dynamic linkers live in /lib.
-+ We default to soft-float, EL. */
-+#undef MUSL_DYNAMIC_LINKER
-+#if TARGET_BIG_ENDIAN_DEFAULT
-+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
-+#endif
-+#define MUSL_DYNAMIC_LINKER \
-+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
-diff -Naur gcc-5.4.0.orig/gcc/config/i386/linux.h gcc-5.4.0/gcc/config/i386/linux.h
---- gcc-5.4.0.orig/gcc/config/i386/linux.h 2015-01-05 04:33:28.000000000 -0800
-+++ gcc-5.4.0/gcc/config/i386/linux.h 2016-12-24 14:50:54.802934056 -0800
-@@ -21,3 +21,6 @@
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-diff -Naur gcc-5.4.0.orig/gcc/config/i386/linux64.h gcc-5.4.0/gcc/config/i386/linux64.h
---- gcc-5.4.0.orig/gcc/config/i386/linux64.h 2015-01-05 04:33:28.000000000 -0800
-+++ gcc-5.4.0/gcc/config/i386/linux64.h 2016-12-24 14:51:15.579142643 -0800
-@@ -30,3 +30,10 @@
- #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
- #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
- #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+
-+#undef MUSL_DYNAMIC_LINKER32
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
-+#undef MUSL_DYNAMIC_LINKER64
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
-+#undef MUSL_DYNAMIC_LINKERX32
-+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
-diff -Naur gcc-5.4.0.orig/gcc/config/microblaze/linux.h gcc-5.4.0/gcc/config/microblaze/linux.h
---- gcc-5.4.0.orig/gcc/config/microblaze/linux.h 2015-05-28 07:08:19.000000000 -0700
-+++ gcc-5.4.0/gcc/config/microblaze/linux.h 2016-12-24 14:58:26.290647241 -0800
-@@ -28,10 +28,20 @@
- #undef TLS_NEEDS_GOT
- #define TLS_NEEDS_GOT 1
-
--#define DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+
-+#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
-+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:;:el}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:el}"
-+#endif
-+
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
-+
- #undef SUBTARGET_EXTRA_SPECS
- #define SUBTARGET_EXTRA_SPECS \
-- { "dynamic_linker", DYNAMIC_LINKER }
-+ { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
-
- #undef LINK_SPEC
- #define LINK_SPEC "%{shared:-shared} \
-diff -Naur gcc-5.4.0.orig/gcc/config/mips/linux.h gcc-5.4.0/gcc/config/mips/linux.h
---- gcc-5.4.0.orig/gcc/config/mips/linux.h 2015-01-05 04:33:28.000000000 -0800
-+++ gcc-5.4.0/gcc/config/mips/linux.h 2016-12-24 15:01:34.093670361 -0800
-@@ -37,7 +37,13 @@
- #define UCLIBC_DYNAMIC_LINKERN32 \
- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
-
-+#undef MUSL_DYNAMIC_LINKER32
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
-+#undef MUSL_DYNAMIC_LINKER64
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1"
-+#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1"
-+
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
- #define GNU_USER_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
-- BIONIC_DYNAMIC_LINKERN32)
-+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
-diff -Naur gcc-5.4.0.orig/gcc/config/rs6000/linux64.h gcc-5.4.0/gcc/config/rs6000/linux64.h
---- gcc-5.4.0.orig/gcc/config/rs6000/linux64.h 2015-03-09 16:18:57.000000000 -0700
-+++ gcc-5.4.0/gcc/config/rs6000/linux64.h 2016-12-24 15:03:44.985080397 -0800
-@@ -363,19 +367,32 @@
- #else
- #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}"
- #endif
-+
-+#define MUSL_DYNAMIC_LINKER32 \
-+ "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
-+#define MUSL_DYNAMIC_LINKER64 \
-+ "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
-+
- #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
- #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) \
-+ "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) \
-+ "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) \
-+ "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER32 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
-+ MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
-+ MUSL_DYNAMIC_LINKER64)
-
- #undef DEFAULT_ASM_ENDIAN
- #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
-diff -Naur gcc-5.4.0.orig/gcc/config/rs6000/sysv4.h gcc-5.4.0/gcc/config/rs6000/sysv4.h
---- gcc-5.4.0.orig/gcc/config/rs6000/sysv4.h 2015-09-24 06:46:45.000000000 -0700
-+++ gcc-5.4.0/gcc/config/rs6000/sysv4.h 2016-12-24 15:08:38.507113094 -0800
-@@ -757,17 +762,27 @@
-
- #define LINK_START_LINUX_SPEC ""
-
-+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","")
-+
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
- #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER \
-+ "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) \
-+ "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) \
-+ "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) \
-+ "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
-+ MUSL_DYNAMIC_LINKER)
-
- #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
-diff -Naur gcc-5.4.0.orig/gcc/config/sh/linux.h gcc-5.4.0/gcc/config/sh/linux.h
---- gcc-5.4.0.orig/gcc/config/sh/linux.h 2015-01-05 04:33:28.000000000 -0800
-+++ gcc-5.4.0/gcc/config/sh/linux.h 2016-12-24 15:09:54.568853072 -0800
-@@ -43,6 +43,27 @@
-
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-
-+#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN
-+#define MUSL_DYNAMIC_LINKER_E "%{mb:eb}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{!ml:eb}"
-+#endif
-+
-+#if TARGET_CPU_DEFAULT & (MASK_HARD_SH2A_DOUBLE | MASK_SH4)
-+/* "-nofpu" if any nofpu option is specified. */
-+#define MUSL_DYNAMIC_LINKER_FP \
-+ "%{m1|m2|m2a-nofpu|m3|m4-nofpu|m4-100-nofpu|m4-200-nofpu|m4-300-nofpu|" \
-+ "m4-340|m4-400|m4-500|m4al:-nofpu}"
-+#else
-+/* "-nofpu" if none of the hard fpu options are specified. */
-+#define MUSL_DYNAMIC_LINKER_FP "%{m2a|m4|m4-100|m4-200|m4-300|m4a:;:-nofpu}"
-+#endif
-+
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER \
-+ "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
-+ "%{mfdpic:-fdpic}.so.1"
-+
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-
- #undef SUBTARGET_LINK_EMUL_SUFFIX
diff --git a/sys-devel/gcc/files/5.4.0/musl.patch b/sys-devel/gcc/files/5.4.0/musl.patch
deleted file mode 100644
index c1541b2..0000000
--- a/sys-devel/gcc/files/5.4.0/musl.patch
+++ /dev/null
@@ -1,502 +0,0 @@
-diff -Naur gcc-5.4.0.orig/fixincludes/mkfixinc.sh gcc-5.4.0/fixincludes/mkfixinc.sh
---- gcc-5.4.0.orig/fixincludes/mkfixinc.sh 2012-10-28 14:42:48.000000000 -0700
-+++ gcc-5.4.0/fixincludes/mkfixinc.sh 2016-12-24 14:47:04.324620119 -0800
-@@ -19,7 +19,8 @@
- powerpc-*-eabi* | \
- powerpc-*-rtems* | \
- powerpcle-*-eabisim* | \
-- powerpcle-*-eabi* )
-+ powerpcle-*-eabi* | \
-+ *-musl* )
- # IF there is no include fixing,
- # THEN create a no-op fixer and exit
- (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
-diff -Naur gcc-5.4.0.orig/gcc/config/glibc-stdint.h gcc-5.4.0/gcc/config/glibc-stdint.h
---- gcc-5.4.0.orig/gcc/config/glibc-stdint.h 2015-01-05 04:33:28.000000000 -0800
-+++ gcc-5.4.0/gcc/config/glibc-stdint.h 2016-12-24 15:24:46.234527766 -0800
-@@ -22,6 +22,12 @@
- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- <http://www.gnu.org/licenses/>. */
-
-+/* Systems using musl libc should use this header and make sure
-+ OPTION_MUSL is defined correctly before using the TYPE macros. */
-+#ifndef OPTION_MUSL
-+#define OPTION_MUSL 0
-+#endif
-+
- #define SIG_ATOMIC_TYPE "int"
-
- #define INT8_TYPE "signed char"
-@@ -43,12 +49,12 @@
- #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
-
- #define INT_FAST8_TYPE "signed char"
--#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
--#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
-+#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
-+#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
- #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
- #define UINT_FAST8_TYPE "unsigned char"
--#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
--#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
-+#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
-+#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
- #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
-
- #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
-diff -Naur gcc-5.4.0.orig/gcc/config/linux.c gcc-5.4.0/gcc/config/linux.c
---- gcc-5.4.0.orig/gcc/config/linux.c 2015-01-05 04:33:28.000000000 -0800
-+++ gcc-5.4.0/gcc/config/linux.c 2016-12-24 15:35:58.913083568 -0800
-@@ -26,7 +26,7 @@
- bool
- linux_libc_has_function (enum function_class fn_class)
- {
-- if (OPTION_GLIBC)
-+ if (OPTION_GLIBC || OPTION_MUSL)
- return true;
- if (OPTION_BIONIC)
- if (fn_class == function_c94
-diff -Naur gcc-5.4.0.orig/gcc/config/linux.h gcc-5.4.0/gcc/config/linux.h
---- gcc-5.4.0.orig/gcc/config/linux.h 2015-01-05 04:33:28.000000000 -0800
-+++ gcc-5.4.0/gcc/config/linux.h 2016-12-24 14:55:26.718712791 -0800
-@@ -32,10 +32,14 @@
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
-@@ -50,21 +54,25 @@
- } while (0)
-
- /* Determine which dynamic linker to use depending on whether GLIBC or
-- uClibc or Bionic is the default C library and whether
-- -muclibc or -mglibc or -mbionic has been passed to change the default. */
-+ uClibc or Bionic or musl is the default C library and whether
-+ -muclibc or -mglibc or -mbionic or -mmusl has been passed to change
-+ the default. */
-
--#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
-- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
-+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
-+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
-
- #if DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
- #elif DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
- #elif DEFAULT_LIBC == LIBC_BIONIC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif /* DEFAULT_LIBC */
-@@ -81,24 +89,101 @@
- #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
- #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32"
-+/* Should be redefined for each target that supports musl. */
-+#define MUSL_DYNAMIC_LINKER "/dev/null"
-+#define MUSL_DYNAMIC_LINKER32 "/dev/null"
-+#define MUSL_DYNAMIC_LINKER64 "/dev/null"
-+#define MUSL_DYNAMIC_LINKERX32 "/dev/null"
-
- #define GNU_USER_DYNAMIC_LINKER \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
-- BIONIC_DYNAMIC_LINKER)
-+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
- #define GNU_USER_DYNAMIC_LINKER32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
-- BIONIC_DYNAMIC_LINKER32)
-+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
-- BIONIC_DYNAMIC_LINKER64)
-+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
- #define GNU_USER_DYNAMIC_LINKERX32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
-- BIONIC_DYNAMIC_LINKERX32)
-+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
-
- /* Whether we have Bionic libc runtime */
- #undef TARGET_HAS_BIONIC
- #define TARGET_HAS_BIONIC (OPTION_BIONIC)
-
-+/* musl avoids problematic includes by rearranging the include directories.
-+ * Unfortunately, this is mostly duplicated from cppdefault.c */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define INCLUDE_DEFAULTS_MUSL_GPP \
-+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
-+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
-+
-+#ifdef LOCAL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL
-+#endif
-+
-+#ifdef PREFIX_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX
-+#endif
-+
-+#ifdef CROSS_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_CROSS \
-+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#ifdef TOOL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_TOOL \
-+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_TOOL
-+#endif
-+
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#endif
-+
-+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
-+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
-+# define INCLUDE_DEFAULTS_MUSL_LOCAL
-+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
-+# define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#else
-+# undef INCLUDE_DEFAULTS_MUSL_CROSS
-+# define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#undef INCLUDE_DEFAULTS
-+#define INCLUDE_DEFAULTS \
-+ { \
-+ INCLUDE_DEFAULTS_MUSL_GPP \
-+ INCLUDE_DEFAULTS_MUSL_LOCAL \
-+ INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ INCLUDE_DEFAULTS_MUSL_CROSS \
-+ INCLUDE_DEFAULTS_MUSL_TOOL \
-+ INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
-+ { 0, 0, 0, 0, 0, 0 } \
-+ }
-+#endif
-+
- #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
- /* This is a *uclinux* target. We don't define below macros to normal linux
- versions, because doing so would require *uclinux* targets to include
-diff -Naur gcc-5.4.0.orig/gcc/config/linux.opt gcc-5.4.0/gcc/config/linux.opt
---- gcc-5.4.0.orig/gcc/config/linux.opt 2015-01-05 04:33:28.000000000 -0800
-+++ gcc-5.4.0/gcc/config/linux.opt 2016-12-24 14:56:23.784327534 -0800
-@@ -28,5 +28,9 @@
- Use GNU C library
-
- muclibc
--Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
-+Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl)
- Use uClibc C library
-+
-+mmusl
-+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic)
-+Use musl C library.
-diff -Naur gcc-5.4.0.orig/gcc/config/rs6000/linux64.h gcc-5.4.0/gcc/config/rs6000/linux64.h
---- gcc-5.4.0.orig/gcc/config/rs6000/linux64.h 2015-03-09 16:18:57.000000000 -0700
-+++ gcc-5.4.0/gcc/config/rs6000/linux64.h 2016-12-24 15:03:44.985080397 -0800
-@@ -299,10 +299,14 @@
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- /* Determine what functions are present at the runtime;
-diff -Naur gcc-5.4.0.orig/gcc/config/rs6000/sysv4.h gcc-5.4.0/gcc/config/rs6000/sysv4.h
---- gcc-5.4.0.orig/gcc/config/rs6000/sysv4.h 2015-09-24 06:46:45.000000000 -0700
-+++ gcc-5.4.0/gcc/config/rs6000/sysv4.h 2016-12-24 15:08:38.507113094 -0800
-@@ -943,3 +959,73 @@
- /* This target uses the sysv4.opt file. */
- #define TARGET_USES_SYSV4_OPT 1
-
-+/* Include order changes for musl, same as in generic linux.h. */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define INCLUDE_DEFAULTS_MUSL_GPP \
-+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
-+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
-+
-+#ifdef LOCAL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL
-+#endif
-+
-+#ifdef PREFIX_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX
-+#endif
-+
-+#ifdef CROSS_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_CROSS \
-+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#ifdef TOOL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_TOOL \
-+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_TOOL
-+#endif
-+
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#endif
-+
-+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
-+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
-+# define INCLUDE_DEFAULTS_MUSL_LOCAL
-+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
-+# define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#else
-+# undef INCLUDE_DEFAULTS_MUSL_CROSS
-+# define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#undef INCLUDE_DEFAULTS
-+#define INCLUDE_DEFAULTS \
-+ { \
-+ INCLUDE_DEFAULTS_MUSL_GPP \
-+ INCLUDE_DEFAULTS_MUSL_LOCAL \
-+ INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ INCLUDE_DEFAULTS_MUSL_CROSS \
-+ INCLUDE_DEFAULTS_MUSL_TOOL \
-+ INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
-+ { 0, 0, 0, 0, 0, 0 } \
-+ }
-+#endif
-diff -Naur gcc-5.4.0.orig/gcc/config.gcc gcc-5.4.0/gcc/config.gcc
---- gcc-5.4.0.orig/gcc/config.gcc 2016-12-24 15:28:09.922509373 -0800
-+++ gcc-5.4.0/gcc/config.gcc 2016-12-24 15:39:19.482040184 -0800
-@@ -575,7 +575,7 @@
- esac
-
- # Common C libraries.
--tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
-+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
-
- # 32-bit x86 processors supported by --with-arch=. Each processor
- # MUST be separated by exactly one space.
-@@ -720,6 +720,9 @@
- *-*-*uclibc*)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
- ;;
-+ *-*-*musl*)
-+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
-+ ;;
- *)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
- ;;
-@@ -1438,7 +1441,7 @@
- extra_options="${extra_options} linux-android.opt"
- # Assume modern glibc if not targeting Android nor uclibc.
- case ${target} in
-- *-*-*android*|*-*-*uclibc*)
-+ *-*-*android*|*-*-*uclibc*|*-*-*musl*)
- ;;
- *)
- default_gnu_indirect_function=yes
-@@ -1507,7 +1510,7 @@
- extra_options="${extra_options} linux-android.opt"
- # Assume modern glibc if not targeting Android nor uclibc.
- case ${target} in
-- *-*-*android*|*-*-*uclibc*)
-+ *-*-*android*|*-*-*uclibc*|*-*-*musl*)
- ;;
- *)
- default_gnu_indirect_function=yes
-diff -Naur gcc-5.4.0.orig/gcc/configure gcc-5.4.0/gcc/configure
---- gcc-5.4.0.orig/gcc/configure 2016-12-24 15:28:54.117939552 -0800
-+++ gcc-5.4.0/gcc/configure 2016-12-24 15:13:46.057105137 -0800
-@@ -27837,6 +27837,9 @@
- else
- gcc_cv_libc_provides_ssp=no
- case "$target" in
-+ *-*-musl*)
-+ # All versions of musl provide stack protector
-+ gcc_cv_libc_provides_ssp=yes;;
- *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
- # glibc 2.4 and later provides __stack_chk_fail and
- # either __stack_chk_guard, or TLS access to stack guard canary.
-@@ -27869,6 +27872,7 @@
- # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
- # simply assert that glibc does provide this, which is true for all
- # realistically usable GNU/Hurd configurations.
-+ # All supported versions of musl provide it as well
- gcc_cv_libc_provides_ssp=yes;;
- *-*-darwin* | *-*-freebsd*)
- ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
-@@ -27965,6 +27969,9 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
-
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-diff -Naur gcc-5.4.0.orig/gcc/configure.ac gcc-5.4.0/gcc/configure.ac
---- gcc-5.4.0.orig/gcc/configure.ac 2016-12-24 15:28:32.129725419 -0800
-+++ gcc-5.4.0/gcc/configure.ac 2016-12-24 15:14:52.372750299 -0800
-@@ -5287,6 +5287,9 @@
- gcc_cv_libc_provides_ssp,
- [gcc_cv_libc_provides_ssp=no
- case "$target" in
-+ *-*-musl*)
-+ # All versions of musl provide stack protector
-+ gcc_cv_libc_provides_ssp=yes;;
- *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
- # glibc 2.4 and later provides __stack_chk_fail and
- # either __stack_chk_guard, or TLS access to stack guard canary.
-@@ -5313,6 +5316,7 @@
- # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
- # simply assert that glibc does provide this, which is true for all
- # realistically usable GNU/Hurd configurations.
-+ # All supported versions of musl provide it as well
- gcc_cv_libc_provides_ssp=yes;;
- *-*-darwin* | *-*-freebsd*)
- AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes],
-@@ -5386,6 +5390,9 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
- GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-diff -Naur gcc-5.4.0.orig/libgcc/unwind-dw2-fde-dip.c gcc-5.4.0/libgcc/unwind-dw2-fde-dip.c
---- gcc-5.4.0.orig/libgcc/unwind-dw2-fde-dip.c 2015-01-27 02:02:26.000000000 -0800
-+++ gcc-5.4.0/libgcc/unwind-dw2-fde-dip.c 2016-12-24 15:16:56.850961302 -0800
-@@ -59,6 +59,12 @@
-
- #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
- && defined(TARGET_DL_ITERATE_PHDR) \
-+ && defined(__linux__)
-+# define USE_PT_GNU_EH_FRAME
-+#endif
-+
-+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-+ && defined(TARGET_DL_ITERATE_PHDR) \
- && (defined(__DragonFly__) || defined(__FreeBSD__))
- # define ElfW __ElfN
- # define USE_PT_GNU_EH_FRAME
-diff -Naur gcc-5.4.0.orig/libitm/config/arm/hwcap.cc gcc-5.4.0/libitm/config/arm/hwcap.cc
---- gcc-5.4.0.orig/libitm/config/arm/hwcap.cc 2015-01-05 04:33:28.000000000 -0800
-+++ gcc-5.4.0/libitm/config/arm/hwcap.cc 2016-12-24 15:19:01.076169845 -0800
-@@ -40,7 +40,7 @@
-
- #ifdef __linux__
- #include <unistd.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <elf.h>
-
- static void __attribute__((constructor))
-diff -Naur gcc-5.4.0.orig/libitm/config/linux/x86/tls.h gcc-5.4.0/libitm/config/linux/x86/tls.h
---- gcc-5.4.0.orig/libitm/config/linux/x86/tls.h 2015-01-05 04:33:28.000000000 -0800
-+++ gcc-5.4.0/libitm/config/linux/x86/tls.h 2016-12-24 15:20:21.897956131 -0800
-@@ -25,16 +25,19 @@
- #ifndef LIBITM_X86_TLS_H
- #define LIBITM_X86_TLS_H 1
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- /* Use slots in the TCB head rather than __thread lookups.
- GLIBC has reserved words 10 through 13 for TM. */
- #define HAVE_ARCH_GTM_THREAD 1
- #define HAVE_ARCH_GTM_THREAD_DISP 1
- #endif
-+#endif
-
- #include "config/generic/tls.h"
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- namespace GTM HIDDEN {
-
- #ifdef __x86_64__
-@@ -101,5 +104,6 @@
-
- } // namespace GTM
- #endif /* >= GLIBC 2.10 */
-+#endif
-
- #endif // LIBITM_X86_TLS_H
-diff -Naur gcc-5.4.0.orig/libstdc++-v3/configure.host gcc-5.4.0/libstdc++-v3/configure.host
---- gcc-5.4.0.orig/libstdc++-v3/configure.host 2015-06-24 02:59:28.000000000 -0700
-+++ gcc-5.4.0/libstdc++-v3/configure.host 2016-12-24 15:21:16.012482591 -0800
-@@ -273,6 +273,9 @@
- freebsd*)
- os_include_dir="os/bsd/freebsd"
- ;;
-+ linux-musl*)
-+ os_include_dir="os/generic"
-+ ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
- if [ "$uclibc" = "yes" ]; then
- os_include_dir="os/uclibc"
diff --git a/sys-devel/gcc/files/5.4.0/ppc-secure_plt.patch b/sys-devel/gcc/files/5.4.0/ppc-secure_plt.patch
deleted file mode 100644
index 4e7f9d4..0000000
--- a/sys-devel/gcc/files/5.4.0/ppc-secure_plt.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-diff -Naur gcc-5.4.0.orig/gcc/config/rs6000/secureplt.h gcc-5.4.0/gcc/config/rs6000/secureplt.h
---- gcc-5.4.0.orig/gcc/config/rs6000/secureplt.h 2015-01-05 04:33:28.000000000 -0800
-+++ gcc-5.4.0/gcc/config/rs6000/secureplt.h 2016-12-24 15:04:26.850531396 -0800
-@@ -18,3 +18,4 @@
- <http://www.gnu.org/licenses/>. */
-
- #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
-+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
-diff -Naur gcc-5.4.0.orig/gcc/config/rs6000/sysv4.h gcc-5.4.0/gcc/config/rs6000/sysv4.h
---- gcc-5.4.0.orig/gcc/config/rs6000/sysv4.h 2015-09-24 06:46:45.000000000 -0700
-+++ gcc-5.4.0/gcc/config/rs6000/sysv4.h 2016-12-24 15:08:38.507113094 -0800
-@@ -537,6 +537,9 @@
- #ifndef CC1_SECURE_PLT_DEFAULT_SPEC
- #define CC1_SECURE_PLT_DEFAULT_SPEC ""
- #endif
-+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
-+#define LINK_SECURE_PLT_DEFAULT_SPEC ""
-+#endif
-
- /* Pass -G xxx to the compiler. */
- #undef CC1_SPEC
-@@ -567,6 +570,7 @@
- : %(link_start_default) }"
-
- #define LINK_START_DEFAULT_SPEC ""
-+#define LINK_SECURE_PLT_SPEC LINK_SECURE_PLT_DEFAULT_SPEC
-
- #undef LINK_SPEC
- #define LINK_SPEC "\
-@@ -574,6 +578,7 @@
- %{R*} \
- %(link_shlib) \
- %{!T*: %(link_start) } \
-+%{!static: %{!mbss-plt: %(link_secure_plt)}} \
- %(link_os)"
-
- /* Shared libraries are not default. */
-@@ -889,6 +904,7 @@
- { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
- { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
- { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
-+ { "link_secure_plt", LINK_SECURE_PLT_SPEC }, \
- { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
- { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
- { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
-diff -Naur gcc-5.4.0.orig/gcc/config.gcc gcc-5.4.0/gcc/config.gcc
---- gcc-5.4.0.orig/gcc/config.gcc 2016-12-24 15:28:09.922509373 -0800
-+++ gcc-5.4.0/gcc/config.gcc 2016-12-24 15:39:19.482040184 -0800
-@@ -2413,6 +2416,10 @@
- powerpc*-*-linux*paired*)
- tm_file="${tm_file} rs6000/750cl.h" ;;
- esac
-+ case ${target} in
-+ *-linux*-musl*)
-+ enable_secureplt=yes ;;
-+ esac
- if test x${enable_secureplt} = xyes; then
- tm_file="rs6000/secureplt.h ${tm_file}"
- fi
diff --git a/sys-devel/gcc/files/6.3.0/musl.patch b/sys-devel/gcc/files/6.3.0/musl.patch
deleted file mode 100644
index 2d56a5c..0000000
--- a/sys-devel/gcc/files/6.3.0/musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -Naur gcc-6.2.0.orig/gcc/config/linux.c gcc-6.2.0/gcc/config/linux.c
---- gcc-6.2.0.orig/gcc/config/linux.c 2016-12-24 15:55:23.308342638 -0800
-+++ gcc-6.2.0/gcc/config/linux.c 2016-12-24 16:00:51.852488459 -0800
-@@ -26,7 +26,7 @@
- bool
- linux_libc_has_function (enum function_class fn_class)
- {
-- if (OPTION_GLIBC)
-+ if (OPTION_GLIBC || OPTION_MUSL)
- return true;
- if (OPTION_BIONIC)
- if (fn_class == function_c94
-diff -Naur gcc-6.2.0.orig/gcc/config.gcc gcc-6.2.0/gcc/config.gcc
---- gcc-6.2.0.orig/gcc/config.gcc 2016-12-24 15:55:15.957272251 -0800
-+++ gcc-6.2.0/gcc/config.gcc 2016-12-24 16:02:12.297258721 -0800
-@@ -1484,7 +1484,7 @@
- extra_options="${extra_options} linux-android.opt"
- # Assume modern glibc if not targeting Android nor uclibc.
- case ${target} in
-- *-*-*android*|*-*-*uclibc*)
-+ *-*-*android*|*-*-*uclibc*|*-*-*musl*)
- ;;
- *)
- default_gnu_indirect_function=yes
-@@ -1553,7 +1553,7 @@
- extra_options="${extra_options} linux-android.opt"
- # Assume modern glibc if not targeting Android nor uclibc.
- case ${target} in
-- *-*-*android*|*-*-*uclibc*)
-+ *-*-*android*|*-*-*uclibc*|*-*-*musl*)
- ;;
- *)
- default_gnu_indirect_function=yes
diff --git a/sys-devel/gcc/files/gcc-4.9.3-tree-vect-data-refs-correctness.patch b/sys-devel/gcc/files/gcc-4.9.3-tree-vect-data-refs-correctness.patch
deleted file mode 100644
index d865e25..0000000
--- a/sys-devel/gcc/files/gcc-4.9.3-tree-vect-data-refs-correctness.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- trunk/gcc/tree-vect-data-refs.c 2015/11/20 16:15:57 230666
-+++ trunk/gcc/tree-vect-data-refs.c 2015/11/20 16:27:17
-@@ -2545,6 +2545,8 @@
- if (t2 == NULL)
- return 1;
-
-+ STRIP_NOPS (t1);
-+ STRIP_NOPS (t2);
-
- if (TREE_CODE (t1) != TREE_CODE (t2))
- return TREE_CODE (t1) < TREE_CODE (t2) ? -1 : 1;
diff --git a/sys-devel/gcc/files/gcc-5.4.0-pr68470.patch b/sys-devel/gcc/files/gcc-5.4.0-pr68470.patch
deleted file mode 100644
index 7f314cf..0000000
--- a/sys-devel/gcc/files/gcc-5.4.0-pr68470.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -Naur gcc-5.4.0.orig/gcc/ipa-split.c gcc-5.4.0/gcc/ipa-split.c
---- gcc-5.4.0.orig/gcc/ipa-split.c 2016-03-30 05:27:12.000000000 -0700
-+++ gcc-5.4.0/gcc/ipa-split.c 2016-12-24 17:10:50.205152721 -0800
-@@ -1246,7 +1246,6 @@
- edge e;
- edge_iterator ei;
- tree retval = NULL, real_retval = NULL, retbnd = NULL;
-- bool split_part_return_p = false;
- bool with_bounds = chkp_function_instrumented_p (current_function_decl);
- gimple last_stmt = NULL;
- unsigned int i;
-@@ -1287,12 +1286,28 @@
- args_to_pass.safe_push (arg);
- }
-
-- /* See if the split function will return. */
-+ /* See if the split function or the main part will return. */
-+ bool main_part_return_p = false;
-+ bool split_part_return_p = false;
- FOR_EACH_EDGE (e, ei, return_bb->preds)
-- if (bitmap_bit_p (split_point->split_bbs, e->src->index))
-- break;
-- if (e)
-- split_part_return_p = true;
-+ {
-+ if (bitmap_bit_p (split_point->split_bbs, e->src->index))
-+ split_part_return_p = true;
-+ else
-+ main_part_return_p = true;
-+ }
-+ /* The main part also returns if we we split on a fallthru edge
-+ and the split part returns. */
-+ if (split_part_return_p)
-+ FOR_EACH_EDGE (e, ei, split_point->entry_bb->preds)
-+ {
-+ if (! bitmap_bit_p (split_point->split_bbs, e->src->index)
-+ && single_succ_p (e->src))
-+ {
-+ main_part_return_p = true;
-+ break;
-+ }
-+ }
-
- /* Add return block to what will become the split function.
- We do not return; no return block is needed. */
-@@ -1336,6 +1351,11 @@
- else
- bitmap_set_bit (split_point->split_bbs, return_bb->index);
-
-+ /* If the main part doesn't return pretend the return block wasn't
-+ found for all of the following. */
-+ if (! main_part_return_p)
-+ return_bb = EXIT_BLOCK_PTR_FOR_FN (cfun);
-+
- /* If RETURN_BB has virtual operand PHIs, they must be removed and the
- virtual operand marked for renaming as we change the CFG in a way that
- tree-inline is not able to compensate for.
diff --git a/sys-devel/gcc/files/gcc-5.4.0-pr70473.patch b/sys-devel/gcc/files/gcc-5.4.0-pr70473.patch
deleted file mode 100644
index 798a457..0000000
--- a/sys-devel/gcc/files/gcc-5.4.0-pr70473.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- a/gcc/config/arm/cortex-a8-neon.md 2016/08/26 10:22:08 239771
-+++ b/gcc/config/arm/cortex-a8-neon.md 2016/08/26 10:23:20 239772
-@@ -357,30 +357,34 @@
- (eq_attr "type" "fmuls"))
- "cortex_a8_vfp,cortex_a8_vfplite*11")
-
-+;; Don't model a reservation for more than 15 cycles as this explodes the
-+;; state space of the automaton for little gain. It is unlikely that the
-+;; scheduler will find enough instructions to hide the full latency of the
-+;; instructions.
- (define_insn_reservation "cortex_a8_vfp_muld" 17
- (and (eq_attr "tune" "cortexa8")
- (eq_attr "type" "fmuld"))
-- "cortex_a8_vfp,cortex_a8_vfplite*16")
-+ "cortex_a8_vfp,cortex_a8_vfplite*15")
-
- (define_insn_reservation "cortex_a8_vfp_macs" 21
- (and (eq_attr "tune" "cortexa8")
- (eq_attr "type" "fmacs,ffmas"))
-- "cortex_a8_vfp,cortex_a8_vfplite*20")
-+ "cortex_a8_vfp,cortex_a8_vfplite*15")
-
- (define_insn_reservation "cortex_a8_vfp_macd" 26
- (and (eq_attr "tune" "cortexa8")
- (eq_attr "type" "fmacd,ffmad"))
-- "cortex_a8_vfp,cortex_a8_vfplite*25")
-+ "cortex_a8_vfp,cortex_a8_vfplite*15")
-
- (define_insn_reservation "cortex_a8_vfp_divs" 37
- (and (eq_attr "tune" "cortexa8")
- (eq_attr "type" "fdivs, fsqrts"))
-- "cortex_a8_vfp,cortex_a8_vfplite*36")
-+ "cortex_a8_vfp,cortex_a8_vfplite*15")
-
- (define_insn_reservation "cortex_a8_vfp_divd" 65
- (and (eq_attr "tune" "cortexa8")
- (eq_attr "type" "fdivd, fsqrtd"))
-- "cortex_a8_vfp,cortex_a8_vfplite*64")
-+ "cortex_a8_vfp,cortex_a8_vfplite*15")
-
- ;; Comparisons can actually take 7 cycles sometimes instead of four,
- ;; but given all the other instructions lumped into type=ffarith that
-
diff --git a/sys-devel/gcc/files/gcc-5.4.0-pr71696-CVE-2016-6131.patch b/sys-devel/gcc/files/gcc-5.4.0-pr71696-CVE-2016-6131.patch
deleted file mode 100644
index b16edbb..0000000
--- a/sys-devel/gcc/files/gcc-5.4.0-pr71696-CVE-2016-6131.patch
+++ /dev/null
@@ -1,252 +0,0 @@
-From b3f6b32165d3f437bd0ac6269c3c499b68ecf036 Mon Sep 17 00:00:00 2001
-From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 4 Aug 2016 16:53:18 +0000
-Subject: [PATCH] Fix for PR71696 in Libiberty Demangler
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-[BZ #71696] -- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71696
-
-2016-08-04 Marcel Böhme <boehme.marcel@gmail.com>
-
- PR c++/71696
- * cplus-dem.c: Prevent infinite recursion when there is a cycle
- in the referencing of remembered mangled types.
- (work_stuff): New stack to keep track of the remembered mangled
- types that are currently being processed.
- (push_processed_type): New method to push currently processed
- remembered type onto the stack.
- (pop_processed_type): New method to pop currently processed
- remembered type from the stack.
- (work_stuff_copy_to_from): Copy values of new variables.
- (delete_non_B_K_work_stuff): Free stack memory.
- (demangle_args): Push/Pop currently processed remembered type.
- (do_type): Do not demangle a cyclic reference and push/pop
- referenced remembered type.
-
-cherry-picked from commit of
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239143 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport [master]
-CVE: CVE-2016-6131
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- libiberty/ChangeLog | 17 ++++++++
- libiberty/cplus-dem.c | 78 ++++++++++++++++++++++++++++++++---
- libiberty/testsuite/demangle-expected | 18 ++++++++
- 3 files changed, 108 insertions(+), 5 deletions(-)
-
-diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
-index 9859ad3..7939480 100644
---- a/libiberty/ChangeLog
-+++ b/libiberty/ChangeLog
-@@ -1,3 +1,20 @@
-+2016-08-04 Marcel Böhme <boehme.marcel@gmail.com>
-+
-+ PR c++/71696
-+ * cplus-dem.c: Prevent infinite recursion when there is a cycle
-+ in the referencing of remembered mangled types.
-+ (work_stuff): New stack to keep track of the remembered mangled
-+ types that are currently being processed.
-+ (push_processed_type): New method to push currently processed
-+ remembered type onto the stack.
-+ (pop_processed_type): New method to pop currently processed
-+ remembered type from the stack.
-+ (work_stuff_copy_to_from): Copy values of new variables.
-+ (delete_non_B_K_work_stuff): Free stack memory.
-+ (demangle_args): Push/Pop currently processed remembered type.
-+ (do_type): Do not demangle a cyclic reference and push/pop
-+ referenced remembered type.
-+
- 2016-06-03 Release Manager
-
- * GCC 5.4.0 released.
-diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
-index 7514e57..f21e630 100644
---- a/libiberty/cplus-dem.c
-+++ b/libiberty/cplus-dem.c
-@@ -144,6 +144,9 @@ struct work_stuff
- string* previous_argument; /* The last function argument demangled. */
- int nrepeats; /* The number of times to repeat the previous
- argument. */
-+ int *proctypevec; /* Indices of currently processed remembered typevecs. */
-+ int proctypevec_size;
-+ int nproctypes;
- };
-
- #define PRINT_ANSI_QUALIFIERS (work -> options & DMGL_ANSI)
-@@ -435,6 +438,10 @@ iterate_demangle_function (struct work_stuff *,
-
- static void remember_type (struct work_stuff *, const char *, int);
-
-+static void push_processed_type (struct work_stuff *, int);
-+
-+static void pop_processed_type (struct work_stuff *);
-+
- static void remember_Btype (struct work_stuff *, const char *, int, int);
-
- static int register_Btype (struct work_stuff *);
-@@ -1301,6 +1308,10 @@ work_stuff_copy_to_from (struct work_stuff *to, struct work_stuff *from)
- memcpy (to->btypevec[i], from->btypevec[i], len);
- }
-
-+ if (from->proctypevec)
-+ to->proctypevec =
-+ XDUPVEC (int, from->proctypevec, from->proctypevec_size);
-+
- if (from->ntmpl_args)
- to->tmpl_argvec = XNEWVEC (char *, from->ntmpl_args);
-
-@@ -1329,11 +1340,17 @@ delete_non_B_K_work_stuff (struct work_stuff *work)
- /* Discard the remembered types, if any. */
-
- forget_types (work);
-- if (work -> typevec != NULL)
-+ if (work->typevec != NULL)
- {
-- free ((char *) work -> typevec);
-- work -> typevec = NULL;
-- work -> typevec_size = 0;
-+ free ((char *) work->typevec);
-+ work->typevec = NULL;
-+ work->typevec_size = 0;
-+ }
-+ if (work->proctypevec != NULL)
-+ {
-+ free (work->proctypevec);
-+ work->proctypevec = NULL;
-+ work->proctypevec_size = 0;
- }
- if (work->tmpl_argvec)
- {
-@@ -3552,6 +3569,8 @@ static int
- do_type (struct work_stuff *work, const char **mangled, string *result)
- {
- int n;
-+ int i;
-+ int is_proctypevec;
- int done;
- int success;
- string decl;
-@@ -3564,6 +3583,7 @@ do_type (struct work_stuff *work, const char **mangled, string *result)
-
- done = 0;
- success = 1;
-+ is_proctypevec = 0;
- while (success && !done)
- {
- int member;
-@@ -3616,8 +3636,15 @@ do_type (struct work_stuff *work, const char **mangled, string *result)
- success = 0;
- }
- else
-+ for (i = 0; i < work->nproctypes; i++)
-+ if (work -> proctypevec [i] == n)
-+ success = 0;
-+
-+ if (success)
- {
-- remembered_type = work -> typevec[n];
-+ is_proctypevec = 1;
-+ push_processed_type (work, n);
-+ remembered_type = work->typevec[n];
- mangled = &remembered_type;
- }
- break;
-@@ -3840,6 +3867,9 @@ do_type (struct work_stuff *work, const char **mangled, string *result)
- string_delete (result);
- string_delete (&decl);
-
-+ if (is_proctypevec)
-+ pop_processed_type (work);
-+
- if (success)
- /* Assume an integral type, if we're not sure. */
- return (int) ((tk == tk_none) ? tk_integral : tk);
-@@ -4252,6 +4282,41 @@ do_arg (struct work_stuff *work, const char **mangled, string *result)
- }
-
- static void
-+push_processed_type (struct work_stuff *work, int typevec_index)
-+{
-+ if (work->nproctypes >= work->proctypevec_size)
-+ {
-+ if (!work->proctypevec_size)
-+ {
-+ work->proctypevec_size = 4;
-+ work->proctypevec = XNEWVEC (int, work->proctypevec_size);
-+ }
-+ else
-+ {
-+ if (work->proctypevec_size < 16)
-+ /* Double when small. */
-+ work->proctypevec_size *= 2;
-+ else
-+ {
-+ /* Grow slower when large. */
-+ if (work->proctypevec_size > (INT_MAX / 3) * 2)
-+ xmalloc_failed (INT_MAX);
-+ work->proctypevec_size = (work->proctypevec_size * 3 / 2);
-+ }
-+ work->proctypevec
-+ = XRESIZEVEC (int, work->proctypevec, work->proctypevec_size);
-+ }
-+ }
-+ work->proctypevec [work->nproctypes++] = typevec_index;
-+}
-+
-+static void
-+pop_processed_type (struct work_stuff *work)
-+{
-+ work->nproctypes--;
-+}
-+
-+static void
- remember_type (struct work_stuff *work, const char *start, int len)
- {
- char *tem;
-@@ -4515,10 +4580,13 @@ demangle_args (struct work_stuff *work, const char **mangled,
- {
- string_append (declp, ", ");
- }
-+ push_processed_type (work, t);
- if (!do_arg (work, &tem, &arg))
- {
-+ pop_processed_type (work);
- return (0);
- }
-+ pop_processed_type (work);
- if (PRINT_ARG_TYPES)
- {
- string_appends (declp, &arg);
-diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
-index 1d8b771..d690b23 100644
---- a/libiberty/testsuite/demangle-expected
-+++ b/libiberty/testsuite/demangle-expected
-@@ -4429,3 +4429,21 @@ __vt_90000000000cafebabe
-
- _Z80800000000000000000000
- _Z80800000000000000000000
-+#
-+# Tests write access violation PR70926
-+
-+0__Ot2m02R5T0000500000
-+0__Ot2m02R5T0000500000
-+#
-+
-+0__GT50000000000_
-+0__GT50000000000_
-+#
-+
-+__t2m05B500000000000000000_
-+__t2m05B500000000000000000_
-+#
-+# Tests stack overflow PR71696
-+
-+__10%0__S4_0T0T0
-+%0<>::%0(%0<>)
---
-2.9.3
-
-
diff --git a/sys-devel/gcc/files/gcc-7.2.0-pr69728.patch b/sys-devel/gcc/files/gcc-7.2.0-pr69728.patch
deleted file mode 100644
index ca5eedc..0000000
--- a/sys-devel/gcc/files/gcc-7.2.0-pr69728.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -Naur gcc-7.2.0.orig/gcc/graphite-sese-to-poly.c gcc-7.2.0/gcc/graphite-sese-to-poly.c
---- gcc-7.2.0.orig/gcc/graphite-sese-to-poly.c 2017-11-29 12:32:19.000188886 -0800
-+++ gcc-7.2.0/gcc/graphite-sese-to-poly.c 2017-11-29 12:32:35.858188584 -0800
-@@ -1043,6 +1043,14 @@
- if (empty < 0 || empty)
- return empty < 0 ? isl_schedule_free (schedule) : schedule;
-
-+ isl_union_set *domain = isl_schedule_get_domain (schedule);
-+ /* We cannot apply an empty domain to pbbs in this loop so return early. */
-+ if (isl_union_set_is_empty (domain))
-+ {
-+ isl_union_set_free (domain);
-+ return schedule;
-+ }
-+
- isl_space *space = isl_set_get_space (iterators);
- int loop_index = isl_space_dim (space, isl_dim_set) - 1;
-
-@@ -1063,7 +1071,6 @@
- prefix = isl_multi_aff_set_tuple_id (prefix, isl_dim_out, label);
-
- int n = isl_multi_aff_dim (prefix, isl_dim_in);
-- isl_union_set *domain = isl_schedule_get_domain (schedule);
- isl_multi_union_pw_aff *mupa = outer_projection_mupa (domain, n);
- mupa = isl_multi_union_pw_aff_apply_multi_aff (mupa, prefix);
- return isl_schedule_insert_partial_schedule (schedule, mupa);
diff --git a/sys-devel/gcc/files/gcc-configure-LANG.patch b/sys-devel/gcc/files/gcc-configure-LANG.patch
deleted file mode 100644
index d1b1b03..0000000
--- a/sys-devel/gcc/files/gcc-configure-LANG.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
-option parsing, it may break.
-
-http://bugs.gentoo.org/103483
-
---- configure
-+++ configure
-@@ -54,6 +54,19 @@
- infodir='${prefix}/info'
- mandir='${prefix}/man'
-
-+# NLS nuisances.
-+for as_var in \
-+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-+ LC_TELEPHONE LC_TIME
-+do
-+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-+ eval $as_var=C; export $as_var
-+ else
-+ unset $as_var
-+ fi
-+done
-+
- # Initialize some other variables.
- subdirs=
- MFLAGS= MAKEFLAGS=
-@@ -452,16 +463,6 @@
- esac
- done
-
--# NLS nuisances.
--# Only set these to C if already set. These must not be set unconditionally
--# because not all systems understand e.g. LANG=C (notably SCO).
--# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
--# Non-C LC_CTYPE values break the ctype check.
--if test "${LANG+set}" = set; then LANG=C; export LANG; fi
--if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
--if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
--if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
--
- # confdefs.h avoids OS command line length limits that DEFS can exceed.
- rm -rf conftest* confdefs.h
- # AIX cpp loses on an empty file, so make sure it contains at least a newline.
-@@ -1850,6 +1850,19 @@
- # Compiler output produced by configure, useful for debugging
- # configure, is in ./config.log if it exists.
-
-+# NLS nuisances.
-+for as_var in \
-+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-+ LC_TELEPHONE LC_TIME
-+do
-+ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then
-+ eval \$as_var=C; export \$as_var
-+ else
-+ unset \$as_var
-+ fi
-+done
-+
- ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
- for ac_option
- do
diff --git a/sys-devel/gcc/files/gcc-spec-env-r1.patch b/sys-devel/gcc/files/gcc-spec-env-r1.patch
deleted file mode 100644
index a589268..0000000
--- a/sys-devel/gcc/files/gcc-spec-env-r1.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-2013-08-22 Magnus Granberg <zorry@gentoo.org>
-
- * gcc/gcc.c (main): Add support for external spec file via the GCC_SPECS env var
- and move the process of the user specifed specs.
-
- This allows us to easily control pie/ssp defaults with gcc-config profiles.
- Original patch by Rob Holland
- Extended to support multiple entries separated by ':' by Kevin F. Quinn
- Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
- Modified to process the GCC_SPECS env var befor DRIVER_SELF_SPECS by Magnus Granberg
-
---- gcc-4.8-20130210/gcc/gcc.c 2013-02-05 16:55:31.000000000 +0100
-+++ gcc-4.8-20130210-work/gcc/gcc.c 2013-07-26 02:32:14.625089864 +0200
-@@ -6427,6 +6428,48 @@ main (int argc, char **argv)
- do_option_spec (option_default_specs[i].name,
- option_default_specs[i].spec);
-
-+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32))
-+ /* Add specs listed in GCC_SPECS. Note; in the process of separating
-+ * each spec listed, the string is overwritten at token boundaries
-+ * (':') with '\0', an effect of strtok_r().
-+ */
-+ specs_file = getenv ("GCC_SPECS");
-+ if (specs_file && (strlen(specs_file) > 0))
-+ {
-+ char *spec, *saveptr;
-+ for (spec=strtok_r(specs_file,":",&saveptr);
-+ spec!=NULL;
-+ spec=strtok_r(NULL,":",&saveptr))
-+ {
-+ struct user_specs *user = (struct user_specs *)
-+ xmalloc (sizeof (struct user_specs));
-+ user->next = (struct user_specs *) 0;
-+ user->filename = spec;
-+ if (user_specs_tail)
-+ user_specs_tail->next = user;
-+ else
-+ user_specs_head = user;
-+ user_specs_tail = user;
-+ }
-+ }
-+#endif
-+ /* Process any user specified specs in the order given on the command
-+ * line. */
-+ for (uptr = user_specs_head; uptr; uptr = uptr->next)
-+ {
-+ char *filename = find_a_file (&startfile_prefixes, uptr->filename,
-+ R_OK, true);
-+ read_specs (filename ? filename : uptr->filename, false, true);
-+ }
-+ /* Process any user self specs. */
-+ {
-+ struct spec_list *sl;
-+ for (sl = specs; sl; sl = sl->next)
-+ if (sl->name_len == sizeof "self_spec" - 1
-+ && !strcmp (sl->name, "self_spec"))
-+ do_self_spec (*sl->ptr_spec);
-+ }
-+
- /* Process DRIVER_SELF_SPECS, adding any new options to the end
- of the command line. */
-
-@@ -6535,24 +6578,6 @@ main (int argc, char **argv)
- PREFIX_PRIORITY_LAST, 0, 1);
- }
-
-- /* Process any user specified specs in the order given on the command
-- line. */
-- for (uptr = user_specs_head; uptr; uptr = uptr->next)
-- {
-- char *filename = find_a_file (&startfile_prefixes, uptr->filename,
-- R_OK, true);
-- read_specs (filename ? filename : uptr->filename, false, true);
-- }
--
-- /* Process any user self specs. */
-- {
-- struct spec_list *sl;
-- for (sl = specs; sl; sl = sl->next)
-- if (sl->name_len == sizeof "self_spec" - 1
-- && !strcmp (sl->name, "self_spec"))
-- do_self_spec (*sl->ptr_spec);
-- }
--
- if (compare_debug)
- {
- enum save_temps save;
diff --git a/sys-devel/gcc/files/gcc-spec-env.patch b/sys-devel/gcc/files/gcc-spec-env.patch
deleted file mode 100644
index 57e7567..0000000
--- a/sys-devel/gcc/files/gcc-spec-env.patch
+++ /dev/null
@@ -1,42 +0,0 @@
- Add support for external spec file via the GCC_SPECS env var. This
- allows us to easily control pie/ssp defaults with gcc-config profiles.
-
- Original patch by Rob Holland
- Extended to support multiple entries separated by ':' by Kevin F. Quinn
- Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
-
---- gcc-4/gcc/gcc.c
-+++ gcc-4/gcc/gcc.c
-@@ -6482,6 +6482,32 @@
-
- /* Process any user specified specs in the order given on the command
- line. */
-+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32))
-+ /* Add specs listed in GCC_SPECS. Note; in the process of separating
-+ * each spec listed, the string is overwritten at token boundaries
-+ * (':') with '\0', an effect of strtok_r().
-+ */
-+ specs_file = getenv ("GCC_SPECS");
-+ if (specs_file && (strlen(specs_file) > 0))
-+ {
-+ char *spec, *saveptr;
-+ for (spec=strtok_r(specs_file,":",&saveptr);
-+ spec!=NULL;
-+ spec=strtok_r(NULL,":",&saveptr))
-+ {
-+ struct user_specs *user = (struct user_specs *)
-+ xmalloc (sizeof (struct user_specs));
-+
-+ user->next = (struct user_specs *) 0;
-+ user->filename = spec;
-+ if (user_specs_tail)
-+ user_specs_tail->next = user;
-+ else
-+ user_specs_head = user;
-+ user_specs_tail = user;
-+ }
-+ }
-+#endif
- for (uptr = user_specs_head; uptr; uptr = uptr->next)
- {
- char *filename = find_a_file (&startfile_prefixes, uptr->filename,
diff --git a/sys-devel/gcc/gcc-6.4.0-r1.ebuild b/sys-devel/gcc/gcc-6.4.0-r1.ebuild
deleted file mode 100644
index 2298161..0000000
--- a/sys-devel/gcc/gcc-6.4.0-r1.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PATCH_VER="1.3"
-UCLIBC_VER="1.0"
-
-inherit toolchain
-
-KEYWORDS="amd64 arm arm64 ~mips ppc x86"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- elibc_glibc? ( >=sys-libs/glibc-2.13 )
- >=${CATEGORY}/binutils-2.20"
-
-if [[ ${CATEGORY} != cross-* ]] ; then
- PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )"
-fi
-
-src_prepare() {
- toolchain_src_prepare
-
- # Upstream Patch
- epatch "${FILESDIR}"/${PN}-5.4.0-pr70473.patch
-
- if use elibc_musl || [[ ${CATEGORY} = cross-*-musl* ]]; then
- epatch "${FILESDIR}"/4.9.4/boehm_gc.patch
- epatch "${FILESDIR}"/5.4.0/cilkrts.patch
- epatch "${FILESDIR}"/6.3.0/cpu_indicator.patch
- epatch "${FILESDIR}"/6.3.0/musl.patch
- epatch "${FILESDIR}"/7.1.0/posix_memalign.patch
- fi
-}
diff --git a/sys-devel/gcc/gcc-7.3.0-r3.ebuild b/sys-devel/gcc/gcc-7.3.0-r3.ebuild
deleted file mode 100644
index 974c675..0000000
--- a/sys-devel/gcc/gcc-7.3.0-r3.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PATCH_VER="1.4"
-#UCLIBC_VER="1.0"
-
-inherit epatch toolchain
-
-KEYWORDS="amd64 arm arm64 ~mips ppc x86"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- elibc_glibc? ( >=sys-libs/glibc-2.13 )
- >=${CATEGORY}/binutils-2.20"
-
-if [[ ${CATEGORY} != cross-* ]] ; then
- PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )"
-fi
-
-src_prepare() {
- toolchain_src_prepare
-
- epatch "${FILESDIR}"/gcc-7.2.0-pr69728.patch
-
- if use elibc_musl || [[ ${CATEGORY} = cross-*-musl* ]]; then
- epatch "${FILESDIR}"/6.3.0/cpu_indicator.patch
- epatch "${FILESDIR}"/7.1.0/posix_memalign.patch
- fi
-}
diff --git a/sys-devel/gcc/gcc-7.3.0-r6.ebuild b/sys-devel/gcc/gcc-7.3.0-r6.ebuild
deleted file mode 100644
index 64dfcf5..0000000
--- a/sys-devel/gcc/gcc-7.3.0-r6.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PATCH_VER="1.8"
-#UCLIBC_VER="1.0"
-
-inherit epatch toolchain
-
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- elibc_glibc? ( >=sys-libs/glibc-2.13 )
- >=${CATEGORY}/binutils-2.20"
-
-if [[ ${CATEGORY} != cross-* ]] ; then
- PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )"
-fi
-
-src_prepare() {
- toolchain_src_prepare
-
- epatch "${FILESDIR}"/gcc-7.2.0-pr69728.patch
-
- if use elibc_musl || [[ ${CATEGORY} = cross-*-musl* ]]; then
- epatch "${FILESDIR}"/6.3.0/cpu_indicator.patch
- epatch "${FILESDIR}"/7.1.0/posix_memalign.patch
- fi
-}
diff --git a/sys-devel/gcc/gcc-7.4.0.ebuild b/sys-devel/gcc/gcc-7.4.0.ebuild
deleted file mode 100644
index 8410c02..0000000
--- a/sys-devel/gcc/gcc-7.4.0.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PATCH_VER="1.1"
-#UCLIBC_VER="1.0"
-
-inherit epatch toolchain
-
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- elibc_glibc? ( >=sys-libs/glibc-2.13 )
- >=${CATEGORY}/binutils-2.20"
-
-if [[ ${CATEGORY} != cross-* ]] ; then
- PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )"
-fi
-
-src_prepare() {
- toolchain_src_prepare
-
- epatch "${FILESDIR}"/gcc-7.2.0-pr69728.patch
-
- if use elibc_musl || [[ ${CATEGORY} = cross-*-musl* ]]; then
- epatch "${FILESDIR}"/6.3.0/cpu_indicator.patch
- epatch "${FILESDIR}"/7.1.0/posix_memalign.patch
- fi
-}
diff --git a/sys-devel/gcc/gcc-8.2.0-r5.ebuild b/sys-devel/gcc/gcc-8.2.0-r5.ebuild
deleted file mode 100644
index 79f2c9c..0000000
--- a/sys-devel/gcc/gcc-8.2.0-r5.ebuild
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PATCH_VER="1.6"
-#UCLIBC_VER="1.0"
-
-inherit toolchain
-
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- elibc_glibc? ( >=sys-libs/glibc-2.13 )
- >=${CATEGORY}/binutils-2.20"
-
-if [[ ${CATEGORY} != cross-* ]] ; then
- PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )"
-fi
-
-src_prepare() {
- toolchain_src_prepare
-
- if use elibc_musl || [[ ${CATEGORY} = cross-*-musl* ]]; then
- epatch "${FILESDIR}"/6.3.0/cpu_indicator.patch
- epatch "${FILESDIR}"/7.1.0/posix_memalign.patch
- fi
-}
diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml
index d6001b2..6a2c985 100644
--- a/sys-devel/gcc/metadata.xml
+++ b/sys-devel/gcc/metadata.xml
@@ -6,9 +6,6 @@
<name>Gentoo Toolchain Project</name>
</maintainer>
<use>
- <flag name="awt">Useful only when building GCJ, this enables Abstract Window Toolkit
- (AWT) peer support on top of GTK+</flag>
- <flag name="cilk">Support the Cilk Plus language (C/C++ based languages for parallel programming)</flag>
<flag name="fixed-point">Enable fixed-point arithmetic support for MIPS targets
in gcc (Warning: significantly increases compile time!)</flag>
<flag name="go">Build the GCC Go language frontend.</flag>