]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aix: SYSTEM_IMPLICIT_EXTERN_C
authorDavid Edelsohn <dje.gcc@gmail.com>
Tue, 24 Aug 2021 20:48:57 +0000 (16:48 -0400)
committerDavid Edelsohn <dje.gcc@gmail.com>
Tue, 24 Aug 2021 22:33:21 +0000 (18:33 -0400)
AIX 7.3 system headers are C++ safe and GCC no longer needs to define
SYSTEM_IMPLICIT_EXTERN_C for AIX 7.3.  This patch moves the definition
from aix.h to the individual OS-level configuration files and does not
define the macro for AIX 7.3.

The patch also corrects the definition of TARGET_AIX_VERSION to 73.

gcc/ChangeLog:
* config/rs6000/aix.h (SYSTEM_IMPLICIT_EXTERN_C): Delete.
* config/rs6000/aix71.h (SYSTEM_IMPLICIT_EXTERN_C): Define.
* config/rs6000/aix72.h (SYSTEM_IMPLICIT_EXTERN_C): Define.
* config/rs6000/aix73.h (TARGET_AIX_VERSION): Increase to 73.

gcc/config/rs6000/aix.h
gcc/config/rs6000/aix71.h
gcc/config/rs6000/aix72.h
gcc/config/rs6000/aix73.h

index 662785cc7db34e3c37f687e5457fcb249115da5c..0f4d8cb2dc8568252ec36a7c31eb0f2a1a5d3548 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
 /* Definitions of target machine for GNU compiler,
    for IBM RS/6000 POWER running AIX.
    Copyright (C) 2000-2021 Free Software Foundation, Inc.
@@ -23,9 +24,6 @@
 #undef  TARGET_AIX
 #define TARGET_AIX 1
 
-/* System headers are not C++-aware.  */
-#define SYSTEM_IMPLICIT_EXTERN_C 1
-
 /* Linux64.h wants to redefine TARGET_AIX based on -m64, but it can't be used
    in the #if conditional in options-default.h, so provide another macro.  */
 #undef  TARGET_AIX_OS
index 38cfa9e158ab31e455530ff5ff6a8a4da9854532..1bc1560c4969be35129ed664dd0ce05f83113687 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
 /* Definitions of target machine for GNU compiler,
    for IBM RS/6000 POWER running AIX V7.1.
    Copyright (C) 2002-2021 Free Software Foundation, Inc.
@@ -268,6 +269,9 @@ extern long long int    atoll(const char *);
 #define SET_CMODEL(opt) do {} while (0)
 #endif
 
+/* System headers are not C++-aware.  */
+#define SYSTEM_IMPLICIT_EXTERN_C 1
+
 /* This target defines SUPPORTS_WEAK and TARGET_ASM_NAMED_SECTION,
    but does not have crtbegin/end.  */
 
index a497a7d8541875f6874f9607e43e8aaab8ec0c58..cca64f14f3a6d991229ece6002ff2ee3ecf00a24 100644 (file)
@@ -270,6 +270,9 @@ extern long long int    atoll(const char *);
 #define SET_CMODEL(opt) do {} while (0)
 #endif
 
+/* System headers are not C++-aware.  */
+#define SYSTEM_IMPLICIT_EXTERN_C 1
+
 /* This target defines SUPPORTS_WEAK and TARGET_ASM_NAMED_SECTION,
    but does not have crtbegin/end.  */
 
index c707c7e76b6998385522a2d22e4f3e5a7340c3ed..f0ca1a55e5d84a9dc1519dad5ef0b3f53f3837f1 100644 (file)
@@ -274,7 +274,7 @@ extern long long int    atoll(const char *);
 /* This target defines SUPPORTS_WEAK and TARGET_ASM_NAMED_SECTION,
    but does not have crtbegin/end.  */
 
-#define TARGET_AIX_VERSION 72
+#define TARGET_AIX_VERSION 73
 
 /* AIX 7.2 supports DWARF3+ debugging.  */
 #define DWARF2_DEBUGGING_INFO 1