mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
clang: Don't send extra -I flags to the linker
svn path=/nixpkgs/trunk/; revision=29883
This commit is contained in:
parent
db619f2d55
commit
1ed93241cd
45
pkgs/development/compilers/llvm/clang-ld-flags.patch
Normal file
45
pkgs/development/compilers/llvm/clang-ld-flags.patch
Normal file
@ -0,0 +1,45 @@
|
||||
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");
|
@ -47,7 +47,7 @@ stdenv.mkDerivation ({
|
||||
find
|
||||
'';
|
||||
|
||||
patches = [ ./clang-include-paths.patch ];
|
||||
patches = [ ./clang-include-paths.patch ./clang-ld-flags.patch ];
|
||||
|
||||
# Set up the header file paths
|
||||
preConfigure = ''
|
||||
|
Loading…
Reference in New Issue
Block a user