diff options
| author | 2018-06-07 05:31:32 +0000 | |
|---|---|---|
| committer | 2018-06-07 05:31:32 +0000 | |
| commit | b7b6fcadff3cdae69a0e7ea0aee103cd0db0176e (patch) | |
| tree | 2f57e52fe2d082ca1360ff2492dfe2fa2a1deb39 | |
| parent | permitlisten/PermitListen unit test from Markus (diff) | |
| download | wireguard-openbsd-b7b6fcadff3cdae69a0e7ea0aee103cd0db0176e.tar.xz wireguard-openbsd-b7b6fcadff3cdae69a0e7ea0aee103cd0db0176e.zip | |
Pass -nopie to the linker when -pg is specified to make the
profiler(gprof) work properly.
ok mpi
| -rw-r--r-- | gnu/llvm/tools/clang/lib/Driver/ToolChains/OpenBSD.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gnu/llvm/tools/clang/lib/Driver/ToolChains/OpenBSD.cpp b/gnu/llvm/tools/clang/lib/Driver/ToolChains/OpenBSD.cpp index d85d4e97e8f..ca8321c2474 100644 --- a/gnu/llvm/tools/clang/lib/Driver/ToolChains/OpenBSD.cpp +++ b/gnu/llvm/tools/clang/lib/Driver/ToolChains/OpenBSD.cpp @@ -149,10 +149,11 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { if (!Args.hasArg(options::OPT_shared)) { - if (Args.hasArg(options::OPT_pg)) + if (Args.hasArg(options::OPT_pg)) { + CmdArgs.push_back("-nopie"); CmdArgs.push_back( Args.MakeArgString(getToolChain().GetFilePath("gcrt0.o"))); - else if (Args.hasArg(options::OPT_static) && + } else if (Args.hasArg(options::OPT_static) && !Args.hasArg(options::OPT_nopie)) CmdArgs.push_back( Args.MakeArgString(getToolChain().GetFilePath("rcrt0.o"))); |
