diff options
author | Tom Stellard <tstellar@redhat.com> | 2018-12-05 19:48:58 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2018-12-05 19:48:58 +0000 |
commit | b1c89d22f9870e78b89910cbc176cba1db0f086e (patch) | |
tree | 34ff84bce3a73a0abf7a65f5befeabd73cd6feed | |
parent | d363502dcdf5a04d562c36ec48a1a0f9f7e4f9b9 (diff) | |
download | llvm-b1c89d22f9870e78b89910cbc176cba1db0f086e.zip llvm-b1c89d22f9870e78b89910cbc176cba1db0f086e.tar.gz llvm-b1c89d22f9870e78b89910cbc176cba1db0f086e.tar.bz2 |
Merging r345470:
------------------------------------------------------------------------
r345470 | brad | 2018-10-27 20:30:18 -0700 (Sat, 27 Oct 2018) | 2 lines
Reapply Pass the nopie flag to the linker when linking with -pg.
------------------------------------------------------------------------
llvm-svn: 348405
-rw-r--r-- | clang/lib/Driver/ToolChains/OpenBSD.cpp | 2 | ||||
-rw-r--r-- | clang/test/Driver/openbsd.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Driver/ToolChains/OpenBSD.cpp b/clang/lib/Driver/ToolChains/OpenBSD.cpp index 7b98cd6..432f607 100644 --- a/clang/lib/Driver/ToolChains/OpenBSD.cpp +++ b/clang/lib/Driver/ToolChains/OpenBSD.cpp @@ -138,7 +138,7 @@ 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)) + if (Args.hasArg(options::OPT_nopie) || Args.hasArg(options::OPT_pg)) CmdArgs.push_back("-nopie"); if (Output.isFilename()) { diff --git a/clang/test/Driver/openbsd.c b/clang/test/Driver/openbsd.c index 4aafa2f..16621b0 100644 --- a/clang/test/Driver/openbsd.c +++ b/clang/test/Driver/openbsd.c @@ -12,7 +12,7 @@ // RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -pg -pthread %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-PG %s // CHECK-PG: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd" -// CHECK-PG: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}gcrt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "-lpthread_p" "-lc_p" "-lgcc" "{{.*}}crtend.o" +// CHECK-PG: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-nopie" "-o" "a.out" "{{.*}}gcrt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "-lpthread_p" "-lc_p" "-lgcc" "{{.*}}crtend.o" // Check CPU type for MIPS64 // RUN: %clang -target mips64-unknown-openbsd -### -c %s 2>&1 \ |