added add and d languages; added --enable-cet=auto and more options [release 9.2.0-3mamba;Thu Dec 05 2019]

This commit is contained in:
Silvan Calarco 2024-01-05 22:37:51 +01:00
parent 753d4b61f2
commit 5ae53db6f7

236
gcc.spec
View File

@ -40,7 +40,7 @@
Name: gcc
Version: 9.2.0
Release: 2mamba
Release: 3mamba
Summary: GNU Compiler Collection (C, C++, Fortran, Go, Ada)
Group: Applications/Development
Vendor: openmamba
@ -98,9 +98,9 @@ BuildRequires: libmpc-devel
BuildRequires: libmpfr-devel >= 2.1.2
%if "%{_target_platform}" == "%{_build}"
BuildRequires: glibc-devel >= 2.5
%ifarch x86_64
BuildRequires: glibc-multilib-devel
%endif
#%ifarch x86_64
#BuildRequires: glibc-multilib-devel
#%endif
#% if "%{?stage2}" != "1"
BuildRequires: tetex >= 3.0
BuildRequires: libgtk2-devel >= 2.8.17
@ -288,6 +288,24 @@ Requires: libcc1 = %{version}-%{release}
%description -n libcc1-devel
GCC cc1 plugin for GDB development files.
#
# D compiler
#
%package d
Summary: The GNU compiler for the D programming language
Group: System/Libraries
Requires: libgdruntime = %{version}-%{release}
%description d
The GNU compiler for the Go programming language.
%package -n libgdruntime
Summary: GCC D language runtime library
Group: System/Libraries
%description -n libgdruntime
This package contains the GCC D language runtime library.
#
# Fortran 95 Compiler
#
@ -561,32 +579,25 @@ AutoReqProv: no
%description -n cross-%{_target_platform}-%{name}%{?bootstrap_append}
Cross Platform gcc for %{_target_platform}.
%if "%{_target_platform}" == "%{_host}"
%debug_package
%endif
%prep
%setup -q -n gcc-%{version}%{?gcc_extraver}
#-D -T
#:<< ___EOF
#%patch2 -p0
#%patch0 -p1
#%patch1 -p1
#%patch3 -p1
#%patch4 -p1
#%patch5 -p1
#%patch6 -p1
#%patch7 -p1
#%patch8 -p0
%if "%{_target_platform}" != "%{_host}"
%define _build_id_links none
%endif
%if "%{_target_platform}" != "%{_build}"
%patch9 -p1
%endif
# psignal_fix_bootstrap_build
%patch11 -p1
#%patch12 -p1
#%patch13 -p1
#%patch14 -p1
#%patch15 -p1
#%patch16 -p1
#%patch19 -p1
%ifarch arm
# workaround for gcc-go
@ -604,9 +615,9 @@ cd ../%{name}-build-%{_target_platform}
slibdir=%{_libdir}
# BUILD_LANGUAGES is only used in final (not staged) build
BUILD_LANGUAGES=c,objc,lto
BUILD_LANGUAGES=c,objc,lto,d
# FIXME: other languages: lto, obj-c++
# TODO: ada: configure: error: GNAT is required to build ada
%if "%{disable_cpp}" != "1"
# Fortran won't build cross platform (?)
@ -690,13 +701,25 @@ CROSS_SYSTEM_HEADER_DIR=/usr/%{_target_platform}/include \
--libdir=%{_libdir} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--with-bugurl="https://bugs.openmamba.org/" \
--host=%{_host} \
--build=%{_build} \
--target=%{_target_platform} \
--enable-shared \
--enable-lto \
--enable-gnu-unique-object \
--enable-linker-build-id \
--with-linker-hash-style=gnu \
--enable-gnu-indirect-function \
--enable-plugin \
--disable-libunwind-exceptions \
--enable-clocale=gnu \
--disable-libstdcxx-pch \
--disable-werror \
--enable-checking=release \
--enable-default-pie \
--enable-default-ssp \
--enable-cet=auto \
--enable-languages=$BUILD_LANGUAGES \
%if "%{target_cpu}" != "avr"
--enable-threads=posix \
@ -705,6 +728,7 @@ CROSS_SYSTEM_HEADER_DIR=/usr/%{_target_platform}/include \
--x-includes=%{_includedir} \
--x-libraries=%{_libdir} \
--with-system-zlib \
--with-isl \
%if "%{?disable_jack}" == "1"
--disable-dssi \
%endif
@ -768,6 +792,9 @@ for p in gcc gcc-ar gcc-nm gcc-ranlib cc gcov c++ g++ gfortran; do
ln -s $p %{buildroot}%{_bindir}/%{_target_platform}-$p
done
# Allow go command to come from go package
mv %{buildroot}%{_bindir}/go %{buildroot}%{_bindir}/gcc-go
install -d -m755 %{buildroot}%{_libdir}/bfd-plugins
ln -sf ../../libexec/gcc/%{_target_platform}/%{version}/liblto_plugin.so %{buildroot}%{_libdir}/bfd-plugins/
@ -798,8 +825,8 @@ mkdir -p %{buildroot}%{_datadir}/gdb/auto-load/%{_libdir}
mv %{buildroot}%{_libdir}/libstdc++.so.*-gdb.py %{buildroot}%{_datadir}/gdb/auto-load/%{_libdir}/
%ifarch x86_64
# fix for 32bit multilib build
mkdir -p %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/lib
mv %{buildroot}%{_prefix}/lib/libstdc++.so.*-gdb.py %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/lib/
mkdir -p %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/lib32
mv %{buildroot}%{_prefix}/lib32/libstdc++.so.*-gdb.py %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/lib32/
%endif
(cd ../gcc-%{version}%{?gcc_extraver}
@ -845,6 +872,9 @@ rm -f %{buildroot}%{_infodir}/libffi.info*
%post -n %{libstdcxx_name} -p /sbin/ldconfig
%postun -n %{libstdcxx_name} -p /sbin/ldconfig
%post -n libgdruntime -p /sbin/ldconfig
%postun -n libgdruntime -p /sbin/ldconfig
%post -n libgfortran -p /sbin/ldconfig
%postun -n libgfortran -p /sbin/ldconfig
@ -1170,6 +1200,28 @@ rm -f %{buildroot}%{_infodir}/libffi.info*
#%doc libstdc++-v3/{ChangeLog*,README*,doc/html/}
%endif "%{disable_cpp}
#
# D language
#
%files d
%defattr(-,root,root)
%{_bindir}/gdc
%{_bindir}/%{_target_platform}-gdc
%{_libdir}/libgdruntime.a
%{_libdir}/libgdruntime.la
%{_libdir}/libgdruntime.so
%{_libdir}/libgphobos.a
%{_libdir}/libgphobos.la
%{_libdir}/libgphobos.so
%{_libdir}/libgphobos.spec
%{_infodir}/gdc.info*
%{_mandir}/man1/gdc.1*
%files -n libgdruntime
%defattr(-,root,root)
%{_libdir}/libgdruntime.so.*
%{_libdir}/libgphobos.so.*
%if "%{disable_fortran}" != "1"
#
# Fortran language
@ -1217,7 +1269,7 @@ rm -f %{buildroot}%{_infodir}/libffi.info*
%files go
%defattr(-,root,root)
%{_bindir}/gccgo
%{_bindir}/go
%{_bindir}/gcc-go
%{_bindir}/gofmt
%{_bindir}/%{_target_platform}-gccgo
%{_infodir}/gccgo.info*
@ -1271,97 +1323,106 @@ rm -f %{buildroot}%{_infodir}/libffi.info*
%defattr(-,root,root)
%dir %{_libdir}/gcc/%{_target_platform}/%{version}/32
%{_libdir}/gcc/%{_target_platform}/%{version}/32/*
%{_prefix}/lib/libgcc_s.so
%{_prefix}/lib/libgcc_s.so.1
%{_prefix}/lib32/libgcc_s.so
%{_prefix}/lib32/libgcc_s.so.1
#
%{_prefix}/lib/libstdc++.*a
%{_prefix}/lib/libstdc++.so
%{_prefix}/lib/libstdc++.so.*
%{_prefix}/lib/libstdc++fs.*a
%{_prefix}/lib32/libstdc++.*a
%{_prefix}/lib32/libstdc++.so
%{_prefix}/lib32/libstdc++.so.*
%{_prefix}/lib32/libstdc++fs.*a
#
%{_prefix}/lib/libasan.a
%{_prefix}/lib/libasan.la
%{_prefix}/lib/libasan.so
%{_prefix}/lib/libasan.so.*
%{_prefix}/lib/libasan_preinit.o
%{_prefix}/lib/libatomic.a
%{_prefix}/lib/libatomic.la
%{_prefix}/lib/libatomic.so
%{_prefix}/lib/libatomic.so.*
%{_prefix}/lib32/libasan.a
%{_prefix}/lib32/libasan.la
%{_prefix}/lib32/libasan.so
%{_prefix}/lib32/libasan.so.*
%{_prefix}/lib32/libasan_preinit.o
%{_prefix}/lib32/libatomic.a
%{_prefix}/lib32/libatomic.la
%{_prefix}/lib32/libatomic.so
%{_prefix}/lib32/libatomic.so.*
#
# gfortran
#
%{_prefix}/lib/libgfortran.a
%{_prefix}/lib/libgfortran.la
%{_prefix}/lib/libgfortran.so
%{_prefix}/lib/libgfortran.so.*
%{_prefix}/lib/libgfortran.spec
%{_prefix}/lib32/libgfortran.a
%{_prefix}/lib32/libgfortran.la
%{_prefix}/lib32/libgfortran.so
%{_prefix}/lib32/libgfortran.so.*
%{_prefix}/lib32/libgfortran.spec
#
# go
#
%dir %{_prefix}/lib/go
%dir %{_prefix}/lib/go/%{version}
%dir %{_prefix}/lib/go/%{version}/%{_target_platform}
%{_prefix}/lib/go/%{version}/%{_target_platform}/*
%{_prefix}/lib/libgo.a
%{_prefix}/lib/libgo.la
%{_prefix}/lib/libgo.so
%{_prefix}/lib/libgo.so.*
%{_prefix}/lib/libgobegin.a
%{_prefix}/lib/libgolibbegin.a
%dir %{_prefix}/lib32/go
%dir %{_prefix}/lib32/go/%{version}
%dir %{_prefix}/lib32/go/%{version}/%{_target_platform}
%{_prefix}/lib32/go/%{version}/%{_target_platform}/*
%{_prefix}/lib32/libgo.a
%{_prefix}/lib32/libgo.la
%{_prefix}/lib32/libgo.so
%{_prefix}/lib32/libgo.so.*
%{_prefix}/lib32/libgobegin.a
%{_prefix}/lib32/libgolibbegin.a
#%{_prefix}/lib/libnetgo.a
#
#
#
%{_prefix}/lib/libgomp.a
%{_prefix}/lib/libgomp.la
%{_prefix}/lib/libgomp.so
%{_prefix}/lib/libgomp.so.*
%{_prefix}/lib/libgomp.spec
%{_prefix}/lib32/libgomp.a
%{_prefix}/lib32/libgomp.la
%{_prefix}/lib32/libgomp.so
%{_prefix}/lib32/libgomp.so.*
%{_prefix}/lib32/libgomp.spec
#%{_prefix}/lib/libgomp-plugin-host_nonshm.la
#%{_prefix}/lib/libgomp-plugin-host_nonshm.so
#%{_prefix}/lib/libgomp-plugin-host_nonshm.so.*
/usr/lib/libitm.a
/usr/lib/libitm.la
/usr/lib/libitm.so
/usr/lib/libitm.so.*
/usr/lib/libitm.spec
/usr/lib32/libitm.a
/usr/lib32/libitm.la
/usr/lib32/libitm.so
/usr/lib32/libitm.so.*
/usr/lib32/libitm.spec
#/usr/lib/libmpx*.a
#/usr/lib/libmpx*.la
#/usr/lib/libmpx*.so
#/usr/lib/libmpx*.so.*
#/usr/lib/libmpx.spec
/usr/lib/libobjc.a
/usr/lib/libobjc.la
/usr/lib/libobjc.so
/usr/lib/libobjc.so.*
/usr/lib/libssp.a
/usr/lib/libssp.la
/usr/lib/libssp.so
/usr/lib/libssp.so.*
/usr/lib/libssp_nonshared.a
/usr/lib/libssp_nonshared.la
/usr/lib/libsupc++.a
/usr/lib/libsupc++.la
/usr/lib32/libobjc.a
/usr/lib32/libobjc.la
/usr/lib32/libobjc.so
/usr/lib32/libobjc.so.*
/usr/lib32/libssp.a
/usr/lib32/libssp.la
/usr/lib32/libssp.so
/usr/lib32/libssp.so.*
/usr/lib32/libssp_nonshared.a
/usr/lib32/libssp_nonshared.la
/usr/lib32/libsupc++.a
/usr/lib32/libsupc++.la
#/usr/lib/libcilkrts.a
#/usr/lib/libcilkrts.la
#/usr/lib/libcilkrts.so
#/usr/lib/libcilkrts.so.*
#/usr/lib/libcilkrts.spec
/usr/lib/libquadmath.a
/usr/lib/libquadmath.la
/usr/lib/libquadmath.so
/usr/lib/libquadmath.so.*
/usr/lib/libsanitizer.spec
/usr/lib/libubsan.a
/usr/lib/libubsan.la
/usr/lib/libubsan.so
/usr/lib/libubsan.so.*
/usr/lib32/libquadmath.a
/usr/lib32/libquadmath.la
/usr/lib32/libquadmath.so
/usr/lib32/libquadmath.so.*
/usr/lib32/libsanitizer.spec
/usr/lib32/libubsan.a
/usr/lib32/libubsan.la
/usr/lib32/libubsan.so
/usr/lib32/libubsan.so.*
#/usr/lib/libvtv.a
#/usr/lib/libvtv.la
#/usr/lib/libvtv.so
#/usr/lib/libvtv.so.*
%{_datadir}/gdb/auto-load/usr/lib/libstdc++.so.*-gdb.py
%{_prefix}/lib32/libgdruntime.a
%{_prefix}/lib32/libgdruntime.la
%{_prefix}/lib32/libgdruntime.so
%{_prefix}/lib32/libgdruntime.so.*
%{_prefix}/lib32/libgphobos.a
%{_prefix}/lib32/libgphobos.la
%{_prefix}/lib32/libgphobos.so
%{_prefix}/lib32/libgphobos.so.*
%{_prefix}/lib32/libgphobos.spec
%{_datadir}/gdb/auto-load/usr/lib32/libstdc++.so.*-gdb.py
%endif
%else
@ -1401,6 +1462,9 @@ rm -f %{buildroot}%{_infodir}/libffi.info*
%endif # cross-platform
%changelog
* Thu Dec 05 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 9.2.0-3mamba
- added add and d languages; added --enable-cet=auto and more options
* Wed Aug 28 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 9.2.0-2mamba
- add legacy provides to libgcc_s.so.1