--- ./gcc/config/rs6000/aix71.h_orig	2022-06-06 07:43:20.682390595 -0500
+++ ./gcc/config/rs6000/aix71.h	2022-06-06 07:44:45.958764849 -0500
@@ -212,6 +212,10 @@
 #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.  */
 
--- ./gcc/config/rs6000/aix72.h_orig	2022-06-06 07:29:13.900259598 -0500
+++ ./gcc/config/rs6000/aix72.h	2022-06-06 07:45:28.630064187 -0500
@@ -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.2.
    Copyright (C) 2002-2017 Free Software Foundation, Inc.
@@ -212,6 +213,10 @@
 #else
 #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.  */
