[llvm-branch-commits] [cfe-branch] r348405 - Merging r345470:

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Dec 5 11:48:58 PST 2018


Author: tstellar
Date: Wed Dec  5 11:48:58 2018
New Revision: 348405

URL: http://llvm.org/viewvc/llvm-project?rev=348405&view=rev
Log:
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.

------------------------------------------------------------------------

Modified:
    cfe/branches/release_70/lib/Driver/ToolChains/OpenBSD.cpp
    cfe/branches/release_70/test/Driver/openbsd.c

Modified: cfe/branches/release_70/lib/Driver/ToolChains/OpenBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_70/lib/Driver/ToolChains/OpenBSD.cpp?rev=348405&r1=348404&r2=348405&view=diff
==============================================================================
--- cfe/branches/release_70/lib/Driver/ToolChains/OpenBSD.cpp (original)
+++ cfe/branches/release_70/lib/Driver/ToolChains/OpenBSD.cpp Wed Dec  5 11:48:58 2018
@@ -138,7 +138,7 @@ void openbsd::Linker::ConstructJob(Compi
 
   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()) {

Modified: cfe/branches/release_70/test/Driver/openbsd.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_70/test/Driver/openbsd.c?rev=348405&r1=348404&r2=348405&view=diff
==============================================================================
--- cfe/branches/release_70/test/Driver/openbsd.c (original)
+++ cfe/branches/release_70/test/Driver/openbsd.c Wed Dec  5 11:48:58 2018
@@ -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 \




More information about the llvm-branch-commits mailing list