[136924] trunk/dports/lang

larryv at macports.org larryv at macports.org
Fri May 29 22:05:09 PDT 2015


Revision: 136924
          https://trac.macports.org/changeset/136924
Author:   larryv at macports.org
Date:     2015-05-29 22:05:09 -0700 (Fri, 29 May 2015)
Log Message:
-----------
gcc47: Backport upstream fix for handling deployment targets

Replace my earlier patch for upstream PR target/63810 (MacPorts r128373)
with the one applied to trunk (GCC r223808). Split out the kernel
version check removal into its own patch, and remove surrounding changes
that have nothing to do with OS versioning. Revbump DragonEgg ports as
appropriate.

https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=rev&rev=223808

Revision Links:
--------------
    https://trac.macports.org/changeset/128373
    https://trac.macports.org/changeset/223808

Modified Paths:
--------------
    trunk/dports/lang/dragonegg-3.3/Portfile
    trunk/dports/lang/dragonegg-3.4/Portfile
    trunk/dports/lang/gcc47/Portfile
    trunk/dports/lang/gcc47/files/macosx-version-min.patch

Added Paths:
-----------
    trunk/dports/lang/gcc47/files/remove-kernel-version-check.patch

Modified: trunk/dports/lang/dragonegg-3.3/Portfile
===================================================================
--- trunk/dports/lang/dragonegg-3.3/Portfile	2015-05-30 03:40:09 UTC (rev 136923)
+++ trunk/dports/lang/dragonegg-3.3/Portfile	2015-05-30 05:05:09 UTC (rev 136924)
@@ -19,7 +19,7 @@
     set gcc_version_no_dot 46
 }
 subport                 ${name}-gcc-4.7 {
-    revision            9
+    revision            10
     set gcc_version     4.7
     set gcc_version_no_dot 47
 }

Modified: trunk/dports/lang/dragonegg-3.4/Portfile
===================================================================
--- trunk/dports/lang/dragonegg-3.4/Portfile	2015-05-30 03:40:09 UTC (rev 136923)
+++ trunk/dports/lang/dragonegg-3.4/Portfile	2015-05-30 05:05:09 UTC (rev 136924)
@@ -19,7 +19,7 @@
     set gcc_version_no_dot 46
 }
 subport                 ${name}-gcc-4.7 {
-    revision            5
+    revision            6
     set gcc_version     4.7
     set gcc_version_no_dot 47
 }

Modified: trunk/dports/lang/gcc47/Portfile
===================================================================
--- trunk/dports/lang/gcc47/Portfile	2015-05-30 03:40:09 UTC (rev 136923)
+++ trunk/dports/lang/gcc47/Portfile	2015-05-30 05:05:09 UTC (rev 136924)
@@ -10,7 +10,7 @@
 
 # Whenever this port is bumped for version/revision, please revbump dragonegg-*-gcc-4.7
 version             4.7.4
-revision            4
+revision            5
 platforms           darwin
 categories          lang
 maintainers         mww openmaintainer
@@ -64,6 +64,10 @@
 
 patchfiles          ppc_fde_encoding.diff
 
+# Don't check Darwin kernel version (GCC PR target/61407
+# <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61407>).
+patchfiles-append   remove-kernel-version-check.patch
+
 # Handle OS X deployment targets correctly (GCC PR target/63810
 # <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63810>).
 patchfiles-append   macosx-version-min.patch

