From 13365d03e2f6d6bd60bca108e9eaae8ef3a7befc6b677c3b1329caabf0a9ba41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 3 Dec 2012 13:52:22 +0000 Subject: [PATCH] Accepting request 143891 from home:marc_schuetz:branches:devel:tools:compiler Fix llvm-config --libdir to return /usr/lib64 where appropriate. The old method of using sed on the executable does no longer work, because llvm-config is now a binary. OBS-URL: https://build.opensuse.org/request/show/143891 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=184 --- llvm-config-lib64.patch | 31 +++++++++++++++++++++++++++++++ llvm.changes | 7 +++++++ llvm.spec | 9 ++++++++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 llvm-config-lib64.patch diff --git a/llvm-config-lib64.patch b/llvm-config-lib64.patch new file mode 100644 index 0000000..98b5bd8 --- /dev/null +++ b/llvm-config-lib64.patch @@ -0,0 +1,31 @@ +diff -ur llvm.orig/tools/llvm-config/llvm-config.cpp llvm/tools/llvm-config/llvm-config.cpp +--- llvm.orig/tools/llvm-config/llvm-config.cpp 2012-11-12 11:25:40.547628293 +0100 ++++ llvm/tools/llvm-config/llvm-config.cpp 2012-12-02 15:09:31.981279773 +0100 +@@ -231,15 +231,15 @@ + switch (DevelopmentTreeLayout) { + case MakefileStyle: + ActiveBinDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/bin"; +- ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib"; ++ ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib64"; + break; + case CMakeStyle: + ActiveBinDir = ActiveObjRoot + "/bin"; +- ActiveLibDir = ActiveObjRoot + "/lib"; ++ ActiveLibDir = ActiveObjRoot + "/lib64"; + break; + case CMakeBuildModeStyle: + ActiveBinDir = ActiveObjRoot + "/bin/" + LLVM_BUILDMODE; +- ActiveLibDir = ActiveObjRoot + "/lib/" + LLVM_BUILDMODE; ++ ActiveLibDir = ActiveObjRoot + "/lib64/" + LLVM_BUILDMODE; + break; + } + +@@ -250,7 +250,7 @@ + ActivePrefix = CurrentExecPrefix; + ActiveIncludeDir = ActivePrefix + "/include"; + ActiveBinDir = ActivePrefix + "/bin"; +- ActiveLibDir = ActivePrefix + "/lib"; ++ ActiveLibDir = ActivePrefix + "/lib64"; + ActiveIncludeOption = "-I" + ActiveIncludeDir; + } + diff --git a/llvm.changes b/llvm.changes index 0e561d4..2d7f344 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Dec 3 13:32:14 UTC 2012 - schuetzm@gmx.net + +- Fix llvm-config --libdir to return /usr/lib64 where appropriate. + The old method of using sed on the executable does no longer + work, because llvm-config is now a binary. + ------------------------------------------------------------------- Fri Nov 30 07:27:46 UTC 2012 - idonmez@suse.com diff --git a/llvm.spec b/llvm.spec index 957fdca..5889279 100644 --- a/llvm.spec +++ b/llvm.spec @@ -37,6 +37,9 @@ Patch2: assume-opensuse.patch Patch3: clang-disable-ada-extension.patch # PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit Patch4: default-to-i586.patch +%if "%{_lib}" == "lib64" +Patch5: llvm-config-lib64.patch +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -125,6 +128,9 @@ This package contains vim plugins for LLVM like syntax highlighting. %endif %patch3 -p1 %patch4 -p1 +%if "%{_lib}" == "lib64" +%patch5 -p1 +%endif # We hardcode i586 rm tools/clang/test/Driver/x86_features.c @@ -151,6 +157,8 @@ TOPLEVEL=$PWD export SUSE_ASNEEDED=0 mkdir stage1 stage2 pushd stage1 +mkdir Release +ln -s lib Release/lib64 ../configure \ --enable-optimized \ @@ -215,7 +223,6 @@ cd .. # Fixup libdir %if "%{_lib}" == "lib64" -sed -i s,ABS_RUN_DIR/lib,ABS_RUN_DIR/lib64, %{buildroot}/%{_bindir}/llvm-config mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/lib64 %endif