r345443 - Revert "Pass the nopie flag to the linker when linking with -pg." until

Brad Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 26 18:14:23 PDT 2018


Author: brad
Date: Fri Oct 26 18:14:22 2018
New Revision: 345443

URL: http://llvm.org/viewvc/llvm-project?rev=345443&view=rev
Log:
Revert "Pass the nopie flag to the linker when linking with -pg." until
one of the tests can be fixed on !OpenBSD hosts.

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

Modified: cfe/trunk/lib/Driver/ToolChains/OpenBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/OpenBSD.cpp?rev=345443&r1=345442&r2=345443&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/OpenBSD.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/OpenBSD.cpp Fri Oct 26 18:14:22 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) || Args.hasArg(options::OPT_pg))
+  if (Args.hasArg(options::OPT_nopie))
     CmdArgs.push_back("-nopie");
 
   if (Output.isFilename()) {

Modified: cfe/trunk/test/Driver/openbsd.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/openbsd.c?rev=345443&r1=345442&r2=345443&view=diff
==============================================================================
--- cfe/trunk/test/Driver/openbsd.c (original)
+++ cfe/trunk/test/Driver/openbsd.c Fri Oct 26 18:14:22 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" "-nopie" "{{.*}}gcrt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lcompiler_rt" "-lpthread_p" "-lc_p" "-lcompiler_rt" "{{.*}}crtend.o"
+// CHECK-PG: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}gcrt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lcompiler_rt" "-lpthread_p" "-lc_p" "-lcompiler_rt" "{{.*}}crtend.o"
 
 // Check CPU type for MIPS64
 // RUN: %clang -target mips64-unknown-openbsd -### -c %s 2>&1 \
@@ -84,8 +84,6 @@
 // Check linking against correct startup code when (not) using PIE
 // RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd %s -### 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-PIE %s
-// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -pg %s -### 2>&1 \
-// RUN:   | FileCheck -check-prefix=CHECK-NOPIE %s
 // RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -pie %s -### 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-PIE-FLAG %s
 // RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -fno-pie %s -### 2>&1 \




More information about the cfe-commits mailing list