Browse Source

llvm: updated to 3.0 release

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@5555 ec354946-7b23-47d6-9f5a-488ba84defc7
kenta 12 years ago
parent
commit
a2a8e893ea
1 changed files with 41 additions and 35 deletions
  1. 41 35
      l/llvm/llvm-vl.spec

+ 41 - 35
l/llvm/llvm-vl.spec

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