Modified: trunk/dports/lang/gcc47/files/macosx-version-min.patch
===================================================================
--- trunk/dports/lang/gcc47/files/macosx-version-min.patch	2015-05-30 03:40:09 UTC (rev 136923)
+++ trunk/dports/lang/gcc47/files/macosx-version-min.patch	2015-05-30 05:05:09 UTC (rev 136924)
@@ -1,8 +1,76 @@
-Index: gcc/config/darwin-c.c
-===================================================================
---- gcc/config/darwin-c.c.orig
+commit 9b0d3d17b04a59bb591c06273d2d5a975f8c5d58
+Author: Lawrence Velázquez <vq at larryv.me>
+Date:   Fri Nov 14 17:52:32 2014 -0500
+
+    Handle OS X deployment targets correctly
+
+    As described in PR target/63810, this addresses several problems with
+    the validation and encoding of deployment target version strings for the
+    __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  There are
+    currently four testcases exercising inputs to -mmacosx-version-min
+    (gcc/testsuite/gcc.dg/darwin-minversion-*), but they provide minimal
+    coverage, and one is incorrect.
+
+    * The tiny number is now respected, if present.  Thus "10.9.4"
+      correctly becomes "1094" instead of "1090", and "10.10.1" becomes
+      "101001" instead of "101000".
+    * Zero padding is now ignored.  Thus "10.09" correctly becomes "1090"
+      instead of "100900", and "10.00010" becomes "101000" instead of being
+      treated as invalid.
+    * Deployment targets that are missing minor and tiny numbers are no
+      longer considered invalid.  Thus "10" is treated as "10.0.0", which
+      becomes "1000" without causing an error.
+
+    With this change, trunk matches the behavior of Apple LLVM Compiler
+    6.1.0 on 8,451 of 8,464 generated test inputs.  (The discrepancies are
+    due to a bug in Clang.)  I don't notice any testsuite regressions on
+    OS X 10.10 Yosemite x86-64.
+
+    2015-05-15  Lawrence Velázquez  <vq at larryv.me>
+
+    	PR target/63810
+    	* gcc/config/darwin-c.c (version_components): New global enum.
+    	(parse_version, version_as_legacy_macro)
+    	(version_as_modern_macro, macosx_version_as_macro): New functions.
+    	(version_as_macro): Remove.
+    	(darwin_cpp_builtins): Use new function.
+    	* gcc/testsuite/gcc.dg/darwin-minversion-3.c: Update testcase.
+    	* gcc/testsuite/gcc.dg/darwin-minversion-4.c: Ditto.
+    	* gcc/testsuite/gcc.dg/darwin-minversion-5.c: New testcase.
+    	* gcc/testsuite/gcc.dg/darwin-minversion-6.c: Ditto.
+    	* gcc/testsuite/gcc.dg/darwin-minversion-7.c: Ditto.
+    	* gcc/testsuite/gcc.dg/darwin-minversion-8.c: Ditto.
+    	* gcc/testsuite/gcc.dg/darwin-minversion-9.c: Ditto.
+    	* gcc/testsuite/gcc.dg/darwin-minversion-10.c: Ditto.
+    	* gcc/testsuite/gcc.dg/darwin-minversion-11.c: Ditto.
+    	* gcc/testsuite/gcc.dg/darwin-minversion-12.c: Ditto.
+---
+Adapted for GCC 4.7.4 from the upstream trunk fix. The text above is
+from my email to the gcc-patches mailing list; some minor details may
+not apply to the patch below.
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63810
+https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01888.html
+https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=rev&rev=223808
+
+ gcc/config/darwin-c.c                       | 155 +++++++++++++++++++++++---
+ gcc/testsuite/gcc.dg/darwin-minversion-10.c |  16 +++
+ gcc/testsuite/gcc.dg/darwin-minversion-11.c |  16 +++
+ gcc/testsuite/gcc.dg/darwin-minversion-12.c |  16 +++
+ gcc/testsuite/gcc.dg/darwin-minversion-3.c  |   6 +-
+ gcc/testsuite/gcc.dg/darwin-minversion-4.c  |  12 ++
+ gcc/testsuite/gcc.dg/darwin-minversion-5.c  |  16 +++
+ gcc/testsuite/gcc.dg/darwin-minversion-6.c  |  15 +++
+ gcc/testsuite/gcc.dg/darwin-minversion-7.c  |  15 +++
+ gcc/testsuite/gcc.dg/darwin-minversion-8.c  |  16 +++
+ gcc/testsuite/gcc.dg/darwin-minversion-9.c  |  15 +++
+ 11 files changed, 282 insertions(+), 16 deletions(-)
+
+diff --git gcc/config/darwin-c.c gcc/config/darwin-c.c
+index 211d141..3a7e3ee 100644
+--- gcc/config/darwin-c.c
 +++ gcc/config/darwin-c.c
-@@ -570,29 +570,180 @@ find_subframework_header (cpp_reader *pf
+@@ -570,25 +570,154 @@ find_subframework_header (cpp_reader *pfile, const char *header, cpp_dir **dirp)
    return 0;
  }
  
