[127393] trunk/dports/lang/gcc46

larryv at macports.org larryv at macports.org
Sun Oct 26 22:38:40 PDT 2014


Revision: 127393
          https://trac.macports.org/changeset/127393
Author:   larryv at macports.org
Date:     2014-10-26 22:38:40 -0700 (Sun, 26 Oct 2014)
Log Message:
-----------
gcc46: Fix builds on Yosemite

Two birds with one stone:
- Backport upstream's fixed OS version check (#43978).
- Fix incorrect symbol lookup due to the Libtool
  MACOSX_DEPLOYMENT_TARGET bug (#44596 and #45483).

Modified Paths:
--------------
    trunk/dports/lang/gcc46/Portfile

Added Paths:
-----------
    trunk/dports/lang/gcc46/files/yosemite-symbol-lookup.patch
    trunk/dports/lang/gcc46/files/yosemite-version-check.patch

Modified: trunk/dports/lang/gcc46/Portfile
===================================================================
--- trunk/dports/lang/gcc46/Portfile	2014-10-26 23:27:06 UTC (rev 127392)
+++ trunk/dports/lang/gcc46/Portfile	2014-10-27 05:38:40 UTC (rev 127393)
@@ -54,7 +54,10 @@
 depends_skip_archcheck-append gcc_select ld64 cctools
 license_noconflict  gmp mpfr ppl libmpc
 
-patchfiles          gcc-4.6-cloog_lang_c.patch enable_libstdcxx_time_yes.patch
+patchfiles          gcc-4.6-cloog_lang_c.patch \
+                    enable_libstdcxx_time_yes.patch \
+                    yosemite-version-check.patch \
+                    yosemite-symbol-lookup.patch
 
 set major           4.6
 

Copied: trunk/dports/lang/gcc46/files/yosemite-symbol-lookup.patch (from rev 127392, trunk/dports/lang/gcc47/files/yosemite-symbol-lookup.patch)
===================================================================
--- trunk/dports/lang/gcc46/files/yosemite-symbol-lookup.patch	                        (rev 0)
+++ trunk/dports/lang/gcc46/files/yosemite-symbol-lookup.patch	2014-10-27 05:38:40 UTC (rev 127393)
@@ -0,0 +1,195 @@
+Index: boehm-gc/configure
+===================================================================
+--- boehm-gc/configure.orig
++++ boehm-gc/configure
+@@ -7581,7 +7581,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: gcc/configure
+===================================================================
+--- gcc/configure.orig
++++ gcc/configure
+@@ -14016,7 +14016,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: libffi/configure
+===================================================================
+--- libffi/configure.orig
++++ libffi/configure
+@@ -6985,7 +6985,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: libgfortran/configure
+===================================================================
+--- libgfortran/configure.orig
++++ libgfortran/configure
+@@ -8574,7 +8574,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: libgo/configure
+===================================================================
+--- libgo/configure.orig
++++ libgo/configure
+@@ -7026,7 +7026,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: libgomp/configure
+===================================================================
+--- libgomp/configure.orig
++++ libgomp/configure
+@@ -7301,7 +7301,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: libjava/classpath/configure
+===================================================================
+--- libjava/classpath/configure.orig
++++ libjava/classpath/configure
+@@ -8301,7 +8301,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: libjava/configure
+===================================================================
+--- libjava/configure.orig
++++ libjava/configure
+@@ -9539,7 +9539,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: libmudflap/configure
+===================================================================
+--- libmudflap/configure.orig
++++ libmudflap/configure
+@@ -7072,7 +7072,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: libobjc/configure
+===================================================================
+--- libobjc/configure.orig
++++ libobjc/configure
+@@ -6777,7 +6777,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: libquadmath/configure
+===================================================================
+--- libquadmath/configure.orig
++++ libquadmath/configure
+@@ -6973,7 +6973,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: libssp/configure
+===================================================================
+--- libssp/configure.orig
++++ libssp/configure
+@@ -7110,7 +7110,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: libstdc++-v3/configure
+===================================================================
+--- libstdc++-v3/configure.orig
++++ libstdc++-v3/configure
+@@ -7815,7 +7815,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: lto-plugin/configure
+===================================================================
+--- lto-plugin/configure.orig
++++ lto-plugin/configure
+@@ -6757,7 +6757,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+Index: zlib/configure
+===================================================================
+--- zlib/configure.orig
++++ zlib/configure
+@@ -6578,7 +6578,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[012]*)
++	10.[012][,.]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;

