[PATCH] D55878: [Driver] Use --hash-style=gnu instead of both on FreeBSD
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 19 10:04:51 PST 2018
MaskRay updated this revision to Diff 178908.
MaskRay edited the summary of this revision.
MaskRay added a comment.
Bring back MIPS special case
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55878/new/
https://reviews.llvm.org/D55878
Files:
lib/Driver/ToolChains/FreeBSD.cpp
test/Driver/freebsd.c
Index: test/Driver/freebsd.c
===================================================================
--- test/Driver/freebsd.c
+++ test/Driver/freebsd.c
@@ -73,9 +73,9 @@
// RUN: %clang -no-canonical-prefixes -target x86_64-pc-freebsd10.0 -m32 %s \
// RUN: --sysroot=%S/Inputs/multiarch_freebsd64_tree -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LDFLAGS9 %s
-// CHECK-LDFLAGS8-NOT: --hash-style=both
+// CHECK-LDFLAGS8-NOT: --hash-style=gnu
// CHECK-LDFLAGS8: --enable-new-dtags
-// CHECK-LDFLAGS9: --hash-style=both
+// CHECK-LDFLAGS9: --hash-style=gnu
// CHECK-LDFLAGS9: --enable-new-dtags
//
// Check that we do not pass --hash-style=gnu and --hash-style=both to linker
Index: lib/Driver/ToolChains/FreeBSD.cpp
===================================================================
--- lib/Driver/ToolChains/FreeBSD.cpp
+++ lib/Driver/ToolChains/FreeBSD.cpp
@@ -156,12 +156,9 @@
CmdArgs.push_back("-dynamic-linker");
CmdArgs.push_back("/libexec/ld-elf.so.1");
}
- if (ToolChain.getTriple().getOSMajorVersion() >= 9) {
- if (Arch == llvm::Triple::arm || Arch == llvm::Triple::sparc ||
- Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64) {
- CmdArgs.push_back("--hash-style=both");
- }
- }
+ if (ToolChain.getTriple().getOSMajorVersion() >= 9 &&
+ !ToolChain.getTriple().isMIPS())
+ CmdArgs.push_back("--hash-style=gnu");
CmdArgs.push_back("--enable-new-dtags");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55878.178908.patch
Type: text/x-patch
Size: 1464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181219/917e9548/attachment.bin>
More information about the cfe-commits
mailing list