@@ -10,21 +78,23 @@
 -   __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro,
 -   so '10.4.2' becomes 1040.  The lowest digit is always zero.
 -   Print a warning if the version number can't be understood.  */
-+/*  Given a version string, return the version as a statically-allocated
-+    array of three non-negative integers.  If the version string is
-+    invalid, return null.
++/* Given an OS X version VERSION_STR, return it as a statically-allocated array
++   of three integers. If VERSION_STR is invalid, return NULL.
 +
-+    Version strings must consist of one, two, or three tokens, each
-+    separated by a single period.  Each token must contain only the
-+    characters '0' through '9' and is converted to an equivalent
-+    integer.  Omitted tokens are treated as zeros.  For example:
++   VERSION_STR must consist of one, two, or three tokens, each separated by
++   a single period.  Each token must contain only the characters '0' through
++   '9' and is converted to an equivalent non-negative decimal integer. Omitted
++   tokens become zeros.  For example:
 +
-+        "10"              becomes   {10,0,0}
-+        "10.10"           becomes   {10,10,0}
-+        "10.10.1"         becomes   {10,10,1}
-+        "10.000010.1"     becomes   {10,10,1}
-+        "10.010.001"      becomes   {10,10,1}
-+        "000010.10.00001" becomes   {10,10,1}  */
++        "10"              becomes       {10,0,0}
++        "10.10"           becomes       {10,10,0}
++        "10.10.1"         becomes       {10,10,1}
++        "10.000010.1"     becomes       {10,10,1}
++        "10.010.001"      becomes       {10,10,1}
++        "000010.10.00001" becomes       {10,10,1}
++        ".9.1"            is invalid
++        "10..9"           is invalid
++        "10.10."          is invalid  */
 +
 +enum version_components { MAJOR, MINOR, TINY };
 +
@@ -35,9 +105,6 @@
 +  char *end;
 +  static unsigned long version_array[3];
 +
-+  if (! version_str)
-+    return NULL;
-+
 +  version_len = strlen (version_str);
 +  if (version_len < 1)
 +    return NULL;
@@ -46,7 +113,7 @@
 +  if (strspn (version_str, "0123456789.") != version_len)
 +    return NULL;
 +
-+  if (! ISDIGIT (version_str[0]) || ! ISDIGIT (version_str[version_len - 1]))
++  if (!ISDIGIT (version_str[0]) || !ISDIGIT (version_str[version_len - 1]))
 +    return NULL;
 +
 +  version_array[MAJOR] = strtoul (version_str, &end, 10);
@@ -68,18 +135,16 @@
 +  return version_array;
 +}
 +
-+/*  Given a three-component version represented as an array of
-+    non-negative integers, return a statically-allocated string suitable
-+    for the legacy __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.
-+    If the version is invalid and cannot be coerced into a valid form,
-+    return null.
++/* Given VERSION -- a three-component OS X version represented as an array of
++   non-negative integers -- return a statically-allocated string suitable for
++   the legacy __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  If VERSION
++   is invalid and cannot be coerced into a valid form, return NULL.
 +
-+    The legacy format is a four-character string -- two chars for the
-+    major number and one each for the minor and tiny numbers.  Major
-+    numbers are zero-padded if necessary.  Minor and tiny numbers from
-+    10 through 99 are permitted but are clamped to 9 (for example,
-+    {10,9,10} produces "1099").  Versions containing numbers greater
-+    than 99 are rejected.  */
++   The legacy format is a four-character string -- two chars for the major
++   number and one each for the minor and tiny numbers.  Minor and tiny numbers
++   from 10 through 99 are permitted but are clamped to 9 (for example, {10,9,10}
++   produces "1099").  If VERSION contains numbers greater than 99, it is
++   rejected.  */
 +
  static const char *
 -version_as_macro (void)
@@ -87,11 +152,8 @@
  {
 -  static char result[] = "1000";
 +  unsigned long major, minor, tiny;
-+  static char result[sizeof "9999"];
++  static char result[5];
 +
-+  if (! version)
-+    return NULL;
-+
 +  major = version[MAJOR];
 +  minor = version[MINOR];
 +  tiny = version[TINY];
@@ -102,37 +164,28 @@
 +  minor = ((minor > 9) ? 9 : minor);
 +  tiny = ((tiny > 9) ? 9 : tiny);
 +
-+  /* NOTE: Cast result of sizeof so that result of sprintf is not
-+     converted to an unsigned type.  */
-+  if (sprintf (result, "%02lu%lu%lu", major, minor, tiny)
-+      != (int) sizeof "9999" - 1)
++  if (sprintf (result, "%lu%lu%lu", major, minor, tiny) != 4)
 +    return NULL;
- 
--  if (strncmp (darwin_macosx_version_min, "10.", 3) != 0)
++
 +  return result;
 +}
