Ignore:
Timestamp:
May 30, 2015, 6:48:07 AM (4 years ago)
Author:
larryv@…
Message:

gcc46: Backport upstream fix for handling deployment targets

Replace my earlier patch for upstream PR target/63810 (MacPorts r128415)
with the one applied to trunk (GCC r223808). Split out the kernel
version check removal into its own patch. Revbump DragonEgg ports as
appropriate.

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

Location:
trunk/dports/lang/gcc46
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/gcc46/Portfile

    r136823 r136925  
    1010# Whenever this port is bumped for version/revision, please revbump dragonegg-3.[012] and dragonegg-*-gcc-4.6
    1111version             4.6.4
    12 revision            8
     12revision            9
    1313platforms           darwin
    1414categories          lang
     
    6565patchfiles          gcc-4.6-cloog_lang_c.patch \
    6666                    enable_libstdcxx_time_yes.patch
     67
     68# Don't check Darwin kernel version (GCC PR target/61407
     69# <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61407>).
     70patchfiles-append   remove-kernel-version-check.patch
    6771
    6872# Handle OS X deployment targets correctly (GCC PR target/63810
  • trunk/dports/lang/gcc46/files/macosx-version-min.patch

    r128415 r136925  
    1 Index: gcc/config/darwin-c.c
    2 ===================================================================
    3 --- gcc/config/darwin-c.c.orig
     1commit 9b0d3d17b04a59bb591c06273d2d5a975f8c5d58
     2Author: Lawrence Velázquez <vq@larryv.me>
     3Date:   Fri Nov 14 17:52:32 2014 -0500
     4
     5    Handle OS X deployment targets correctly
     6
     7    As described in PR target/63810, this addresses several problems with
     8    the validation and encoding of deployment target version strings for the
     9    __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  There are
     10    currently four testcases exercising inputs to -mmacosx-version-min
     11    (gcc/testsuite/gcc.dg/darwin-minversion-*), but they provide minimal
     12    coverage, and one is incorrect.
     13
     14    * The tiny number is now respected, if present.  Thus "10.9.4"
     15      correctly becomes "1094" instead of "1090", and "10.10.1" becomes
     16      "101001" instead of "101000".
     17    * Zero padding is now ignored.  Thus "10.09" correctly becomes "1090"
     18      instead of "100900", and "10.00010" becomes "101000" instead of being
     19      treated as invalid.
     20    * Deployment targets that are missing minor and tiny numbers are no
     21      longer considered invalid.  Thus "10" is treated as "10.0.0", which
     22      becomes "1000" without causing an error.
     23
     24    With this change, trunk matches the behavior of Apple LLVM Compiler
     25    6.1.0 on 8,451 of 8,464 generated test inputs.  (The discrepancies are
     26    due to a bug in Clang.)  I don't notice any testsuite regressions on
     27    OS X 10.10 Yosemite x86-64.
     28
     29    2015-05-15  Lawrence Velázquez  <vq@larryv.me>
     30
     31        PR target/63810
     32        * gcc/config/darwin-c.c (version_components): New global enum.
     33        (parse_version, version_as_legacy_macro)
     34        (version_as_modern_macro, macosx_version_as_macro): New functions.
     35        (version_as_macro): Remove.
     36        (darwin_cpp_builtins): Use new function.
     37        * gcc/testsuite/gcc.dg/darwin-minversion-3.c: Update testcase.
     38        * gcc/testsuite/gcc.dg/darwin-minversion-4.c: Ditto.
     39        * gcc/testsuite/gcc.dg/darwin-minversion-5.c: New testcase.
     40        * gcc/testsuite/gcc.dg/darwin-minversion-6.c: Ditto.
     41        * gcc/testsuite/gcc.dg/darwin-minversion-7.c: Ditto.
     42        * gcc/testsuite/gcc.dg/darwin-minversion-8.c: Ditto.
     43        * gcc/testsuite/gcc.dg/darwin-minversion-9.c: Ditto.
     44        * gcc/testsuite/gcc.dg/darwin-minversion-10.c: Ditto.
     45        * gcc/testsuite/gcc.dg/darwin-minversion-11.c: Ditto.
     46        * gcc/testsuite/gcc.dg/darwin-minversion-12.c: Ditto.
     47---
     48Adapted for GCC 4.6.4 from the upstream trunk fix. The text above is
     49from my email to the gcc-patches mailing list; some minor details may
     50not apply to the patch below.
     51
     52https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63810
     53https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01888.html
     54https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=rev&rev=223808
     55
     56 gcc/config/darwin-c.c                       | 155 +++++++++++++++++++++++---
     57 gcc/testsuite/gcc.dg/darwin-minversion-10.c |  16 +++
     58 gcc/testsuite/gcc.dg/darwin-minversion-11.c |  16 +++
     59 gcc/testsuite/gcc.dg/darwin-minversion-12.c |  16 +++
     60 gcc/testsuite/gcc.dg/darwin-minversion-3.c  |   6 +-
     61 gcc/testsuite/gcc.dg/darwin-minversion-4.c  |  12 ++
     62 gcc/testsuite/gcc.dg/darwin-minversion-5.c  |  16 +++
     63 gcc/testsuite/gcc.dg/darwin-minversion-6.c  |  15 +++
     64 gcc/testsuite/gcc.dg/darwin-minversion-7.c  |  15 +++
     65 gcc/testsuite/gcc.dg/darwin-minversion-8.c  |  16 +++
     66 gcc/testsuite/gcc.dg/darwin-minversion-9.c  |  15 +++
     67 11 files changed, 282 insertions(+), 16 deletions(-)
     68
     69diff --git gcc/config/darwin-c.c gcc/config/darwin-c.c
     70index 211d141..3a7e3ee 100644
     71--- gcc/config/darwin-c.c
    472+++ gcc/config/darwin-c.c
    5 @@ -568,29 +568,180 @@ find_subframework_header (cpp_reader *pf
     73@@ -568,25 +568,154 @@ find_subframework_header (cpp_reader *pfile, const char *header, cpp_dir **dirp)
    674   return 0;
    775 }
     
    1179-   so '10.4.2' becomes 1040.  The lowest digit is always zero.
    1280-   Print a warning if the version number can't be understood.  */
    13 +/*  Given a version string, return the version as a statically-allocated
    14 +    array of three non-negative integers.  If the version string is
    15 +    invalid, return null.
    16 +
    17 +    Version strings must consist of one, two, or three tokens, each
    18 +    separated by a single period.  Each token must contain only the
    19 +    characters '0' through '9' and is converted to an equivalent
    20 +    integer.  Omitted tokens are treated as zeros.  For example:
    21 +
    22 +        "10"              becomes   {10,0,0}
    23 +        "10.10"           becomes   {10,10,0}
    24 +        "10.10.1"         becomes   {10,10,1}
    25 +        "10.000010.1"     becomes   {10,10,1}
    26 +        "10.010.001"      becomes   {10,10,1}
    27 +        "000010.10.00001" becomes   {10,10,1}  */
     81+/* Given an OS X version VERSION_STR, return it as a statically-allocated array
     82+   of three integers. If VERSION_STR is invalid, return NULL.
     83+
     84+   VERSION_STR must consist of one, two, or three tokens, each separated by
     85+   a single period.  Each token must contain only the characters '0' through
     86+   '9' and is converted to an equivalent non-negative decimal integer. Omitted
     87+   tokens become zeros.  For example:
     88+
     89+        "10"              becomes       {10,0,0}
     90+        "10.10"           becomes       {10,10,0}
     91+        "10.10.1"         becomes       {10,10,1}
     92+        "10.000010.1"     becomes       {10,10,1}
     93+        "10.010.001"      becomes       {10,10,1}
     94+        "000010.10.00001" becomes       {10,10,1}
     95+        ".9.1"            is invalid
     96+        "10..9"           is invalid
     97+        "10.10."          is invalid  */
    2898+
    2999+enum version_components { MAJOR, MINOR, TINY };
     
    36106+  static unsigned long version_array[3];
    37107+
    38 +  if (! version_str)
    39 +    return NULL;
    40 +
    41108+  version_len = strlen (version_str);
    42109+  if (version_len < 1)
     
    47114+    return NULL;
    48115+
    49 +  if (! ISDIGIT (version_str[0]) || ! ISDIGIT (version_str[version_len - 1]))
     116+  if (!ISDIGIT (version_str[0]) || !ISDIGIT (version_str[version_len - 1]))
    50117+    return NULL;
    51118+
     
    69136+}
    70137+
    71 +/*  Given a three-component version represented as an array of
    72 +    non-negative integers, return a statically-allocated string suitable
    73 +    for the legacy __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.
    74 +    If the version is invalid and cannot be coerced into a valid form,
    75 +    return null.
    76 +
    77 +    The legacy format is a four-character string -- two chars for the
    78 +    major number and one each for the minor and tiny numbers.  Major
    79 +    numbers are zero-padded if necessary.  Minor and tiny numbers from
    80 +    10 through 99 are permitted but are clamped to 9 (for example,
    81 +    {10,9,10} produces "1099").  Versions containing numbers greater
    82 +    than 99 are rejected.  */
     138+/* Given VERSION -- a three-component OS X version represented as an array of
     139+   non-negative integers -- return a statically-allocated string suitable for
     140+   the legacy __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  If VERSION
     141+   is invalid and cannot be coerced into a valid form, return NULL.
     142+
     143+   The legacy format is a four-character string -- two chars for the major
     144+   number and one each for the minor and tiny numbers.  Minor and tiny numbers
     145+   from 10 through 99 are permitted but are clamped to 9 (for example, {10,9,10}
     146+   produces "1099").  If VERSION contains numbers greater than 99, it is
     147+   rejected.  */
    83148+
    84149 static const char *
     
    88153-  static char result[] = "1000";
    89154+  unsigned long major, minor, tiny;
    90 +  static char result[sizeof "9999"];
    91 +
    92 +  if (! version)
    93 +    return NULL;
     155+  static char result[5];
    94156+
    95157+  major = version[MAJOR];
     
    103165+  tiny = ((tiny > 9) ? 9 : tiny);
    104166+
    105 /* NOTE: Cast result of sizeof so that result of sprintf is not
    106 +     converted to an unsigned type.  */
    107 +  if (sprintf (result, "%02lu%lu%lu", major, minor, tiny)
    108     != (int) sizeof "9999" - 1)
    109 +    return NULL;
     167if (sprintf (result, "%lu%lu%lu", major, minor, tiny) != 4)
     168+    return NULL;
     169+
     170return result;
     171+}
    110172 
    111173-  if (strncmp (darwin_macosx_version_min, "10.", 3) != 0)
    112 +  return result;
    113 +}
    114 +
    115 +/*  Given a three-component version represented as an array of
    116 +    non-negative integers, return a statically-allocated string suitable
    117 +    for the modern __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro
    118 +    or the __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ macro.  If the
    119 +    version is invalid, return null.
    120 +
    121 +    The modern format is a five- or six-character string -- one or two
    122 +    chars for the major number and two each for the minor and tiny
    123 +    numbers, which are zero-padded if necessary (for example, {8,1,0}
    124 +    produces "80100", and {10,10,1} produces "101001").  Versions
    125 +    containing numbers greater than 99 are rejected.  */
     174+/* Given VERSION -- a three-component OS X version represented as an array of
     175+   non-negative integers -- return a statically-allocated string suitable for
     176+   the modern __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  If VERSION
     177+   is invalid, return NULL.
     178+
     179+   The modern format is a six-character string -- two chars for each component,
     180+   with zero-padding if necessary (for example, {10,10,1} produces "101001"). If
     181+   VERSION contains numbers greater than 99, it is rejected.  */
    126182+
    127183+static const char *
     
    129185+{
    130186+  unsigned long major, minor, tiny;
    131 +  static char result[sizeof "999999"];
    132 +
    133 +  if (! version)
    134 +    return NULL;
     187+  static char result[7];
    135188+
    136189+  major = version[MAJOR];
     
    141194+    return NULL;
    142195+
    143 +  /* NOTE: 'sizeof ((x > y) ? "foo" : "bar")' returns size of char
    144 +     pointer instead of char array, so use
    145 +     '(x > y) ? sizeof "foo" : sizeof "bar"' instead.  */
    146 +  /* NOTE: Cast result of sizeof so that result of sprintf is not
    147 +     converted to an unsigned type.  */
    148 +  if (sprintf (result, "%lu%02lu%02lu", major, minor, tiny)
    149 +      != (int) ((major > 9) ? sizeof "999999" : sizeof "99999") - 1)
     196+  if (sprintf (result, "%02lu%02lu%02lu", major, minor, tiny) != 6)
    150197+    return NULL;
    151198+
     
    153200+}
    154201+
    155 +/*  Return the value of darwin_macosx_version_min, suitably formatted
    156 +    for the __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  Values
    157 +    representing OS X 10.9 and earlier are encoded using the legacy
    158 +    four-character format, while 10.10 and later use a modern
    159 +    six-character format.  (For example, "10.9" produces "1090", and
    160 +    "10.10.1" produces "101001".)  If the value is invalid and cannot be
    161 +    coerced into a valid form, print a warning and return "1000".  */
     202+/* Return the value of darwin_macosx_version_min, suitably formatted for the
     203+   __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  Values representing
     204+   OS X 10.9 and earlier are encoded using the legacy four-character format,
     205+   while 10.10 and later use a modern six-character format.  (For example,
     206+   "10.9" produces "1090", and "10.10.1" produces "101001".)  If
     207+   darwin_macosx_version_min is invalid and cannot be coerced into a valid
     208+   form, print a warning and return "1000".  */
    162209+
    163210+static const char *
     
    168215+
    169216+  version_array = parse_version (darwin_macosx_version_min);
    170 +  if (! version_array)
     217+  if (!version_array)
    171218     goto fail;
    172219-  if (! ISDIGIT (darwin_macosx_version_min[3]))
    173220+
    174 +  /* Do not assume that the major number will always be exactly 10.  */
    175 +  if (version_array[MAJOR] < 10 || version_array[MAJOR] > 10)
     221+  if (version_array[MAJOR] != 10)
    176222     goto fail;
    177223-  result[2] = darwin_macosx_version_min[3];
     
    179225-      && darwin_macosx_version_min[4] != '.')
    180226+
    181 +  if (version_array[MAJOR] == 10 && version_array[MINOR] < 10)
     227+  if (version_array[MINOR] < 10)
    182228+    version_macro = version_as_legacy_macro (version_array);
    183229+  else
    184230+    version_macro = version_as_modern_macro (version_array);
    185231+
    186 +  if (! version_macro)
     232+  if (!version_macro)
    187233     goto fail;
    188234 
     
    192238  fail:
    193239   error ("unknown value %qs of -mmacosx-version-min",
    194 -        darwin_macosx_version_min);
    195 +         darwin_macosx_version_min);
    196    return "1000";
    197  }
    198  
    199 @@ -612,7 +763,7 @@ darwin_cpp_builtins (cpp_reader *pfile)
     240@@ -612,7 +741,7 @@ darwin_cpp_builtins (cpp_reader *pfile)
    200241     builtin_define ("__CONSTANT_CFSTRINGS__");
    201242 
     
    206247   /* Since we do not (at 4.6) support ObjC gc for the NeXT runtime, the
    207248      following will cause a syntax error if one tries to compile gc attributed
    208 Index: gcc/config/darwin-driver.c
    209 ===================================================================
    210 --- gcc/config/darwin-driver.c.orig
    211 +++ gcc/config/darwin-driver.c
    212 @@ -99,8 +99,6 @@ darwin_default_min_version (unsigned int
    213    version_p = osversion + 1;
    214    if (ISDIGIT (*version_p))
    215      major_vers = major_vers * 10 + (*version_p++ - '0');
    216 -  if (major_vers > 4 + 9)
    217 -    goto parse_failed;
    218    if (*version_p++ != '.')
    219      goto parse_failed;
    220    version_pend = strchr(version_p, '.');
    221 Index: gcc/testsuite/gcc.dg/darwin-minversion-1.c
    222 ===================================================================
    223 --- gcc/testsuite/gcc.dg/darwin-minversion-1.c.orig
    224 +++ gcc/testsuite/gcc.dg/darwin-minversion-1.c
    225 @@ -2,7 +2,8 @@
    226  /* { dg-options "-mmacosx-version-min=10.1" } */
    227  /* { dg-do run { target *-*-darwin* } } */
    228  
    229 -int main(void)
    230 +int
    231 +main ()
    232  {
    233  #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1010
    234    fail me;
    235 Index: gcc/testsuite/gcc.dg/darwin-minversion-10.c
    236 ===================================================================
     249diff --git gcc/testsuite/gcc.dg/darwin-minversion-10.c gcc/testsuite/gcc.dg/darwin-minversion-10.c
     250new file mode 100644
     251index 0000000..bf95d46
    237252--- /dev/null
    238253+++ gcc/testsuite/gcc.dg/darwin-minversion-10.c
    239254@@ -0,0 +1,16 @@
    240 +/* PR target/63810: Test that a version with a zero-padded minor
    241 +   number < 10 and a zero-padded tiny number < 10 produces the correct
     255+/* PR target/63810: Test that an OS X minimum version with zero-padded
     256+   minor and tiny numbers less than 10 produces the correct
    242257+   four-character macro.  */
    243 +/* Added by Lawrence Velázquez <larryv@macports.org>.  */
     258+/* Added by Lawrence Velázquez <vq@larryv.me>.  */
    244259+
    245260+/* { dg-options "-mmacosx-version-min=10.07.02" } */
     
    254269+  return 0;
    255270+}
    256 Index: gcc/testsuite/gcc.dg/darwin-minversion-11.c
    257 ===================================================================
     271diff --git gcc/testsuite/gcc.dg/darwin-minversion-11.c gcc/testsuite/gcc.dg/darwin-minversion-11.c
     272new file mode 100644
     273index 0000000..a03e707
    258274--- /dev/null
    259275+++ gcc/testsuite/gcc.dg/darwin-minversion-11.c
    260 @@ -0,0 +1,15 @@
    261 +/* PR target/63810: Test that a version with outrageous zero-padding and
    262 +   a minor number > 9 still produces a six-character macro.  */
    263 +/* Added by Lawrence Velázquez <larryv@macports.org>.  */
     276@@ -0,0 +1,16 @@
     277+/* PR target/63810: Test that an OS X minimum version with outrageous
     278+   zero-padding and a minor number greater than 9 still produces
     279+   a six-character macro.  */
     280+/* Added by Lawrence Velázquez <vq@larryv.me>.  */
    264281+
    265282+/* { dg-options "-mmacosx-version-min=00010.010.0000098" } */
     
    274291+  return 0;
    275292+}
    276 Index: gcc/testsuite/gcc.dg/darwin-minversion-12.c
    277 ===================================================================
     293diff --git gcc/testsuite/gcc.dg/darwin-minversion-12.c gcc/testsuite/gcc.dg/darwin-minversion-12.c
     294new file mode 100644
     295index 0000000..4c2ce38
    278296--- /dev/null
    279297+++ gcc/testsuite/gcc.dg/darwin-minversion-12.c
    280 @@ -0,0 +1,15 @@
    281 +/* PR target/63810: Test that a version with outrageous zero-padding and
    282 +   a minor number < 10 still produces a four-character macro.  */
    283 +/* Added by Lawrence Velázquez <larryv@macports.org>.  */
     298@@ -0,0 +1,16 @@
     299+/* PR target/63810: Test that an OS X minimum version with outrageous
     300+   zero-padding and a minor number less than 10 still produces
     301+   a four-character macro.  */
     302+/* Added by Lawrence Velázquez <vq@larryv.me>.  */
    284303+
    285304+/* { dg-options "-mmacosx-version-min=010.008.000031" } */
     
    294313+  return 0;
    295314+}
    296 Index: gcc/testsuite/gcc.dg/darwin-minversion-2.c
    297 ===================================================================
    298 --- gcc/testsuite/gcc.dg/darwin-minversion-2.c.orig
    299 +++ gcc/testsuite/gcc.dg/darwin-minversion-2.c
    300 @@ -2,7 +2,8 @@
    301  /* { dg-options "-mmacosx-version-min=10.1 -mmacosx-version-min=10.3" } */
    302  /* { dg-do run { target *-*-darwin* } } */
    303  
    304 -int main(void)
    305 +int
    306 +main ()
    307  {
    308  #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1030
    309    fail me;
    310 Index: gcc/testsuite/gcc.dg/darwin-minversion-3.c
    311 ===================================================================
    312 --- gcc/testsuite/gcc.dg/darwin-minversion-3.c.orig
     315diff --git gcc/testsuite/gcc.dg/darwin-minversion-3.c gcc/testsuite/gcc.dg/darwin-minversion-3.c
     316index d0c5934..76886dd 100644
     317--- gcc/testsuite/gcc.dg/darwin-minversion-3.c
    313318+++ gcc/testsuite/gcc.dg/darwin-minversion-3.c
    314 @@ -1,10 +1,11 @@
     319@@ -1,10 +1,10 @@
    315320-/* Test that most-minor versions greater than 9 work.  */
    316321-/* { dg-options "-mmacosx-version-min=10.4.10" } */
    317 +/* Test that most minor versions < 10 work.  */
     322+/* Test that most minor versions less than 10 work.  */
    318323+/* { dg-options "-mmacosx-version-min=10.4.1" } */
    319324 /* { dg-do compile { target *-*-darwin* } } */
    320325 
    321 -int main(void)
    322 +int
    323 +main ()
     326 int main(void)
    324327 {
    325328-#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1040
     
    328331 #endif
    329332   return 0;
    330 Index: gcc/testsuite/gcc.dg/darwin-minversion-4.c
    331 ===================================================================
     333diff --git gcc/testsuite/gcc.dg/darwin-minversion-4.c gcc/testsuite/gcc.dg/darwin-minversion-4.c
     334new file mode 100644
     335index 0000000..1481aa5
    332336--- /dev/null
    333337+++ gcc/testsuite/gcc.dg/darwin-minversion-4.c
    334338@@ -0,0 +1,12 @@
    335 +/* Test that minor versions > 9 produce a six-character macro.  */
     339+/* Test that minor versions greater than 9 produce a six-character macro.  */
    336340+/* { dg-options "-mmacosx-version-min=10.10.1" } */
    337341+/* { dg-do compile { target *-*-darwin* } } */
     
    345349+  return 0;
    346350+}
    347 Index: gcc/testsuite/gcc.dg/darwin-minversion-5.c
    348 ===================================================================
     351diff --git gcc/testsuite/gcc.dg/darwin-minversion-5.c gcc/testsuite/gcc.dg/darwin-minversion-5.c
     352new file mode 100644
     353index 0000000..09a9d72
    349354--- /dev/null
    350355+++ gcc/testsuite/gcc.dg/darwin-minversion-5.c
    351356@@ -0,0 +1,16 @@
    352 +/* PR target/63810: Test that a version with minor number < 10 and tiny
    353 +   number > 9 produces a four-character macro with the tiny number
    354 +   clamped to 9.  */
    355 +/* Added by Lawrence Velázquez <larryv@macports.org>.  */
     357+/* PR target/63810: Test that an OS X minimum version with minor number
     358+   less than 10 and tiny number greater than 9 produces a four-character
     359+   macro with the tiny number clamped to 9.  */
     360+/* Added by Lawrence Velázquez <vq@larryv.me>.  */
    356361+
    357362+/* { dg-options "-mmacosx-version-min=10.9.10" } */
     
    366371+  return 0;
    367372+}
    368 Index: gcc/testsuite/gcc.dg/darwin-minversion-6.c
    369 ===================================================================
     373diff --git gcc/testsuite/gcc.dg/darwin-minversion-6.c gcc/testsuite/gcc.dg/darwin-minversion-6.c
     374new file mode 100644
     375index 0000000..e01fa72
    370376--- /dev/null
    371377+++ gcc/testsuite/gcc.dg/darwin-minversion-6.c
     
    373379+/* PR target/63810: Test that tiny numbers are preserved in
    374380+   six-character macros.  */
    375 +/* Added by Lawrence Velázquez <larryv@macports.org>.  */
     381+/* Added by Lawrence Velázquez <vq@larryv.me>.  */
    376382+
    377383+/* { dg-options "-mmacosx-version-min=10.10.11" } */
     
    386392+  return 0;
    387393+}
    388 Index: gcc/testsuite/gcc.dg/darwin-minversion-7.c
    389 ===================================================================
     394diff --git gcc/testsuite/gcc.dg/darwin-minversion-7.c gcc/testsuite/gcc.dg/darwin-minversion-7.c
     395new file mode 100644
     396index 0000000..72f495b
    390397--- /dev/null
    391398+++ gcc/testsuite/gcc.dg/darwin-minversion-7.c
    392399@@ -0,0 +1,15 @@
    393 +/* PR target/63810: Test that tiny numbers < 10 are preserved in
     400+/* PR target/63810: Test that tiny numbers less than 10 are preserved in
    394401+   four-character macros.  */
    395 +/* Added by Lawrence Velázquez <larryv@macports.org>.  */
     402+/* Added by Lawrence Velázquez <vq@larryv.me>.  */
    396403+
    397404+/* { dg-options "-mmacosx-version-min=10.9.1" } */
     
    406413+  return 0;
    407414+}
    408 Index: gcc/testsuite/gcc.dg/darwin-minversion-8.c
    409 ===================================================================
     415diff --git gcc/testsuite/gcc.dg/darwin-minversion-8.c gcc/testsuite/gcc.dg/darwin-minversion-8.c
     416new file mode 100644
     417index 0000000..5982df5
    410418--- /dev/null
    411419+++ gcc/testsuite/gcc.dg/darwin-minversion-8.c
    412 @@ -0,0 +1,15 @@
    413 +/* PR target/63810: Test that a version with minor number > 9 and no
    414 +   tiny number produces a six-character macro ending in "00".  */
    415 +/* Added by Lawrence Velázquez <larryv@macports.org>.  */
     420@@ -0,0 +1,16 @@
     421+/* PR target/63810: Test that an OS X minimum version with minor number
     422+   greater than 9 and no tiny number produces a six-character macro
     423+   ending in "00".  */
     424+/* Added by Lawrence Velázquez <vq@larryv.me>.  */
    416425+
    417426+/* { dg-options "-mmacosx-version-min=10.11" } */
     
    426435+  return 0;
    427436+}
    428 Index: gcc/testsuite/gcc.dg/darwin-minversion-9.c
    429 ===================================================================
     437diff --git gcc/testsuite/gcc.dg/darwin-minversion-9.c gcc/testsuite/gcc.dg/darwin-minversion-9.c
     438new file mode 100644
     439index 0000000..d781783
    430440--- /dev/null
    431441+++ gcc/testsuite/gcc.dg/darwin-minversion-9.c
    432442@@ -0,0 +1,15 @@
    433 +/* PR target/63810: Test that a version with a zero-padded minor
    434 +   number < 10 produces a four-character macro.  */
    435 +/* Added by Lawrence Velázquez <larryv@macports.org>.  */
     443+/* PR target/63810: Test that an OS X minimum version with a zero-padded
     444+   minor number less than 10 produces a four-character macro.  */
     445+/* Added by Lawrence Velázquez <vq@larryv.me>.  */
    436446+
    437447+/* { dg-options "-mmacosx-version-min=10.08.4" } */
  • trunk/dports/lang/gcc46/files/remove-kernel-version-check.patch

    r136924 r136925  
    2121--- gcc/config/darwin-driver.c
    2222+++ gcc/config/darwin-driver.c
    23 @@ -57,8 +57,6 @@ darwin_find_version_from_kernel (char *new_flag)
     23@@ -99,8 +99,6 @@ darwin_find_version_from_kernel (char *new_flag)
    2424   version_p = osversion + 1;
    2525   if (ISDIGIT (*version_p))
Note: See TracChangeset for help on using the changeset viewer.