Browse Source

llvm: update to 3.3

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

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

@@ -5,8 +5,8 @@
 %define build_apidoc %{?_with_doxygen:1}%{!?_with_doxygen:0}
 
 Name:           llvm
-Version:        3.1
-Release:        2%{?_dist_release}
+Version:        3.3
+Release:        1%{?_dist_release}
 Summary:        The Low Level Virtual Machine
 Summary(ja):    LLVM - 低レベルバーチャルマシン
 
@@ -14,29 +14,25 @@ Group:          Development/Languages
 License:        NCSA
 URL:            http://llvm.org/
 Source0:        http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.gz
-Source1:        http://llvm.org/releases/%{version}/clang-%{version}.src.tar.gz
+Source1:        http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.gz
+Source2:        http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.gz
+
 # multilib fixes
-Source2:        llvm-Config-config.h
-Source3:        llvm-Config-llvm-config.h
+Source10:        llvm-Config-config.h
+Source11:        llvm-Config-llvm-config.h
 
 # Data files should be installed with timestamps preserved
 Patch0:         llvm-2.6-timestamp.patch
 
-# r600 llvm and clang patches
-Patch600: 0001-r600-Add-some-intrinsic-definitions.patch
-Patch601: 0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch
-
-Patch610: 0001-Add-r600-TargetInfo.patch
-Patch611: 0002-r600-Add-some-target-builtins.patch
-Patch612: 0003-r600-Add-read_global_size-and-read_local_size-builti.patch
+Patch11:        clang-hardfloat-hack.patch
 
-# ocaml
-Patch700: llvm-fix-ghc.patch
+# hack the link flags for the shared libs for speed and memory usage
+Patch21:        llvm-3.2-symbolic-shlib.patch
 
 # Vine Patch
 Patch1000: clang-3.1-driver-ld.gold.patch
 Patch1001: clang-3.1-driver-lib64.patch
-Patch1002: clang-3.1-driver-vine.patch
+Patch1002: clang-3.3-driver-vine.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
@@ -207,24 +203,18 @@ HTML documentation for LLVM's OCaml binding.
 
 
 %prep
-%setup -q -n llvm-%{version}.src -a1 %{?_with_gcc:-a2}
-mv clang-%{version}.src tools/clang
+%setup -q -n llvm-%{version}.src -a1 -a2
+rm -f tools/clang
+mv cfe-%{version}.src tools/clang
 
 # llvm patches
 %patch0 -p1 -b .timestamp
 
-# r600 llvm patch
-%patch600 -p1 -b .r600
-%patch601 -p1 -b .r601
-
-# clang patches
-pushd tools/clang
-%patch610 -p1 -b .r610
-%patch611 -p1 -b .r611
-%patch612 -p1 -b .r612
-popd
+# arm hard float
+%patch11 -p1 -b .orig
 
-%patch700 -p0 -b .ghc
+# fix llvm-config --libs
+%patch21 -p1 -b .orig
 
 %patch1000 -p1 -b .driver-ld.gold
 %ifarch x86_64
@@ -238,9 +228,8 @@ sed -i 's|/lib /usr/lib $lt_ld_extra|/%{_lib} %{_libdir} $lt_ld_extra|' \
     
 
 %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++
+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
@@ -250,16 +239,27 @@ export CC=/usr/bin/gcc; export CXX=/usr/bin/g++
   --datadir=%{_libdir}/%{name} \
 %if %{?_with_doxygen:1}%{!?_with_doxygen:0}
   --enable-doxygen \
+%endif
+%ifarch armv7hl armv7l
+  --with-cpu=cortex-a8 \
+  --with-tune=cortex-a8 \
+  --with-arch=armv7-a \
+  --with-float=hard \
+  --with-fpu=vfpv3-d16 \
+  --with-abi=aapcs-linux \
 %endif
   --enable-targets=host \
   --disable-assertions \
+  --enable-optimized \
   --enable-jit \
   --enable-libffi \
   --enable-shared \
+  --enable-pic \
+  --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/%{gcc_version}/include) \
   --with-binutils-include=%{_includedir} \
-  --enable-pic
+  --enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx \
+  --enable-experimental-targets=R600
   
-
 # FIXME file this
 # configure does not properly specify libdir
 sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
@@ -284,9 +284,9 @@ mv %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}
 
 pushd %{buildroot}%{_includedir}/llvm/Config
 mv config.h config-%{__isa_bits}.h
-cp -p %{SOURCE2} config.h
+cp -p %{SOURCE10} config.h
 mv llvm-config.h llvm-config-%{__isa_bits}.h
-cp -p %{SOURCE3} llvm-config.h
+cp -p %{SOURCE11} llvm-config.h
 popd
 
 # Create ld.so.conf.d entry
@@ -467,6 +467,9 @@ exit 0
 
 
 %changelog
+* Mon Oct 28 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3-1
+- update to 3.3
+
 * Mon Dec 03 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-2
 - ld.gold (patch1000,1001)
 - add /%{_lib} to ld search path