+ 
+-  if (strncmp (darwin_macosx_version_min, "10.", 3) != 0)
++/* Given VERSION -- a three-component OS X version represented as an array of
++   non-negative integers -- return a statically-allocated string suitable for
++   the modern __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  If VERSION
++   is invalid, return NULL.
 +
-+/*  Given a three-component version represented as an array of
-+    non-negative integers, return a statically-allocated string suitable
-+    for the modern __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro
-+    or the __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ macro.  If the
-+    version is invalid, return null.
++   The modern format is a six-character string -- two chars for each component,
++   with zero-padding if necessary (for example, {10,10,1} produces "101001"). If
++   VERSION contains numbers greater than 99, it is rejected.  */
 +
-+    The modern format is a five- or six-character string -- one or two
-+    chars for the major number and two each for the minor and tiny
-+    numbers, which are zero-padded if necessary (for example, {8,1,0}
-+    produces "80100", and {10,10,1} produces "101001").  Versions
-+    containing numbers greater than 99 are rejected.  */
-+
 +static const char *
 +version_as_modern_macro (const unsigned long *version)
 +{
 +  unsigned long major, minor, tiny;
-+  static char result[sizeof "999999"];
++  static char result[7];
 +
-+  if (! version)
-+    return NULL;
-+
 +  major = version[MAJOR];
 +  minor = version[MINOR];
 +  tiny = version[TINY];
@@ -140,25 +193,19 @@
 +  if (major > 99 || minor > 99 || tiny > 99)
 +    return NULL;
 +
-+  /* NOTE: 'sizeof ((x > y) ? "foo" : "bar")' returns size of char
-+     pointer instead of char array, so use
-+     '(x > y) ? sizeof "foo" : sizeof "bar"' instead.  */
-+  /* NOTE: Cast result of sizeof so that result of sprintf is not
-+     converted to an unsigned type.  */
-+  if (sprintf (result, "%lu%02lu%02lu", major, minor, tiny)
-+      != (int) ((major > 9) ? sizeof "999999" : sizeof "99999") - 1)
++  if (sprintf (result, "%02lu%02lu%02lu", major, minor, tiny) != 6)
 +    return NULL;
 +
 +  return result;
 +}
 +
-+/*  Return the value of darwin_macosx_version_min, suitably formatted
-+    for the __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  Values
-+    representing OS X 10.9 and earlier are encoded using the legacy
-+    four-character format, while 10.10 and later use a modern
-+    six-character format.  (For example, "10.9" produces "1090", and
-+    "10.10.1" produces "101001".)  If the value is invalid and cannot be
-+    coerced into a valid form, print a warning and return "1000".  */
++/* Return the value of darwin_macosx_version_min, suitably formatted for the
++   __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  Values representing
++   OS X 10.9 and earlier are encoded using the legacy four-character format,
++   while 10.10 and later use a modern six-character format.  (For example,
++   "10.9" produces "1090", and "10.10.1" produces "101001".)  If
++   darwin_macosx_version_min is invalid and cannot be coerced into a valid
++   form, print a warning and return "1000".  */
 +
 +static const char *
 +macosx_version_as_macro (void)
@@ -167,23 +214,22 @@
 +  const char *version_macro;
 +
 +  version_array = parse_version (darwin_macosx_version_min);
-+  if (! version_array)
++  if (!version_array)
      goto fail;
 -  if (! ISDIGIT (darwin_macosx_version_min[3]))
 +
-+  /* Do not assume that the major number will always be exactly 10.  */
-+  if (version_array[MAJOR] < 10 || version_array[MAJOR] > 10)
++  if (version_array[MAJOR] != 10)
      goto fail;
 -  result[2] = darwin_macosx_version_min[3];
 -  if (darwin_macosx_version_min[4] != '\0'
 -      && darwin_macosx_version_min[4] != '.')
 +
