[PATCH] D92054: [Driver] Default Generic_GCC ppc/ppc64/ppc64le to -fasynchronous-unwind-tables

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 21 15:32:51 PST 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6bbb04a732cd: [Driver] Default Generic_GCC ppc/ppc64/ppc64le to -fasynchronous-unwind-tables (authored by MaskRay).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92054/new/

https://reviews.llvm.org/D92054

Files:
  clang/docs/ReleaseNotes.rst
  clang/lib/Driver/ToolChains/Gnu.cpp
  clang/test/Driver/ppc-features.cpp


Index: clang/test/Driver/ppc-features.cpp
===================================================================
--- clang/test/Driver/ppc-features.cpp
+++ clang/test/Driver/ppc-features.cpp
@@ -1,6 +1,7 @@
 /// Check default CC1 and linker options for ppc32.
 // RUN: %clang -### -target powerpc-unknown-linux-gnu %s 2>&1 | FileCheck --check-prefix=PPC32 %s
-// PPC32: "-mfloat-abi" "hard"
+// PPC32:      "-munwind-tables"
+// PPC32-SAME: "-mfloat-abi" "hard"
 
 // PPC32: "-m" "elf32ppclinux"
 
@@ -38,11 +39,12 @@
 
 
 /// Check default CC1 and linker options for ppc64.
-// RUN: %clang -### -target powerpc64le-unknown-linux-gnu %s 2>&1 | FileCheck --check-prefix=PPC64 %s
-// RUN: %clang -### -target powerpc64-unknown-linux-gnu %s 2>&1 | FileCheck -check-prefix=PPC64BE %s
-// PPC64: "-mfloat-abi" "hard"
+// RUN: %clang -### -target powerpc64le-unknown-linux-gnu %s 2>&1 | FileCheck --check-prefixes=PPC64,PPC64LE %s
+// RUN: %clang -### -target powerpc64-unknown-linux-gnu %s 2>&1 | FileCheck --check-prefixes=PPC64,PPC64BE %s
+// PPC64:      "-munwind-tables"
+// PPC64-SAME: "-mfloat-abi" "hard"
 
-// PPC64: "-m" "elf64lppc"
+// PPC64LE: "-m" "elf64lppc"
 // PPC64BE: "-m" "elf64ppc"
 
 // check -msoft-float option for ppc64
Index: clang/lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Gnu.cpp
+++ clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2674,6 +2674,9 @@
 bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const {
   switch (getArch()) {
   case llvm::Triple::aarch64:
+  case llvm::Triple::ppc:
+  case llvm::Triple::ppc64:
+  case llvm::Triple::ppc64le:
   case llvm::Triple::x86_64:
     return true;
   default:
Index: clang/docs/ReleaseNotes.rst
===================================================================
--- clang/docs/ReleaseNotes.rst
+++ clang/docs/ReleaseNotes.rst
@@ -118,6 +118,10 @@
   `-fno-delete-null-pointer-checks` has gained the power to remove the
   `nonnull` attribute on `this` for configurations that need it to be nullable.
 - ``-gsplit-dwarf`` no longer implies ``-g2``.
+- ``-fasynchronous-unwind-tables`` is now the default on Linux AArch64/PowerPC.
+  This behavior matches newer GCC.
+  (`D91760 <https://reviews.llvm.org/D91760>`_)
+  (`D92054 <https://reviews.llvm.org/D92054>`_)
 
 Removed Compiler Flags
 -------------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92054.313209.patch
Type: text/x-patch
Size: 2377 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201221/2b7b78d7/attachment.bin>


More information about the cfe-commits mailing list