mirror of
https://abf.rosa.ru/djam/llvm.git
synced 2025-02-23 16:22:50 +00:00
Automatic import for version 3.0
This commit is contained in:
parent
974695de0c
commit
c86d9d540f
5 changed files with 248 additions and 170 deletions
3
.abf.yml
3
.abf.yml
|
@ -1,2 +1,3 @@
|
|||
sources:
|
||||
"llvm-2.9.tgz": 500f587f840199ac53c4fc7572839d08fa9d9123
|
||||
"clang-3.0.tar.gz": 1fa11f07f957bd9c9de003d1b5a7a9ba1e0055e4
|
||||
"llvm-3.0.tar.gz": b683e7294fcf69887c0d709025d4640f5dca755b
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
--- llvm/trunk/include/llvm/Operator.h 2011/05/08 00:56:32 131061
|
||||
+++ llvm/trunk/include/llvm/Operator.h 2011/05/08 01:59:22 131062
|
||||
@@ -186,28 +186,46 @@
|
||||
};
|
||||
|
||||
class AddOperator
|
||||
- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> {};
|
||||
+ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> {
|
||||
+ ~AddOperator(); // DO NOT IMPLEMENT
|
||||
+};
|
||||
class SubOperator
|
||||
- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> {};
|
||||
+ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> {
|
||||
+ ~SubOperator(); // DO NOT IMPLEMENT
|
||||
+};
|
||||
class MulOperator
|
||||
- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> {};
|
||||
+ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> {
|
||||
+ ~MulOperator(); // DO NOT IMPLEMENT
|
||||
+};
|
||||
class ShlOperator
|
||||
- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> {};
|
||||
+ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> {
|
||||
+ ~ShlOperator(); // DO NOT IMPLEMENT
|
||||
+};
|
||||
|
||||
|
||||
class SDivOperator
|
||||
- : public ConcreteOperator<PossiblyExactOperator, Instruction::SDiv> {};
|
||||
+ : public ConcreteOperator<PossiblyExactOperator, Instruction::SDiv> {
|
||||
+ ~SDivOperator(); // DO NOT IMPLEMENT
|
||||
+};
|
||||
class UDivOperator
|
||||
- : public ConcreteOperator<PossiblyExactOperator, Instruction::UDiv> {};
|
||||
+ : public ConcreteOperator<PossiblyExactOperator, Instruction::UDiv> {
|
||||
+ ~UDivOperator(); // DO NOT IMPLEMENT
|
||||
+};
|
||||
class AShrOperator
|
||||
- : public ConcreteOperator<PossiblyExactOperator, Instruction::AShr> {};
|
||||
+ : public ConcreteOperator<PossiblyExactOperator, Instruction::AShr> {
|
||||
+ ~AShrOperator(); // DO NOT IMPLEMENT
|
||||
+};
|
||||
class LShrOperator
|
||||
- : public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> {};
|
||||
+ : public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> {
|
||||
+ ~LShrOperator(); // DO NOT IMPLEMENT
|
||||
+};
|
||||
|
||||
|
||||
|
||||
class GEPOperator
|
||||
: public ConcreteOperator<Operator, Instruction::GetElementPtr> {
|
||||
+ ~GEPOperator(); // DO NOT IMPLEMENT
|
||||
+
|
||||
enum {
|
||||
IsInBounds = (1 << 0)
|
||||
};
|
36
llvm-3.0-mandriva.patch
Normal file
36
llvm-3.0-mandriva.patch
Normal file
|
@ -0,0 +1,36 @@
|
|||
--- llvm-3.0.src/tools/clang/lib/Driver/ToolChains.cpp.orig 2011-12-07 14:14:58.862544889 -0200
|
||||
+++ llvm-3.0.src/tools/clang/lib/Driver/ToolChains.cpp 2011-12-07 14:24:20.726544993 -0200
|
||||
@@ -1389,6 +1389,7 @@ enum LinuxDistro {
|
||||
Fedora14,
|
||||
Fedora15,
|
||||
FedoraRawhide,
|
||||
+ Mandriva,
|
||||
OpenSuse11_3,
|
||||
OpenSuse11_4,
|
||||
OpenSuse12_1,
|
||||
@@ -1507,6 +1508,9 @@ static LinuxDistro DetectLinuxDistro(llv
|
||||
if (!llvm::sys::fs::exists("/etc/arch-release", Exists) && Exists)
|
||||
return ArchLinux;
|
||||
|
||||
+ if (!llvm::sys::fs::exists("/etc/mandriva-release", Exists) && Exists)
|
||||
+ return Mandriva;
|
||||
+
|
||||
return UnknownDistro;
|
||||
}
|
||||
|
||||
@@ -1654,6 +1658,7 @@ Linux::GCCInstallationDetector::GCCInsta
|
||||
"x86_64-redhat-linux",
|
||||
"x86_64-suse-linux",
|
||||
"x86_64-manbo-linux-gnu",
|
||||
+ "x86_64-mandriva-linux-gnu",
|
||||
"x86_64-linux-gnu",
|
||||
"x86_64-slackware-linux"
|
||||
};
|
||||
@@ -1668,6 +1673,7 @@ Linux::GCCInstallationDetector::GCCInsta
|
||||
"i686-pc-linux-gnu",
|
||||
"i486-linux-gnu",
|
||||
"i386-linux-gnu",
|
||||
+ "i586-mandriva-linux-gnu",
|
||||
"i686-redhat-linux",
|
||||
"i586-redhat-linux",
|
||||
"i386-redhat-linux",
|
28
llvm-3.0-soversion.patch
Normal file
28
llvm-3.0-soversion.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
--- llvm-3.0.src/cmake/modules/AddLLVM.cmake.orig 2011-12-29 18:06:26.000000000 +0000
|
||||
+++ llvm-3.0.src/cmake/modules/AddLLVM.cmake 2011-12-29 18:08:18.000000000 +0000
|
||||
@@ -11,6 +11,10 @@ macro(add_llvm_library name)
|
||||
|
||||
if( BUILD_SHARED_LIBS )
|
||||
llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )
|
||||
+ SET_TARGET_PROPERTIES(${name}
|
||||
+ PROPERTIES
|
||||
+ VERSION ${PACKAGE_VERSION}
|
||||
+ SOVERSION ${PACKAGE_VERSION})
|
||||
endif()
|
||||
|
||||
# Ensure that the system libraries always comes last on the
|
||||
--- llvm-3.0.src/tools/clang/CMakeLists.txt.orig 2011-12-29 18:18:24.000000000 +0000
|
||||
+++ llvm-3.0.src/tools/clang/CMakeLists.txt 2011-12-29 18:19:44.000000000 +0000
|
||||
@@ -190,6 +190,12 @@ macro(add_clang_library name)
|
||||
|
||||
target_link_libraries( ${name} ${LLVM_USED_LIBS} )
|
||||
llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )
|
||||
+ if( BUILD_SHARED_LIBS )
|
||||
+ SET_TARGET_PROPERTIES(${name}
|
||||
+ PROPERTIES
|
||||
+ VERSION ${PACKAGE_VERSION}
|
||||
+ SOVERSION ${PACKAGE_VERSION})
|
||||
+ endif()
|
||||
target_link_libraries( ${name} ${LLVM_COMMON_LIBS} )
|
||||
link_system_libs( ${name} )
|
||||
|
294
llvm.spec
294
llvm.spec
|
@ -1,35 +1,43 @@
|
|||
%define _disable_ld_no_undefined 0
|
||||
%define _disable_ld_no_undefined 0
|
||||
%define _requires_exceptions devel(libLLVMSupport\\|devel(libclangARCMigrate\\|devel(libclangAST\\|devel(libclangBasic\\|devel(libclangFrontend\\|devel(libclangLex\\|devel(libclangSema\\|libclangBasic
|
||||
%define ffi_include_dir %(pkg-config libffi --cflags-only-I | sed -e 's/-I//')
|
||||
%define c_include_dirs %(echo `gcc -print-search-dirs | grep install | sed -e 's/install: //'`include:%{_includedir})
|
||||
%define version 3.0
|
||||
%define major 3
|
||||
%define minor 0
|
||||
%define libllvm %mklibname llvm %{major}.%{minor}
|
||||
%define libllvm_devel %mklibname -d llvm
|
||||
%define libclang %mklibname clang %{major}.%{minor}
|
||||
%define libclang_devel %mklibname -d clang
|
||||
|
||||
%define compile_apidox 0
|
||||
%{?_with_apidox: %{expand: %%global compile_apidox 1}}
|
||||
Name: llvm
|
||||
Version: %{version}
|
||||
Release: 4
|
||||
Summary: Low Level Virtual Machine (LLVM)
|
||||
License: NCSA
|
||||
Group: Development/Other
|
||||
URL: http://llvm.org/
|
||||
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tar.gz
|
||||
Source1: http://llvm.org/releases/%{version}/clang-%{version}.tar.gz
|
||||
%rename llvm-doc
|
||||
Requires: %{libllvm} = %{EVRD}
|
||||
Requires: libstdc++-devel
|
||||
BuildRequires: bison
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: ffi-devel
|
||||
BuildRequires: flex
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: groff
|
||||
BuildRequires: libstdc++-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: sed
|
||||
BuildRequires: tcl
|
||||
BuildRequires: zip
|
||||
|
||||
Name: llvm
|
||||
Version: 2.9
|
||||
Release: %mkrel 3
|
||||
Summary: Low Level Virtual Machine (LLVM)
|
||||
License: NCSA
|
||||
Group: Development/Other
|
||||
URL: http://llvm.org/
|
||||
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tgz
|
||||
Patch0: llvm-2.9-gcc46.patch
|
||||
BuildRoot: %_tmppath/%name-%version-%release-root
|
||||
Obsoletes: llvm-devel
|
||||
Obsoletes: llvm-ocaml
|
||||
Requires: libstdc++-devel
|
||||
BuildRequires: bison
|
||||
BuildRequires: groff
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: ocaml
|
||||
BuildRequires: tcl
|
||||
%if %{compile_apidox}
|
||||
BuildRequires: doxygen
|
||||
%endif
|
||||
BuildRequires: flex
|
||||
BuildRequires: sed
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: libstdc++-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: zip
|
||||
Patch0: llvm-3.0-mandriva.patch
|
||||
Patch1: llvm-3.0-soversion.patch
|
||||
|
||||
%description
|
||||
LVM is a robust system, particularly well suited for developing new mid-level
|
||||
|
@ -40,111 +48,173 @@ including those which require compile-time, link-time, or run-time optimization
|
|||
for effective implementation, proper tail calls or garbage collection.
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/*
|
||||
%exclude %{_bindir}/clang*
|
||||
%exclude %{_bindir}/llvm-config
|
||||
%exclude %{_bindir}/c-index-test
|
||||
%doc LICENSE.TXT
|
||||
%{_bindir}/bugpoint
|
||||
%{_bindir}/llc
|
||||
%{_bindir}/lli
|
||||
%{_bindir}/opt
|
||||
%{_bindir}/llvm-ar
|
||||
%{_bindir}/llvm-as
|
||||
%{_bindir}/llvm-bcanalyzer
|
||||
%{_bindir}/llvm-diff
|
||||
%{_bindir}/llvm-dis
|
||||
%{_bindir}/llvm-extract
|
||||
%{_bindir}/llvm-ld
|
||||
%{_bindir}/llvm-link
|
||||
%{_bindir}/llvm-mc
|
||||
%{_bindir}/llvm-nm
|
||||
%{_bindir}/llvm-objdump
|
||||
%{_bindir}/llvm-prof
|
||||
%{_bindir}/llvm-ranlib
|
||||
%{_bindir}/llvm-stub
|
||||
%{_bindir}/llvmc
|
||||
%{_bindir}/macho-dump
|
||||
%{_bindir}/tblgen
|
||||
%{_mandir}/man1/*
|
||||
%{_libdir}/ocaml/*
|
||||
%{_bindir}/llvm-config
|
||||
%{_includedir}/*
|
||||
%{_libdir}/%{name}
|
||||
|
||||
#-----------------------------------------------------------
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for LLVM
|
||||
Group: Books/Computer books
|
||||
Requires: %{name} = %{version}
|
||||
Obsoletes: llvm-doc-evel
|
||||
|
||||
%description doc
|
||||
Documentation for the LLVM compiler infrastructure.
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root,-)
|
||||
%doc README.txt
|
||||
%doc docs/*.css
|
||||
%doc docs/*.html
|
||||
%doc docs/img
|
||||
%doc docs/tutorial
|
||||
%doc docs/ocamldoc
|
||||
%doc examples
|
||||
%if %{compile_apidox}
|
||||
%doc docs/doxygen
|
||||
%endif
|
||||
|
||||
#-----------------------------------------------------------
|
||||
%package -n %{libllvm}
|
||||
Summary: LLVM %{version} shared libraries
|
||||
Group: System/Libraries
|
||||
%if "%{major}.%{minor}" == "3.0"
|
||||
# removed before next submit
|
||||
%define libllvm3 %mklibname llvm 3
|
||||
%rename %{libllvm3}
|
||||
%endif
|
||||
|
||||
%description -n %{libllvm}
|
||||
%{summary}.
|
||||
|
||||
%files -n %{libllvm}
|
||||
%{_libdir}/*.so.%{major}.%{minor}
|
||||
%exclude %{_libdir}/lib*clang*.so.%{major}.%{minor}
|
||||
|
||||
#-----------------------------------------------------------
|
||||
%package -n %{libllvm_devel}
|
||||
Summary: LLVM %{version} development files
|
||||
Group: Development/Other
|
||||
Requires: %{libllvm} = %{EVRD}
|
||||
Requires: llvm = %{EVRD}
|
||||
%rename llvm-devel
|
||||
|
||||
%description -n %{libllvm_devel}
|
||||
%{summary}.
|
||||
|
||||
%files -n %{libllvm_devel}
|
||||
%{_bindir}/llvm-config
|
||||
%{_libdir}/*.so
|
||||
%exclude %{_libdir}/lib*clang*.so
|
||||
%{_includedir}/llvm
|
||||
%{_includedir}/llvm-c
|
||||
%{_libdir}/cmake/llvm
|
||||
|
||||
#-----------------------------------------------------------
|
||||
%package -n clang
|
||||
Summary: C/C++/Objective-C Frontend Toolkit
|
||||
Group: Development/Other
|
||||
Requires: llvm = %{EVRD}
|
||||
Requires: %{libclang} = %{EVRD}
|
||||
Requires: gcc-c++
|
||||
|
||||
%description -n clang
|
||||
Clang is an LLVM front end for the C, C++, and Objective-C languages.
|
||||
Clang aims to provide a better user experience through expressive
|
||||
diagnostics, a high level of conformance to language standards, fast
|
||||
compilation, and low memory use. Like LLVM, Clang provides a modular,
|
||||
library-based architecture that makes it suitable for creating or
|
||||
integrating with other development tools. Clang is considered a
|
||||
production-quality compiler for C, Objective-C, C++ and Objective-C++
|
||||
on x86 (32- and 64-bit), and for Darwin/ARM targets.
|
||||
|
||||
%files -n clang
|
||||
%{_bindir}/clang*
|
||||
%{_bindir}/c-index-test
|
||||
%{_libdir}/clang
|
||||
|
||||
#-----------------------------------------------------------
|
||||
%package -n %{libclang}
|
||||
Summary: Clang %{version} shared libraries
|
||||
Group: Development/Other
|
||||
%if "%{major}.%{minor}" == "3.0"
|
||||
# removed before next submit
|
||||
%define libclang3 %mklibname clang 3
|
||||
%rename %{libclang3}
|
||||
%endif
|
||||
|
||||
%description -n %{libclang}
|
||||
%{summary}.
|
||||
|
||||
%files -n %{libclang}
|
||||
%{_libdir}/lib*clang*.so.%{major}.%{minor}
|
||||
|
||||
#-----------------------------------------------------------
|
||||
%package -n %{libclang_devel}
|
||||
Summary: Clang %{version} development files
|
||||
Group: Development/Other
|
||||
Requires: %{libclang} = %{EVRD}
|
||||
Provides: clang-devel = %{EVRD}
|
||||
|
||||
%description -n %{libclang_devel}
|
||||
%{summary}.
|
||||
|
||||
%files -n %{libclang_devel}
|
||||
%{_includedir}/clang
|
||||
%{_includedir}/clang-c
|
||||
%{_libdir}/lib*clang*.so
|
||||
|
||||
#-----------------------------------------------------------
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p2
|
||||
%setup -q -n %{name}-%{version}.src -a1
|
||||
mv clang-%{version}.src tools/clang
|
||||
|
||||
cat > autoconf/config.guess <<EOF
|
||||
#!/bin/sh
|
||||
echo %{_target_platform}
|
||||
EOF
|
||||
chmod +x autoconf/config.guess
|
||||
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%configure2_5x \
|
||||
--libdir=%{_libdir}/%{name} \
|
||||
--datadir=%{_datadir}/%{name} \
|
||||
--enable-shared \
|
||||
--enable-jit \
|
||||
--enable-optimized \
|
||||
--enable-targets=host-only \
|
||||
--disable-expensive-checks \
|
||||
--enable-debug-runtime \
|
||||
--disable-assertions \
|
||||
--enable-threads \
|
||||
%if %{compile_apidox}
|
||||
--enable-doxygen \
|
||||
%endif
|
||||
%if "%{_lib}" == "lib64"
|
||||
--enable-pic
|
||||
%else
|
||||
--enable-pic=no
|
||||
%cmake \
|
||||
-DC_INCLUDE_DIRS:STRING=%{c_include_dirs} \
|
||||
-DCLANG_VENDOR:STRING=%{vendor} \
|
||||
-DFFI_INCLUDE_DIR:PATH=%{ffi_include_dir} \
|
||||
-DLLVM_ENABLE_ASSERTIONS:BOOL=false \
|
||||
-DLLVM_INCLUDE_EXAMPLES:BOOL=false \
|
||||
%ifarch x86_64
|
||||
-DLLVM_LIBDIR_SUFFIX:STRING=64 \
|
||||
%endif
|
||||
-DLLVM_ENABLE_FFI:BOOL=true \
|
||||
-DBUILD_SHARED_LIBS:BOOL=true \
|
||||
-DBUILD_STATIC_LIBS:BOOL=false
|
||||
|
||||
LD_LIBRARY_PATH=$PWD/lib:$_LIBRARY_PATH \
|
||||
%make
|
||||
|
||||
#-----------------------------------------------------------
|
||||
%install
|
||||
%__rm -rf %buildroot
|
||||
|
||||
|
||||
%makeinstall_std \
|
||||
KEEP_SYMBOLS=1 \
|
||||
PROJ_docsdir=%{_docdir}/%{name} \
|
||||
PROJ_etcdir=%{_sysconfdir}/%{name} \
|
||||
PROJ_libdir=%{_libdir}/%{name}
|
||||
|
||||
# Invalid dir
|
||||
rm -rf %buildroot%_bindir/.dir
|
||||
%makeinstall_std -C build
|
||||
mkdir -p %{buildroot}%{_libdir}/cmake
|
||||
mv -f %{buildroot}%{_datadir}/llvm/cmake %{buildroot}%{_libdir}/cmake/llvm
|
||||
rmdir %{buildroot}%{_datadir}/llvm
|
||||
|
||||
%ifarch x86_64
|
||||
# adjust library path
|
||||
sed -i -e 's|ABS_RUN_DIR/lib.*"|ABS_RUN_DIR/%{_lib}/%{name}"|' %{buildroot}%_bindir/llvm-config
|
||||
|
||||
%clean
|
||||
%__rm -rf %buildroot
|
||||
sed -i -e 's|ABS_RUN_DIR/lib.*"|ABS_RUN_DIR/%{_lib}"|' \
|
||||
%{buildroot}%{_bindir}/llvm-config
|
||||
%endif
|
||||
|
||||
rm -f %{buildroot}%{_libdir}/{BugpointPasses.so,LLVMHello.so,profile_rt.so}
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed May 18 2011 Funda Wang <fwang@mandriva.org> 2.9-3mdv2011.0
|
||||
* Tue Jan 10 2012 Paulo Andrade <pcpa@mandriva.com.br> 3.0-4
|
||||
+ Revision: 759605
|
||||
- Rename library packages to match soname.
|
||||
|
||||
* Sun Jan 08 2012 Funda Wang <fwang@mandriva.org> 3.0-3
|
||||
+ Revision: 758660
|
||||
- force to disable assertion
|
||||
|
||||
* Thu Dec 29 2011 Paulo Andrade <pcpa@mandriva.com.br> 3.0-2
|
||||
+ Revision: 748201
|
||||
- Build versioned shared libraries and split packages for easier upgrades.
|
||||
|
||||
* Wed Dec 07 2011 Paulo Andrade <pcpa@mandriva.com.br> 3.0-1
|
||||
+ Revision: 738726
|
||||
- Update to llvm 3.0 and enable clang 3.0.
|
||||
|
||||
* Wed May 18 2011 Funda Wang <fwang@mandriva.org> 2.9-3
|
||||
+ Revision: 675990
|
||||
- rebuild
|
||||
- add upstream patch to deal with -std=c++0x flag used in lightspark (upstream bug#9869)
|
||||
|
@ -192,7 +262,7 @@ sed -i -e 's|ABS_RUN_DIR/lib.*"|ABS_RUN_DIR/%{_lib}/%{name}"|' %{buildroot}%_bin
|
|||
- update file list
|
||||
- new version 2.6
|
||||
|
||||
* Sun Sep 27 2009 Olivier Blin <oblin@mandriva.com> 2.5-8mdv2010.0
|
||||
* Sun Sep 27 2009 Olivier Blin <blino@mandriva.org> 2.5-8mdv2010.0
|
||||
+ Revision: 450115
|
||||
- make the configure stuff know about mips and mipsel
|
||||
(rediffed patch from Arnaud Patard)
|
||||
|
|
Loading…
Add table
Reference in a new issue