[122725] trunk/dports/lang/apple-gcc42

jeremyhu at macports.org jeremyhu at macports.org
Sun Jul 27 17:19:29 PDT 2014


Revision: 122725
          https://trac.macports.org/changeset/122725
Author:   jeremyhu at macports.org
Date:     2014-07-27 17:19:29 -0700 (Sun, 27 Jul 2014)
Log Message:
-----------
apple-gcc42: Fix support for Yosemite deployment target

Modified Paths:
--------------
    trunk/dports/lang/apple-gcc42/Portfile

Added Paths:
-----------
    trunk/dports/lang/apple-gcc42/files/yosemite-deployment-target.patch

Modified: trunk/dports/lang/apple-gcc42/Portfile
===================================================================
--- trunk/dports/lang/apple-gcc42/Portfile	2014-07-27 21:17:57 UTC (rev 122724)
+++ trunk/dports/lang/apple-gcc42/Portfile	2014-07-28 00:19:29 UTC (rev 122725)
@@ -6,7 +6,7 @@
 name			apple-gcc42
 version			5666.3
 set gcc_version		4.2.1
-revision		13
+revision		14
 categories		lang
 platforms		darwin
 license			{GPL-2+ Permissive}
@@ -101,13 +101,15 @@
 set objroot ${workpath}/objroot
 set symroot ${workpath}/symroot
 
-# werror-*.patch                 : Fix compilation errors when building for x86_64
-# incpath.patch                  : Don't prepend the -isysroot option argument to the compiler's own search paths
-# driverdriver-num_infiles.patch : Fix linking with no input files (ie all static archives passed with -l...)
-# driverdriver-armcheck.patch    : Build fix for the driverdriver when arm support is not available (eg: Tiger)
-# tiger-Unwind_GetIPInfo.patch   : https://trac.macports.org/ticket/36226
+# werror-*.patch                     : Fix compilation errors when building for x86_64
+# incpath.patch                      : Don't prepend the -isysroot option argument to the compiler's own search paths
+# driverdriver-num_infiles.patch     : Fix linking with no input files (ie all static archives passed with -l...)
+# driverdriver-armcheck.patch        : Build fix for the driverdriver when arm support is not available (eg: Tiger)
+# tiger-Unwind_GetIPInfo.patch       : https://trac.macports.org/ticket/36226
+# yosemite-deployment-target.patch   : https://trac.macports.org/ticket/43978
 
 patchfiles-append \
+	yosemite-deployment-target.patch \
 	werror-c-incpath.patch \
 	werror-local-alloc.patch \
 	incpath.patch \

Added: trunk/dports/lang/apple-gcc42/files/yosemite-deployment-target.patch
===================================================================
--- trunk/dports/lang/apple-gcc42/files/yosemite-deployment-target.patch	                        (rev 0)
+++ trunk/dports/lang/apple-gcc42/files/yosemite-deployment-target.patch	2014-07-28 00:19:29 UTC (rev 122725)
@@ -0,0 +1,110 @@
+--- gcc/config/darwin-c.c.orig	2010-10-14 13:27:53.000000000 -0700
++++ gcc/config/darwin-c.c	2014-07-27 16:06:45.000000000 -0700
+@@ -933,24 +933,24 @@ find_subframework_header (cpp_reader *pf
+    Print a warning if the version number is not known.  */
+ static const char *
+ /* APPLE LOCAL ARM 5683689 */
+-macosx_version_as_macro (void)
++legacy_version_as_macro (const char *version_str)
+ {
+   static char result[] = "1000";
+ 
+-  if (strncmp (darwin_macosx_version_min, "10.", 3) != 0)
++  if (strncmp (version_str, "10.", 3) != 0)
+     goto fail;
+-  if (! ISDIGIT (darwin_macosx_version_min[3]))
++  if (! ISDIGIT (version_str[3]))
+     goto fail;
+-  result[2] = darwin_macosx_version_min[3];
+-  if (darwin_macosx_version_min[4] != '\0')
++  result[2] = version_str[3];
++  if (version_str[4] != '\0')
+     {
+-      if (darwin_macosx_version_min[4] != '.')
++      if (version_str[4] != '.')
+ 	goto fail;
+-      if (! ISDIGIT (darwin_macosx_version_min[5]))
++      if (! ISDIGIT (version_str[5]))
+ 	goto fail;
+-      if (darwin_macosx_version_min[6] != '\0')
++      if (version_str[6] != '\0')
+ 	goto fail;
+-      result[3] = darwin_macosx_version_min[5];
++      result[3] = version_str[5];
+     }
+   else
+     result[3] = '0';
+@@ -958,9 +958,7 @@ macosx_version_as_macro (void)
+   return result;
+ 
+  fail:
+-  error ("Unknown value %qs of -mmacosx-version-min",
+-	 darwin_macosx_version_min);
+-  return "1000";
++  return NULL;
+ }
+ 
+ /* APPLE LOCAL begin ARM 5683689 */
+@@ -972,13 +970,13 @@ macosx_version_as_macro (void)
+    defaults to '00' if not specified.  In the case of a parse error,
+    print a warning and return 10200.  */
+ static const char *
+-iphoneos_version_as_macro (void)
++modern_version_as_macro (const char *version_str)
+ {
+   static char result[sizeof ("99.99.99") + 1];
+-  const char *src_ptr = darwin_iphoneos_version_min;
++  const char *src_ptr = version_str;
+   char *result_ptr = &result[0];
+ 
+-  if (! darwin_iphoneos_version_min)
++  if (! version_str)
+     goto fail;
+ 
+   if (! ISDIGIT (*src_ptr))
+@@ -1032,10 +1030,42 @@ iphoneos_version_as_macro (void)
+   return result;
+   
+  fail:
+-  error ("Unknown value %qs of -miphoneos-version-min",
+-	 darwin_iphoneos_version_min);
+-  return "10200";
++  return NULL;
++}
++
++static const char *
++iphoneos_version_as_macro (void)
++{
++    static const char *result;
++    result = modern_version_as_macro(darwin_iphoneos_version_min);
++
++    if (!result) {
++        error ("Unknown value %qs of -miphoneos-version-min",
++               darwin_iphoneos_version_min);
++        return "10200";
++    }
++
++    return result;
+ }
++
++static const char *
++macosx_version_as_macro (void)
++{
++    static const char *result;
++    result = legacy_version_as_macro(darwin_macosx_version_min);
++
++    if (!result)
++        result = modern_version_as_macro(darwin_macosx_version_min);
++
++    if (!result) {
++        error ("Unknown value %qs of -mmacosx-version-min",
++               darwin_macosx_version_min);
++        return "1000";
++    }
++
++    return result;
++}
++
+ /* APPLE LOCAL end ARM 5683689 */
+ 
+ /* Define additional CPP flags for Darwin.   */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140727/f7a5518e/attachment-0001.html>


More information about the macports-changes mailing list