summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorrobert <robert@openbsd.org>2017-07-27 20:13:43 +0000
committerrobert <robert@openbsd.org>2017-07-27 20:13:43 +0000
commitea0632d04cb1d4dc46ec11fa50e77962d7c868e4 (patch)
treeac5a3bac608a3a18e57be5e05d794b4455b5e211 /gnu/llvm/tools/clang/lib/Driver/Tools.cpp
parentAdd prototypes for prototypes for __b64_pton and __b64_ntop; pointed (diff)
downloadwireguard-openbsd-ea0632d04cb1d4dc46ec11fa50e77962d7c868e4.tar.xz
wireguard-openbsd-ea0632d04cb1d4dc46ec11fa50e77962d7c868e4.zip
push back -pie to the linker if -pie is specified to avoid an unused argument
warning ok kettenis@, deraadt@
Diffstat (limited to 'gnu/llvm/tools/clang/lib/Driver/Tools.cpp')
-rw-r--r--gnu/llvm/tools/clang/lib/Driver/Tools.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp
index 5eeb81f3039..f6926813643 100644
--- a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp
+++ b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp
@@ -8936,6 +8936,9 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
}
}
+ if (Args.hasArg(options::OPT_pie))
+ CmdArgs.push_back("-pie");
+
if (Args.hasArg(options::OPT_nopie))
CmdArgs.push_back("-nopie");