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"); } 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