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