aix: default to DWARF 4.
authorDavid Edelsohn <dje.gcc@gmail.com>
Sun, 17 Jan 2021 20:39:46 +0000 (15:39 -0500)
committerDavid Edelsohn <dje.gcc@gmail.com>
Sun, 17 Jan 2021 23:10:00 +0000 (18:10 -0500)
GCC now defaults to DWARF 5.  AIX only supports DWARF 4 (3.5).

This patch overrides the default DWARF version to 4 unless explicitly
stated.

gcc/ChangeLog:

* config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Override
dwarf_version to 4.
* config/rs6000/aix72.h (SUBTARGET_OVERRIDE_OPTIONS): Same.

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

index cb250e9871cf4338d8c9626d35a343b0a1a4779c..3612ed2593b0b8f98c70510e8f8de192d7ba9013 100644 (file)
@@ -62,6 +62,9 @@ do {                                                                  \
       /* aix/ppc doesn't support -mvsx and -maltivec with Go */                \
       rs6000_isa_flags &= ~(OPTION_MASK_VSX | OPTION_MASK_ALTIVEC);    \
     }                                                                  \
+  if (!global_options_set.x_dwarf_version)                             \
+    /* AIX only supports DWARF 4.  */                                  \
+    dwarf_version = 4;                                                 \
 } while (0)
 
 #define ASM_SPEC32 "-a32"
index 8bcaca47a7b00346056db580710df87e536b4741..d34909283cc6e3aae101b3dbe6155f6a5bd5b778 100644 (file)
@@ -62,6 +62,9 @@ do {                                                                  \
       /* aix/ppc doesn't support -mvsx and -maltivec with Go */                \
       rs6000_isa_flags &= ~(OPTION_MASK_VSX | OPTION_MASK_ALTIVEC);    \
     }                                                                  \
+  if (!global_options_set.x_dwarf_version)                             \
+    /* AIX only supports DWARF 4.  */                                  \
+    dwarf_version = 4;                                                 \
 } while (0)
 
 #define ASM_SPEC32 "-a32"