X-Git-Url: https://git.tld-linux.org/?p=packages%2Fllvm.git;a=blobdiff_plain;f=llvm-config.patch;fp=llvm-config.patch;h=0000000000000000000000000000000000000000;hp=87c331ce8ce4f74fbe6a0656ef5e94b7ebcf3dff;hb=9444547a02350424e740b4ca65361b05fe0b2b7c;hpb=656dad7958424646715fdc78658078a516c49ae3 diff --git a/llvm-config.patch b/llvm-config.patch deleted file mode 100644 index 87c331c..0000000 --- a/llvm-config.patch +++ /dev/null @@ -1,158 +0,0 @@ ---- llvm-3.5.0.src/tools/llvm-config/llvm-config.cpp.orig 2014-03-29 02:08:53.000000000 +0100 -+++ llvm-3.5.0.src/tools/llvm-config/llvm-config.cpp 2014-10-01 20:43:44.679547719 +0200 -@@ -247,12 +247,12 @@ - break; - case CMakeStyle: - ActiveBinDir = ActiveObjRoot + "/bin"; -- ActiveLibDir = ActiveObjRoot + "/lib"; -+ ActiveLibDir = LLVM_LIBDIR; - break; - case CMakeBuildModeStyle: - ActivePrefix = ActiveObjRoot; - ActiveBinDir = ActiveObjRoot + "/bin/" + build_mode; -- ActiveLibDir = ActiveObjRoot + "/lib/" + build_mode; -+ ActiveLibDir = std::string(LLVM_LIBDIR "/") + build_mode; - break; - } - -@@ -263,7 +263,7 @@ - ActivePrefix = CurrentExecPrefix; - ActiveIncludeDir = ActivePrefix + "/include"; - ActiveBinDir = ActivePrefix + "/bin"; -- ActiveLibDir = ActivePrefix + "/lib"; -+ ActiveLibDir = LLVM_LIBDIR; - ActiveIncludeOption = "-I" + ActiveIncludeDir; - } - ---- llvm-3.4.1.src/autoconf/configure.ac.orig 2014-05-21 18:37:05.321379360 +0200 -+++ llvm-3.4.1.src/autoconf/configure.ac 2014-05-21 18:40:49.568041358 +0200 -@@ -1813,8 +1813,9 @@ - eval LLVM_DOCSDIR="${prefix}/share/doc/llvm"; - eval LLVM_ETCDIR="${prefix}/etc/llvm"; - eval LLVM_INCLUDEDIR="${prefix}/include"; --eval LLVM_INFODIR="${prefix}/info"; --eval LLVM_MANDIR="${prefix}/man"; -+eval LLVM_INFODIR="${datadir}/info"; -+eval LLVM_MANDIR="${datadir}/man"; -+eval LLVM_LIBDIR="${libdir}"; - LLVM_CONFIGTIME=`date` - AC_SUBST(LLVM_PREFIX) - AC_SUBST(LLVM_BINDIR) -@@ -1824,6 +1825,7 @@ - AC_SUBST(LLVM_INCLUDEDIR) - AC_SUBST(LLVM_INFODIR) - AC_SUBST(LLVM_MANDIR) -+AC_SUBST(LLVM_LIBDIR) - AC_SUBST(LLVM_CONFIGTIME) - - dnl Disable embedding timestamps in the build directory, with ENABLE_TIMESTAMPS. -@@ -1851,6 +1851,8 @@ - [Installation directory for .info files]) - AC_DEFINE_UNQUOTED(LLVM_MANDIR, "$LLVM_MANDIR", - [Installation directory for man pages]) -+AC_DEFINE_UNQUOTED(LLVM_LIBDIR, "$LLVM_LIBDIR", -+ [Installation directory for libraries]) - AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME", - [Time at which LLVM was configured]) - AC_DEFINE_UNQUOTED(LLVM_HOST_TRIPLE, "$host", ---- llvm-3.5.0.src/tools/clang/lib/Driver/ToolChains.cpp.orig 2014-08-27 22:07:31.000000000 +0200 -+++ llvm-3.5.0.src/tools/clang/lib/Driver/ToolChains.cpp 2014-10-01 20:56:40.312848502 +0200 -@@ -2999,19 +2999,6 @@ - return Triple.isArch32Bit() ? "lib" : "lib64"; - } - -- // It happens that only x86 and PPC use the 'lib32' variant of oslibdir, and -- // using that variant while targeting other architectures causes problems -- // because the libraries are laid out in shared system roots that can't cope -- // with a 'lib32' library search path being considered. So we only enable -- // them when we know we may need it. -- // -- // FIXME: This is a bit of a hack. We should really unify this code for -- // reasoning about oslibdir spellings with the lib dir spellings in the -- // GCCInstallationDetector, but that is a more significant refactoring. -- if (Triple.getArch() == llvm::Triple::x86 || -- Triple.getArch() == llvm::Triple::ppc) -- return "lib32"; -- - if (Triple.getArch() == llvm::Triple::x86_64 && - Triple.getEnvironment() == llvm::Triple::GNUX32) - return "libx32"; -@@ -3160,7 +3147,7 @@ - // Try walking via the GCC triple path in case of biarch or multiarch GCC - // installations with strange symlinks. - if (GCCInstallation.isValid()) { -- addPathIfExists(SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() + -+ addPathIfExists(SysRoot + "/usr/" + OSLibDir + "/" + GCCInstallation.getTriple().str() + - "/../../" + OSLibDir, Paths); - - // Add the 'other' biarch variant path -@@ -3190,10 +3177,10 @@ - // FIXME: It's not clear whether we should use the driver's installed - // directory ('Dir' below) or the ResourceDir. - if (StringRef(D.Dir).startswith(SysRoot)) -- addPathIfExists(D.Dir + "/../lib", Paths); -+ addPathIfExists(D.Dir + "/../" + OSLibDir, Paths); - -- addPathIfExists(SysRoot + "/lib", Paths); -- addPathIfExists(SysRoot + "/usr/lib", Paths); -+ addPathIfExists(SysRoot + "/" + OSLibDir, Paths); -+ addPathIfExists(SysRoot + "/usr/" + OSLibDir, Paths); - } - - bool Linux::HasNativeLLVMSupport() const { ---- llvm-3.5.0.src/tools/clang/lib/Driver/Tools.cpp.orig 2014-08-07 06:51:51.000000000 +0200 -+++ llvm-3.5.0.src/tools/clang/lib/Driver/Tools.cpp 2014-10-01 21:04:32.002828710 +0200 -@@ -26,6 +26,7 @@ - #include "llvm/ADT/StringExtras.h" - #include "llvm/ADT/StringSwitch.h" - #include "llvm/ADT/Twine.h" -+#include "llvm/Config/config.h" - #include "llvm/Option/Arg.h" - #include "llvm/Option/ArgList.h" - #include "llvm/Option/Option.h" -@@ -1425,7 +1426,7 @@ - // as gold requires -plugin to come before any -plugin-opt that -Wl might - // forward. - CmdArgs.push_back("-plugin"); -- std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so"; -+ std::string Plugin = LLVM_LIBDIR "/LLVMgold.so"; - CmdArgs.push_back(Args.MakeArgString(Plugin)); - - // Try to pass driver level flags relevant to LTO code generation down to -@@ -2037,12 +2038,7 @@ - - static SmallString<128> getCompilerRTLibDir(const ToolChain &TC) { - // The runtimes are located in the OS-specific resource directory. -- SmallString<128> Res(TC.getDriver().ResourceDir); -- const llvm::Triple &Triple = TC.getTriple(); -- // TC.getOS() yield "freebsd10.0" whereas "freebsd" is expected. -- StringRef OSLibName = (Triple.getOS() == llvm::Triple::FreeBSD) ? -- "freebsd" : TC.getOS(); -- llvm::sys::path::append(Res, "lib", OSLibName); -+ SmallString<128> Res(LLVM_LIBDIR); - return Res; - } - -@@ -5899,9 +5895,9 @@ - const ArgList &Args, - const char *LinkingOutput) const { - // FIXME: Find a real GCC, don't hard-code versions here -- std::string GCCLibPath = "/usr/gcc/4.5/lib/gcc/"; -+ std::string GCCLibPath = LLVM_LIBDIR "/gcc/"; - const llvm::Triple &T = getToolChain().getTriple(); -- std::string LibPath = "/usr/lib/"; -+ std::string LibPath = LLVM_LIBDIR "/"; - llvm::Triple::ArchType Arch = T.getArch(); - switch (Arch) { - case llvm::Triple::x86: ---- llvm-3.5.0.src/tools/clang/runtime/compiler-rt/Makefile.orig 2014-05-22 23:13:30.000000000 +0200 -+++ llvm-3.5.0.src/tools/clang/runtime/compiler-rt/Makefile 2014-10-18 22:10:17.008329250 +0200 -@@ -20,7 +20,7 @@ - $(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc)) - - ResourceDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION) --PROJ_resources := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION) -+PROJ_resources := $(DESTDIR)$(PROJ_libdir)/clang/$(CLANG_VERSION) - - ResourceLibDir := $(ResourceDir)/lib - ResourceIncludeDir := $(ResourceDir)/include