Copied: trunk/dports/lang/gcc46/files/yosemite-version-check.patch (from rev 127392, trunk/dports/lang/gcc47/files/yosemite-version-check.patch)
===================================================================
--- trunk/dports/lang/gcc46/files/yosemite-version-check.patch	                        (rev 0)
+++ trunk/dports/lang/gcc46/files/yosemite-version-check.patch	2014-10-27 05:38:40 UTC (rev 127393)
@@ -0,0 +1,117 @@
+Index: gcc/config/darwin-c.c
+===================================================================
+--- gcc/config/darwin-c.c.orig
++++ gcc/config/darwin-c.c
+@@ -569,21 +569,34 @@ find_subframework_header (cpp_reader *pf
+ }
+ 
+ /* Return the value of darwin_macosx_version_min suitable for the
+-   __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro,
+-   so '10.4.2' becomes 1040.  The lowest digit is always zero.
++   __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro, so '10.4.2'
++   becomes 1040 and '10.10.0' becomes 101000.  The lowest digit is
++   always zero, as is the second lowest for '10.10.x' and above.
+    Print a warning if the version number can't be understood.  */
+ static const char *
+ version_as_macro (void)
+ {
+-  static char result[] = "1000";
++  static char result[7] = "1000";
++  int minorDigitIdx;
+ 
+   if (strncmp (darwin_macosx_version_min, "10.", 3) != 0)
+     goto fail;
+   if (! ISDIGIT (darwin_macosx_version_min[3]))
+     goto fail;
+-  result[2] = darwin_macosx_version_min[3];
+-  if (darwin_macosx_version_min[4] != '\0'
+-      && darwin_macosx_version_min[4] != '.')
++
++  minorDigitIdx = 3;
++  result[2] = darwin_macosx_version_min[minorDigitIdx++];
++  if (ISDIGIT (darwin_macosx_version_min[minorDigitIdx]))
++  {
++    /* Starting with OS X 10.10, the macro ends '00' rather than '0',
++       i.e. 10.10.x becomes 101000 rather than 10100.  */
++    result[3] = darwin_macosx_version_min[minorDigitIdx++];
++    result[4] = '0';
++    result[5] = '0';
++    result[6] = '\0';
++  }
++  if (darwin_macosx_version_min[minorDigitIdx] != '\0'
++      && darwin_macosx_version_min[minorDigitIdx] != '.')
+     goto fail;
+ 
+   return result;
+Index: gcc/config/darwin-driver.c
+===================================================================
+--- gcc/config/darwin-driver.c.orig
++++ gcc/config/darwin-driver.c
+@@ -99,8 +99,6 @@ darwin_default_min_version (unsigned int
+   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, '.');
+Index: gcc/testsuite/gcc.dg/darwin-minversion-1.c
+===================================================================
+--- gcc/testsuite/gcc.dg/darwin-minversion-1.c.orig
++++ gcc/testsuite/gcc.dg/darwin-minversion-1.c
+@@ -2,7 +2,8 @@
+ /* { dg-options "-mmacosx-version-min=10.1" } */
+ /* { dg-do run { target *-*-darwin* } } */
+ 
+-int main(void)
++int
++main ()
+ {
+ #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1010
+   fail me;
+Index: gcc/testsuite/gcc.dg/darwin-minversion-2.c
+===================================================================
+--- gcc/testsuite/gcc.dg/darwin-minversion-2.c.orig
++++ gcc/testsuite/gcc.dg/darwin-minversion-2.c
+@@ -2,7 +2,8 @@
+ /* { dg-options "-mmacosx-version-min=10.1 -mmacosx-version-min=10.3" } */
+ /* { dg-do run { target *-*-darwin* } } */
+ 
+-int main(void)
++int
++main ()
+ {
+ #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1030
+   fail me;
+Index: gcc/testsuite/gcc.dg/darwin-minversion-3.c
+===================================================================
+--- gcc/testsuite/gcc.dg/darwin-minversion-3.c.orig
++++ gcc/testsuite/gcc.dg/darwin-minversion-3.c
+@@ -2,7 +2,8 @@
+ /* { dg-options "-mmacosx-version-min=10.4.10" } */
+ /* { dg-do compile { target *-*-darwin* } } */
+ 
+-int main(void)
++int
++main ()
+ {
+ #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1040
+   fail me;
+Index: gcc/testsuite/gcc.dg/darwin-minversion-4.c
+===================================================================
+--- /dev/null
++++ gcc/testsuite/gcc.dg/darwin-minversion-4.c
+@@ -0,0 +1,12 @@
++/* Test that major versions greater than 9 work and have the additional 0.  */
++/* { dg-options "-mmacosx-version-min=10.10.0" } */
++/* { dg-do compile { target *-*-darwin* } } */
++
++int
++main ()
++{
++#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 101000
++  fail me;
++#endif
++  return 0;
++}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141026/15649b4c/attachment.html>


More information about the macports-changes mailing list