]> git.pld-linux.org Git - packages/llvm.git/blame - llvm-config.patch
- updated to 3.5.1
[packages/llvm.git] / llvm-config.patch
CommitLineData
b883cf1e
JB
1--- llvm-3.5.0.src/tools/llvm-config/llvm-config.cpp.orig 2014-03-29 02:08:53.000000000 +0100
2+++ llvm-3.5.0.src/tools/llvm-config/llvm-config.cpp 2014-10-01 20:43:44.679547719 +0200
3@@ -247,12 +247,12 @@
ebde279d
JB
4 break;
5 case CMakeStyle:
6 ActiveBinDir = ActiveObjRoot + "/bin";
7- ActiveLibDir = ActiveObjRoot + "/lib";
8+ ActiveLibDir = LLVM_LIBDIR;
9 break;
10 case CMakeBuildModeStyle:
b883cf1e
JB
11 ActivePrefix = ActiveObjRoot;
12 ActiveBinDir = ActiveObjRoot + "/bin/" + build_mode;
13- ActiveLibDir = ActiveObjRoot + "/lib/" + build_mode;
14+ ActiveLibDir = std::string(LLVM_LIBDIR "/") + build_mode;
ebde279d
JB
15 break;
16 }
17
b883cf1e 18@@ -263,7 +263,7 @@
ebde279d
JB
19 ActivePrefix = CurrentExecPrefix;
20 ActiveIncludeDir = ActivePrefix + "/include";
21 ActiveBinDir = ActivePrefix + "/bin";
22- ActiveLibDir = ActivePrefix + "/lib";
23+ ActiveLibDir = LLVM_LIBDIR;
24 ActiveIncludeOption = "-I" + ActiveIncludeDir;
25 }
26
11b6f380
JB
27--- llvm-3.4.1.src/autoconf/configure.ac.orig 2014-05-21 18:37:05.321379360 +0200
28+++ llvm-3.4.1.src/autoconf/configure.ac 2014-05-21 18:40:49.568041358 +0200
29@@ -1813,8 +1813,9 @@
ebde279d
JB
30 eval LLVM_DOCSDIR="${prefix}/share/doc/llvm";
31 eval LLVM_ETCDIR="${prefix}/etc/llvm";
32 eval LLVM_INCLUDEDIR="${prefix}/include";
33-eval LLVM_INFODIR="${prefix}/info";
34-eval LLVM_MANDIR="${prefix}/man";
35+eval LLVM_INFODIR="${datadir}/info";
36+eval LLVM_MANDIR="${datadir}/man";
11b6f380 37+eval LLVM_LIBDIR="${libdir}";
ebde279d
JB
38 LLVM_CONFIGTIME=`date`
39 AC_SUBST(LLVM_PREFIX)
40 AC_SUBST(LLVM_BINDIR)
11b6f380
JB
41@@ -1824,6 +1825,7 @@
42 AC_SUBST(LLVM_INCLUDEDIR)
43 AC_SUBST(LLVM_INFODIR)
44 AC_SUBST(LLVM_MANDIR)
45+AC_SUBST(LLVM_LIBDIR)
46 AC_SUBST(LLVM_CONFIGTIME)
47
48 dnl Disable embedding timestamps in the build directory, with ENABLE_TIMESTAMPS.
49@@ -1851,6 +1851,8 @@
50 [Installation directory for .info files])
51 AC_DEFINE_UNQUOTED(LLVM_MANDIR, "$LLVM_MANDIR",
52 [Installation directory for man pages])
53+AC_DEFINE_UNQUOTED(LLVM_LIBDIR, "$LLVM_LIBDIR",
54+ [Installation directory for libraries])
55 AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME",
56 [Time at which LLVM was configured])
57 AC_DEFINE_UNQUOTED(LLVM_HOST_TRIPLE, "$host",
b883cf1e
JB
58--- llvm-3.5.0.src/tools/clang/lib/Driver/ToolChains.cpp.orig 2014-08-27 22:07:31.000000000 +0200
59+++ llvm-3.5.0.src/tools/clang/lib/Driver/ToolChains.cpp 2014-10-01 20:56:40.312848502 +0200
60@@ -2999,19 +2999,6 @@
11b6f380
JB
61 return Triple.isArch32Bit() ? "lib" : "lib64";
62 }
63
b883cf1e 64- // It happens that only x86 and PPC use the 'lib32' variant of oslibdir, and
11b6f380
JB
65- // using that variant while targeting other architectures causes problems
66- // because the libraries are laid out in shared system roots that can't cope
b883cf1e 67- // with a 'lib32' library search path being considered. So we only enable
11b6f380
JB
68- // them when we know we may need it.
69- //
70- // FIXME: This is a bit of a hack. We should really unify this code for
b883cf1e 71- // reasoning about oslibdir spellings with the lib dir spellings in the
11b6f380
JB
72- // GCCInstallationDetector, but that is a more significant refactoring.
73- if (Triple.getArch() == llvm::Triple::x86 ||
74- Triple.getArch() == llvm::Triple::ppc)
75- return "lib32";
76-
b883cf1e
JB
77 if (Triple.getArch() == llvm::Triple::x86_64 &&
78 Triple.getEnvironment() == llvm::Triple::GNUX32)
79 return "libx32";
80@@ -3160,7 +3147,7 @@
11b6f380 81 // Try walking via the GCC triple path in case of biarch or multiarch GCC
3a1d4bb3 82 // installations with strange symlinks.
11b6f380 83 if (GCCInstallation.isValid()) {
3a1d4bb3 84- addPathIfExists(SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() +
b883cf1e
JB
85+ addPathIfExists(SysRoot + "/usr/" + OSLibDir + "/" + GCCInstallation.getTriple().str() +
86 "/../../" + OSLibDir, Paths);
87
88 // Add the 'other' biarch variant path
89@@ -3190,10 +3177,10 @@
90 // FIXME: It's not clear whether we should use the driver's installed
91 // directory ('Dir' below) or the ResourceDir.
92 if (StringRef(D.Dir).startswith(SysRoot))
93- addPathIfExists(D.Dir + "/../lib", Paths);
94+ addPathIfExists(D.Dir + "/../" + OSLibDir, Paths);
3a1d4bb3 95
11b6f380 96- addPathIfExists(SysRoot + "/lib", Paths);
3a1d4bb3 97- addPathIfExists(SysRoot + "/usr/lib", Paths);
b883cf1e
JB
98+ addPathIfExists(SysRoot + "/" + OSLibDir, Paths);
99+ addPathIfExists(SysRoot + "/usr/" + OSLibDir, Paths);
c999855f 100 }
11b6f380 101
b883cf1e
JB
102 bool Linux::HasNativeLLVMSupport() const {
103--- llvm-3.5.0.src/tools/clang/lib/Driver/Tools.cpp.orig 2014-08-07 06:51:51.000000000 +0200
104+++ llvm-3.5.0.src/tools/clang/lib/Driver/Tools.cpp 2014-10-01 21:04:32.002828710 +0200
11b6f380
JB
105@@ -26,6 +26,7 @@
106 #include "llvm/ADT/StringExtras.h"
107 #include "llvm/ADT/StringSwitch.h"
108 #include "llvm/ADT/Twine.h"
109+#include "llvm/Config/config.h"
110 #include "llvm/Option/Arg.h"
111 #include "llvm/Option/ArgList.h"
112 #include "llvm/Option/Option.h"
b883cf1e
JB
113@@ -1425,7 +1426,7 @@
114 // as gold requires -plugin to come before any -plugin-opt that -Wl might
115 // forward.
116 CmdArgs.push_back("-plugin");
117- std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so";
118+ std::string Plugin = LLVM_LIBDIR "/LLVMgold.so";
119 CmdArgs.push_back(Args.MakeArgString(Plugin));
120
121 // Try to pass driver level flags relevant to LTO code generation down to
122@@ -2037,12 +2038,7 @@
3a1d4bb3 123
b883cf1e
JB
124 static SmallString<128> getCompilerRTLibDir(const ToolChain &TC) {
125 // The runtimes are located in the OS-specific resource directory.
126- SmallString<128> Res(TC.getDriver().ResourceDir);
127- const llvm::Triple &Triple = TC.getTriple();
128- // TC.getOS() yield "freebsd10.0" whereas "freebsd" is expected.
129- StringRef OSLibName = (Triple.getOS() == llvm::Triple::FreeBSD) ?
130- "freebsd" : TC.getOS();
131- llvm::sys::path::append(Res, "lib", OSLibName);
132+ SmallString<128> Res(LLVM_LIBDIR);
133 return Res;
3a1d4bb3 134 }
b883cf1e
JB
135
136@@ -5899,9 +5895,9 @@
3a1d4bb3
JB
137 const ArgList &Args,
138 const char *LinkingOutput) const {
139 // FIXME: Find a real GCC, don't hard-code versions here
140- std::string GCCLibPath = "/usr/gcc/4.5/lib/gcc/";
141+ std::string GCCLibPath = LLVM_LIBDIR "/gcc/";
142 const llvm::Triple &T = getToolChain().getTriple();
143- std::string LibPath = "/usr/lib/";
144+ std::string LibPath = LLVM_LIBDIR "/";
145 llvm::Triple::ArchType Arch = T.getArch();
146 switch (Arch) {
b883cf1e 147 case llvm::Triple::x86:
d756c460
JB
148--- llvm-3.5.0.src/tools/clang/runtime/compiler-rt/Makefile.orig 2014-05-22 23:13:30.000000000 +0200
149+++ llvm-3.5.0.src/tools/clang/runtime/compiler-rt/Makefile 2014-10-18 22:10:17.008329250 +0200
150@@ -20,7 +20,7 @@
151 $(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
152
153 ResourceDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION)
154-PROJ_resources := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)
155+PROJ_resources := $(DESTDIR)$(PROJ_libdir)/clang/$(CLANG_VERSION)
156
157 ResourceLibDir := $(ResourceDir)/lib
158 ResourceIncludeDir := $(ResourceDir)/include
This page took 0.078812 seconds and 4 git commands to generate.