nixpkgs/pkgs/development/compilers/llvm/clang-ld-flags.patch
Shea Levy 1ed93241cd clang: Don't send extra -I flags to the linker
svn path=/nixpkgs/trunk/; revision=29883
2011-10-19 04:14:55 +00:00

46 lines
1.5 KiB
Diff

diff -Naur a/tools/clang/lib/Driver/ToolChains.cpp b/tools/clang/lib/Driver/ToolChains.cpp
--- a/tools/clang/lib/Driver/ToolChains.cpp 2011-03-21 17:29:27.000000000 -0400
+++ b/tools/clang/lib/Driver/ToolChains.cpp 2011-10-18 19:43:48.999590771 -0400
@@ -1482,12 +1482,9 @@
Lib = Lib64;
}
- llvm::sys::Path LinkerPath(Base + "/../../../../" + GccTriple + "/bin/ld");
- if (!llvm::sys::fs::exists(LinkerPath.str(), Exists) && Exists)
- Linker = LinkerPath.str();
- else
- Linker = GetProgramPath("ld");
+ Linker = GetProgramPath("ld");
+#if 0
LinuxDistro Distro = DetectLinuxDistro(Arch);
if (IsUbuntu(Distro)) {
@@ -1531,6 +1528,7 @@
Paths.push_back(Base + "/../../..");
if (Arch == getArch() && IsUbuntu(Distro))
Paths.push_back("/usr/lib/" + GccTriple);
+#endif
}
bool Linux::HasNativeLLVMSupport() const {
diff -Naur a/tools/clang/lib/Driver/Tools.cpp b/tools/clang/lib/Driver/Tools.cpp
--- a/tools/clang/lib/Driver/Tools.cpp 2011-03-06 18:31:01.000000000 -0500
+++ b/tools/clang/lib/Driver/Tools.cpp 2011-10-18 18:44:00.799604267 -0400
@@ -3619,6 +3619,7 @@
ToolChain.getArch() == llvm::Triple::thumb ||
(!Args.hasArg(options::OPT_static) &&
!Args.hasArg(options::OPT_shared))) {
+#if 0
CmdArgs.push_back("-dynamic-linker");
if (ToolChain.getArch() == llvm::Triple::x86)
CmdArgs.push_back("/lib/ld-linux.so.2");
@@ -3627,6 +3628,7 @@
CmdArgs.push_back("/lib/ld-linux.so.3");
else
CmdArgs.push_back("/lib64/ld-linux-x86-64.so.2");
+#endif
}
CmdArgs.push_back("-o");