|
@@ -2,33 +2,34 @@
|
|
#
|
|
#
|
|
# --with doxygen
|
|
# --with doxygen
|
|
# The doxygen docs are HUGE, so they are not built by default.
|
|
# The doxygen docs are HUGE, so they are not built by default.
|
|
|
|
+%define build_apidoc %{?_with_doxygen:1}%{!?_with_doxygen:0}
|
|
|
|
|
|
Name: llvm
|
|
Name: llvm
|
|
-Version: 2.9
|
|
+Version: 3.0
|
|
-Release: 3%{?_dist_release}
|
|
+Release: 1%{?_dist_release}
|
|
Summary: The Low Level Virtual Machine
|
|
Summary: The Low Level Virtual Machine
|
|
Summary(ja): LLVM - 低レベルバーチャルマシン
|
|
Summary(ja): LLVM - 低レベルバーチャルマシン
|
|
|
|
|
|
Group: Development/Languages
|
|
Group: Development/Languages
|
|
License: NCSA
|
|
License: NCSA
|
|
URL: http://llvm.org/
|
|
URL: http://llvm.org/
|
|
-Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tgz
|
|
+Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tar.gz
|
|
-Source1: http://llvm.org/releases/%{version}/clang-%{version}.tgz
|
|
+Source1: http://llvm.org/releases/%{version}/clang-%{version}.tar.gz
|
|
# multilib fixes
|
|
# multilib fixes
|
|
Source2: llvm-Config-config.h
|
|
Source2: llvm-Config-config.h
|
|
Source3: llvm-Config-llvm-config.h
|
|
Source3: llvm-Config-llvm-config.h
|
|
|
|
|
|
# Data files should be installed with timestamps preserved
|
|
# Data files should be installed with timestamps preserved
|
|
Patch0: llvm-2.6-timestamp.patch
|
|
Patch0: llvm-2.6-timestamp.patch
|
|
-# clang link failure if system GCC version is unknown
|
|
+# workaround for http://llvm.org/bugs/show_bug.cgi?id=11177
|
|
-# http://llvm.org/bugs/show_bug.cgi?id=8897
|
|
+Patch1: llvm-3.0-fix11177.patch
|
|
-Patch1: clang-2.9-add_gcc_vers.patch
|
|
|
|
# fix bug 9798 - Linker flags fail / can't find crtbegin.o
|
|
# fix bug 9798 - Linker flags fail / can't find crtbegin.o
|
|
# http://llvm.org/bugs/show_bug.cgi?id=9798
|
|
# http://llvm.org/bugs/show_bug.cgi?id=9798
|
|
-Patch2: clang-2.9-fix9798.patch
|
|
+Patch2: clang-3.0-fix9798.patch
|
|
# Vine Patch
|
|
# Vine Patch
|
|
-Patch3: clang-2.9-driver-ld.gold.patch
|
|
+Patch3: llvm-3.0-fixLLVMgold.patch
|
|
-Patch4: clang-2.9-driver-lib64.patch
|
|
+Patch4: clang-3.0-driver-ld.gold.patch
|
|
|
|
+Patch5: clang-3.0-driver-lib64.patch
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
|
|
|
@@ -43,7 +44,7 @@ BuildRequires: libtool-ltdl-devel
|
|
BuildRequires: ocaml
|
|
BuildRequires: ocaml
|
|
# for DejaGNU test suite
|
|
# for DejaGNU test suite
|
|
BuildRequires: dejagnu tcl python
|
|
BuildRequires: dejagnu tcl python
|
|
-%if %{?_with_doxygen:1}%{!?_with_doxygen:0}
|
|
+%if %{build_apidoc}
|
|
BuildRequires: doxygen graphviz
|
|
BuildRequires: doxygen graphviz
|
|
%endif
|
|
%endif
|
|
Requires: llvm-libs = %{version}-%{release}
|
|
Requires: llvm-libs = %{version}-%{release}
|
|
@@ -148,7 +149,7 @@ Requires: %{name} = %{version}-%{release}
|
|
Documentation for the Clang compiler front-end.
|
|
Documentation for the Clang compiler front-end.
|
|
|
|
|
|
|
|
|
|
-%if %{?_with_doxygen:1}%{!?_with_doxygen:0}
|
|
+%if %{build_apidoc}
|
|
%package apidoc
|
|
%package apidoc
|
|
Summary: API documentation for LLVM
|
|
Summary: API documentation for LLVM
|
|
Summary(ja): LLVM の API ドキュメント
|
|
Summary(ja): LLVM の API ドキュメント
|
|
@@ -197,19 +198,20 @@ HTML documentation for LLVM's OCaml binding.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
%prep
|
|
-%setup -q -n llvm-%{version} -a1 %{?_with_gcc:-a2}
|
|
+%setup -q -n llvm-%{version}.src -a1 %{?_with_gcc:-a2}
|
|
-mv clang-%{version} tools/clang
|
|
+mv clang-%{version}.src tools/clang
|
|
|
|
|
|
# llvm patches
|
|
# llvm patches
|
|
%patch0 -p1 -b .timestamp
|
|
%patch0 -p1 -b .timestamp
|
|
|
|
+%patch1 -p1 -b .fix11177
|
|
|
|
+%patch3 -p1 -b .fixLLVMgold
|
|
|
|
|
|
# clang patches
|
|
# clang patches
|
|
pushd tools/clang
|
|
pushd tools/clang
|
|
-%patch1 -p1 -b .add_gcc_ver
|
|
|
|
%patch2 -p1 -b .fix9798
|
|
%patch2 -p1 -b .fix9798
|
|
-%patch3 -p1 -b .ldgold
|
|
+%patch4 -p1 -b .ldgold
|
|
%ifarch x86_64
|
|
%ifarch x86_64
|
|
-%patch4 -p1 -b .lib64
|
|
+%patch5 -p1 -b .lib64
|
|
%endif
|
|
%endif
|
|
popd
|
|
popd
|
|
|
|
|
|
@@ -220,24 +222,32 @@ popd
|
|
|
|
|
|
|
|
|
|
%build
|
|
%build
|
|
|
|
+# explicitly supply CC and CXX when running 'configure'
|
|
|
|
+# http://llvm.org/bugs/show_bug.cgi?id=9472
|
|
|
|
+export CC=/usr/bin/gcc; export CXX=/usr/bin/g++
|
|
|
|
+
|
|
# Disabling assertions now, rec. by pure and needed for OpenGTL
|
|
# Disabling assertions now, rec. by pure and needed for OpenGTL
|
|
# TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
|
|
# TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
|
|
%configure \
|
|
%configure \
|
|
--prefix=%{_prefix} \
|
|
--prefix=%{_prefix} \
|
|
--libdir=%{_libdir}/%{name} \
|
|
--libdir=%{_libdir}/%{name} \
|
|
--datadir=%{_libdir}/%{name} \
|
|
--datadir=%{_libdir}/%{name} \
|
|
|
|
+%if %{?_with_doxygen:1}%{!?_with_doxygen:0}
|
|
|
|
+ --enable-doxygen \
|
|
|
|
+%endif
|
|
|
|
+ --enable-targets=host \
|
|
--disable-assertions \
|
|
--disable-assertions \
|
|
--enable-jit \
|
|
--enable-jit \
|
|
--enable-libffi \
|
|
--enable-libffi \
|
|
--enable-shared \
|
|
--enable-shared \
|
|
--with-binutils-include=%{_includedir} --enable-pic \
|
|
--with-binutils-include=%{_includedir} --enable-pic \
|
|
- --with-c-include-dirs=%{_includedir}:$(find %{_prefix}/lib/gcc/*/* \
|
|
+# --with-c-include-dirs=%{_includedir}:$(find %{_prefix}/lib/gcc/*/* \
|
|
- -maxdepth 0 -type d)/include \
|
|
+# -maxdepth 0 -type d)/include \
|
|
-%if %{__isa_bits} == 64
|
|
+#%if %{__isa_bits} == 64
|
|
- --with-cxx-include-32bit-dir=32 \
|
|
+# --with-cxx-include-32bit-dir=32 \
|
|
-%endif
|
|
+#%endif
|
|
- --with-cxx-include-root=$(find %{_includedir}/c++/* -maxdepth 0 -type d) \
|
|
+# --with-cxx-include-root=$(find %{_includedir}/c++/* -maxdepth 0 -type d) \
|
|
- --with-cxx-include-arch=%{_target_cpu}-%{_vendor}-%{_os}
|
|
+# --with-cxx-include-arch=%{_target_cpu}-%{_vendor}-%{_os}
|
|
|
|
|
|
|
|
|
|
# FIXME file this
|
|
# FIXME file this
|
|
@@ -245,17 +255,12 @@ popd
|
|
sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
|
|
sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
|
|
|
|
|
|
make %{_smp_mflags} REQUIRES_RTTI=1 \
|
|
make %{_smp_mflags} REQUIRES_RTTI=1 \
|
|
-%ifarch ppc
|
|
|
|
- ## gcc-4.4.5 still doesn't seem to support fno-var-tracking-assignments
|
|
|
|
- ## OPTIMIZE_OPTION="%{optflags} -fno-var-tracking-assignments"
|
|
|
|
OPTIMIZE_OPTION="%{optflags}"
|
|
OPTIMIZE_OPTION="%{optflags}"
|
|
-%else
|
|
|
|
- OPTIMIZE_OPTION="%{optflags}"
|
|
|
|
-%endif
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
%install
|
|
rm -rf %{buildroot}
|
|
rm -rf %{buildroot}
|
|
|
|
+
|
|
make install DESTDIR=%{buildroot} \
|
|
make install DESTDIR=%{buildroot} \
|
|
PROJ_docsdir=/moredocs
|
|
PROJ_docsdir=/moredocs
|
|
|
|
|
|
@@ -289,12 +294,13 @@ done
|
|
|
|
|
|
# Move documentation back to build directory
|
|
# Move documentation back to build directory
|
|
#
|
|
#
|
|
|
|
+pwd
|
|
mv %{buildroot}/moredocs .
|
|
mv %{buildroot}/moredocs .
|
|
rm -f moredocs/*.tar.gz
|
|
rm -f moredocs/*.tar.gz
|
|
rm -f moredocs/ocamldoc/html/*.tar.gz
|
|
rm -f moredocs/ocamldoc/html/*.tar.gz
|
|
|
|
|
|
# and separate the apidoc
|
|
# and separate the apidoc
|
|
-%if 0%{?_with_doxygen}
|
|
+%if %{build_apidoc}
|
|
mv moredocs/html/doxygen apidoc
|
|
mv moredocs/html/doxygen apidoc
|
|
mv tools/clang/docs/doxygen/html clang-apidoc
|
|
mv tools/clang/docs/doxygen/html clang-apidoc
|
|
%endif
|
|
%endif
|
|
@@ -302,7 +308,7 @@ mv tools/clang/docs/doxygen/html clang-apidoc
|
|
# And prepare Clang documentation
|
|
# And prepare Clang documentation
|
|
#
|
|
#
|
|
mkdir clang-docs
|
|
mkdir clang-docs
|
|
-for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do
|
|
+for f in LICENSE.TXT NOTES.txt README.txt; do
|
|
ln tools/clang/$f clang-docs/
|
|
ln tools/clang/$f clang-docs/
|
|
done
|
|
done
|
|
rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools}
|
|
rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools}
|
|
@@ -374,7 +380,6 @@ exit 0
|
|
%{_bindir}/macho-dump
|
|
%{_bindir}/macho-dump
|
|
%{_bindir}/opt
|
|
%{_bindir}/opt
|
|
%exclude %{_mandir}/man1/clang.1.*
|
|
%exclude %{_mandir}/man1/clang.1.*
|
|
-%exclude %{_mandir}/man1/llvmg??.1.*
|
|
|
|
%doc %{_mandir}/man1/*.1.*
|
|
%doc %{_mandir}/man1/*.1.*
|
|
|
|
|
|
%files devel
|
|
%files devel
|
|
@@ -395,8 +400,6 @@ exit 0
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
%doc clang-docs/*
|
|
%doc clang-docs/*
|
|
%{_bindir}/clang*
|
|
%{_bindir}/clang*
|
|
-#%{_bindir}/c-index-test
|
|
|
|
-%{_bindir}/tblgen
|
|
|
|
%{_libdir}/%{name}/libclang.so
|
|
%{_libdir}/%{name}/libclang.so
|
|
%{_prefix}/lib/clang
|
|
%{_prefix}/lib/clang
|
|
%doc %{_mandir}/man1/clang.1.*
|
|
%doc %{_mandir}/man1/clang.1.*
|
|
@@ -447,6 +450,9 @@ exit 0
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Tue Jan 24 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 3.0-1
|
|
|
|
+- updated to 3.0 release
|
|
|
|
+
|
|
* Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 2.9-3
|
|
* Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 2.9-3
|
|
- added patch 2-4 to support -O4 link-time optimization
|
|
- added patch 2-4 to support -O4 link-time optimization
|
|
|
|
|