enable more languages: m2, rust [release 14.2.1+20240909git.3951efed-2mamba;Sat Oct 05 2024]

This commit is contained in:
Silvan Calarco 2024-10-09 10:46:07 +02:00
parent 69d56a06d0
commit e3d047ff83
3 changed files with 90 additions and 35 deletions

View File

@ -1,12 +0,0 @@
--- gcc-13.1.1/libgomp/env.c.orig 2023-06-20 10:11:45.125868665 +0200
+++ gcc-13.1.1/libgomp/env.c 2023-06-20 10:04:18.089095860 +0200
@@ -2059,6 +2059,9 @@
none = gomp_get_initial_icv_item (GOMP_DEVICE_NUM_FOR_NO_SUFFIX);
initialize_icvs (&none->icvs);
+ if (environ == 0) fprintf(stderr, "FIXME: initialize_env: environ is not initialized\n");
+
+ if (environ != 0)
for (env = environ; *env != 0; env++)
{
if (!startswith (*env, "OMP_"))

View File

@ -0,0 +1,15 @@
Avoid leaking current data on generated file for Ada.
Index: gcc/ada/gcc-interface/Makefile.in
===================================================================
--- gcc/ada/gcc-interface/Makefile.in (revision 268977)
+++ gcc/ada/gcc-interface/Makefile.in (working copy)
@@ -2407,6 +2407,7 @@ $(RTSDIR)/s-oscons.ads: ../stamp-gnatlib
$(OSCONS_CPP) ; \
$(OSCONS_EXTRACT) ; \
../bldtools/oscons/xoscons s-oscons)
+ touch -r $(fsrcpfx)ada/gsocket.h $@
gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads
test -f $(RTSDIR)/s-oscons.ads || exit 1

View File

