<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[127393] trunk/dports/lang/gcc46</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/127393">127393</a></dd>
<dt>Author</dt> <dd>larryv@macports.org</dd>
<dt>Date</dt> <dd>2014-10-26 22:38:40 -0700 (Sun, 26 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>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).</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportslanggcc46Portfile">trunk/dports/lang/gcc46/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportslanggcc46filesyosemitesymbollookuppatch">trunk/dports/lang/gcc46/files/yosemite-symbol-lookup.patch</a></li>
<li><a href="#trunkdportslanggcc46filesyosemiteversioncheckpatch">trunk/dports/lang/gcc46/files/yosemite-version-check.patch</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportslanggcc46Portfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/lang/gcc46/Portfile (127392 => 127393)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -54,7 +54,10 @@
</span><span class="cx"> depends_skip_archcheck-append gcc_select ld64 cctools
</span><span class="cx"> license_noconflict  gmp mpfr ppl libmpc
</span><span class="cx"> 
</span><del>-patchfiles          gcc-4.6-cloog_lang_c.patch enable_libstdcxx_time_yes.patch
</del><ins>+patchfiles          gcc-4.6-cloog_lang_c.patch \
+                    enable_libstdcxx_time_yes.patch \
+                    yosemite-version-check.patch \
+                    yosemite-symbol-lookup.patch
</ins><span class="cx"> 
</span><span class="cx"> set major           4.6
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkdportslanggcc46filesyosemitesymbollookuppatchfromrev127392trunkdportslanggcc47filesyosemitesymbollookuppatch"></a>
<div class="copfile"><h4>Copied: trunk/dports/lang/gcc46/files/yosemite-symbol-lookup.patch (from rev 127392, trunk/dports/lang/gcc47/files/yosemite-symbol-lookup.patch) (0 => 127393)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,195 @@
</span><ins>+Index: boehm-gc/configure
+===================================================================
+--- boehm-gc/configure.orig
++++ boehm-gc/configure
+@@ -7581,7 +7581,7 @@ $as_echo &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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 &quot;$lt_cv_ld_force_load&quot; &gt;&amp;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' ;;
</ins></span></pre></div>
<a id="trunkdportslanggcc46filesyosemiteversioncheckpatchfromrev127392trunkdportslanggcc47filesyosemiteversioncheckpatch"></a>
<div class="copfile"><h4>Copied: trunk/dports/lang/gcc46/files/yosemite-version-check.patch (from rev 127392, trunk/dports/lang/gcc47/files/yosemite-version-check.patch) (0 => 127393)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,117 @@
</span><ins>+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[] = &quot;1000&quot;;
++  static char result[7] = &quot;1000&quot;;
++  int minorDigitIdx;

+   if (strncmp (darwin_macosx_version_min, &quot;10.&quot;, 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'
+-      &amp;&amp; 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'
++      &amp;&amp; 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 &gt; 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 &quot;-mmacosx-version-min=10.1&quot; } */
+ /* { 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 &quot;-mmacosx-version-min=10.1 -mmacosx-version-min=10.3&quot; } */
+ /* { 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 &quot;-mmacosx-version-min=10.4.10&quot; } */
+ /* { 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 &quot;-mmacosx-version-min=10.10.0&quot; } */
++/* { dg-do compile { target *-*-darwin* } } */
++
++int
++main ()
++{
++#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 101000
++  fail me;
++#endif
++  return 0;
++}
</ins></span></pre>
</div>
</div>

</body>
</html>