Author: hans Date: Wed Aug 2 10:42:08 2017 New Revision: 309844 URL: http://llvm.org/viewvc/llvm-project?rev=309844&view=rev Log: Merging r309523: ------------------------------------------------------------------------ r309523 | brad | 2017-07-30 14:13:59 -0700 (Sun, 30 Jul 2017) | 2 lines
Also pass -pie back to the linker when linking on OpenBSD. ------------------------------------------------------------------------ Modified: cfe/branches/release_50/ (props changed) cfe/branches/release_50/lib/Driver/ToolChains/OpenBSD.cpp cfe/branches/release_50/test/Driver/openbsd.c Propchange: cfe/branches/release_50/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Aug 2 10:42:08 2017 @@ -1,4 +1,4 @@ /cfe/branches/type-system-rewrite:134693-134817 -/cfe/trunk:308455,308824,308897,309058,309112-309113,309226,309327,309382-309383,309488,309503,309722,309752 +/cfe/trunk:308455,308824,308897,309058,309112-309113,309226,309327,309382-309383,309488,309503,309523,309722,309752 /cfe/trunk/test:170344 /cfe/trunk/test/SemaTemplate:126920 Modified: cfe/branches/release_50/lib/Driver/ToolChains/OpenBSD.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/lib/Driver/ToolChains/OpenBSD.cpp?rev=309844&r1=309843&r2=309844&view=diff ============================================================================== --- cfe/branches/release_50/lib/Driver/ToolChains/OpenBSD.cpp (original) +++ cfe/branches/release_50/lib/Driver/ToolChains/OpenBSD.cpp Wed Aug 2 10:42:08 2017 @@ -133,6 +133,8 @@ void openbsd::Linker::ConstructJob(Compi } } + if (Args.hasArg(options::OPT_pie)) + CmdArgs.push_back("-pie"); if (Args.hasArg(options::OPT_nopie)) CmdArgs.push_back("-nopie"); Modified: cfe/branches/release_50/test/Driver/openbsd.c URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/test/Driver/openbsd.c?rev=309844&r1=309843&r2=309844&view=diff ============================================================================== --- cfe/branches/release_50/test/Driver/openbsd.c (original) +++ cfe/branches/release_50/test/Driver/openbsd.c Wed Aug 2 10:42:08 2017 @@ -77,7 +77,9 @@ // 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 %s -fno-pie %s -### 2>&1 \ +// 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 \ // RUN: | FileCheck -check-prefix=CHECK-PIE %s // RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -static %s -### 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-STATIC-PIE %s @@ -93,6 +95,7 @@ // RUN: | FileCheck -check-prefix=CHECK-NOPIE %s // CHECK-PIE: "{{.*}}crt0.o" // CHECK-PIE-NOT: "-nopie" +// CHECK-PIE-FLAG: "-pie" // CHECK-STATIC-PIE: "{{.*}}rcrt0.o" // CHECK-STATIC-PIE-NOT: "-nopie" // CHECK-NOPIE: "-nopie" "{{.*}}crt0.o" _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits