[llvm-branch-commits] [cfe-branch] r301083 - Merging r295614:
Brad Smith via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Apr 22 09:45:56 PDT 2017
Author: brad
Date: Sat Apr 22 11:45:56 2017
New Revision: 301083
URL: http://llvm.org/viewvc/llvm-project?rev=301083&view=rev
Log:
Merging r295614:
------------------------------------------------------------------------
r295614 | brad | 2017-02-19 15:11:48 -0500 (Sun, 19 Feb 2017) | 2 lines
Always use --eh-frame-hdr on OpenBSD, even for -static
------------------------------------------------------------------------
Modified:
cfe/branches/release_40/lib/Driver/Tools.cpp
cfe/branches/release_40/test/Driver/openbsd.c
Modified: cfe/branches/release_40/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/lib/Driver/Tools.cpp?rev=301083&r1=301082&r2=301083&view=diff
==============================================================================
--- cfe/branches/release_40/lib/Driver/Tools.cpp (original)
+++ cfe/branches/release_40/lib/Driver/Tools.cpp Sat Apr 22 11:45:56 2017
@@ -8907,12 +8907,12 @@ void openbsd::Linker::ConstructJob(Compi
CmdArgs.push_back("__start");
}
+ CmdArgs.push_back("--eh-frame-hdr");
if (Args.hasArg(options::OPT_static)) {
CmdArgs.push_back("-Bstatic");
} else {
if (Args.hasArg(options::OPT_rdynamic))
CmdArgs.push_back("-export-dynamic");
- CmdArgs.push_back("--eh-frame-hdr");
CmdArgs.push_back("-Bdynamic");
if (Args.hasArg(options::OPT_shared)) {
CmdArgs.push_back("-shared");
Modified: cfe/branches/release_40/test/Driver/openbsd.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/test/Driver/openbsd.c?rev=301083&r1=301082&r2=301083&view=diff
==============================================================================
--- cfe/branches/release_40/test/Driver/openbsd.c (original)
+++ cfe/branches/release_40/test/Driver/openbsd.c Sat Apr 22 11:45:56 2017
@@ -3,6 +3,12 @@
// CHECK-LD: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
// CHECK-LD: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "-lc" "-lgcc" "{{.*}}crtend.o"
+// Check for --eh-frame-hdr being passed with static linking
+// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -static %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-LD-STATIC-EH %s
+// CHECK-LD-STATIC-EH: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
+// CHECK-LD-STATIC-EH: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bstatic" "-o" "a.out" "{{.*}}rcrt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "-lc" "-lgcc" "{{.*}}crtend.o"
+
// 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"
More information about the llvm-branch-commits
mailing list