Accepting request 110700 from devel:tools:compiler
- Target i586-linux for 32bit builds bnc#728737 OBS-URL: https://build.opensuse.org/request/show/110700 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm?expand=0&rev=23
This commit is contained in:
commit
f6b56659f6
@ -1,11 +0,0 @@
|
|||||||
--- tools/clang/tools/libclang/CMakeLists.txt (revision 132071)
|
|
||||||
+++ tools/clang/tools/libclang/CMakeLists.txt (working copy)
|
|
||||||
@@ -33,7 +33,7 @@
|
|
||||||
|
|
||||||
set_target_properties(libclang
|
|
||||||
PROPERTIES
|
|
||||||
- OUTPUT_NAME "libclang"
|
|
||||||
+ OUTPUT_NAME "clang"
|
|
||||||
VERSION ${LIBCLANG_LIBRARY_VERSION}
|
|
||||||
DEFINE_SYMBOL _CINDEX_LIB_)
|
|
||||||
|
|
13
default-to-i586.patch
Normal file
13
default-to-i586.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Index: llvm/tools/clang/lib/Driver/Tools.cpp
|
||||||
|
===================================================================
|
||||||
|
--- llvm.orig/tools/clang/lib/Driver/Tools.cpp
|
||||||
|
+++ llvm/tools/clang/lib/Driver/Tools.cpp
|
||||||
|
@@ -897,7 +897,7 @@ void Clang::AddX86TargetArgs(const ArgLi
|
||||||
|
if (getToolChain().getArch() == llvm::Triple::x86_64)
|
||||||
|
CPUName = "x86-64";
|
||||||
|
else if (getToolChain().getArch() == llvm::Triple::x86)
|
||||||
|
- CPUName = "pentium4";
|
||||||
|
+ CPUName = "i586";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 20 12:40:27 UTC 2012 - idonmez@suse.com
|
||||||
|
|
||||||
|
- Target i586-linux for 32bit builds
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Dec 27 21:33:48 UTC 2011 - idonmez@suse.com
|
Tue Dec 27 21:33:48 UTC 2011 - idonmez@suse.com
|
||||||
|
|
||||||
|
99
llvm.spec
99
llvm.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package llvm
|
# spec file for package llvm
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -15,9 +15,10 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define _revision 145598
|
%define _revision 145598
|
||||||
%define _release_version 3.0
|
%define _release_version 3.0
|
||||||
%define _supported_archs "ARM;X86"
|
%define _supported_archs "arm,x86"
|
||||||
|
|
||||||
Name: llvm
|
Name: llvm
|
||||||
Version: 3.0
|
Version: 3.0
|
||||||
@ -30,8 +31,6 @@ Source0: %{name}-%{version}.tar.bz2
|
|||||||
Source100: %{name}-rpmlintrc
|
Source100: %{name}-rpmlintrc
|
||||||
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision
|
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision
|
||||||
Patch1: set-revision.patch
|
Patch1: set-revision.patch
|
||||||
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Use correct lib prefix
|
|
||||||
Patch2: clang-cmake-lib.patch
|
|
||||||
# PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features
|
# PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features
|
||||||
Patch3: assume-opensuse.patch
|
Patch3: assume-opensuse.patch
|
||||||
# PATCH-FIX-UPSTREAM clang-glibc2.14.patch idoenmez@suse.de -- Support glibc 2.14 headers
|
# PATCH-FIX-UPSTREAM clang-glibc2.14.patch idoenmez@suse.de -- Support glibc 2.14 headers
|
||||||
@ -40,6 +39,8 @@ Patch4: clang-glibc2.14.patch
|
|||||||
Patch5: clang-disable-ada-extension.patch
|
Patch5: clang-disable-ada-extension.patch
|
||||||
# PATCH-FIX-UPSTREAM http://llvm.org/viewvc/llvm-project?view=rev&revision=147295
|
# PATCH-FIX-UPSTREAM http://llvm.org/viewvc/llvm-project?view=rev&revision=147295
|
||||||
Patch6: clang-pr11642.patch
|
Patch6: clang-pr11642.patch
|
||||||
|
# PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit
|
||||||
|
Patch7: default-to-i586.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -48,7 +49,6 @@ BuildRequires: binutils-devel >= 2.21.90
|
|||||||
%endif
|
%endif
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
BuildRequires: cmake
|
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
@ -112,8 +112,8 @@ This package contains the clang (C language) frontend for LLVM.
|
|||||||
|
|
||||||
Summary: CLANG frontend for LLVM (devel package)
|
Summary: CLANG frontend for LLVM (devel package)
|
||||||
Group: Development/Languages/Other
|
Group: Development/Languages/Other
|
||||||
Requires: llvm-devel = %{version}
|
|
||||||
Requires: clang = %{version}
|
Requires: clang = %{version}
|
||||||
|
Requires: llvm-devel = %{version}
|
||||||
%{py_requires}
|
%{py_requires}
|
||||||
|
|
||||||
%description clang-devel
|
%description clang-devel
|
||||||
@ -132,13 +132,16 @@ This package contains vim plugins for LLVM like syntax highlighting.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1
|
%patch1
|
||||||
%patch2
|
|
||||||
%patch3
|
%patch3
|
||||||
cd tools/clang
|
cd tools/clang
|
||||||
%patch4
|
%patch4
|
||||||
%patch6
|
%patch6
|
||||||
cd ../..
|
cd ../..
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
|
||||||
|
# We hardcode i586
|
||||||
|
rm tools/clang/test/Driver/x86_features.c
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
@ -150,13 +153,11 @@ TOPLEVEL=$PWD
|
|||||||
mkdir stage1 stage2 stage3
|
mkdir stage1 stage2 stage3
|
||||||
pushd stage1
|
pushd stage1
|
||||||
|
|
||||||
# Idiot cmake doesn't let me select my own optimization level here
|
|
||||||
# hence we use configure, this needed to workaround a gcc 4.5 bug
|
|
||||||
../configure \
|
../configure \
|
||||||
--enable-optimized \
|
--enable-optimized \
|
||||||
--disable-assertions \
|
--disable-assertions \
|
||||||
--with-optimize-option="-O0" \
|
--with-optimize-option="-O0" \
|
||||||
--enable-targets=host
|
--enable-targets=host
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
@ -166,41 +167,42 @@ pushd stage2
|
|||||||
export CC=$TOPLEVEL/stage1/Release/bin/clang
|
export CC=$TOPLEVEL/stage1/Release/bin/clang
|
||||||
export CXX=$TOPLEVEL/stage1/Release/bin/clang++
|
export CXX=$TOPLEVEL/stage1/Release/bin/clang++
|
||||||
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
../configure \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
--enable-optimized \
|
||||||
-DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
|
--disable-assertions \
|
||||||
..
|
--enable-targets=host
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
popd
|
popd
|
||||||
pushd stage3
|
pushd stage3
|
||||||
# Needed to make clang resource dir working inside build tree
|
|
||||||
ln -s lib lib64
|
|
||||||
|
|
||||||
export CC=$TOPLEVEL/stage2/bin/clang
|
# autotools ignore --libdir
|
||||||
export CXX=$TOPLEVEL/stage2/bin/clang++
|
mkdir Release
|
||||||
|
ln -s lib Release/lib64
|
||||||
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
export CC=$TOPLEVEL/stage2/Release/bin/clang
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
export CXX=$TOPLEVEL/stage2/Release/bin/clang++
|
||||||
-DLLVM_ENABLE_ASSERTIONS=FALSE \
|
|
||||||
-DLLVM_ENABLE_PIC=TRUE \
|
../configure \
|
||||||
-DLLVM_ENABLE_TIMESTAMPS=FALSE \
|
--prefix=%{_prefix} \
|
||||||
-DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
|
--enable-optimized \
|
||||||
-DCLANG_VENDOR="SUSE Linux" \
|
--disable-assertions \
|
||||||
%if "%{_lib}" == "lib64"
|
--enable-pic \
|
||||||
-DLLVM_LIBDIR_SUFFIX=64 \
|
--disable-timestamps \
|
||||||
%endif
|
--enable-targets=%{_supported_archs} \
|
||||||
%if 0%{?suse_version} >= 1220
|
%if 0%{?suse_version} >= 1220
|
||||||
-DLLVM_BINUTILS_INCDIR=/usr/include \
|
--with-binutils-include=/usr/include \
|
||||||
%endif
|
%endif
|
||||||
-DCLANG_RESOURCE_DIR="../%{_lib}/clang/%{_release_version}" \
|
--with-clang-resource-dir="../%{_lib}/clang/%{_release_version}"
|
||||||
..
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags} REQUIRES_RTTI=1
|
||||||
|
|
||||||
%check
|
%check
|
||||||
cd stage3
|
cd stage3
|
||||||
make check
|
make check
|
||||||
make clang-test
|
cd tools/clang
|
||||||
|
make test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
cd stage3
|
cd stage3
|
||||||
@ -210,13 +212,19 @@ cd ..
|
|||||||
# Fixup libdir
|
# Fixup libdir
|
||||||
%if "%{_lib}" == "lib64"
|
%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
|
||||||
|
mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/lib64
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Docs
|
||||||
|
mkdir -p %{buildroot}/usr/share/doc/packages/llvm-doc/
|
||||||
|
mv %{buildroot}/usr/docs/llvm/html %{buildroot}/usr/share/doc/packages/llvm-doc/
|
||||||
|
rm -rf %{buildroot}/usr/docs/
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
||||||
file %{buildroot}/%{_libdir}/%{name}/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
file %{buildroot}/%{_libdir}/%{name}/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
||||||
|
|
||||||
find %{buildroot}%{_includedir}/clang -name '*.tmp' -exec rm {} +
|
find %{buildroot}%{_includedir}/clang -name '*.tmp' -exec rm {} +
|
||||||
|
chmod -x %{buildroot}/%{_libdir}/*.a
|
||||||
|
|
||||||
for file in `find examples -type f`; do
|
for file in `find examples -type f`; do
|
||||||
install -d %{buildroot}%{_docdir}/%{name}-doc/`dirname $file`
|
install -d %{buildroot}%{_docdir}/%{name}-doc/`dirname $file`
|
||||||
@ -272,15 +280,6 @@ install -m 755 -d %{buildroot}%{_datadir}/vim/site/syntax/
|
|||||||
install -m 644 utils/vim/*.vim %{buildroot}%{_datadir}/vim/site/syntax/
|
install -m 644 utils/vim/*.vim %{buildroot}%{_datadir}/vim/site/syntax/
|
||||||
mv utils/vim/README utils/vim/README.vim
|
mv utils/vim/README utils/vim/README.vim
|
||||||
|
|
||||||
# Create man pages because cmake buildsystem doesn't do for us
|
|
||||||
install -m 755 -d %{buildroot}%{_mandir}/man1
|
|
||||||
# tblgen is not installed anymore.
|
|
||||||
rm docs/CommandGuide/tblgen.pod
|
|
||||||
for i in docs/CommandGuide/*.pod tools/clang/docs/tools/*.pod; do
|
|
||||||
page=`echo $i|awk -F"/" '{print $(NF)}'|sed s,.pod,,` &&
|
|
||||||
pod2man -s1 $i %{buildroot}%{_mandir}/man1/$page.1;
|
|
||||||
done
|
|
||||||
|
|
||||||
# Remove gtest library
|
# Remove gtest library
|
||||||
rm -f %{buildroot}%{_libdir}/*gtest*
|
rm -f %{buildroot}%{_libdir}/*gtest*
|
||||||
|
|
||||||
@ -308,7 +307,6 @@ rm -f %{buildroot}%{_libdir}/libEnhancedDisassembly.*
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc *.TXT *.txt
|
%doc *.TXT *.txt
|
||||||
%{_bindir}/bugpoint
|
%{_bindir}/bugpoint
|
||||||
%{_bindir}/diagtool
|
|
||||||
%{_bindir}/llc
|
%{_bindir}/llc
|
||||||
%{_bindir}/lli
|
%{_bindir}/lli
|
||||||
%{_bindir}/macho-dump
|
%{_bindir}/macho-dump
|
||||||
@ -317,12 +315,12 @@ rm -f %{buildroot}%{_libdir}/libEnhancedDisassembly.*
|
|||||||
%{_bindir}/opt
|
%{_bindir}/opt
|
||||||
%{_mandir}/man1/bugpoint.1%{ext_man}
|
%{_mandir}/man1/bugpoint.1%{ext_man}
|
||||||
%exclude %{_mandir}/man1/lit.1%{ext_man}
|
%exclude %{_mandir}/man1/lit.1%{ext_man}
|
||||||
|
%{_mandir}/man1/tblgen.1%{ext_man}
|
||||||
%{_mandir}/man1/llc.1%{ext_man}
|
%{_mandir}/man1/llc.1%{ext_man}
|
||||||
%{_mandir}/man1/lli.1%{ext_man}
|
%{_mandir}/man1/lli.1%{ext_man}
|
||||||
%exclude %{_mandir}/man1/%{name}-config.1%{ext_man}
|
%exclude %{_mandir}/man1/%{name}-config.1%{ext_man}
|
||||||
%{_mandir}/man1/llvm*.1%{ext_man}
|
%{_mandir}/man1/llvm*.1%{ext_man}
|
||||||
%{_mandir}/man1/opt.1%{ext_man}
|
%{_mandir}/man1/opt.1%{ext_man}
|
||||||
%{_mandir}/man1/FileCheck.1%{ext_man}
|
|
||||||
|
|
||||||
%files clang
|
%files clang
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -340,7 +338,7 @@ rm -f %{buildroot}%{_libdir}/libEnhancedDisassembly.*
|
|||||||
%{py_sitedir}/Resources
|
%{py_sitedir}/Resources
|
||||||
%{_datadir}/clang
|
%{_datadir}/clang
|
||||||
%{_mandir}/man1/clang.1.gz
|
%{_mandir}/man1/clang.1.gz
|
||||||
%{_libdir}/libclang.so.*
|
%{_libdir}/libclang.so
|
||||||
%{_libdir}/libLTO.so
|
%{_libdir}/libLTO.so
|
||||||
%{_libdir}/*profile*.a
|
%{_libdir}/*profile*.a
|
||||||
%if 0%{?suse_version} >= 1220
|
%if 0%{?suse_version} >= 1220
|
||||||
@ -380,15 +378,12 @@ rm -f %{buildroot}%{_libdir}/libEnhancedDisassembly.*
|
|||||||
%{_includedir}/clang
|
%{_includedir}/clang
|
||||||
%{_includedir}/clang-c
|
%{_includedir}/clang-c
|
||||||
%{_libdir}/libLTO.a
|
%{_libdir}/libLTO.a
|
||||||
%{_libdir}/libclang.so
|
|
||||||
%{_libdir}/libclang*.a
|
%{_libdir}/libclang*.a
|
||||||
%{_libdir}/*profile*.so
|
%{_libdir}/*profile*.so
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}/%{name}-config
|
%{_bindir}/%{name}-config
|
||||||
%dir %{_datadir}/llvm/
|
|
||||||
%{_datadir}/llvm/*
|
|
||||||
%doc %{_mandir}/man1/%{name}-config.1%{ext_man}
|
%doc %{_mandir}/man1/%{name}-config.1%{ext_man}
|
||||||
%{_includedir}/%{name}/
|
%{_includedir}/%{name}/
|
||||||
%{_includedir}/%{name}-c/
|
%{_includedir}/%{name}-c/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user