summaryrefslogtreecommitdiffstats
path: root/contrib/llvm
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2016-07-22 01:16:56 +0000
committeremaste <emaste@FreeBSD.org>2016-07-22 01:16:56 +0000
commita815cdb9d2deffe7fe686db30a11b52957d6328b (patch)
treeab11e7bef2a8d76cf9d7602b022beb625b75d719 /contrib/llvm
parent5aa045f55578c73f64456b65bede7858f8c3949b (diff)
downloadFreeBSD-src-a815cdb9d2deffe7fe686db30a11b52957d6328b.zip
FreeBSD-src-a815cdb9d2deffe7fe686db30a11b52957d6328b.tar.gz
MFC r303031: clang++: Always use --eh-frame-hdr on FreeBSD, even for -static
FreeBSD uses LLVM's libunwind on FreeBSD/arm64 today (and we expect to use it more widely in the future) and it requires the EH frame segment in static binaries.
Diffstat (limited to 'contrib/llvm')
-rw-r--r--contrib/llvm/tools/clang/lib/Driver/Tools.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
index 86d046b..d077654 100644
--- a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
+++ b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
@@ -5848,12 +5848,12 @@ void freebsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
if (Args.hasArg(options::OPT_pie))
CmdArgs.push_back("-pie");
+ 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");
if (Args.hasArg(options::OPT_shared)) {
CmdArgs.push_back("-Bshareable");
} else {
OpenPOWER on IntegriCloud