From 0c1aa9f11bb366066424d7a55dba68b45cb07dde Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 27 Oct 2018 01:14:22 +0000 Subject: [PATCH] Revert "Pass the nopie flag to the linker when linking with -pg." until one of the tests can be fixed on !OpenBSD hosts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345443 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/ToolChains/OpenBSD.cpp | 2 +- test/Driver/openbsd.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Driver/ToolChains/OpenBSD.cpp b/lib/Driver/ToolChains/OpenBSD.cpp index 3d35d37b7d..018076ab19 100644 --- a/lib/Driver/ToolChains/OpenBSD.cpp +++ b/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) || Args.hasArg(options::OPT_pg)) + if (Args.hasArg(options::OPT_nopie)) CmdArgs.push_back("-nopie"); if (Output.isFilename()) { diff --git a/test/Driver/openbsd.c b/test/Driver/openbsd.c index 1307007626..1ea1f58dfc 100644 --- a/test/Driver/openbsd.c +++ b/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" "-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 \ -- 2.50.1