MaskRay created this revision. MaskRay added reviewers: PowerPC, Bdragon28, nemanjai. Herald added subscribers: cfe-commits, steven.zhang, kbarton, krytarowski, arichardson, emaste. Herald added a project: clang. MaskRay requested review of this revision.
GCC made the switch in 2018-04-10 ("rs6000: Enable -fasynchronous-unwind-tables by default"). In Clang, FreeBSD/NetBSD powerpc have already defaulted to -fasynchronous-unwind-tables. This patch defaults Generic_GCC powerpc (which affects Linux) to use -fasynchronous-unwind-tables. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D92054 Files: 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" @@ -40,7 +41,8 @@ /// 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" +// PPC64: "-munwind-tables" +// PPC64-SAME: "-mfloat-abi" "hard" // PPC64: "-m" "elf64lppc" // PPC64BE: "-m" "elf64ppc" 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/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" @@ -40,7 +41,8 @@ /// 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" +// PPC64: "-munwind-tables" +// PPC64-SAME: "-mfloat-abi" "hard" // PPC64: "-m" "elf64lppc" // PPC64BE: "-m" "elf64ppc" 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:
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits