diff options
author | Erik Schnetter <schnetter@gmail.com> | 2019-04-18 06:53:21 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2019-04-18 06:53:21 +0000 |
commit | 8e6759aafdefd2313e580aa1f5e18f8339da1350 (patch) | |
tree | 2fe2734c6c922af16a7a69ab02366ae070a71256 /fixincludes/inclhack.def | |
parent | 5c727cf6259e7f71185fb647b52cbe3907cc4774 (diff) | |
download | gcc-8e6759aafdefd2313e580aa1f5e18f8339da1350.zip gcc-8e6759aafdefd2313e580aa1f5e18f8339da1350.tar.gz gcc-8e6759aafdefd2313e580aa1f5e18f8339da1350.tar.bz2 |
re PR bootstrap/89864 (gcc fails to build/bootstrap with XCode 10.2)
fix PR89864
2019-04-18 Erik Schnetter <schnetter@gmail.com>
Jakub Jelinek <jakub@redhat.com>
Iain Sandoe <iain@sandoe.co.uk>
PR bootstrap/89864
* inclhack.def (darwin_ucred__Atomic): New, work around _Atomic keyword
use in headers included by C++.
* fixincl.x: Regenerated.
Co-Authored-By: Iain Sandoe <iain@sandoe.co.uk>
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r270435
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r-- | fixincludes/inclhack.def | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 8fd9f7e..d8ce89a 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -1622,6 +1622,25 @@ fix = { "#define UINTMAX_C(v) (v ## ULL)"; }; +/* The SDK included with XCode 10.2 has the file <sys/ucred.h> that uses the + C11 _Atomic keyword (exposing it to C++ code). The work-around here follows + the header in declaring the entity volatile when _Atomic is not available. +*/ +fix = { + hackname = darwin_ucred__Atomic; + mach = "*-*-darwin*"; + files = sys/ucred.h; + select = "_Atomic"; + c_fix = wrap; + c_fix_arg = "#if (__STDC_VERSION__ < 201112L) || defined(__cplusplus)\n" + "# define _Atomic volatile\n" + "#endif\n"; + c_fix_arg = "#if (__STDC_VERSION__ < 201112L) || defined(__cplusplus)\n" + "# undef _Atomic\n" + "#endif\n"; + test_text = "_Atomic"; +}; + /* * Fix <c_asm.h> on Digital UNIX V4.0: * It contains a prototype for a DEC C internal asm() function, |