-+  if (version_array[MAJOR] == 10 && version_array[MINOR] < 10)
++  if (version_array[MINOR] < 10)
 +    version_macro = version_as_legacy_macro (version_array);
 +  else
 +    version_macro = version_as_modern_macro (version_array);
 +
-+  if (! version_macro)
++  if (!version_macro)
      goto fail;
  
 -  return result;
@@ -191,12 +237,7 @@
  
   fail:
    error ("unknown value %qs of -mmacosx-version-min",
--	 darwin_macosx_version_min);
-+         darwin_macosx_version_min);
-   return "1000";
- }
- 
-@@ -614,7 +765,7 @@ darwin_cpp_builtins (cpp_reader *pfile)
+@@ -614,7 +743,7 @@ darwin_cpp_builtins (cpp_reader *pfile)
      builtin_define ("__CONSTANT_CFSTRINGS__");
  
    builtin_define_with_value ("__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__",
@@ -205,133 +246,16 @@
  
    /* Since we do not (at 4.6) support ObjC gc for the NeXT runtime, the
       following will cause a syntax error if one tries to compile gc attributed
-Index: gcc/config/darwin-driver.c
-===================================================================
---- gcc/config/darwin-driver.c.orig
-+++ gcc/config/darwin-driver.c
-@@ -29,8 +29,8 @@ along with GCC; see the file COPYING3.  
- #include <sys/sysctl.h>
- #include "xregex.h"
- 
--static bool
--darwin_find_version_from_kernel (char *new_flag)
-+static char *
-+darwin_find_version_from_kernel (void)
- {
-   char osversion[32];
-   size_t osversion_len = sizeof (osversion) - 1;
-@@ -39,6 +39,7 @@ darwin_find_version_from_kernel (char *n
-   char minor_vers[6];
-   char * version_p;
-   char * version_pend;
-+  char * new_flag;
- 
-   /* Determine the version of the running OS.  If we can't, warn user,
-      and do nothing.  */
-@@ -46,7 +47,7 @@ darwin_find_version_from_kernel (char *n
- 	      &osversion_len, NULL, 0) == -1)
-     {
-       warning (0, "sysctl for kern.osversion failed: %m");
--      return false;
-+      return NULL;
-     }
- 
-   /* Try to parse the first two parts of the OS version number.  Warn
-@@ -57,8 +58,6 @@ darwin_find_version_from_kernel (char *n
-   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, '.');
-@@ -74,17 +73,16 @@ darwin_find_version_from_kernel (char *n
-   if (major_vers - 4 <= 4)
-     /* On 10.4 and earlier, the old linker is used which does not
-        support three-component system versions.  */
--    sprintf (new_flag, "10.%d", major_vers - 4);
-+    asprintf (&new_flag, "10.%d", major_vers - 4);
-   else
--    sprintf (new_flag, "10.%d.%s", major_vers - 4,
--	     minor_vers);
-+    asprintf (&new_flag, "10.%d.%s", major_vers - 4, minor_vers);
- 
--  return true;
-+  return new_flag;
- 
-  parse_failed:
-   warning (0, "couldn%'t understand kern.osversion %q.*s",
- 	   (int) osversion_len, osversion);
--  return false;
-+  return NULL;
- }
- 
- #endif
-@@ -105,7 +103,7 @@ darwin_default_min_version (unsigned int
-   const unsigned int argc = *decoded_options_count;
-   struct cl_decoded_option *const argv = *decoded_options;
-   unsigned int i;
--  static char new_flag[sizeof ("10.0.0") + 6];
-+  const char *new_flag;
- 
-   /* If the command-line is empty, just return.  */
-   if (argc <= 1)
-@@ -142,16 +140,16 @@ darwin_default_min_version (unsigned int
- 
- #ifndef CROSS_DIRECTORY_STRUCTURE
- 
-- /* Try to find the version from the kernel, if we fail - we print a message 
--    and give up.  */
-- if (!darwin_find_version_from_kernel (new_flag))
--   return;
-+  /* Try to find the version from the kernel, if we fail - we print a message
-+     and give up.  */
-+  new_flag = darwin_find_version_from_kernel ();
-+  if (!new_flag)
-+    return;
- 
- #else
- 
-- /* For cross-compilers, default to the target OS version. */
--
-- strncpy (new_flag, DEF_MIN_OSX_VERSION, sizeof (new_flag));
-+  /* For cross-compilers, default to the target OS version. */
-+  new_flag = DEF_MIN_OSX_VERSION;
- 
- #endif /* CROSS_DIRECTORY_STRUCTURE */
- 
-@@ -165,7 +163,6 @@ darwin_default_min_version (unsigned int
-   memcpy (*decoded_options + 2, argv + 1,
- 	  (argc - 1) * sizeof (struct cl_decoded_option));
-   return;
--  
- }
- 
- /* Translate -filelist and -framework options in *DECODED_OPTIONS
-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-10.c
-===================================================================
+diff --git gcc/testsuite/gcc.dg/darwin-minversion-10.c gcc/testsuite/gcc.dg/darwin-minversion-10.c
+new file mode 100644
+index 0000000..bf95d46
 --- /dev/null
 +++ gcc/testsuite/gcc.dg/darwin-minversion-10.c
 @@ -0,0 +1,16 @@
-+/* PR target/63810: Test that a version with a zero-padded minor
-+   number < 10 and a zero-padded tiny number < 10 produces the correct
++/* PR target/63810: Test that an OS X minimum version with zero-padded
++   minor and tiny numbers less than 10 produces the correct
 +   four-character macro.  */
-+/* Added by Lawrence Velázquez <larryv at macports.org>.  */
++/* Added by Lawrence Velázquez <vq at larryv.me>.  */
 +
 +/* { dg-options "-mmacosx-version-min=10.07.02" } */
 +/* { dg-do compile { target *-*-darwin* } } */
@@ -344,14 +268,16 @@
 +#endif
 +  return 0;
 +}
-Index: gcc/testsuite/gcc.dg/darwin-minversion-11.c
-===================================================================
+diff --git gcc/testsuite/gcc.dg/darwin-minversion-11.c gcc/testsuite/gcc.dg/darwin-minversion-11.c
+new file mode 100644
+index 0000000..a03e707
 --- /dev/null
 +++ gcc/testsuite/gcc.dg/darwin-minversion-11.c
-@@ -0,0 +1,15 @@
-+/* PR target/63810: Test that a version with outrageous zero-padding and
-+   a minor number > 9 still produces a six-character macro.  */
-+/* Added by Lawrence Velázquez <larryv at macports.org>.  */
+@@ -0,0 +1,16 @@
++/* PR target/63810: Test that an OS X minimum version with outrageous
++   zero-padding and a minor number greater than 9 still produces
++   a six-character macro.  */
++/* Added by Lawrence Velázquez <vq at larryv.me>.  */
 +
 +/* { dg-options "-mmacosx-version-min=00010.010.0000098" } */
 +/* { dg-do compile { target *-*-darwin* } } */
@@ -364,14 +290,16 @@
 +#endif
 +  return 0;
 +}
