diff --git a/gcc-13.1.1-libgomp-workaround-null-environ.patch b/gcc-13.1.1-libgomp-workaround-null-environ.patch deleted file mode 100644 index 717bb0c..0000000 --- a/gcc-13.1.1-libgomp-workaround-null-environ.patch +++ /dev/null @@ -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_")) diff --git a/gcc-14.2.1+20240909git.3951efed-ada-repro.patch b/gcc-14.2.1+20240909git.3951efed-ada-repro.patch new file mode 100644 index 0000000..6625636 --- /dev/null +++ b/gcc-14.2.1+20240909git.3951efed-ada-repro.patch @@ -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 + diff --git a/gcc.spec b/gcc.spec index 8c316fd..7583030 100644 --- a/gcc.spec +++ b/gcc.spec @@ -38,7 +38,7 @@ Name: gcc Version: 14.2.1+20240909git.3951efed -Release: 1mamba +Release: 2mamba Summary: GNU Compiler Collection (C, C++, Fortran, Go, Ada) Group: Applications/Development 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://sourceware.org/git/gcc.git/releases%2Fgcc-14@%{gittag}/gcc-%{version}.tar.bz2 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 ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -324,11 +324,11 @@ Requires: libgo-devel = %{version}-%{release} The GNU compiler for the Go programming language. %package -n libgo -Summary: Library for the Go programmi language +Summary: Library for the Go programming language Group: System/Libraries %description -n libgo -Library for the Go programmi language. +Library for the Go programming language. %package -n libgo-devel Summary: Development headers and static library for libgo @@ -336,7 +336,7 @@ Group: Development/Libraries Requires: libgo = %{version}-%{release} %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 @@ -348,6 +348,36 @@ Group: System/Libraries %description -n libgfortran 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 Summary: Development files for libiberty Group: Development/Libraries @@ -608,19 +638,7 @@ Cross Platform gcc for %{_target_platform}. %endif %patch 0 -p1 - -%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 +%patch 1 -p0 -b .ada-repro # Do not run fixincludes sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in @@ -639,13 +657,10 @@ cd ../%{name}-build-%{_target_platform} slibdir=%{_libdir} # BUILD_LANGUAGES is only used in final (not staged) build -BUILD_LANGUAGES=c,objc,lto,d - -# TODO: ada: configure: error: GNAT is required to build ada +BUILD_LANGUAGES=c,objc,lto,d,rust %if "%{disable_cpp}" != "1" -# Fortran won't build cross platform (?) -BUILD_LANGUAGES="${BUILD_LANGUAGES},c++,obj-c++" +BUILD_LANGUAGES="${BUILD_LANGUAGES},c++,obj-c++,m2" %endif %if "%{disable_fortran}" != "1" # Fortran won't build cross platform (?) @@ -654,6 +669,14 @@ BUILD_LANGUAGES="${BUILD_LANGUAGES},fortran" %if "%{disable_go}" != "1" BUILD_LANGUAGES="${BUILD_LANGUAGES},go" %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 i386-*|i486-*|i586-*|i686-*|athlon-*) @@ -1210,6 +1233,32 @@ rm -f %{buildroot}%{_infodir}/libquadmath.info* %{_libdir}/libgolibbegin.a %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 %defattr(-,root,root) %{_infodir}/cpp.info.* @@ -1334,6 +1383,9 @@ rm -f %{buildroot}%{_infodir}/libquadmath.info* %endif %changelog +* Sat Oct 05 2024 Silvan Calarco 14.2.1+20240909git.3951efed-2mamba +- enable more languages: m2, rust + * Mon Sep 09 2024 Silvan Calarco 14.2.1+20240909git.3951efed-1mamba - update to 14.2.1+20240909git.3951efed