Accepting request 196796 from devel:tools:compiler
- Fix filelist for aarch64 - aarch64-suse-support.patch: Enable AArch64 suse toolchain support - Add s390x support - Remove unused chrpath dependency - Re-enable ARCMT since libclang depends on it - Define host_triple for aarch64 - Fix ARMv6 build OBS-URL: https://build.opensuse.org/request/show/196796 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm?expand=0&rev=50
This commit is contained in:
commit
e3e6e456f2
16
aarch64-suse-support.patch
Normal file
16
aarch64-suse-support.patch
Normal file
@ -0,0 +1,16 @@
|
||||
Index: llvm-3.3/tools/clang/lib/Driver/ToolChains.cpp
|
||||
===================================================================
|
||||
--- llvm-3.3.orig/tools/clang/lib/Driver/ToolChains.cpp
|
||||
+++ llvm-3.3/tools/clang/lib/Driver/ToolChains.cpp
|
||||
@@ -1073,9 +1073,10 @@ Generic_GCC::GCCInstallationDetector::GC
|
||||
// Declare a bunch of static data sets that we'll select between below. These
|
||||
// are specifically designed to always refer to string literals to avoid any
|
||||
// lifetime or initialization issues.
|
||||
- static const char *const AArch64LibDirs[] = { "/lib" };
|
||||
+ static const char *const AArch64LibDirs[] = { "/lib64", "/lib" };
|
||||
static const char *const AArch64Triples[] = {
|
||||
"aarch64-none-linux-gnu",
|
||||
+ "aarch64-suse-linux",
|
||||
"aarch64-linux-gnu"
|
||||
};
|
||||
|
18
llvm-no-visibility.patch
Normal file
18
llvm-no-visibility.patch
Normal file
@ -0,0 +1,18 @@
|
||||
Index: llvm-3.3/cmake/modules/HandleLLVMOptions.cmake
|
||||
===================================================================
|
||||
--- llvm-3.3.orig/cmake/modules/HandleLLVMOptions.cmake
|
||||
+++ llvm-3.3/cmake/modules/HandleLLVMOptions.cmake
|
||||
@@ -104,13 +104,6 @@ if( LLVM_ENABLE_PIC )
|
||||
# On Windows all code is PIC. MinGW warns if -fPIC is used.
|
||||
else()
|
||||
add_flag_or_print_warning("-fPIC")
|
||||
-
|
||||
- if( WIN32 OR CYGWIN)
|
||||
- # MinGW warns if -fvisibility-inlines-hidden is used.
|
||||
- else()
|
||||
- check_cxx_compiler_flag("-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG)
|
||||
- append_if(SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG "-fvisibility-inlines-hidden" CMAKE_CXX_FLAGS)
|
||||
- endif()
|
||||
endif()
|
||||
endif()
|
||||
|
31
llvm.changes
31
llvm.changes
@ -1,3 +1,34 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 28 20:31:11 UTC 2013 - schwab@suse.de
|
||||
|
||||
- Fix filelist for aarch64
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 28 11:07:16 UTC 2013 - schwab@suse.de
|
||||
|
||||
- aarch64-suse-support.patch: Enable AArch64 suse toolchain support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 28 11:02:06 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Add s390x support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 28 10:57:32 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Remove unused chrpath dependency
|
||||
- Re-enable ARCMT since libclang depends on it
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 26 07:23:57 UTC 2013 - schwab@suse.de
|
||||
|
||||
- Define host_triple for aarch64
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 22 10:59:28 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Fix ARMv6 build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 21 11:04:35 UTC 2013 - idonmez@suse.com
|
||||
|
||||
|
41
llvm.spec
41
llvm.spec
@ -29,6 +29,10 @@
|
||||
%define _supported_archs "PowerPC"
|
||||
%endif
|
||||
|
||||
%ifarch s390x
|
||||
%define _supported_archs "SystemZ"
|
||||
%endif
|
||||
|
||||
Name: llvm
|
||||
Version: 3.3
|
||||
Release: 0
|
||||
@ -52,6 +56,10 @@ Patch6: arm_suse_support.diff
|
||||
# PATCH-FIX-OPENSUSE unreachable-code.patch -- Unreachable code warning triggered on SLE
|
||||
Patch7: unreachable-code.patch
|
||||
Patch8: cmake-host-triple.patch
|
||||
# PATCH-FIX-OPENSUSE aarch64-suse-support.patch -- Enable AArch64 suse toolchain support
|
||||
Patch9: aarch64-suse-support.patch
|
||||
# PATCH-FIX-OPENSUSE llvm-no-visibility.patch -- Disable visibility
|
||||
Patch10: llvm-no-visibility.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -62,7 +70,6 @@ BuildRequires: cmake
|
||||
BuildRequires: binutils-devel >= 2.21.90
|
||||
%endif
|
||||
BuildRequires: bison
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: flex
|
||||
BuildRequires: gcc
|
||||
@ -160,6 +167,10 @@ This package contains vim plugins for LLVM like syntax highlighting.
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%ifarch s390 s390x
|
||||
%patch10 -p1
|
||||
%endif
|
||||
|
||||
# We hardcode i586
|
||||
rm tools/clang/test/Driver/x86_features.c
|
||||
@ -179,7 +190,7 @@ sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp \
|
||||
%endif
|
||||
|
||||
# Only enable target archs otherwise llvm-config is messed up
|
||||
%ifnarch ppc64 arm
|
||||
%ifnarch arm ppc64 s390x
|
||||
sed -i s,"subdirectories = .*","subdirectories = AArch64 ARM PowerPC R600 X86", lib/Target/LLVMBuild.txt
|
||||
%endif
|
||||
|
||||
@ -191,6 +202,10 @@ sed -i s,"subdirectories = .*","subdirectories = ARM", lib/Target/LLVMBuild.txt
|
||||
sed -i s,"subdirectories = .*","subdirectories = PowerPC", lib/Target/LLVMBuild.txt
|
||||
%endif
|
||||
|
||||
%ifarch s390x
|
||||
sed -i s,"subdirectories = .*","subdirectories = SystemZ", lib/Target/LLVMBuild.txt
|
||||
%endif
|
||||
|
||||
sed -i s,"IntelJITEvents OProfileJIT","", lib/ExecutionEngine/LLVMBuild.txt
|
||||
echo > utils/unittest/LLVMBuild.txt
|
||||
|
||||
@ -212,11 +227,18 @@ pushd stage1
|
||||
%ifarch armv7hl
|
||||
%define host_triple armv7hl-suse-linux-gnueabi
|
||||
%endif
|
||||
%ifarch aarch64
|
||||
%define host_triple aarch64-suse-linux
|
||||
%endif
|
||||
%ifarch ppc64
|
||||
%define host_triple powerpc64-suse-linux
|
||||
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"PowerPC"',g ../cmake/modules/AddLLVM.cmake
|
||||
rm -rf ../projects/compiler-rt
|
||||
%endif
|
||||
%ifarch s390x
|
||||
%define host_triple s390x-suse-linux
|
||||
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"SystemZ"',g ../cmake/modules/AddLLVM.cmake
|
||||
%endif
|
||||
|
||||
cmake -G "Unix Makefiles" \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
@ -247,6 +269,10 @@ cmake -G "Unix Makefiles" \
|
||||
-DLLVM_HOST_TRIPLE=%{host_triple} \
|
||||
%endif
|
||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||
%ifarch armv6hl
|
||||
-DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \
|
||||
-DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \
|
||||
%endif
|
||||
%ifarch armv7hl
|
||||
-DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \
|
||||
-DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \
|
||||
@ -263,11 +289,10 @@ cmake -G "Unix Makefiles" \
|
||||
-DLLVM_BINUTILS_INCDIR=/usr/include \
|
||||
%endif
|
||||
-DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
|
||||
%ifnarch arm ppc64
|
||||
%ifnarch arm ppc64 s390x
|
||||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{_experimental_archs} \
|
||||
%endif
|
||||
-DLLVM_BUILD_TESTS=OFF \
|
||||
-DCLANG_ENABLE_ARCMT=OFF \
|
||||
..
|
||||
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
@ -286,6 +311,12 @@ for i in crash-narrowfunctiontest metadata remove_arguments_test; do
|
||||
rm ../test/BugPoint/$i.ll;
|
||||
done
|
||||
|
||||
%ifarch s390 s390x
|
||||
for i in TestClassDecl.m TestClassForwardDecl.m c-index-getCursor-test.m; do
|
||||
rm ../tools/clang/test/Index/$i;
|
||||
done
|
||||
%endif
|
||||
|
||||
make check
|
||||
make clang-test
|
||||
%endif
|
||||
@ -430,7 +461,7 @@ rm -rf %{buildroot}/usr/share/llvm/cmake
|
||||
%{_libdir}/bfd-plugins/
|
||||
%endif
|
||||
%{_libdir}/clang
|
||||
%ifnarch ppc64
|
||||
%ifnarch aarch64 ppc64 s390 s390x
|
||||
%{_libdir}/clang/%{_release_version}/lib/linux/
|
||||
%endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user