- Fix resource dir for libclang case (clang-resourcedirs.patch)
- Always build tests OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=348
This commit is contained in:
parent
2bf142bb0f
commit
ffa9611f01
18
clang-resourcedirs.patch
Normal file
18
clang-resourcedirs.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
Index: llvm/tools/clang/lib/Driver/Driver.cpp
|
||||||
|
===================================================================
|
||||||
|
--- llvm.orig/tools/clang/lib/Driver/Driver.cpp
|
||||||
|
+++ llvm/tools/clang/lib/Driver/Driver.cpp
|
||||||
|
@@ -66,11 +66,11 @@ Driver::Driver(StringRef ClangExecutable
|
||||||
|
|
||||||
|
// Compute the path to the resource directory.
|
||||||
|
StringRef ClangResourceDir(CLANG_RESOURCE_DIR);
|
||||||
|
- SmallString<128> P(Dir);
|
||||||
|
+ SmallString<128> P((Dir != "") ? Dir : "/usr/bin/");
|
||||||
|
if (ClangResourceDir != "")
|
||||||
|
llvm::sys::path::append(P, ClangResourceDir);
|
||||||
|
else
|
||||||
|
- llvm::sys::path::append(P, "..", "lib", "clang", CLANG_VERSION_STRING);
|
||||||
|
+ llvm::sys::path::append(P, "..", "LLVM_LIBDIR", "clang", CLANG_VERSION_STRING);
|
||||||
|
ResourceDir = P.str();
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 3 11:58:28 UTC 2014 - idonmez@suse.com
|
||||||
|
|
||||||
|
- Fix resource dir for libclang case (clang-resourcedirs.patch)
|
||||||
|
- Always build tests
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Feb 22 18:18:57 CET 2014 - ro@suse.de
|
Sat Feb 22 18:18:57 CET 2014 - ro@suse.de
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ Patch8: aarch64-suse-support.patch
|
|||||||
Patch9: arm-remove-xfails.diff
|
Patch9: arm-remove-xfails.diff
|
||||||
# PATCH-FIX-OPENSUSE asan-disable-hugemalloctest.patch -- Disable ASAN HugeMallocTest
|
# PATCH-FIX-OPENSUSE asan-disable-hugemalloctest.patch -- Disable ASAN HugeMallocTest
|
||||||
Patch10: asan-disable-hugemalloctest.patch
|
Patch10: asan-disable-hugemalloctest.patch
|
||||||
|
Patch11: clang-resourcedirs.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -153,6 +154,7 @@ This package contains the Python bindings to clang (C language) frontend for LLV
|
|||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch9
|
%patch9
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
|
%patch11 -p1
|
||||||
|
|
||||||
# We hardcode i586
|
# We hardcode i586
|
||||||
rm tools/clang/test/Driver/x86_features.c
|
rm tools/clang/test/Driver/x86_features.c
|
||||||
@ -172,6 +174,8 @@ sed -i s,"/lib/","/lib64/",g tools/clang/lib/Driver/Tools.cpp \
|
|||||||
sed -i s,"}lib{","}lib64{",g tools/clang/test/Preprocessor/iwithprefix.c
|
sed -i s,"}lib{","}lib64{",g tools/clang/test/Preprocessor/iwithprefix.c
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
sed -i s,LLVM_LIBDIR,%{_lib}, tools/clang/lib/Driver/Driver.cpp
|
||||||
|
|
||||||
# Only enable target archs otherwise llvm-config is messed up
|
# Only enable target archs otherwise llvm-config is messed up
|
||||||
%ifarch %{ix86} x86_64
|
%ifarch %{ix86} x86_64
|
||||||
sed -i s,"subdirectories = .*","subdirectories = R600 X86", lib/Target/LLVMBuild.txt
|
sed -i s,"subdirectories = .*","subdirectories = R600 X86", lib/Target/LLVMBuild.txt
|
||||||
@ -196,6 +200,7 @@ echo > utils/unittest/LLVMBuild.txt
|
|||||||
TOPLEVEL=$PWD
|
TOPLEVEL=$PWD
|
||||||
mkdir stage1 stage2
|
mkdir stage1 stage2
|
||||||
pushd stage1
|
pushd stage1
|
||||||
|
ln -sf lib lib64
|
||||||
|
|
||||||
# Define host-triple
|
# Define host-triple
|
||||||
%ifarch %{ix86}
|
%ifarch %{ix86}
|
||||||
@ -272,7 +277,6 @@ cmake -G "Unix Makefiles" \
|
|||||||
%endif
|
%endif
|
||||||
%if "%{_lib}" == "lib64"
|
%if "%{_lib}" == "lib64"
|
||||||
-DLLVM_LIBDIR_SUFFIX=64 \
|
-DLLVM_LIBDIR_SUFFIX=64 \
|
||||||
-DCLANG_RESOURCE_DIR=../%{_lib}/clang/%{_release_version} \
|
|
||||||
%endif
|
%endif
|
||||||
-DLLVM_REQUIRES_RTTI=ON \
|
-DLLVM_REQUIRES_RTTI=ON \
|
||||||
-DLLVM_ENABLE_TIMESTAMPS=OFF \
|
-DLLVM_ENABLE_TIMESTAMPS=OFF \
|
||||||
@ -286,6 +290,7 @@ cmake -G "Unix Makefiles" \
|
|||||||
%else
|
%else
|
||||||
-DLLVM_TARGETS_TO_BUILD=host \
|
-DLLVM_TARGETS_TO_BUILD=host \
|
||||||
%endif
|
%endif
|
||||||
|
-DLLVM_BUILD_TESTS=ON \
|
||||||
..
|
..
|
||||||
|
|
||||||
make %{?_smp_mflags} VERBOSE=1
|
make %{?_smp_mflags} VERBOSE=1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user