-Index: gcc/testsuite/gcc.dg/darwin-minversion-12.c
-===================================================================
+diff --git gcc/testsuite/gcc.dg/darwin-minversion-12.c gcc/testsuite/gcc.dg/darwin-minversion-12.c
+new file mode 100644
+index 0000000..4c2ce38
 --- /dev/null
 +++ gcc/testsuite/gcc.dg/darwin-minversion-12.c
-@@ -0,0 +1,15 @@
-+/* PR target/63810: Test that a version with outrageous zero-padding and
-+   a minor number < 10 still produces a four-character macro.  */
-+/* Added by Lawrence Velázquez <larryv at macports.org>.  */
+@@ -0,0 +1,16 @@
++/* PR target/63810: Test that an OS X minimum version with outrageous
++   zero-padding and a minor number less than 10 still produces
++   a four-character macro.  */
++/* Added by Lawrence Velázquez <vq at larryv.me>.  */
 +
 +/* { dg-options "-mmacosx-version-min=010.008.000031" } */
 +/* { dg-do compile { target *-*-darwin* } } */
@@ -384,46 +312,31 @@
 +#endif
 +  return 0;
 +}
-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
+diff --git gcc/testsuite/gcc.dg/darwin-minversion-3.c gcc/testsuite/gcc.dg/darwin-minversion-3.c
+index d0c5934..76886dd 100644
+--- gcc/testsuite/gcc.dg/darwin-minversion-3.c
 +++ gcc/testsuite/gcc.dg/darwin-minversion-3.c
