Skip to content

Commit 1a76c29

Browse files
androm3datstellar
authored andcommitted
[hexagon] Enable --eh-frame-hdr (#130225)
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: #129745 (cherry picked from commit 6657769)
1 parent ecde8c2 commit 1a76c29

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

clang/lib/Driver/ToolChains/Hexagon.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ constructHexagonLinkArgs(Compilation &C, const JobAction &JA,
313313
// handled somewhere else.
314314
Args.ClaimAllArgs(options::OPT_static_libgcc);
315315

316+
CmdArgs.push_back("--eh-frame-hdr");
316317
//----------------------------------------------------------------------------
317318
//
318319
//----------------------------------------------------------------------------

clang/test/Driver/hexagon-toolchain-elf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@
555555
// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \
556556
// RUN: -mcpu=hexagonv60 \
557557
// RUN: -fuse-ld=lld %s 2>&1 | FileCheck -check-prefix=CHECK382 %s
558+
// CHECK382: "--eh-frame-hdr
558559
// CHECK382-NOT: "-march=
559560
// CHECK382-NOT: "-mcpu=
560561
// -----------------------------------------------------------------------------

clang/test/Driver/hexagon-toolchain-linux.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
// RUN: --target=hexagon-unknown-linux-musl %s -### 2>&1 \
128128
// RUN: | FileCheck -check-prefix=CHECK011 %s
129129
// CHECK011: InstalledDir: [[INSTALLED_DIR:.+]]
130+
// CHECK011: "--eh-frame-hdr"
130131
// CHECK011: crt1.o
131132
// CHECK011-NOT: "-lunwind"
132133
// CHECK011-NOT: "-lgcc_eh"

0 commit comments

Comments
 (0)