1
1
Name: llvm
2
- Version: 3.3
2
+ Version: 7.0.1
3
3
Release: 0
4
4
Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
5
5
License: University of Illinois/NCSA Open Source License
6
6
Group: Development/Tools
7
7
URL: http://llvm.org/
8
8
Source: %{version }/%{name }-%{version }.tar.gz
9
9
Source1: LLVMBuild.txt
10
- Source100: llvm-3.0-rpmlintrc
11
- Patch0: llvm-3.1-sb2-build-workaround.patch
12
10
Patch1: nosse4-avx.patch
13
11
Requires(post): /sbin/ldconfig
14
12
Requires(postun): /sbin/ldconfig
15
- BuildRequires: gcc >= 3.4, python
13
+ BuildRequires: cmake
14
+ BuildRequires: gcc, python
16
15
17
16
%description
18
17
LLVM is a compiler infrastructure designed for compile-time, link-time, runtime,
@@ -33,42 +32,51 @@ Requires: %{name} = %{version}
33
32
LLVM Header files
34
33
35
34
%prep
36
- %setup -q -n %{name }-%{version }/%{name }
37
- %patch0 -p1
38
- #%patch1 -p1
35
+ %setup -q -n %{name }-%{version }/%{name }/llvm
39
36
cp %{_sourcedir }/LLVMBuild.txt projects/
40
37
41
38
%build
42
- ./configure \
43
- --build=%{_target_platform } \
44
- --host=%{_target_platform } \
45
- --prefix=%{_prefix } \
46
- --bindir=%{_bindir } \
47
- --datadir=%{_datadir } \
48
- --includedir=%{_includedir } \
49
- --libdir=%{_libdir } \
50
- --enable-optimized \
51
- --enable-assertions \
52
- --disable-docs
53
- make %{?_smp_mflags } tools-only
39
+
40
+ mkdir -p build
41
+ pushd build
42
+
43
+ %cmake .. -G "Unix Makefiles" \
44
+ -DBUILD_SHARED_LIBS:BOOL= OFF \
45
+ -DCMAKE_BUILD_TYPE= Release \
46
+ -DLLVM_BUILD_DOCS:BOOL= OFF \
47
+ -DLLVM_BUILD_LLVM_DYLIB:BOOL= OFF \
48
+ -DLLVM_BUILD_RUNTIME:BOOL= OFF \
49
+ -DLLVM_ENABLE_ASSERTIONS:BOOL= OFF \
50
+ -DLLVM_INCLUDE_BENCHMARKS:BOOL= OFF \
51
+ -DLLVM_INCLUDE_DIRS:PATH= %{_includedir } \
52
+ -DLLVM_INCLUDE_EXAMPLES:BOOL= OFF \
53
+ -DLLVM_INCLUDE_TEST:BOOL= OFF \
54
+ -DLLVM_LINK_LLVM_DYLIB:BOOL= OFF \
55
+ -DLLVM_TARGETS_TO_BUILD= Native \
56
+ -DLLVM_TOOLS_BINARY_DIR:PATH= %{_bindir }
57
+
58
+ # Jobs limited to 4 to prevent OBS from running out of memory
59
+ make -j4
60
+ popd build
54
61
55
62
%install
56
63
rm -rf %{buildroot }
57
- make install DESTDIR=%{buildroot }
64
+ make -C build install/strip DESTDIR=%{buildroot }
58
65
59
66
%post -p /sbin/ldconfig
60
67
61
68
%postun -p /sbin/ldconfig
62
69
63
70
%files
64
71
%defattr(-, root, root)
65
- %doc CREDITS.TXT LICENSE.TXT README.txt
66
72
%{_bindir }/*
67
- %attr(744,-,-) %{_libdir }/* .so
73
+ %{_libdir }/* .so.*
74
+ %{_datadir }/opt-viewer
68
75
69
76
%files devel
70
77
%defattr(-, root, root)
71
- %attr(744,-,-) %{_libdir }/* .a
78
+ %{_libdir }/* .a
79
+ %{_libdir }/* .so
72
80
%{_includedir }/llvm
73
81
%{_includedir }/llvm-c
74
-
82
+ %{ _libdir }/cmake
0 commit comments