-@@ -1,10 +1,11 @@
+@@ -1,10 +1,10 @@
 -/* Test that most-minor versions greater than 9 work.  */
 -/* { dg-options "-mmacosx-version-min=10.4.10" } */
-+/* Test that most minor versions < 10 work.  */
++/* Test that most minor versions less than 10 work.  */
 +/* { dg-options "-mmacosx-version-min=10.4.1" } */
  /* { dg-do compile { target *-*-darwin* } } */
  
--int main(void)
-+int
-+main ()
+ int main(void)
  {
 -#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1040
 +#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1041
    fail me;
  #endif
    return 0;
-Index: gcc/testsuite/gcc.dg/darwin-minversion-4.c
-===================================================================
+diff --git gcc/testsuite/gcc.dg/darwin-minversion-4.c gcc/testsuite/gcc.dg/darwin-minversion-4.c
+new file mode 100644
+index 0000000..1481aa5
 --- /dev/null
 +++ gcc/testsuite/gcc.dg/darwin-minversion-4.c
 @@ -0,0 +1,12 @@
-+/* Test that minor versions > 9 produce a six-character macro.  */
++/* Test that minor versions greater than 9 produce a six-character macro.  */
 +/* { dg-options "-mmacosx-version-min=10.10.1" } */
 +/* { dg-do compile { target *-*-darwin* } } */
 +
@@ -435,15 +348,16 @@
 +#endif
 +  return 0;
 +}
-Index: gcc/testsuite/gcc.dg/darwin-minversion-5.c
-===================================================================
+diff --git gcc/testsuite/gcc.dg/darwin-minversion-5.c gcc/testsuite/gcc.dg/darwin-minversion-5.c
+new file mode 100644
+index 0000000..09a9d72
 --- /dev/null
 +++ gcc/testsuite/gcc.dg/darwin-minversion-5.c
 @@ -0,0 +1,16 @@
-+/* PR target/63810: Test that a version with minor number < 10 and tiny
-+   number > 9 produces a four-character macro with the tiny number
-+   clamped to 9.  */
-+/* Added by Lawrence Velázquez <larryv at macports.org>.  */
++/* PR target/63810: Test that an OS X minimum version with minor number
++   less than 10 and tiny number greater than 9 produces a four-character
++   macro with the tiny number clamped to 9.  */
++/* Added by Lawrence Velázquez <vq at larryv.me>.  */
 +
 +/* { dg-options "-mmacosx-version-min=10.9.10" } */
 +/* { dg-do compile { target *-*-darwin* } } */
@@ -456,14 +370,15 @@
 +#endif
 +  return 0;
 +}
-Index: gcc/testsuite/gcc.dg/darwin-minversion-6.c
-===================================================================
+diff --git gcc/testsuite/gcc.dg/darwin-minversion-6.c gcc/testsuite/gcc.dg/darwin-minversion-6.c
+new file mode 100644
+index 0000000..e01fa72
 --- /dev/null
 +++ gcc/testsuite/gcc.dg/darwin-minversion-6.c
 @@ -0,0 +1,15 @@
 +/* PR target/63810: Test that tiny numbers are preserved in
 +   six-character macros.  */
-+/* Added by Lawrence Velázquez <larryv at macports.org>.  */
++/* Added by Lawrence Velázquez <vq at larryv.me>.  */
 +
 +/* { dg-options "-mmacosx-version-min=10.10.11" } */
 +/* { dg-do compile { target *-*-darwin* } } */
@@ -476,14 +391,15 @@
 +#endif
 +  return 0;
 +}
-Index: gcc/testsuite/gcc.dg/darwin-minversion-7.c
-===================================================================
+diff --git gcc/testsuite/gcc.dg/darwin-minversion-7.c gcc/testsuite/gcc.dg/darwin-minversion-7.c
+new file mode 100644
+index 0000000..72f495b
 --- /dev/null
 +++ gcc/testsuite/gcc.dg/darwin-minversion-7.c
 @@ -0,0 +1,15 @@
-+/* PR target/63810: Test that tiny numbers < 10 are preserved in
++/* PR target/63810: Test that tiny numbers less than 10 are preserved in
 +   four-character macros.  */
