Ismail Dönmez 2011-04-20 13:53:17 +00:00 committed by Git OBS Bridge
commit fb34434f16
9 changed files with 2756 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
clang-2.9.tar.bz2 Normal file
View File

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

12
llvm-2.4-fix-ocaml.patch Normal file
View File

@ -0,0 +1,12 @@
diff -Nur llvm-2.7-orig/bindings/ocaml/Makefile.ocaml llvm-2.7/bindings/ocaml/Makefile.ocaml
--- llvm-2.7-orig/bindings/ocaml/Makefile.ocaml 2010-07-25 14:27:11.996652508 +0200
+++ llvm-2.7/bindings/ocaml/Makefile.ocaml 2010-07-25 14:28:31.082402281 +0200
@@ -165,7 +165,7 @@
install-deplibs:
$(Verb) $(MKDIR) $(PROJ_libocamldir)
$(Verb) for i in $(DestLibs:$(PROJ_libocamldir)/%=%); do \
- ln -sf "$(PROJ_libdir)/$$i" "$(PROJ_libocamldir)/$$i"; \
+ ln -sf "${OVERRIDE_libdir}/$$i" "$(PROJ_libocamldir)/$$i"; \
done
uninstall-deplibs:

2236
llvm-2.8-doxygen.patch Normal file

File diff suppressed because it is too large Load Diff

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

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

9
llvm-rpmlintrc Normal file
View File

@ -0,0 +1,9 @@
# This line is mandatory to access the configuration functions
from Config import *
# it is a compiler and the package provides llvm-gcc-devel, llvm-gcc-c++-devel
addFilter("devel-file-in-non-devel-package .*/clang/.*/include/.*")
addFilter("zero-length .*/llvm-apidoc/.*")
addFilter("arch-dependent-file-in-usr-share .*/llvm-apidoc/.*")
addFilter("binaryinfo-readelf-failed .*/llvm-apidoc/.*")

67
llvm.changes Normal file
View File

@ -0,0 +1,67 @@
-------------------------------------------------------------------
Thu Apr 7 08:22:48 UTC 2011 - idoenmez@novell.com
- Update to 2.9
-------------------------------------------------------------------
Wed Apr 6 18:50:59 CEST 2011 - stepan@coresystems.de
- drop revision from Requires: fields
- update to 2.8.99 revision 129008.
-------------------------------------------------------------------
Mon Mar 7 20:09:51 CET 2011 - jslaby@suse.de
- spec file cleanup
-------------------------------------------------------------------
Wed Dec 22 11:41:15 UTC 2010 - dmacvicar@suse.de
- Do not require specific ffi version but gather the
appropiate one from the distro
-------------------------------------------------------------------
Fri Dec 10 04:57:21 UTC 2010 - reddwarf@opensuse.org
- Fix compatibility with C++0x compilers (g++ 4.5)
-------------------------------------------------------------------
Mon Nov 29 10:31:49 UTC 2010 - ismail@namtrac.org
- Fix C include paths
-------------------------------------------------------------------
Fri Nov 26 12:48:54 UTC 2010 - ismail@namtrac.org
- Fix header path for openSUSE 11.4
- Enabled PIC for x86 for loadable module support
- Enable package tests for llvm and clang
- Disable package timestamps to silence an rpmlint warning
-------------------------------------------------------------------
Wed Jun 2 00:00:00 UTC 2010 - anschneider@exsuse.de
- Fixed the build on x86 plattforms.
- Package the clang c++-analyzer.
-------------------------------------------------------------------
Sat May 1 00:00:00 UTC 2010 - jslaby@suse.de
- update to llvm 2.7
-------------------------------------------------------------------
Mon Mar 15 00:00:00 UTC 2010 - jslaby@suse.de
- added vim plugins
-------------------------------------------------------------------
Sun Mar 14 00:00:00 UTC 2010 - jslaby@suse.de
- added libffi-devel to llvm-devel requires so that build does not fail
- fixed build of explicit constructors with gcc45
-------------------------------------------------------------------
Mon Nov 2 00:00:00 UTC 2009 - jslaby@suse.de
- Initial 2.6 release

402
llvm.spec Normal file
View File

