summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2019-04-18 06:53:21 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-04-18 06:53:21 +0000
commit8e6759aafdefd2313e580aa1f5e18f8339da1350 (patch)
tree2fe2734c6c922af16a7a69ab02366ae070a71256 /fixincludes
parent5c727cf6259e7f71185fb647b52cbe3907cc4774 (diff)
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')
-rw-r--r--fixincludes/ChangeLog9
-rw-r--r--fixincludes/fixincl.x58
-rw-r--r--fixincludes/inclhack.def19
3 files changed, 81 insertions, 5 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 918f33f7b15..ad37281c3fb 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
2018-10-31 Joseph Myers <joseph@codesourcery.com>
PR bootstrap/82856
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index ad5824da015..e150d70fa37 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed October 16, 2018 at 11:38:39 AM by AutoGen 5.18.7
+ * It has been AutoGen-ed April 16, 2019 at 09:32:25 AM by AutoGen 5.17.4
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Oct 16 11:38:39 CEST 2018
+/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Apr 16 09:32:25 IST 2019
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
- * This file contains 251 fixup descriptions.
+ * This file contains 252 fixup descriptions.
*
* See README for more information.
*
@@ -3274,6 +3274,48 @@ static const char* apzDarwin_Stdint_7Patch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Darwin_Ucred__Atomic fix
+ */
+tSCC zDarwin_Ucred__AtomicName[] =
+ "darwin_ucred__Atomic";
+
+/*
+ * File name selection pattern
+ */
+tSCC zDarwin_Ucred__AtomicList[] =
+ "sys/ucred.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzDarwin_Ucred__AtomicMachs[] = {
+ "*-*-darwin*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zDarwin_Ucred__AtomicSelect0[] =
+ "_Atomic";
+
+#define DARWIN_UCRED__ATOMIC_TEST_CT 1
+static tTestDesc aDarwin_Ucred__AtomicTests[] = {
+ { TT_EGREP, zDarwin_Ucred__AtomicSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Darwin_Ucred__Atomic
+ */
+static const char* apzDarwin_Ucred__AtomicPatch[] = {
+ "wrap",
+ "#if (__STDC_VERSION__ < 201112L) || defined(__cplusplus)\n\
+# define _Atomic volatile\n\
+#endif\n",
+ "#if (__STDC_VERSION__ < 201112L) || defined(__cplusplus)\n\
+# undef _Atomic\n\
+#endif\n",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Dec_Intern_Asm fix
*/
tSCC zDec_Intern_AsmName[] =
@@ -10188,9 +10230,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 289
+#define REGEX_COUNT 290
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 251
+#define FIX_COUNT 252
/*
* Enumerate the fixes
@@ -10273,6 +10315,7 @@ typedef enum {
DARWIN_STDINT_5_FIXIDX,
DARWIN_STDINT_6_FIXIDX,
DARWIN_STDINT_7_FIXIDX,
+ DARWIN_UCRED__ATOMIC_FIXIDX,
DEC_INTERN_ASM_FIXIDX,
DJGPP_WCHAR_H_FIXIDX,
ECD_CURSOR_FIXIDX,
@@ -10835,6 +10878,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
DARWIN_STDINT_7_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aDarwin_Stdint_7Tests, apzDarwin_Stdint_7Patch, 0 },
+ { zDarwin_Ucred__AtomicName, zDarwin_Ucred__AtomicList,
+ apzDarwin_Ucred__AtomicMachs,
+ DARWIN_UCRED__ATOMIC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aDarwin_Ucred__AtomicTests, apzDarwin_Ucred__AtomicPatch, 0 },
+
{ zDec_Intern_AsmName, zDec_Intern_AsmList,
apzDec_Intern_AsmMachs,
DEC_INTERN_ASM_TEST_CT, FD_MACH_ONLY,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 8fd9f7ef295..d8ce89ac8c4 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,