-+/* Added by Lawrence Velázquez <larryv at macports.org>.  */
++/* Added by Lawrence Velázquez <vq at larryv.me>.  */
 +
 +/* { dg-options "-mmacosx-version-min=10.9.1" } */
 +/* { dg-do compile { target *-*-darwin* } } */
@@ -496,14 +412,16 @@
 +#endif
 +  return 0;
 +}
-Index: gcc/testsuite/gcc.dg/darwin-minversion-8.c
-===================================================================
+diff --git gcc/testsuite/gcc.dg/darwin-minversion-8.c gcc/testsuite/gcc.dg/darwin-minversion-8.c
+new file mode 100644
+index 0000000..5982df5
 --- /dev/null
 +++ gcc/testsuite/gcc.dg/darwin-minversion-8.c
-@@ -0,0 +1,15 @@
-+/* PR target/63810: Test that a version with minor number > 9 and no
-+   tiny number produces a six-character macro ending in "00".  */
-+/* Added by Lawrence Velázquez <larryv at macports.org>.  */
+@@ -0,0 +1,16 @@
++/* PR target/63810: Test that an OS X minimum version with minor number
++   greater than 9 and no tiny number produces a six-character macro
++   ending in "00".  */
++/* Added by Lawrence Velázquez <vq at larryv.me>.  */
 +
 +/* { dg-options "-mmacosx-version-min=10.11" } */
 +/* { dg-do compile { target *-*-darwin* } } */
@@ -516,14 +434,15 @@
 +#endif
 +  return 0;
 +}
-Index: gcc/testsuite/gcc.dg/darwin-minversion-9.c
-===================================================================
+diff --git gcc/testsuite/gcc.dg/darwin-minversion-9.c gcc/testsuite/gcc.dg/darwin-minversion-9.c
+new file mode 100644
+index 0000000..d781783
 --- /dev/null
 +++ gcc/testsuite/gcc.dg/darwin-minversion-9.c
 @@ -0,0 +1,15 @@
-+/* PR target/63810: Test that a version with a zero-padded minor
-+   number < 10 produces a four-character macro.  */
-+/* Added by Lawrence Velázquez <larryv at macports.org>.  */
++/* PR target/63810: Test that an OS X minimum version with a zero-padded
++   minor number less than 10 produces a four-character macro.  */
++/* Added by Lawrence Velázquez <vq at larryv.me>.  */
 +
 +/* { dg-options "-mmacosx-version-min=10.08.4" } */
 +/* { dg-do compile { target *-*-darwin* } } */

Copied: trunk/dports/lang/gcc47/files/remove-kernel-version-check.patch (from rev 127365, trunk/dports/lang/gcc47/files/yosemite-version-check.patch)
===================================================================
--- trunk/dports/lang/gcc47/files/remove-kernel-version-check.patch	                        (rev 0)
+++ trunk/dports/lang/gcc47/files/remove-kernel-version-check.patch	2015-05-30 05:05:09 UTC (rev 136924)
@@ -0,0 +1,31 @@
+commit 9be4ec7ebf2d759114a98b0f532171f0e9e5768d
+Author: fxcoudert <fxcoudert at 138bc75d-0d04-0410-961f-82ee72b054a4>
+Date:   Sun Sep 14 08:05:43 2014 +0000
+
+    	PR target/61407
+
+    	* config/darwin-driver.c (darwin_find_version_from_kernel): Removed
+    	kernel version check to avoid incrementing it after every major OS X
+    	release.
+---
+Extracted from upstream r215251.
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61407
+https://gcc.gnu.org/viewcvs/gcc?view=rev&rev=215251
+
+ gcc/config/darwin-driver.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git gcc/config/darwin-driver.c gcc/config/darwin-driver.c
+index 48eaf19..5b3991c 100644
+--- gcc/config/darwin-driver.c
++++ gcc/config/darwin-driver.c
+@@ -57,8 +57,6 @@ darwin_find_version_from_kernel (char *new_flag)
+   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, '.');


Property changes on: trunk/dports/lang/gcc47/files/remove-kernel-version-check.patch
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/mld-qt-481/dports/lang/gcc47/files/yosemite-version-check.patch:92720,92813,92891,92963,93522,93556,93699,93743,93771-93773,93806,93817-93818,93856
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150529/3c192821/attachment-0001.html>


More information about the macports-changes mailing list