@ -38,7 +38,7 @@
Name: gcc Name: gcc
Version: 14.2.1+20240909git.3951efed Version: 14.2.1+20240909git.3951efed
Release: 1mamba Release: 2mamba
Summary: GNU Compiler Collection (C, C++, Fortran, Go, Ada) Summary: GNU Compiler Collection (C, C++, Fortran, Go, Ada)
Group: Applications/Development Group: Applications/Development
Vendor: openmamba Vendor: openmamba
@ -48,7 +48,7 @@ URL: https://gcc.gnu.org/
#Source: https://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.bz2 #Source: https://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.bz2
Source: https://sourceware.org/git/gcc.git/releases%2Fgcc-14@%{gittag}/gcc-%{version}.tar.bz2 Source: https://sourceware.org/git/gcc.git/releases%2Fgcc-14@%{gittag}/gcc-%{version}.tar.bz2
Patch0: gcc-10.1.0-arm-provide-futex-atomic-functions.patch Patch0: gcc-10.1.0-arm-provide-futex-atomic-functions.patch
Patch1: gcc-13.1.1-libgomp-workaround-null-environ.patch Patch1: gcc-14.2.1+20240909git.3951efed-ada-repro.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
@ -324,11 +324,11 @@ Requires: libgo-devel = %{version}-%{release}
The GNU compiler for the Go programming language. The GNU compiler for the Go programming language.
%package -n libgo %package -n libgo
Summary: Library for the Go programmi language Summary: Library for the Go programming language
Group: System/Libraries Group: System/Libraries
%description -n libgo %description -n libgo
Library for the Go programmi language. Library for the Go programming language.
%package -n libgo-devel %package -n libgo-devel
Summary: Development headers and static library for libgo Summary: Development headers and static library for libgo
@ -336,7 +336,7 @@ Group: Development/Libraries
Requires: libgo = %{version}-%{release} Requires: libgo = %{version}-%{release}
%description -n libgo-devel %description -n libgo-devel
Development files for the library for the Go programmi language. Development files for the library for the Go programming language.
# #
# Fortran 95 Libraries # Fortran 95 Libraries
@ -348,6 +348,36 @@ Group: System/Libraries
%description -n libgfortran %description -n libgfortran
This package contains Fortran 95 shared library which is needed to run Fortran 95 dynamically linked programs. This package contains Fortran 95 shared library which is needed to run Fortran 95 dynamically linked programs.
#
# Modula-2 compiler
#
%package m2
Summary: The GNU frontend for the Modula-2 programming language
Group: System/Libraries
Requires: libm2 = %{version}-%{release}
Requires: libm2-devel = %{version}-%{release}
%description m2
The GNU frontend for the Modula-2 programming language.
%package -n libm2
Summary: Library for the Modula-2 programming language
Group: System/Libraries
%description -n libm2
Library for the Modula-2 programming language.
%package -n libm2-devel
Summary: Development headers and static library for libm2
Group: Development/Libraries
Requires: libm2 = %{version}-%{release}
%description -n libm2-devel
Development files for the library for the Modula-2 programming language.
#
# Other libraries
#
%package -n libiberty-devel %package -n libiberty-devel
Summary: Development files for libiberty Summary: Development files for libiberty
Group: Development/Libraries Group: Development/Libraries
@ -608,19 +638,7 @@ Cross Platform gcc for %{_target_platform}.
%endif %endif
%patch 0 -p1 %patch 0 -p1
%patch 1 -p0 -b .ada-repro
%ifarch arm
%patch 1 -p1
## workaround for gcc-go
#cp libgo/go/internal/syscall/unix/{getrandom_linux_arm.go,dummy.go}
cat >> libgo/go/internal/syscall/unix/dummy.go << __EOF
const (
getrandomTrap uintptr = 384
copyFileRangeTrap uintptr = 391
)
__EOF
%endif
# Do not run fixincludes # Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
@ -639,13 +657,10 @@ cd ../%{name}-build-%{_target_platform}
slibdir=%{_libdir} slibdir=%{_libdir}
# BUILD_LANGUAGES is only used in final (not staged) build # BUILD_LANGUAGES is only used in final (not staged) build
BUILD_LANGUAGES=c,objc,lto,d BUILD_LANGUAGES=c,objc,lto,d,rust
# TODO: ada: configure: error: GNAT is required to build ada
%if "%{disable_cpp}" != "1" %if "%{disable_cpp}" != "1"
# Fortran won't build cross platform (?) BUILD_LANGUAGES="${BUILD_LANGUAGES},c++,obj-c++,m2"
BUILD_LANGUAGES="${BUILD_LANGUAGES},c++,obj-c++"
%endif %endif
%if "%{disable_fortran}" != "1" %if "%{disable_fortran}" != "1"
# Fortran won't build cross platform (?) # Fortran won't build cross platform (?)
@ -654,6 +669,14 @@ BUILD_LANGUAGES="${BUILD_LANGUAGES},fortran"
%if "%{disable_go}" != "1" %if "%{disable_go}" != "1"
BUILD_LANGUAGES="${BUILD_LANGUAGES},go" BUILD_LANGUAGES="${BUILD_LANGUAGES},go"
%endif %endif
#%if "%{disable_ada}" != "1"
#BUILD_LANGUAGES="${BUILD_LANGUAGES},ada"
## Bootstrap GNAT (ada) with prebuilt toolchains
## x86_64: https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-14.2.0-1/gnat-x86_64-linux-14.2.0-1.tar.gz
## x86: https://community.download.adacore.com/v1/c5e9e6fdff5cb77ed90cf8c62536653e27c0bed6?filename=gnat-gpl-2014-x86-linux-bin.tar.gz&rand=1247
#export CC=~/gnat-x86_64-linux-14.2.0-1/bin/gcc
#export PATH=$PATH:~/gnat-x86_64-linux-14.2.0-1/bin
#%endif
case %{_target_platform} in case %{_target_platform} in
i386-*|i486-*|i586-*|i686-*|athlon-*) i386-*|i486-*|i586-*|i686-*|athlon-*)
@ -1210,6 +1233,32 @@ rm -f %{buildroot}%{_infodir}/libquadmath.info*
%{_libdir}/libgolibbegin.a %{_libdir}/libgolibbegin.a
%endif %endif
%files m2
%defattr(-,root,root)
%{_bindir}/gccrs
%{_bindir}/gm2
%{_bindir}/%{_target_platform}-gccrs
%{_bindir}/%{_target_platform}-gm2
%{_infodir}/m2.info.gz
%{_mandir}/man1/gm2.1*
%files -n libm2
%defattr(-,root,root)
%ifarch x86_64
%{_prefix}/lib32/libm2*.so.*
%endif
%{_libdir}/libm2*.so.*
%files -n libm2-devel
%defattr(-,root,root)
%ifarch x86_64
%{_prefix}/lib32/libm2*.a
%{_prefix}/lib32/libm2*.so
%endif
%{_libdir}/libm2*.a
%{_libdir}/libm2*.so
%{_libdir}/libm2*.a
%files doc %files doc
%defattr(-,root,root) %defattr(-,root,root)
%{_infodir}/cpp.info.* %{_infodir}/cpp.info.*
@ -1334,6 +1383,9 @@ rm -f %{buildroot}%{_infodir}/libquadmath.info*
%endif %endif
%changelog %changelog
* Sat Oct 05 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 14.2.1+20240909git.3951efed-2mamba
- enable more languages: m2, rust
* Mon Sep 09 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 14.2.1+20240909git.3951efed-1mamba * Mon Sep 09 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 14.2.1+20240909git.3951efed-1mamba
- update to 14.2.1+20240909git.3951efed - update to 14.2.1+20240909git.3951efed