-
Notifications
You must be signed in to change notification settings - Fork 15.3k
release/20.x: [hexagon] Enable --eh-frame-hdr (#130225) #130678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@iajbar What do you think about merging this PR to the release branch? |
|
@llvm/pr-subscribers-backend-hexagon @llvm/pr-subscribers-clang-driver Author: None (llvmbot) ChangesBackport 6657769 Requested by: @androm3da Full diff: https://github.com/llvm/llvm-project/pull/130678.diff 3 Files Affected:
diff --git a/clang/lib/Driver/ToolChains/Hexagon.cpp b/clang/lib/Driver/ToolChains/Hexagon.cpp
index 76cedf312d68a..772a9827cb211 100644
--- a/clang/lib/Driver/ToolChains/Hexagon.cpp
+++ b/clang/lib/Driver/ToolChains/Hexagon.cpp
@@ -313,6 +313,7 @@ constructHexagonLinkArgs(Compilation &C, const JobAction &JA,
// handled somewhere else.
Args.ClaimAllArgs(options::OPT_static_libgcc);
+ CmdArgs.push_back("--eh-frame-hdr");
//----------------------------------------------------------------------------
//
//----------------------------------------------------------------------------
diff --git a/clang/test/Driver/hexagon-toolchain-elf.c b/clang/test/Driver/hexagon-toolchain-elf.c
index be812dda40d57..de2ebfeeda26c 100644
--- a/clang/test/Driver/hexagon-toolchain-elf.c
+++ b/clang/test/Driver/hexagon-toolchain-elf.c
@@ -555,6 +555,7 @@
// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \
// RUN: -mcpu=hexagonv60 \
// RUN: -fuse-ld=lld %s 2>&1 | FileCheck -check-prefix=CHECK382 %s
+// CHECK382: "--eh-frame-hdr
// CHECK382-NOT: "-march=
// CHECK382-NOT: "-mcpu=
// -----------------------------------------------------------------------------
diff --git a/clang/test/Driver/hexagon-toolchain-linux.c b/clang/test/Driver/hexagon-toolchain-linux.c
index 6f7f3b20f9141..e791353cca07f 100644
--- a/clang/test/Driver/hexagon-toolchain-linux.c
+++ b/clang/test/Driver/hexagon-toolchain-linux.c
@@ -127,6 +127,7 @@
// RUN: --target=hexagon-unknown-linux-musl %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK011 %s
// CHECK011: InstalledDir: [[INSTALLED_DIR:.+]]
+// CHECK011: "--eh-frame-hdr"
// CHECK011: crt1.o
// CHECK011-NOT: "-lunwind"
// CHECK011-NOT: "-lgcc_eh"
|
|
@iajbar can you review this cherry-pick for the compiler driver? |
The missing `PT_GNU_EH_FRAME` was causing C++ exception handling test failures in llvm-test-suite. We should unconditionally add this argument like the other drivers do. Discovered-by: Alexey Karyakin <[email protected]> Fixes: llvm#129745 (cherry picked from commit 6657769)
|
@androm3da (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR. |
Backport 6657769
Requested by: @androm3da