mirror of
https://abf.rosa.ru/djam/lcc.git
synced 2025-02-23 14:02:48 +00:00
503 lines
15 KiB
RPMSpec
503 lines
15 KiB
RPMSpec
%global debug_package %nil
|
|
# all %%e2k arches have the same triplet
|
|
%define gcc_target_platform e2k-%{_vendor}-linux
|
|
|
|
%define eprof_major 1
|
|
%define libeprof %mklibname eprof %{eprof_major}
|
|
%define libeprof_devel %mklibname eprof -d
|
|
%define libeprof_static_devel %mklibname eprof -d -s
|
|
|
|
%define omp_major 1
|
|
%define libomp %mklibname omp %{omp_major}
|
|
%define libomp_devel %mklibname omp -d
|
|
%define libomp_static_devel %mklibname omp -d -s
|
|
|
|
%bcond_with bundled_libs
|
|
|
|
Summary: lcc from mcst repository binaries
|
|
Name: lcc
|
|
Version: 1.25.26
|
|
Release: 1
|
|
License: GPLv2+
|
|
Group: System/Base
|
|
# https://storage.mcst.ru/repo/pdk/sp/1.25/
|
|
Source0: lcc_%{version}-vd6u2_e2k-8c.deb
|
|
Source1: lcc-libs_%{version}-vd6u42_e2k-8c.deb
|
|
Source2: c89
|
|
Source3: c99
|
|
Source100: lcc.rpmlintrc
|
|
Provides: gcc
|
|
Provides: gcc(e2k-64)
|
|
Provides: gcc-c++
|
|
Provides: gcc-cpp
|
|
Provides: gcc-gfortran
|
|
Requires: lcc-kit-devel
|
|
|
|
Requires: %{libomp_static_devel} >= %{EVRD}
|
|
Requires: %{libeprof_static_devel} >= %{EVRD}
|
|
Exclusivearch: %{e2k}
|
|
|
|
%description
|
|
lcc from mcst repository binaries
|
|
|
|
%package doc
|
|
Summary: doc package for %{name}
|
|
|
|
%description doc
|
|
documentation for MCST LCC
|
|
|
|
%if %{with bundled_libs}
|
|
#-----------------------------------------------------------------------
|
|
# stdc++ operations
|
|
#-----------------------------------------------------------------------
|
|
|
|
%define stdcxx_major 6
|
|
%define libstdcxx %mklibname stdc++ %{stdcxx_major}
|
|
%define libstdcxx_devel %mklibname stdc++ -d
|
|
%define libstdcxx_static_devel %mklibname stdc++ -d -s
|
|
|
|
%package -n %{libstdcxx}
|
|
Summary: GNU Standard C++ library
|
|
Group: System/Libraries
|
|
%if "%{libstdcxx}" != "libstdc++"
|
|
Provides: libstdc++ = %{EVRD}
|
|
%endif
|
|
|
|
%description -n %{libstdcxx}
|
|
The libstdc++ package contains a rewritten standard compliant
|
|
GCC Standard C++ Library.
|
|
|
|
%files -n %{libstdcxx}
|
|
%{_libdir}/libstdc++.so.%{stdcxx_major}*
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
%package -n %{libstdcxx_devel}
|
|
Summary: Header files and libraries for C++ development
|
|
Group: Development/C++
|
|
Requires: %{libstdcxx} = %{EVRD}
|
|
%if "%{libstdcxx_devel}" != "libstdc++-devel"
|
|
Provides: libstdc++-devel = %{EVRD}
|
|
%endif
|
|
Provides: stdc++-devel = %{EVRD}
|
|
|
|
# We don't want to pull in an entire Python environment just because of
|
|
# libstdc++'s python based gdb plugin...
|
|
%define __requires_exclude_from ^(%{py3_puresitedir}|%{_datadir}/gdb/).*$
|
|
|
|
%description -n %{libstdcxx_devel}
|
|
This is the GNU implementation of the standard C++ libraries. This
|
|
package includes the header files and libraries needed for C++
|
|
development. This includes rewritten implementation of STL.
|
|
|
|
%files -n %{libstdcxx_devel}
|
|
%{_includedir}/c++/g++-v3/
|
|
%{_libdir}/libstdc++.so
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
%package -n %{libstdcxx_static_devel}
|
|
Summary: Static libraries for the GNU standard C++ library
|
|
Group: Development/C++
|
|
Requires: %{libstdcxx_devel} = %{EVRD}
|
|
%if "%{libstdcxx_static_devel}" != "libstdc++-static-devel"
|
|
Provides: libstdc++-static-devel = %{EVRD}
|
|
%endif
|
|
Provides: stdc++-static-devel = %{EVRD}
|
|
|
|
%description -n %{libstdcxx_static_devel}
|
|
Static libraries for the GNU standard C++ library.
|
|
|
|
%files -n %{libstdcxx_static_devel}
|
|
%{_libdir}/libstdc++.*a
|
|
%{_libdir}/libstdc++fs.*a
|
|
%{_libdir}/libsupc++.*a
|
|
|
|
#-----------------------------------------------------------------------
|
|
# Atomic operations
|
|
#-----------------------------------------------------------------------
|
|
|
|
%define atomic_major 1
|
|
%define libatomic %mklibname atomic %{atomic_major}
|
|
%define libatomic_devel %mklibname atomic -d
|
|
%define libatomic_static_devel %mklibname atomic -d -s
|
|
|
|
%package -n %{libatomic}
|
|
Summary: GCC Atomic operations library
|
|
Group: Development/C
|
|
# compat with Fedora/RH
|
|
Provides: libatomic = %{EVRD}
|
|
|
|
%description -n %{libatomic}
|
|
GCC Atomic operations Library.
|
|
|
|
%files -n %{libatomic}
|
|
%{_libdir}/libatomic.so.%{atomic_major}*
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
%package -n %{libatomic_static_devel}
|
|
Summary: Static libatomic
|
|
Group: Development/C
|
|
Requires: %{libatomic_devel} = %{EVRD}
|
|
|
|
%description -n %{libatomic_static_devel}
|
|
Static libatomic.
|
|
|
|
%files -n %{libatomic_static_devel}
|
|
%{_libdir}/libatomic.a
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
%package -n %{libatomic_devel}
|
|
Summary: GCC Atomic optimizer development support
|
|
Group: Development/C
|
|
Requires: %{libatomic} = %{EVRD}
|
|
Provides: libatomic-devel = %{EVRD}
|
|
Provides: atomic-devel = %{EVRD}
|
|
|
|
%description -n %{libatomic_devel}
|
|
This package contains GCC libraries which are needed
|
|
to use Atomic optimizer features.
|
|
|
|
%files -n %{libatomic_devel}
|
|
%{_libdir}/libatomic.so
|
|
#-----------------------------------------------------------------------
|
|
# end Atomic operations
|
|
#-----------------------------------------------------------------------
|
|
#-----------------------------------------------------------------------
|
|
# quadmath operations
|
|
#-----------------------------------------------------------------------
|
|
%define quadmath_major 0
|
|
%define libquadmath %mklibname quadmath %{quadmath_major}
|
|
%define libquadmath_devel %mklibname quadmath -d
|
|
%define libquadmath_static_devel %mklibname quadmath -d -s
|
|
|
|
%package -n %{libquadmath}
|
|
Summary: GCC __float128 shared support library
|
|
Group: System/Libraries
|
|
Provides: libquadmath = %{EVRD}
|
|
|
|
%description -n %{libquadmath}
|
|
This package contains GCC shared support library which is needed
|
|
for __float128 math support and for Fortran REAL*16 support.
|
|
|
|
%files -n %{libquadmath}
|
|
%{_libdir}/libquadmath.so.%{quadmath_major}*
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
%package -n %{libquadmath_devel}
|
|
Summary: GCC __float128 support
|
|
Group: Development/C
|
|
Requires: %{libquadmath} = %{EVRD}
|
|
Provides: libquadmath-devel = %{EVRD}
|
|
Provides: quadmath-devel = %{EVRD}
|
|
|
|
%description -n %{libquadmath_devel}
|
|
This package contains support for building Fortran programs using
|
|
REAL*16 and programs using __float128 math.
|
|
|
|
%files -n %{libquadmath_devel}
|
|
%{_libdir}/libquadmath.so
|
|
%{_includedir}/quadmath*.h
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
%package -n %{libquadmath_static_devel}
|
|
Summary: Static libraries for __float128 support
|
|
Group: Development/C
|
|
Requires: %{libquadmath_devel} = %{EVRD}
|
|
Provides: libquadmath-static-devel = %{EVRD}
|
|
Provides: quadmath-static-devel = %{EVRD}
|
|
|
|
%description -n %{libquadmath_static_devel}
|
|
This package contains static libraries for building Fortran programs
|
|
using REAL*16 and programs using __float128 math.
|
|
|
|
%files -n %{libquadmath_static_devel}
|
|
%{_libdir}/libquadmath.*a
|
|
|
|
#-----------------------------------------------------------------------
|
|
# end quadmath operations
|
|
#-----------------------------------------------------------------------
|
|
#-----------------------------------------------------------------------
|
|
# fortran operations
|
|
#-----------------------------------------------------------------------
|
|
|
|
%define gfortran_major 3
|
|
%define liblfortran %mklibname gfortran %{gfortran_major}
|
|
%define liblfortran_devel %mklibname gfortran -d
|
|
%define liblfortran_static_devel %mklibname gfortran -d -s
|
|
|
|
%package -n %{liblfortran}
|
|
Summary: Fortran 95 runtime libraries
|
|
Group: System/Libraries
|
|
Requires: %{libquadmath} = %{EVRD}
|
|
%if "%{liblfortran}" != "liblfortran"
|
|
Provides: liblfortran = %{EVRD}
|
|
%endif
|
|
|
|
%description -n %{liblfortran}
|
|
This package contains Fortran 95 shared library which is needed to run
|
|
Fortran 95 dynamically linked programs.
|
|
|
|
%files -n %{liblfortran}
|
|
%{_libdir}/liblfortran.so.%{gfortran_major}*
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
%package -n %{liblfortran_devel}
|
|
Summary: Fortran 95 libraries
|
|
Group: System/Libraries
|
|
Requires: %{liblfortran} = %{EVRD}
|
|
Provides: gfortran-devel = %{EVRD}
|
|
|
|
%description -n %{liblfortran_devel}
|
|
This package contains Fortran 95 shared library which is needed to
|
|
compile Fortran 95 programs.
|
|
|
|
%files -n %{liblfortran_devel}
|
|
%{_libdir}/libgfortran.so
|
|
%{_libdir}/liblfortran.so
|
|
%{_libdir}/liblfortran.spec
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
%package -n %{liblfortran_static_devel}
|
|
Summary: Fortran 95 static libraries
|
|
Group: System/Libraries
|
|
Requires: %{liblfortran_devel} = %{EVRD}
|
|
Provides: gfortran-static-devel = %{EVRD}
|
|
|
|
%description -n %{liblfortran_static_devel}
|
|
This package contains Fortran 95 static library which is needed to
|
|
compile Fortran 95 programs.
|
|
|
|
%files -n %{liblfortran_static_devel}
|
|
%{_libdir}/liblfortran.*a
|
|
#-----------------------------------------------------------------------
|
|
# end fortran operations
|
|
#-----------------------------------------------------------------------
|
|
|
|
%define gcc_major 1
|
|
%define libgcc %mklibname gcc %{gcc_major}
|
|
%define libgcc_devel %mklibname gcc -d
|
|
|
|
%package -n %{libgcc}
|
|
Summary: GNU C library
|
|
Group: System/Libraries
|
|
%if "%{libgcc}" != "libgcc"
|
|
Provides: libgcc = %{EVRD}
|
|
%endif
|
|
|
|
%description -n %{libgcc}
|
|
The %{libgcc} package contains GCC shared libraries for lcc
|
|
|
|
%files -n %{libgcc}
|
|
%{_libdir}/libgcc_s.so.%{gcc_major}
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
%package -n %{libgcc_devel}
|
|
Summary: Development files for libgcc
|
|
Group: System/Libraries
|
|
Requires: %{libgcc} = %{EVRD}
|
|
|
|
%description -n %{libgcc_devel}
|
|
The %{libgcc} package contains header files and object files needed to
|
|
build applications with libgcc.
|
|
|
|
%files -n %{libgcc_devel}
|
|
%{_libdir}/libgcc_s.so
|
|
|
|
# end bundled libs
|
|
%endif
|
|
|
|
%files doc
|
|
/opt/mcst/doc
|
|
|
|
#----------------------------------------------------------------------
|
|
%package -n %{libomp}
|
|
Summary: GCC OpenMP v3.0 shared support library
|
|
Group: System/Libraries
|
|
Provides: libomp = %{EVRD}
|
|
|
|
%description -n %{libomp}
|
|
This package contains GCC shared library which is needed
|
|
for OpenMP v3.0 support.
|
|
|
|
%files -n %{libomp}
|
|
%{_libdir}/libomp.so.%{omp_major}*
|
|
|
|
%package -n %{libomp_devel}
|
|
Summary: GCC OpenMP v3.0 development support
|
|
Group: Development/C
|
|
Requires: %{name} = %{EVRD}
|
|
Requires: %{libomp} = %{EVRD}
|
|
Provides: libomp-devel = %{EVRD}
|
|
Provides: libgomp-devel = %{EVRD}
|
|
Provides: gomp-devel = %{EVRD}
|
|
Provides: omp-devel = %{EVRD}
|
|
|
|
%description -n %{libomp_devel}
|
|
This package contains GCC development which is needed
|
|
to compile OpenMP v3.0 support.
|
|
|
|
%files -n %{libomp_devel}
|
|
%{_libdir}/libomp.so
|
|
%{_libdir}/libgomp.so
|
|
%{_includedir}/omp.h
|
|
|
|
%package -n %{libomp_static_devel}
|
|
Summary: GCC OpenMP v3.0 static library
|
|
Group: Development/C
|
|
Requires: %{libomp_devel} = %{EVRD}
|
|
Provides: libomp-static-devel = %{EVRD}
|
|
Provides: gomp-static-devel = %{EVRD}
|
|
Provides: omp-static-devel = %{EVRD}
|
|
|
|
%description -n %{libomp_static_devel}
|
|
This package contains GCC static libraries which are needed
|
|
to compile OpenMP v3.0 support.
|
|
|
|
%files -n %{libomp_static_devel}
|
|
%{_libdir}/libomp.*a
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
%package -n %{libeprof}
|
|
Summary: GCC eprof library
|
|
Group: Development/C
|
|
# compat with Fedora/RH
|
|
Provides: libeprof = %{EVRD}
|
|
|
|
%description -n %{libeprof}
|
|
GCC eprof operations Library.
|
|
|
|
%files -n %{libeprof}
|
|
%{_libdir}/libeprof.so.%{eprof_major}*
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
%package -n %{libeprof_static_devel}
|
|
Summary: Static libatomic
|
|
Group: Development/C
|
|
Requires: %{libeprof_devel} = %{EVRD}
|
|
|
|
%description -n %{libeprof_static_devel}
|
|
Static libatomic.
|
|
|
|
%files -n %{libeprof_static_devel}
|
|
%{_libdir}/libeprof.a
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
%package -n %{libeprof_devel}
|
|
Summary: GCC eprof support
|
|
Group: Development/C
|
|
Requires: %{libeprof} = %{EVRD}
|
|
Provides: libeprof-devel = %{EVRD}
|
|
Provides: eprof-devel = %{EVRD}
|
|
|
|
%description -n %{libeprof_devel}
|
|
This package contains GCC libraries which are needed
|
|
to use profiler features.
|
|
|
|
%files -n %{libeprof_devel}
|
|
%{_libdir}/libeprof.so
|
|
#----------------------------------------------------------------------
|
|
|
|
%prep
|
|
# lcc
|
|
ar x %{SOURCE0}
|
|
tar -xvf data.tar.xz
|
|
# lcc-libs
|
|
ar x %{SOURCE1}
|
|
tar -xvf data.tar.xz
|
|
# cleanup
|
|
rm -fv data.tar.* control.tar*
|
|
|
|
%build
|
|
|
|
%install
|
|
cp -frax opt usr var %{buildroot}
|
|
install -m755 %{SOURCE2} %{buildroot}%{_bindir}
|
|
install -m755 %{SOURCE3} %{buildroot}%{_bindir}
|
|
%if %{without bundled_libs}
|
|
|
|
rm -fv %{buildroot}/%{_libdir}/libstdc*
|
|
rm -fv %{buildroot}/%{_libdir}/libquadm*
|
|
rm -fv %{buildroot}/%{_libdir}/libatomic*
|
|
rm -fv %{buildroot}/%{_libdir}/libgcc_s*
|
|
rm -fv %{buildroot}/%{_libdir}/liblfort*
|
|
|
|
%endif
|
|
rm -rf %{buildroot}/usr/lib32
|
|
rm -rf %{buildroot}/usr/lib128
|
|
#cp -fax ./* %{buildroot}
|
|
#find %{buildroot}/ ! -type d |sed "s:%{buildroot}::" > files.list
|
|
mkdir -p %{buildroot}/%{_includedir}
|
|
cp -fv opt/mcst/lcc-home/%{version}/e2k-v4-linux/lib64/libomp.a %{buildroot}/%{_libdir}/libomp.a
|
|
cp -fv opt/mcst/lcc-home/%{version}/e2k-v4-linux/include/omp.h %{buildroot}/%{_includedir}/omp.h
|
|
# backward compat for omp libs
|
|
ln -s libomp.so.%{omp_major} %{buildroot}/%{_libdir}/libomp.so
|
|
ln -s %{_libdir}/libomp.so %{buildroot}/%{_libdir}/libgomp.so
|
|
|
|
cp -fvp opt/mcst/lcc-home/%{version}/e2k-v4-linux/lib64/libeprof.a %{buildroot}/%{_libdir}
|
|
ln -s libeprof.so.%{eprof_major} %{buildroot}/%{_libdir}/libeprof.so
|
|
unlink %{buildroot}/%{_prefix}/lib
|
|
|
|
# compat symlink for cpp
|
|
mkdir -p %{buildroot}/lib
|
|
ln -s %{_bindir}/cpp %{buildroot}/lib/cpp
|
|
|
|
%if %{with bundled_libs}
|
|
mkdir -p %{buildroot}/%{_libdir}
|
|
# fortran
|
|
cp -fvp opt/mcst/lcc-home/%{version}/e2k-v4-linux/lib64/liblfortran.a %{buildroot}/%{_libdir}
|
|
cp -fvp opt/mcst/lcc-home/%{version}/e2k-v4-linux/lib64/liblfortran.spec %{buildroot}/%{_libdir}
|
|
# backward compat for fortran libs
|
|
ln -s liblfortran.so.%{gfortran_major} %{buildroot}/%{_libdir}/liblfortran.so
|
|
ln -s %{_libdir}/liblfortran.so %{buildroot}/%{_libdir}/libgfortran.so
|
|
# quadmath
|
|
cp -fvp opt/mcst/lcc-home/%{version}/e2k-v4-linux/lib64/libquadmath.a %{buildroot}/%{_libdir}
|
|
ln -s libquadmath.so.%{quadmath_major} %{buildroot}/%{_libdir}/libquadmath.so
|
|
cp -fv opt/mcst/lcc-home/%{version}/e2k-v4-linux/include/quadmath*.h %{buildroot}/%{_includedir}/
|
|
# atomic
|
|
cp -fvp opt/mcst/lcc-home/%{version}/e2k-v4-linux/lib64/libatomic.a %{buildroot}/%{_libdir}
|
|
ln -s libatomic.so.%{atomic_major} %{buildroot}/%{_libdir}/libatomic.so
|
|
|
|
cp -fv opt/mcst/lcc-home/%{version}/e2k-v4-linux/lib64/libstdc++.*a %{buildroot}/%{_libdir}
|
|
cp -fv opt/mcst/lcc-home/%{version}/e2k-v4-linux/lib64/libstdc++fs.*a %{buildroot}/%{_libdir}
|
|
cp -fv opt/mcst/lcc-home/%{version}/e2k-v4-linux/lib64/libsupc++.*a %{buildroot}/%{_libdir}
|
|
cp -fvr opt/mcst/lcc-home/%{version}/e2k-v4-linux/include/c++/ %{buildroot}/%{_includedir}
|
|
%endif
|
|
|
|
%files
|
|
/opt/mcst/lcc-home/%{version}/*/include/
|
|
/opt/mcst/lcc-home/%{version}/e2k-v4-linux/mod/
|
|
/opt/mcst/lcc-home/%{version}/e2k-v4-linux/lib*
|
|
/opt/mcst/man/man1/lcc.1*
|
|
/opt/mcst/man/man1/ld.1*
|
|
/opt/mcst/man/man1/ldis.1*
|
|
%{_bindir}/c++
|
|
%{_bindir}/cc
|
|
%{_bindir}/cpp
|
|
%{_bindir}/g++
|
|
%{_bindir}/gcc
|
|
%{_bindir}/c89
|
|
%{_bindir}/c99
|
|
%{_bindir}/gfortran
|
|
|
|
/opt/mcst/lcc-home/%{version}/e2k-v4-linux/bin/*
|
|
/opt/mcst/bin/cpp
|
|
/opt/mcst/bin/l++
|
|
/opt/mcst/bin/lcc
|
|
/opt/mcst/bin/ldis
|
|
/opt/mcst/bin/lfortran
|
|
/lib/cpp
|
|
|
|
|
|
/var/log/build/lcc-%{version}-libs.build.ident
|
|
/var/log/build/lcc-%{version}.build.ident
|