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
This commit is contained in:
Ismail Dönmez 2012-12-03 13:52:22 +00:00 committed by Git OBS Bridge
parent 5585ed3a17
commit 13365d03e2
3 changed files with 46 additions and 1 deletions

31
llvm-config-lib64.patch Normal file
View File

@ -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;
}

View File

@ -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

View File

@ -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