GCC Bugzilla – Attachment 33824 Details for
Bug 61407
Build errors on latest OS X 10.10 Yosemite with Xcode 6 on GCC 4.8.3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
gcc 4.2 based patch which handles tiny version numbers properly
yosemite-deployment-target.patch (text/plain), 3.03 KB, created by
Jeremy Huddleston Sequoia
on 2014-10-27 19:19:29 UTC
(
hide
)
Description:
gcc 4.2 based patch which handles tiny version numbers properly
Filename:
MIME Type:
Creator:
Jeremy Huddleston Sequoia
Created:
2014-10-27 19:19:29 UTC
Size:
3.03 KB
patch
obsolete
>--- 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. */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 61407
:
32886
|
32949
|
33180
|
33461
|
33464
| 33824 |
33932