Accepting request 95509 from devel:tools:compiler

- Switch to 3-stage bootstrap 

- Build first stage compiler with -O0 to workaround gcc 4.5 bug 

- Update to final 3.0 release
  * No real change since rc2

- Use %{_lib} macro instead of checking for x86_64

- Enable ARM support again
- Switch to optimized build

- Disable ARM support, VM goes out of memory while compiling it 

- Really enable ARM support
- Remove forcing -frtti

OBS-URL: https://build.opensuse.org/request/show/95509
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm?expand=0&rev=20
This commit is contained in:
Stephan Kulow 2011-12-06 16:59:38 +00:00 committed by Git OBS Bridge
commit 750b387d12
4 changed files with 77 additions and 23 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4e405888b4a4dfdfff799a6d0ab2f933d83dcc7f62406d55ba337d98a7196304
size 13958733

3
llvm-3.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d9486d9f956ceb8002377406368ad871f41ce01e95ba3b735757df4beaaa3374
size 13988408

View File

@ -1,3 +1,41 @@
-------------------------------------------------------------------
Mon Dec 5 13:19:22 UTC 2011 - idoenmez@suse.de
- Switch to 3-stage bootstrap
-------------------------------------------------------------------
Fri Dec 2 12:22:07 UTC 2011 - idoenmez@suse.de
- Build first stage compiler with -O0 to workaround gcc 4.5 bug
-------------------------------------------------------------------
Thu Dec 1 18:04:15 UTC 2011 - idoenmez@suse.de
- Update to final 3.0 release
* No real change since rc2
-------------------------------------------------------------------
Tue Nov 29 13:23:32 UTC 2011 - idoenmez@suse.de
- Use %{_lib} macro instead of checking for x86_64
-------------------------------------------------------------------
Wed Nov 16 14:28:17 UTC 2011 - idonmez@suse.com
- Enable ARM support again
- Switch to optimized build
-------------------------------------------------------------------
Thu Nov 10 14:54:50 UTC 2011 - idonmez@suse.com
- Disable ARM support, VM goes out of memory while compiling it
-------------------------------------------------------------------
Thu Nov 10 10:33:01 UTC 2011 - idonmez@suse.com
- Really enable ARM support
- Remove forcing -frtti
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Nov 7 15:05:52 UTC 2011 - idonmez@suse.com Mon Nov 7 15:05:52 UTC 2011 - idonmez@suse.com

View File

@ -16,11 +16,12 @@
# #
%define _revision 143961 %define _revision 145598
%define _release_version 3.0 %define _release_version 3.0
%define _supported_archs "ARM;X86"
Name: llvm Name: llvm
Version: 2.9.99.svn20111106 Version: 3.0
Release: 1 Release: 1
License: NCSA License: NCSA
Summary: Low Level Virtual Machine Summary: Low Level Virtual Machine
@ -132,38 +133,53 @@ This package contains vim plugins for LLVM like syntax highlighting.
sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
# Nasty hardcoded path # Nasty hardcoded path
%ifarch x86_64 %if "%{_lib}" == "lib64"
sed -i s,/lib/LLVMgold.so,/lib64/LLVMgold.so, tools/clang/lib/Driver/Tools.cpp sed -i s,/lib/LLVMgold.so,/lib64/LLVMgold.so, tools/clang/lib/Driver/Tools.cpp
%endif %endif
%build %build
TOPLEVEL=$PWD TOPLEVEL=$PWD
mkdir stage1 stage2 mkdir stage1 stage2 stage3
cd stage1 pushd stage1
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \ # Idiot cmake doesn't let me select my own optimization level here
-DLLVM_ENABLE_ASSERTIONS=TRUE \ # hence we use configure, this needed to workaround a gcc 4.5 bug
-DLLVM_TARGETS_TO_BUILD="ARM;X86" \ ../configure \
.. --enable-optimized \
--disable-assertions \
--with-optimize-option="-O0" \
--enable-targets=host
make %{?_smp_mflags} make %{?_smp_mflags}
cd ../stage2 popd
pushd stage2
export CC=$TOPLEVEL/stage1/Release/bin/clang
export CXX=$TOPLEVEL/stage1/Release/bin/clang++
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
..
make %{?_smp_mflags}
popd
pushd stage3
# Needed to make clang resource dir working inside build tree # Needed to make clang resource dir working inside build tree
ln -s lib lib64 ln -s lib lib64
export CC=$TOPLEVEL/stage1/bin/clang export CC=$TOPLEVEL/stage2/bin/clang
export CXX=$TOPLEVEL/stage1/bin/clang++ export CXX=$TOPLEVEL/stage2/bin/clang++
export CXXFLAGS="%{optflags} -frtti"
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \ cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=FALSE \ -DLLVM_ENABLE_ASSERTIONS=FALSE \
-DLLVM_ENABLE_PIC=TRUE \ -DLLVM_ENABLE_PIC=TRUE \
-DLLVM_ENABLE_TIMESTAMPS=FALSE \ -DLLVM_ENABLE_TIMESTAMPS=FALSE \
-DLLVM_TARGETS_TO_BUILD=X86 \ -DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
-DCLANG_VENDOR="SUSE Linux" \ -DCLANG_VENDOR="SUSE Linux" \
%ifarch x86_64 %if "%{_lib}" == "lib64"
-DLLVM_LIBDIR_SUFFIX=64 \ -DLLVM_LIBDIR_SUFFIX=64 \
%endif %endif
%if 0%{?suse_version} >= 1220 %if 0%{?suse_version} >= 1220
@ -174,17 +190,17 @@ cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
make %{?_smp_mflags} make %{?_smp_mflags}
%check %check
cd stage2 cd stage3
make check make check
make clang-test make clang-test
%install %install
cd stage2 cd stage3
%makeinstall %makeinstall
cd .. cd ..
# Fixup libdir for x86-64 # Fixup libdir
%ifarch x86_64 %if "%{_lib}" == "lib64"
sed -i s,ABS_RUN_DIR/lib,ABS_RUN_DIR/lib64, %{buildroot}/%{_bindir}/llvm-config sed -i s,ABS_RUN_DIR/lib,ABS_RUN_DIR/lib64, %{buildroot}/%{_bindir}/llvm-config
%endif %endif