diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2016-09-05 18:54:14 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2016-09-05 18:54:14 +0000 |
commit | f22c89db6c0d511aeff9072fc9aee2b0d7cd1129 (patch) | |
tree | a2b30630e75a264cd5a2c1bb67220b3937e1a828 /gnu/llvm | |
parent | 65db7e413da4847fc8126a25099fbee88ffaf1f5 (diff) |
libunwind relies on the EH frame header. Our OpenBSD frontend code
does not tell our linker to produce that header for statically linked
binaries. Just create that header for all binaries and we are fine.
ok guenther@
Diffstat (limited to 'gnu/llvm')
-rw-r--r-- | gnu/llvm/tools/clang/lib/Driver/Tools.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp index 3c228b1ebe2..b19cd1065de 100644 --- a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp +++ b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp @@ -7570,12 +7570,13 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("__start"); } + CmdArgs.push_back("--eh-frame-hdr"); + if (Args.hasArg(options::OPT_static)) { CmdArgs.push_back("-Bstatic"); } else { if (Args.hasArg(options::OPT_rdynamic)) CmdArgs.push_back("-export-dynamic"); - CmdArgs.push_back("--eh-frame-hdr"); CmdArgs.push_back("-Bdynamic"); if (Args.hasArg(options::OPT_shared)) { CmdArgs.push_back("-shared"); |