summaryrefslogtreecommitdiff
path: root/sys-devel/gcc-apple/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-devel/gcc-apple/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-devel/gcc-apple/files')
-rw-r--r--sys-devel/gcc-apple/files/gcc-apple-4.0.1_p5465-default-altivec.patch38
-rw-r--r--sys-devel/gcc-apple/files/gcc-apple-4.2.1-arch-option.patch57
-rw-r--r--sys-devel/gcc-apple/files/gcc-apple-4.2.1-autoconf-m4-precious.patch12
-rw-r--r--sys-devel/gcc-apple/files/gcc-apple-4.2.1-dsymutil.patch20
-rw-r--r--sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs-r1.patch39
-rw-r--r--sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs.patch27
-rw-r--r--sys-devel/gcc-apple/files/gcc-apple-4.2.1-texinfo.patch33
-rw-r--r--sys-devel/gcc-apple/files/gcc-apple-4.2.1_p5666-darwin14.patch148
-rw-r--r--sys-devel/gcc-apple/files/gcc-apple-4.2.1_p5666-perl-5.18.patch11
-rw-r--r--sys-devel/gcc-apple/files/libstdc++-16.patch11
10 files changed, 396 insertions, 0 deletions
diff --git a/sys-devel/gcc-apple/files/gcc-apple-4.0.1_p5465-default-altivec.patch b/sys-devel/gcc-apple/files/gcc-apple-4.0.1_p5465-default-altivec.patch
new file mode 100644
index 000000000000..e7b0bbbf8078
--- /dev/null
+++ b/sys-devel/gcc-apple/files/gcc-apple-4.0.1_p5465-default-altivec.patch
@@ -0,0 +1,38 @@
+* reverse patch to gain 10.4 behaviour for AltiVec.
+
+--- gcc/config/rs6000/rs6000-c.c
++++ gcc/config/rs6000/rs6000-c.c
+@@ -245,22 +245,22 @@
+ builtin_define ("__bool=__attribute__((altivec(bool__))) unsigned");
+
+ /* APPLE LOCAL begin AltiVec */
++ builtin_define ("vector=vector");
++ builtin_define ("pixel=pixel");
++ builtin_define ("_Bool=_Bool");
++ builtin_define ("bool=bool");
++ init_vector_keywords (pfile);
++
++ /* Indicate that the compiler supports Apple AltiVec syntax,
++ including context-sensitive keywords. */
+ if (rs6000_altivec_pim)
+ {
+- builtin_define ("vector=vector");
+- builtin_define ("pixel=pixel");
+- builtin_define ("_Bool=_Bool");
+- builtin_define ("bool=bool");
+- init_vector_keywords (pfile);
+-
+- /* Indicate that the compiler supports Apple AltiVec syntax,
+- including context-sensitive keywords. */
+ builtin_define ("__APPLE_ALTIVEC__");
+ builtin_define ("vec_step(T)=(sizeof (__typeof__(T)) / sizeof (__typeof__(T) __attribute__((altivec(element__)))))");
+-
+- /* Enable context-sensitive macros. */
+- cpp_get_callbacks (pfile)->macro_to_expand = rs6000_macro_to_expand;
+ }
++
++ /* Enable context-sensitive macros. */
++ cpp_get_callbacks (pfile)->macro_to_expand = rs6000_macro_to_expand;
+ /* APPLE LOCAL end AltiVec */
+ }
+ if (TARGET_SPE)
diff --git a/sys-devel/gcc-apple/files/gcc-apple-4.2.1-arch-option.patch b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-arch-option.patch
new file mode 100644
index 000000000000..94abba89306c
--- /dev/null
+++ b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-arch-option.patch
@@ -0,0 +1,57 @@
+Description: Add dummy -arch option with simplistic check.
+Author: Heiko Przybyl <zuxez@cs.tu-berlin.de>
+
+diff -pruN gcc-5664.orig/gcc/gcc.c gcc-5664/gcc/gcc.c
+--- gcc-5664.orig/gcc/gcc.c 2010-09-21 22:28:11.000000000 +0200
++++ gcc-5664/gcc/gcc.c 2010-09-21 22:28:24.000000000 +0200
+@@ -88,6 +88,8 @@ compilation is specified by a string cal
+ #include "flags.h"
+ #include "opts.h"
+
++#include <mach-o/arch.h>
++
+ /* By default there is no special suffix for target executables. */
+ /* FIXME: when autoconf is fixed, remove the host check - dj */
+ #if defined(TARGET_EXECUTABLE_SUFFIX) && defined(HOST_EXECUTABLE_SUFFIX)
+--- gcc-5664/gcc/gcc.c.orig 2010-09-22 01:30:04.000000000 +0200
++++ gcc-5664/gcc/gcc.c 2010-09-22 01:36:52.000000000 +0200
+@@ -1401,6 +1401,39 @@ translate_options (int *argcp, const cha
+ nskip += 1;
+ else if (! strcmp (p, "Xassembler"))
+ nskip += 1;
++ /* GENTOO_PORTAGE Allow but filter -arch. */
++ if (! strcmp (p, "arch")) {
++ if (i + 1 == argc)
++ fatal ("argument to `-arch' is missing");
++ /* Check current arch vs. given arch if possible. */
++ const NXArchInfo *ai = NXGetLocalArchInfo();
++ if (ai) {
++ /* Returns the most generic setting */
++ /* aka "i386", "x86_64", "ppc", "ppc64", "arm". */
++ const NXArchInfo *gai = NXGetArchInfoFromCpuType(ai->cputype, CPU_SUBTYPE_MULTIPLE);
++ if (gai) {
++ const char *name = gai->name;
++#ifdef __LP64__
++ /* Make sure x64 on 32bit kernel is set correctly. */
++ if (gai->cputype == CPU_TYPE_I386) {
++ name = "x86_64";
++ }
++ else if (gai->cputype == CPU_TYPE_POWERPC) {
++ name = "ppc64";
++ }
++#endif
++ if (strcmp(name, argv[i + 1]) != 0) {
++ fatal ("`-arch %s' does not match current compiler arch `%s'",
++ argv[i + 1], name);
++ }
++ }
++ }
++
++ /* Skip argument. */
++ i += 2;
++ /* Don't add option to the new env. */
++ nskip = 0;
++ }
+
+ /* Watch out for an option at the end of the command line that
+ is missing arguments, and avoid skipping past the end of the
diff --git a/sys-devel/gcc-apple/files/gcc-apple-4.2.1-autoconf-m4-precious.patch b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-autoconf-m4-precious.patch
new file mode 100644
index 000000000000..0ad6ced95867
--- /dev/null
+++ b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-autoconf-m4-precious.patch
@@ -0,0 +1,12 @@
+https://sourceware.org/ml/libffi-discuss/2009/msg00289.html
+
+--- libgomp/configure.ac
++++ libgomp/configure.ac
+@@ -110,6 +110,7 @@
+ m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
+ m4_define([_AC_ARG_VAR_PRECIOUS],[])
+ AC_PROG_CC
++m4_undefine([_AC_ARG_VAR_PRECIOUS])
+ m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
+
+ AC_SUBST(CFLAGS)
diff --git a/sys-devel/gcc-apple/files/gcc-apple-4.2.1-dsymutil.patch b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-dsymutil.patch
new file mode 100644
index 000000000000..8da025d8c5d0
--- /dev/null
+++ b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-dsymutil.patch
@@ -0,0 +1,20 @@
+Revert of dsymutil part of
+http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00057.html
+See http://article.gmane.org/gmane.linux.gentoo.alt/4327
+
+--- gcc/config/darwin.h
++++ gcc/config/darwin.h
+@@ -326,12 +326,7 @@
+ "/* APPLE LOCAL nested functions 4357979 */"\
+ %{fnested-functions: -allow_stack_execute} \
+ %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %G %L}} \
+-"/* APPLE LOCAL begin mainline 4.3 2006-10-31 4370146 */"\
+- %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}}\n\
+-%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+-"/* APPLE LOCAL end mainline 4.3 2006-10-31 4370146 */"\
+- %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \
+- %{g*:%{!gstabs*:%{!g0: dsymutil %{o*:%*}%{!o:a.out}}}}}}}}}}}}"
++ %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}}"
+ /* APPLE LOCAL end mainline */
+
+ #ifdef TARGET_SYSTEM_ROOT
diff --git a/sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs-r1.patch b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs-r1.patch
new file mode 100644
index 000000000000..497248527d6d
--- /dev/null
+++ b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs-r1.patch
@@ -0,0 +1,39 @@
+In Prefix we are really self-providing, so don't look back!
+Original patch by Heiko Przybyl
+
+/usr/lib and /lib are not valid locations to search for startfiles,
+especially as they come BEFORE the prefix locations.
+
+--- gcc/gcc.c
++++ gcc/gcc.c
+@@ -1525,8 +1525,8 @@ static const char *gcc_libexec_prefix;
+ #endif
+
+ static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
+-static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/";
+-static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/";
++static const char *const standard_exec_prefix_1 = "@GENTOO_PORTAGE_EPREFIX@/usr/libexec/gcc/";
++static const char *const standard_exec_prefix_2 = "@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/";
+ static const char *md_exec_prefix = MD_EXEC_PREFIX;
+
+ static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
+diff --git a/a/gcc/config/darwin.h b/b/gcc/config/darwin.h
+index 482cd4c..b971c64 100644
+--- gcc/config/darwin.h
++++ gcc/config/darwin.h
+@@ -24,6 +24,15 @@ Boston, MA 02110-1301, USA. */
+ #ifndef CONFIG_DARWIN_H
+ #define CONFIG_DARWIN_H
+
++#undef STANDARD_STARTFILE_PREFIX
++#define STANDARD_STARTFILE_PREFIX "@GENTOO_PORTAGE_TPREFIX@/usr/lib"
++
++#undef STANDARD_STARTFILE_PREFIX_1
++#define STANDARD_STARTFILE_PREFIX_1 "@GENTOO_PORTAGE_TPREFIX@/lib"
++
++#undef STANDARD_STARTFILE_PREFIX_2
++#define STANDARD_STARTFILE_PREFIX_2 STANDARD_STARTFILE_PREFIX_1
++
+ /* The definitions in this file are common to all processor types
+ running Darwin, which is the kernel for Mac OS X. Darwin is
+ basically a BSD user layer laid over a Mach kernel, then evolved
diff --git a/sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs.patch b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs.patch
new file mode 100644
index 000000000000..2cd947b4e82f
--- /dev/null
+++ b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs.patch
@@ -0,0 +1,27 @@
+In Prefix we are really self-providing, so don't look back!
+Patch by Heiko Przybyl
+
+--- gcc/gcc.c
++++ gcc/gcc.c
+@@ -1525,8 +1525,8 @@ static const char *gcc_libexec_prefix;
+ #endif
+
+ static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
+-static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/";
+-static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/";
++static const char *const standard_exec_prefix_1 = "@GENTOO_PORTAGE_EPREFIX@/usr/libexec/gcc/";
++static const char *const standard_exec_prefix_2 = "@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/";
+ static const char *md_exec_prefix = MD_EXEC_PREFIX;
+
+ static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
+--- gcc/config/darwin.h
++++ gcc/config/darwin.h
+@@ -1286,7 +1286,7 @@ void add_framework_path (char *);
+ } \
+ } while (0)
+
+-#define SYSROOT_PRIORITY PREFIX_PRIORITY_FIRST
++#define SYSROOT_PRIORITY PREFIX_PRIORITY_LAST
+ /* APPLE LOCAL end isysroot 5083137 */
+
+ /* Every program on darwin links against libSystem which contains the pthread
diff --git a/sys-devel/gcc-apple/files/gcc-apple-4.2.1-texinfo.patch b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-texinfo.patch
new file mode 100644
index 000000000000..f82fe60d2ee7
--- /dev/null
+++ b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-texinfo.patch
@@ -0,0 +1,33 @@
+--- configure
++++ configure
+@@ -3748,7 +3748,7 @@
+ # For an installed makeinfo, we require it to be from texinfo 4.4 or
+ # higher, else we use the "missing" dummy.
+ if ${MAKEINFO} --version \
+- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
++ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|4\.[1-9][0-9]|[5-9])' >/dev/null 2>&1; then
+ :
+ else
+ MAKEINFO="$MISSING makeinfo"
+--- gcc/configure.ac
++++ gcc/configure.ac
+@@ -882,7 +882,7 @@
+ # that we can use it.
+ gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
+ [GNU texinfo.* \([0-9][0-9.]*\)],
+- [4.[4-9]*])
++ [4.[4-9]*|4.[1-9][0-9]])
+ if test $gcc_cv_prog_makeinfo_modern = no; then
+ MAKEINFO="$MISSING makeinfo"
+ AC_MSG_WARN([
+--- libgomp/configure.ac
++++ libgomp/configure.ac
+@@ -135,7 +135,7 @@
+ # that we can use it.
+ ACX_CHECK_PROG_VER([MAKEINFO], [makeinfo], [--version],
+ [GNU texinfo.* \([0-9][0-9.]*\)],
+- [4.[4-9]*])
++ [4.[4-9]*|4.[1-9][0-9]])
+ AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes")
+
+
diff --git a/sys-devel/gcc-apple/files/gcc-apple-4.2.1_p5666-darwin14.patch b/sys-devel/gcc-apple/files/gcc-apple-4.2.1_p5666-darwin14.patch
new file mode 100644
index 000000000000..fb785b0ad9c4
--- /dev/null
+++ b/sys-devel/gcc-apple/files/gcc-apple-4.2.1_p5666-darwin14.patch
@@ -0,0 +1,148 @@
+https://537826.bugs.gentoo.org/attachment.cgi?id=394896
+https://bugs.gentoo.org/show_bug.cgi?id=537826
+Michael Weiser
+
+Backport of https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=218873 (as
+per https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61407) to correctly encode Mac
+OS X versions >10.9 into __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__.
+Extended to also encode patch level the way clang and Apple GCC 4.2.1 do.
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63810 has a much more generic
+patch. But it's not yet in-tree pending legal paperwork. Once that's done, we
+can backport that.
+
+--- gcc/libgcov.c
++++ gcc/libgcov.c
+@@ -34,6 +34,14 @@
+ #include "coretypes.h"
+ #include "tm.h"
+
++/* to deal with XBC headers from 10.10 */
++#ifndef __has_extension
++#define __has_extension(x) 0
++#endif
++#ifndef __has_feature
++#define __has_feature(x) 0
++#endif
++
+ /* APPLE LOCAL begin instant off 6414141 */
+ #if defined(__APPLE__) && !defined(__STATIC__) && !defined(__ppc__) && !defined(__ppc64__) && !defined(__arm__)
+ #include <vproc.h>
+--- gcc/config/darwin-driver.c.orig 2010-10-14 22:27:53.000000000 +0200
++++ gcc/config/darwin-driver.c 2015-01-25 21:15:09.000000000 +0100
+@@ -174,8 +174,6 @@
+ version_p = osversion + 1;
+ if (ISDIGIT (*version_p))
+ major_vers = major_vers * 10 + (*version_p++ - '0');
+- if (major_vers > 4 + 9)
+- goto parse_failed;
+ if (*version_p++ != '.')
+ goto parse_failed;
+ version_pend = strchr(version_p, '.');
+--- gcc/config/darwin-c.c.orig 2015-01-25 19:44:40.000000000 +0100
++++ gcc/config/darwin-c.c 2015-01-25 21:05:47.000000000 +0100
+@@ -930,31 +930,91 @@
+
+ /* Return the value of darwin_macosx_version_min suitable for the
+ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro,
+- so '10.4.2' becomes 1042.
++ so '10.4.2' becomes 1042 and '10.10.2' becomes 101002.
++ Cap patch level to 9 in the old format.
+ Print a warning if the version number is not known. */
+ static const char *
+ /* APPLE LOCAL ARM 5683689 */
+ macosx_version_as_macro (void)
+ {
+- static char result[] = "1000";
++ static char result[7] = "1000";
++ int inputindex = 3, outputindex = 2;
+
++ /* make sure version starts with "10." - makes sure we can safely start
++ * parsing at inputindex == 3 */
+ if (strncmp (darwin_macosx_version_min, "10.", 3) != 0)
+ goto fail;
++
++ /* first character of minor version needs to be digit */
+ if (! ISDIGIT (darwin_macosx_version_min[3]))
+ goto fail;
+- result[2] = darwin_macosx_version_min[3];
+- if (darwin_macosx_version_min[4] != '\0')
++
++ result[outputindex++] = darwin_macosx_version_min[inputindex++];
++
++ if (ISDIGIT (darwin_macosx_version_min[inputindex])) {
++ /* Starting with OS X 10.10, the macro ends '00' rather than '0',
++ i.e. 10.10.x becomes 101000 rather than 10100. */
++ result[outputindex++] = darwin_macosx_version_min[inputindex++];
++ result[4] = '0';
++ result[5] = '0';
++ result[6] = '\0';
++ }
++
++ /* if we're out of input, leave patch level at 0 or 00 and finish */
++ if (darwin_macosx_version_min[inputindex] == '\0')
++ return result;
++
++ /* a dot *must* follow now */
++ if (darwin_macosx_version_min[inputindex++] != '.')
++ goto fail;
++
++ /* a digit must follow after the dot */
++ if (! ISDIGIT (darwin_macosx_version_min[inputindex]))
++ goto fail;
++
++ /* old-style macro */
++ if (outputindex == 3)
++ {
++ /* one-digit patch level */
++ if (darwin_macosx_version_min[inputindex + 1] == '\0')
+ {
+- if (darwin_macosx_version_min[4] != '.')
+- goto fail;
+- if (! ISDIGIT (darwin_macosx_version_min[5]))
+- goto fail;
+- if (darwin_macosx_version_min[6] != '\0')
+- goto fail;
+- result[3] = darwin_macosx_version_min[5];
++ result[outputindex] = darwin_macosx_version_min[inputindex];
++ return result;
+ }
+- else
+- result[3] = '0';
++
++ inputindex++;
++ if (! ISDIGIT (darwin_macosx_version_min[inputindex++]))
++ goto fail;
++
++ /* three digits? */
++ if (darwin_macosx_version_min[inputindex] != '\0')
++ goto fail;
++
++ /* no room for another digit. Traditional Apple GCC 4.2.1 doesn't accept
++ * it but current clang caps it to 9. We choose to be in line with clang. */
++ result[outputindex] = '9';
++ return result;
++ }
++
++ /* new-style macro */
++
++ /* leave a leading zero if only one digit is following */
++ if (darwin_macosx_version_min[inputindex + 1] == '\0') {
++ result[outputindex + 1] = darwin_macosx_version_min[inputindex];
++ return result;
++ }
++
++ result[outputindex++] = darwin_macosx_version_min[inputindex++];
++
++ /* a digit must follow now */
++ if (! ISDIGIT (darwin_macosx_version_min[inputindex]))
++ goto fail;
++
++ result[outputindex] = darwin_macosx_version_min[inputindex++];
++
++ /* no more input allowed */
++ if (darwin_macosx_version_min[inputindex] != '\0')
++ goto fail;
+
+ return result;
+
diff --git a/sys-devel/gcc-apple/files/gcc-apple-4.2.1_p5666-perl-5.18.patch b/sys-devel/gcc-apple/files/gcc-apple-4.2.1_p5666-perl-5.18.patch
new file mode 100644
index 000000000000..af3688aa48e5
--- /dev/null
+++ b/sys-devel/gcc-apple/files/gcc-apple-4.2.1_p5666-perl-5.18.patch
@@ -0,0 +1,11 @@
+--- a/contrib/texi2pod.pl
++++ b/contrib/texi2pod.pl
+@@ -337,7 +337,7 @@ while(<$inf>) {
+ $_ = "\n=item $1\n";
+ }
+ } else {
+- $_ = "\n=item $ic\n";
++ $_ = "\n=item Z\&LT;\&GT;$ic\n";
+ $ic =~ y/A-Ya-y/B-Zb-z/;
+ $ic =~ s/(\d+)/$1 + 1/eg;
+ }
diff --git a/sys-devel/gcc-apple/files/libstdc++-16.patch b/sys-devel/gcc-apple/files/libstdc++-16.patch
new file mode 100644
index 000000000000..81d075bface7
--- /dev/null
+++ b/sys-devel/gcc-apple/files/libstdc++-16.patch
@@ -0,0 +1,11 @@
+--- libstdc++-v3/include/bits/c++config
++++ libstdc++-v3/include/bits/c++config
+@@ -76,7 +76,7 @@
+ }
+ namespace std
+ {
+- using namespace __gnu_debug_def __attribute__ ((strong));
++ using namespace __gnu_debug_def;
+ }
+ #else
+ # define _GLIBCXX_STD std