@ -0,0 +1,402 @@
#
# spec file for package llvm (Version 2.8)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%bcond_with doxygen
%ifarch s390 s390x sparc64
# No ocaml on these arches
%bcond_with ocaml
%else
%bcond_without ocaml
%endif
%define _prefix /usr
%define _sharedir %{_prefix}/share
Name: llvm
Summary: Low Level Virtual Machine
Version: 2.9
Release: 0
License: Other Open Source
Group: Development/Languages/Other
Url: http://www.llvm.org
Source0: %{name}-%{version}.tar.bz2
Source1: clang-%{version}.tar.bz2
Source100: %{name}-rpmlintrc
Patch0: llvm-2.4-fix-ocaml.patch
# http://llvm.org/bugs/show_bug.cgi?id=8214
Patch1: llvm-2.8-doxygen.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf automake bison cmake flex gcc gcc-c++
BuildRequires: chrpath groff libtool python-devel
BuildRequires: dejagnu tcl-devel tk-devel
BuildRequires: fdupes
%if %{with doxygen}
BuildRequires: cairo doxygen freefont gd graphviz graphviz-gd zip
%endif
%if %{with ocaml}
BuildRequires: ocaml ocaml-facile ocaml-ocamldoc
%endif
# Code10 does not have libffi
%if 0%{?suse_version} > 1100
BuildRequires: libffi-devel
%endif
# LLVM is not supported on PPC64
# http://llvm.org/bugs/show_bug.cgi?id=3729
ExcludeArch: ppc64
%description
LLVM is a compiler infrastructure designed for compile-time,
link-time, runtime, and idle-time optimization of programs from
arbitrary programming languages.
The compiler infrastructure includes mirror sets of programming
tools as well as libraries with equivalent functionality.
%package devel
Summary: Libraries and Header Files for LLVM
Group: Development/Languages/Other
Requires: %{name} = %{version}-%{release}
Requires: libstdc++-devel >= 3.4 libffi-devel
AutoReqProv: on
%description devel
This package contains library and header files needed to develop
new native programs that use the LLVM infrastructure.
%package doc
Summary: Documentation for LLVM
Group: Documentation/HTML
Requires: %{name} = %{version}-%{release}
AutoReqProv: on
%description doc
Documentation for the LLVM compiler infrastructure.
%if %{with doxygen}
%package apidoc
Summary: API documentation for LLVM
Group: Documentation/HTML
%description apidoc
API documentation for the LLVM compiler infrastructure.
%endif
%package clang
Summary: CLANG frontend for LLVM
Group: Development/Languages/Other
Requires: %{name} = %{version}-%{release}
%{py_requires}
AutoReqProv: on
%description clang
This package contains the clang (C language) frontend for LLVM.
%package clang-devel
Summary: CLANG frontend for LLVM (devel package)
Group: Development/Languages/Other
Requires: %{name} = %{version}-%{release}
%{py_requires}
AutoReqProv: on
%description clang-devel
This package contains the clang (C language) frontend for LLVM.
(development files)
%if %{with ocaml}
%package ocaml
Summary: OCaml Binding for LLVM
Group: Development/Libraries/Other
Requires: %{name} = %{version}-%{release}
Requires: ocaml-runtime
AutoReqProv: on
%description ocaml
This package contains the OCaml binding for LLVM.
%package ocaml-devel
Summary: Development Files for llvm-ocaml
Group: Development/Libraries/Other
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-ocaml = %{version}-%{release}
%description ocaml-devel
The llvm-ocaml-devel package contains libraries and signature files
for developing applications that use llvm-ocaml.
%endif
%package vim-plugins
Summary: Vim plugins for LLVM
Group: Productivity/Text/Editors
Requires: vim
AutoReqProv: on
%description vim-plugins
This package contains vim plugins for LLVM like syntax highlighting.
%prep
%setup -q -n %{name}-%{version} -b 1
mv ../clang-%{version}/ tools/clang
%patch0 -p1
pushd docs
%patch1 -p0
popd
%build
# Enable rtti
# http://llvm.org/docs/Packaging.html
export REQUIRES_RTTI=1
%configure --prefix=%{_prefix} \
--libdir=%{_libdir}/%{name} \
--datadir=%{_datadir}/%{name} \
--enable-assertions \
--enable-jit \
--enable-optimized \
--enable-pic \
--enable-timestamps=no \
--with-c-include-dirs=/usr/include:\
%{_libdir}/gcc/%{_target_cpu}-suse-linux/4.5/include:\
%{_libdir}/gcc/%{_target_cpu}-suse-linux/4.5/include-fixed
%if %{with doxygen}
--enable-doxygen \
%endif
make %{?_smp_mflags} KEEP_SYMBOLS=1
cd tools/clang
make %{?_smp_mflags} KEEP_SYMBOLS=1
%check
make check
cd tools/clang
make test
%install
%makeinstall DESTDIR=%{buildroot} \
PROJ_etcdir=%{_sysconfdir}/%{name} \
PROJ_libdir=%{_libdir}/%{name} \
PROJ_docsdir=%{_docdir}/%{name}-doc \
OVERRIDE_libdir=%{_libdir}/%{name} \
KEEP_SYMBOLS=1
# cleanup
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
# And OCaml .o files
# %%__rm %%{buildroot}%%{_libdir}/ocaml/*.o
find %{buildroot}%{_includedir}/clang -name '*.tmp' -exec rm {} +
# Adjust library path
%__sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \
%{buildroot}%{_bindir}/%{name}-config
for file in `find examples -type f`; do
install -d %{buildroot}%{_docdir}/%{name}-doc/`dirname $file`
install -m 644 $file %{buildroot}%{_docdir}/%{name}-doc/$file
done
%if %{with doxygen}
# Move api-doc so fdupes can filter the duplicates
%__install -dm 755 %{buildroot}%{_docdir}/%{name}-apidoc
%__mv %{buildroot}%{_docdir}/%{name}-doc/html/doxygen \
%{buildroot}%{_docdir}/%{name}-apidoc
%endif
find %{buildroot}%{_docdir}/%{name}-doc/ -name '*.tar.gz' -exec rm {} \;
chmod -x %{buildroot}%{_libdir}/%{name}/*.[oa]
%if %{with ocaml}
chmod -x %{buildroot}%{_libdir}/ocaml/libllvm*a
%endif
install -d %{buildroot}%{py_sitedir}
#mv %%{buildroot}%%{_bindir}/ccclib %%{buildroot}%%{py_sitedir}
# install scan-build et al
install -d %{buildroot}%{_sharedir}/clang
pushd tools/clang/tools
for file in scan-build/ccc-analyzer scan-build/scan-build \
scan-view/scan-view; do
install $file %{buildroot}%{_bindir}
done
for file in scan-build/scanview.css scan-build/sorttable.js; do
install -m 644 $file %{buildroot}%{_sharedir}/clang/
done
for file in scan-view/Reporter.py scan-view/ScanView.py \
scan-view/startfile.py; do
install -m 644 $file %{buildroot}%{py_sitedir}
done
install -d %{buildroot}%{py_sitedir}/Resources/
for file in scan-view/Resources/*; do
install -m 644 $file %{buildroot}%{py_sitedir}/Resources/
done
popd
pushd %{buildroot}%{_bindir}
ln -s ccc-analyzer c++-analyzer
popd
sed -i 's,RealBin/bin/clang,RealBin/clang,' \
%{buildroot}%{_bindir}/scan-build
sed -i 's,RealBin/bin/ccc-analyzer,RealBin/ccc-analyzer,' \
%{buildroot}%{_bindir}/scan-build
sed -i 's,RealBin/bin/ccc-analyzer,RealBin/ccc-analyzer,' \
%{buildroot}%{_bindir}/scan-build
sed -i 's,$RealBin/sorttable.js,%{_sharedir}/clang/sorttable.js,' \
%{buildroot}%{_bindir}/scan-build
sed -i 's,$RealBin/scanview.css,%{_sharedir}/clang/scanview.css,' \
%{buildroot}%{_bindir}/scan-build
sed -i 's,RealBin/bin,RealBin,' \
%{buildroot}%{_bindir}/scan-build
install -m 755 -d %{buildroot}%{_datadir}/vim/site/syntax/
install -m 644 utils/vim/*.vim %{buildroot}%{_datadir}/vim/site/syntax/
mv utils/vim/README utils/vim/README.vim
%fdupes -s %{buildroot}%{_docdir}/%{name}
%fdupes -s %{buildroot}%{_docdir}/%{name}-doc
%if %{with doxygen}
%fdupes -s %{buildroot}%{_docdir}/%{name}-apidoc
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc *.TXT *.txt
%{_bindir}/bugpoint
%{_bindir}/llc
%{_bindir}/lli
%{_bindir}/macho-dump
%exclude %{_bindir}/%{name}-config
%{_bindir}/%{name}*
%{_bindir}/opt
%{_mandir}/man1/bugpoint.1.gz
%exclude %{_mandir}/man1/lit.1.gz
%{_mandir}/man1/llc.1.gz
%{_mandir}/man1/lli.1.gz
%exclude %{_mandir}/man1/%{name}-config.1.gz
%{_mandir}/man1/llvm*.1.gz
%{_mandir}/man1/opt.1.gz
%files clang
%defattr(-,root,root)
%{_bindir}/clang
%{_bindir}/clang++
%{_bindir}/tblgen
%{_bindir}/ccc-analyzer
%{_bindir}/c++-analyzer
%{_bindir}/scan-build
%{_bindir}/scan-view
%{py_sitedir}/ScanView.py
%{py_sitedir}/Reporter.py
%{py_sitedir}/startfile.py
%{py_sitedir}/Resources
%{_sharedir}/clang
%{_mandir}/man1/clang.1.gz
%{_mandir}/man1/tblgen.1.gz
# rpmlint complains that these files should go
# into a -devel package. They are integral part
# of clang, so I don't think this is right.
# Similarly, for gcc they are not part of a gcc-devel
# package either. What's the right way to proceed?
%dir %{_prefix}/lib/clang
%dir %{_prefix}/lib/clang/*
%dir %{_prefix}/lib/clang/*/include
%{_prefix}/lib/clang/*/include/altivec.h
%{_prefix}/lib/clang/*/include/arm_neon.h
%{_prefix}/lib/clang/*/include/avxintrin.h
%{_prefix}/lib/clang/*/include/emmintrin.h
%{_prefix}/lib/clang/*/include/float.h
%{_prefix}/lib/clang/*/include/immintrin.h
%{_prefix}/lib/clang/*/include/iso646.h
%{_prefix}/lib/clang/*/include/limits.h
%{_prefix}/lib/clang/*/include/mm_malloc.h
%{_prefix}/lib/clang/*/include/mmintrin.h
%{_prefix}/lib/clang/*/include/nmmintrin.h
%{_prefix}/lib/clang/*/include/pmmintrin.h
%{_prefix}/lib/clang/*/include/smmintrin.h
%{_prefix}/lib/clang/*/include/stdarg.h
%{_prefix}/lib/clang/*/include/stdbool.h
%{_prefix}/lib/clang/*/include/stddef.h
%{_prefix}/lib/clang/*/include/stdint.h
%{_prefix}/lib/clang/*/include/tgmath.h
%{_prefix}/lib/clang/*/include/tmmintrin.h
%{_prefix}/lib/clang/*/include/varargs.h
%{_prefix}/lib/clang/*/include/wmmintrin.h
%{_prefix}/lib/clang/*/include/x86intrin.h
%{_prefix}/lib/clang/*/include/xmmintrin.h
%files clang-devel
%defattr(-,root,root)
%{_includedir}/clang
%{_includedir}/clang-c
%files devel
%defattr(-,root,root,-)
%{_bindir}/%{name}-config
%doc %{_mandir}/man1/%{name}-config.1.gz
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%dir %{_includedir}/%{name}-c
%{_includedir}/%{name}-c/*
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*
%if %{with ocaml}
%files ocaml
%defattr(-,root,root,-)
%{_libdir}/ocaml/*.cma
%{_libdir}/ocaml/*.cmi
%files ocaml-devel
%defattr(-,root,root,-)
%{_libdir}/ocaml/*.a
%{_libdir}/ocaml/*.cmx*
%{_libdir}/ocaml/*.mli
%endif
%files doc
%defattr(-,root,root,-)
%{_docdir}/%{name}-doc
%if %{with doxygen}
%files apidoc
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-apidoc
%endif
%files vim-plugins
%defattr(-,root,root,-)
%doc utils/vim/README.vim
%{_datadir}/vim/
%changelog