Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (30181345bccb302920b79429f96889285682b18f)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (30181345bccb302920b79429f96889285682b18f)
  • Date: Tue, 11 Jul 2023 16:14:20 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

ChangeLog
| 3
gnu/gcc-10/BUILD
| 143 ++
gnu/gcc-10/CONFIGURE
| 4
gnu/gcc-10/DEPENDS
| 45
gnu/gcc-10/DETAILS
| 59
gnu/gcc-10/EXPORTS
| 3
gnu/gcc-10/FINAL
| 2
gnu/gcc-10/HISTORY
| 11
gnu/gcc-10/INSTALL
| 10
gnu/gcc-10/PREPARE
| 23
gnu/gcc-10/PRE_BUILD
| 47
gnu/gcc-10/PRE_SUB_DEPENDS
| 11
gnu/gcc-10/SUB_DEPENDS
| 12
gnu/gcc-10/patches/0001-Allow-transformations-on-info-file-names.patch
| 683 ++++++++++
gnu/gcc-10/patches/0001-Remove-conflicting-duplicated-manpages.patch
| 33

gnu/gcc-10/patches/0001-musl-always-use--lib--directory-for-all-x86_64-ABIs.patch
| 116 +
gnu/gcc-10/patches/50_all_posix_memalign.patch
| 31
gnu/gcc-10/ssp_nonshared.diff
| 14
gnu/gcc/HISTORY
| 15
gnu/gcc/PRE_BUILD
| 2
gnu/gcc/patches/0001-libgo-Add-support-for-libucontext.patch
| 52

gnu/gcc/patches/0001-libgo-include-asm-ptrace.h-for-pt_regs-definition-on-PowerPC.patch
| 53
gnu/gcc/patches/0001-libgo-make-match.sh-POSIX-shell-compatible.patch
| 28
gnu/gcc/patches/0034-Use-generic-errstr.go-implementation-on-musl.patch
| 204 --

gnu/gcc/patches/0037-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
| 199 --
gnu/gcc/patches/0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
| 43
gnu/gcc/patches/0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
| 71 -
gnu/gcc/patches/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
| 41
gnu/gcc/patches/0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
| 108 -

gnu/gcc/patches/0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch
| 36
30 files changed, 1266 insertions(+), 836 deletions(-)

New commits:
commit 30181345bccb302920b79429f96889285682b18f
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

gcc: Enable patch application again

commit e191dba2212e6ed7396814208529e6cead0ab727
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

gcc-10: New spell, GCC 10.x

diff --git a/ChangeLog b/ChangeLog
index 6f48bc8..8d07e3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2023-07-11 Ismael Luceno <ismael AT sourcemage.org>
+ * gnu/gcc-10: new spell, the GNU Compiler Collection, version 10.x
+
2023-07-05 Conner Clere <xenanthropy AT sourcemage.org>
* utils/rtkit: new spell, realtime policy and watchdog daemon
* wm-addons/mako-notification: new spell, wayland notification daemon
diff --git a/gnu/gcc-10/BUILD b/gnu/gcc-10/BUILD
new file mode 100755
index 0000000..cba7a1a
--- /dev/null
+++ b/gnu/gcc-10/BUILD
@@ -0,0 +1,143 @@
+# cc1 compilation fails if the file blocks limit is too low
+ulimit -f unlimited &&
+
+. "$GRIMOIRE/FUNCTIONS" &&
+# using -pipe causes spurious test-suite failures
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
+CFLAGS=${CFLAGS/-pipe/} &&
+CXXFLAGS=${CXXFLAGS/-pipe/} &&
+
+if list_find "$GCC_10_COMPILER" "fortran"; then
+ OPTS+=" --enable-libquadmath"
+else
+ OPTS+=" --disable-libquadmath"
+fi &&
+
+persistent_read gmp GMP_BUILD_ARCH GMP_BUILD_ARCH &&
+persistent_read mpfr MPFR_BUILD_ARCH MPFR_BUILD_ARCH &&
+
+if [[ $GMP_BUILD_ARCH != ${SMGL_COMPAT_ARCHS[4]}
+ || $MPFR_BUILD_ARCH != ${SMGL_COMPAT_ARCHS[4]} ]]; then
+ message "${PROBLEM_COLOR}" 1>&2 &&
+ message "gmp and/or mpfr have been built with a different archspec,
building gcc now" 1>&2 &&
+ message "would result in a broken compiler" 1>&2 &&
+ message "${DEFAULT_COLOR}" 1>&2
+ return 1
+fi &&
+
+# install gcc libraries to /lib instead of /lib64
+sedit "s/lib64/lib/" gcc/config/i386/linux64.h &&
+# tell gcc to target binaries to expect the linker in /lib instead of /lib64
+sedit "s/lib64/lib/" gcc/config/i386/t-linux64 &&
+
+if [[ "$ARCHITECTURE" == "pentium4" ||
+ "$ARCHITECTURE" == "pentium-m" ]]; then
+ CFLAGS=${CFLAGS//-ffast-math/}
+ CXXFLAGS=${CXXFLAGS//-ffast-math/}
+fi &&
+
+disable_fortify_source &&
+disable_cf_protection &&
+
+# fixes seg-fault on libiberty/splay.c in v 4.3.2
+if is_version_less $(installed_version gcc) 5.0.0; then
+ CFLAGS="-O1 $CFLAGS"
+fi &&
+
+if [[ $CROSS_INSTALL == on ]]; then
+ OPTS="--host=$HOST $OPTS"
+else
+ OPTS="--build=$HOST $OPTS"
+fi &&
+
+# store CFLAGS and LDFLAGS persistently so they can be read by the other
+# split spells later, see bug #10087
+GCC_10_CFLAGS="$CFLAGS" &&
+GCC_10_LDFLAGS="$LDFLAGS" &&
+persistent_add GCC_10_CFLAGS GCC_10_LDFLAGS &&
+# when updating this spell please check if this is still necessary:
+if [[ $GCJ_AWT == y ]]; then
+ CFLAGS="$CFLAGS -I${INSTALL_ROOT}/usr/include/freetype2"
+fi &&
+
+if list_find "$GCC_10_COMPILER" "ada" ; then
+ # setup bootstrap ada compiler
+ ADA_PATH=${SOURCE13/.tar.bz2/} &&
+ PATH=$SOURCE_DIRECTORY/$ADA_PATH/bin:$PATH &&
+
+ export CC="$SOURCE_DIRECTORY/$ADA_PATH/bin/gcc" &&
+
+ export
INCLUDE_DIR="$SOURCE_DIRECTORY/$ADA_PATH/lib/gcc/$HOST/${VERSION13}/include"
&&
+ export LIB_DIR="$SOURCE_DIRECTORY/$ADA_PATH/lib/gcc/$HOST/${VERSION13}/"
&&
+ export LDFLAGS="-L${LIB_DIR}" &&
+ export LIBRARY_PATH="$LIB_DIR" &&
+ export LD_LIBRARY_PATH="$LIB_DIR" &&
+ export COMPILER_PATH="$SOURCE_DIRECTORY/$ADA_PATH/bin" &&
+
+ export ADA_OBJECTS_PATH="$LIB_DIR/adalib" &&
+ export ADA_INCLUDE_PATH="$LIB_DIR/adainclude" &&
+
+ OPTS="--enable-libada $OPTS"
+
+fi &&
+
+OPTS="$GCJ_HOME $OPTS" &&
+OPTS="--prefix=$INSTALL_ROOT/opt/gcc-${VERSION/.*} $OPTS" &&
+OPTS="--program-suffix=-${VERSION/.*} $OPTS" &&
+OPTS="--with-gcc-major-version-only $OPTS" &&
+OPTS="--with-bugurl=http://bugs.sourcemage.org $OPTS" &&
+OPTS="--enable-languages=${GCC_10_COMPILER// /,},lto $OPTS" &&
+OPTS="--enable-shared $OPTS" &&
+OPTS="--enable-threads=posix $OPTS" &&
+OPTS="--enable-__cxa_atexit $OPTS" &&
+OPTS="--disable-libunwind-exceptions $OPTS" &&
+OPTS="--enable-clocale=gnu $OPTS" &&
+OPTS="--disable-libstdcxx-pch $OPTS" &&
+OPTS="--disable-bootstrap $OPTS" &&
+OPTS="--enable-gnu-unique-object $OPTS" &&
+OPTS="--enable-linker-build-id $OPTS" &&
+if [[ "$GCC_10_CLOOG" == "y" ]]; then
+ OPTS="--enable-cloog-backend=isl $OPTS" &&
+ OPTS="--disable-isl-version-check $OPTS"
+else
+ OPTS="--without-isl --without-cloog $OPTS"
+fi &&
+OPTS="--enable-plugin $OPTS" &&
+OPTS="--enable-install-libiberty $OPTS" &&
+OPTS="--with-linker-hash-style=gnu $OPTS" &&
+OPTS="--disable-werror $OPTS" &&
+OPTS="--enable-checking=release $OPTS" &&
+OPTS="--enable-default-pie $OPTS" &&
+OPTS="--enable-default-ssp $OPTS" &&
+OPTS="--enable-cet=auto $OPTS" &&
+OPTS="--enable-lto $OPTS" &&
+
+case "$HOST" in
+*-musl)
+ OPTS="--disable-multilib $OPTS" &&
+ OPTS="--disable-libssp $OPTS" &&
+ OPTS="--disable-libmpx $OPTS" &&
+ OPTS="--disable-libmudflap $OPTS" &&
+ OPTS="--disable-libsanitizer $OPTS" &&
+ OPTS="--disable-symvers $OPTS"
+ ;;
+esac &&
+
+# https://sourceware.org/bugzilla/show_bug.cgi?id=21930
+export glibcxx_cv_c99_math_cxx98=yes glibcxx_cv_c99_math_cxx11=yes &&
+
+cd "$SOURCE_DIRECTORY.bld" &&
+"$SOURCE_DIRECTORY"/configure $OPTS &&
+
+if is_version_less $(installed_version gcc) 4.9.0; then
+ if ! spell_ok gcc49; then
+ message "${PROBLEM_COLOR}" 1>&2 &&
+ message "This version of gcc needs gcc >= 4.9.0 to be able to compile.
Spell" 1>&2 &&
+ message "gcc49 is available to support this, but is not found to be
installed." 1>&2 &&
+ message "Please cast gcc49 first." 1>&2 &&
+ message "${DEFAULT_COLOR}" 1>&2
+ return 1
+ fi
+ export CC=/opt/gcc49/bin/gcc CXX=/opt/gcc49/bin/g++ CPP=/opt/gcc49/bin/cpp
+fi &&
+make CFLAGS="$CFLAGS" BOOT_CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
diff --git a/gnu/gcc-10/CONFIGURE b/gnu/gcc-10/CONFIGURE
new file mode 100755
index 0000000..9c13afd
--- /dev/null
+++ b/gnu/gcc-10/CONFIGURE
@@ -0,0 +1,4 @@
+. $SECTION_DIRECTORY/FUNCTIONS &&
+default_configure_gcc &&
+
+config_query GCC_10_CLOOG "Use cloog loop vectorizer?" y
diff --git a/gnu/gcc-10/DEPENDS b/gnu/gcc-10/DEPENDS
new file mode 100755
index 0000000..6a52701
--- /dev/null
+++ b/gnu/gcc-10/DEPENDS
@@ -0,0 +1,45 @@
+. "$GRIMOIRE/FUNCTIONS" &&
+. "$GRIMOIRE/libcompat" &&
+depends perl &&
+depends diffutils &&
+depends gmp "--with-gmp=${INSTALL_ROOT}/" &&
+depends libmpc "--with-mpc=${INSTALL_ROOT}/usr" &&
+depends mpfr "--with-mpfr=${INSTALL_ROOT}/" &&
+depends smgl-fhs &&
+depends smgl-archspecs &&
+depends zlib "--with-system-zlib" &&
+
+optional_depends GETTEXT \
+ "--enable-nls" \
+ "--disable-nls" \
+ "for Native Language Support" &&
+
+
+if is_version_less $(installed_version gcc) 4.9.0; then
+ depends gcc49
+fi &&
+
+if is_version_less $(installed_version gmp) 4.3.2; then
+ force_depends mpfr
+fi &&
+if is_version_less $(installed_version mpfr) 2.4.2; then
+ force_depends mpfr
+fi &&
+
+if spell_ok gmp; then
+ persistent_read gmp GMP_BUILD_ARCH GMP_BUILD_ARCH || true
+fi &&
+if spell_ok mpfr; then
+ persistent_read mpfr MPFR_BUILD_ARCH MPFR_BUILD_ARCH || true
+fi &&
+if [[ $GMP_BUILD_ARCH != ${SMGL_COMPAT_ARCHS[4]}
+ || $MPFR_BUILD_ARCH != ${SMGL_COMPAT_ARCHS[4]} ]]; then
+ force_depends gmp &&
+ force_depends mpfr
+fi &&
+
+
+if is_version_less $(installed_version libmpc) 0.8.1; then
+ force_depends libmpc
+fi
+
diff --git a/gnu/gcc-10/DETAILS b/gnu/gcc-10/DETAILS
new file mode 100755
index 0000000..f2efa9d
--- /dev/null
+++ b/gnu/gcc-10/DETAILS
@@ -0,0 +1,59 @@
+ SPELL=gcc-10
+ VERSION=10.5.0
+ ISL_VERSION=0.20
+ BASE_SOURCE_URL="https://ftp.gnu.org/pub/gnu/gcc/gcc-$VERSION";
+ SOURCE=gcc-$VERSION.tar.xz
+ SOURCE2=$SOURCE.sig
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/gcc-$VERSION
+ SOURCE_URL[0]=$GNU_URL/gcc/gcc-$VERSION/$SOURCE
+ SOURCE_URL[1]=${BASE_SOURCE_URL}/$SOURCE
+ SOURCE2_URL[0]=${SOURCE_URL[0]}.sig
+ SOURCE2_URL[1]=${SOURCE_URL[1]}.sig
+ SOURCE_GPG=gnu.gpg:$SOURCE.sig:UPSTREAM_KEY
+ SOURCE2_IGNORE=signature
+
+if [[ "$GCC_10_CLOOG" == "y" ]]; then
+ SOURCE3=isl-${ISL_VERSION}.tar.xz
+ SOURCE3_URL[0]=http://isl.gforge.inria.fr/$SOURCE3
+
SOURCE3_HASH=sha512:394bccd22d8e63cb052a60ad8b1a75f4ec43916a9482c66f5167b534b538161179c47919815983b7fbc20dfaa1a590e88b251850aa092bbffc2891635bf30dc4
+fi
+
+if list_find "$GCC_10_COMPILER" "ada" ; then
+
+# howto generate the ada bootstraper
+# step 1: make a backup of your existing gcc cache you'll lose things like
libstdc++
+# step 2: modify sorcery CFLAGS to be generic x86_64 only
+# step 3: cast -r gcc -> select c and ada
+# step 4: wait
+# step 5: after it's done copy the generated cache(named
gcc-$VERSION-$HOST.tar.bz2)
+# to ada-$VERSION-$HOST.tar.bz2
+# step 7: update version under the right field and test cast gcc with ada
enabled
+# step 8: cast something ada dependant AND RUN IT
+# step 9: if it all works then upload the cache generated under step 5
somewhere
+# bug someone to put it in the right place if you don't have access
+# step 10: restore your old gcc cache and resurrect it
+#
+
+ case "${SMGL_COMPAT_ARCHS[1]}" in
+ x86_64) VERSION13=8.2.0 ARCH13=x86_64 ;;
+ *) VERSION13=4.7.1 ARCH13=i686 ;;
+ esac
+ SOURCE13=ada-$VERSION13-$ARCH13-pc-linux-gnu.tar.bz2
+ SOURCE13_URL[0]=https://download.sourcemage.org/distro/$SOURCE13
+ SOURCE13_URL[1]=https://smgl.bandrate.org/$SOURCE13
+ SOURCE13_GPG="gurus.gpg:$SOURCE13.sig:VERIFIED_UPSTREAM_KEY"
+ SOURCE14=$SOURCE13.sig
+ SOURCE14_URL[0]=${SOURCE13_URL[0]}.sig
+ SOURCE14_URL[1]=${SOURCE13_URL[1]}.sig
+ SOURCE14_IGNORE=signature
+fi
+ LICENSE[0]=GPL
+ TMPFS=off
+ WEB_SITE=https://gcc.gnu.org/
+ KEYWORDS="compiler"
+ ENTERED=20040420
+ SHORT="the GNU Compiler Collection, version 10.x"
+ DOCS="$DOCS INSTALL"
+cat << EOF
+The entire GNU Compiler Collection.
+EOF
diff --git a/gnu/gcc-10/EXPORTS b/gnu/gcc-10/EXPORTS
new file mode 100755
index 0000000..732f4db
--- /dev/null
+++ b/gnu/gcc-10/EXPORTS
@@ -0,0 +1,3 @@
+GCC_10_CFLAGS
+GCC_10_COMPILER
+GCC_10_LDFLAGS
diff --git a/gnu/gcc-10/FINAL b/gnu/gcc-10/FINAL
new file mode 100755
index 0000000..bff4320
--- /dev/null
+++ b/gnu/gcc-10/FINAL
@@ -0,0 +1,2 @@
+default_final &&
+rm_source_dir $SOURCE_DIRECTORY.bld
diff --git a/gnu/gcc-10/HISTORY b/gnu/gcc-10/HISTORY
new file mode 100644
index 0000000..01f8955
--- /dev/null
+++ b/gnu/gcc-10/HISTORY
@@ -0,0 +1,11 @@
+2023-07-11 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS: updated spell to 10.5.0
+ * CONFIGURE, BUILD: converted to non-bootstrap build
+ * PREPARE: removed options for jit and go
+ * PRE_BUILD: enable patch application again
+ * patches/0001-Allow-transformations-on-info-file-names.patch,
+ patches/0001-Remove-conflicting-duplicated-manpages.patch
+ fixed conflicts with other concurrently-installed GCC versions
+
+2023-07-11 Ismael Luceno <ismael AT sourcemage.org>
+ * all: Spell created from commit 3541bc62f9db78e46ad4
diff --git a/gnu/gcc-10/INSTALL b/gnu/gcc-10/INSTALL
new file mode 100755
index 0000000..f20b882
--- /dev/null
+++ b/gnu/gcc-10/INSTALL
@@ -0,0 +1,10 @@
+#
+# Bug #10647, also fixed in devel Sorcery
+#
+cd $SOURCE_DIRECTORY.bld &&
+
+# in some weird cases, this actually fails with multiple jobs
+make_single &&
+make CFLAGS="$CFLAGS" BOOT_CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
+ install &&
+make_normal
diff --git a/gnu/gcc-10/PREPARE b/gnu/gcc-10/PREPARE
new file mode 100755
index 0000000..43c79c2
--- /dev/null
+++ b/gnu/gcc-10/PREPARE
@@ -0,0 +1,23 @@
+message "Note: C and C++ compilers are always built"
+. $GRIMOIRE/config_query_multi.function
+list_remove GCC_10_COMPILER c &&
+list_remove GCC_10_COMPILER c++ &&
+config_query_multi GCC_10_COMPILER "Select the additional compilers you
want" \
+ none \
+ ada \
+ brig \
+ d \
+ fortran \
+ objc \
+ obj-c++ \
+ all &&
+list_remove GCC_10_COMPILER none &&
+if list_find "$GCC_10_COMPILER" "all" ; then
+ list_remove GCC_10_COMPILER all &&
+ list_add GCC_10_COMPILER ada &&
+ list_add GCC_10_COMPILER brig &&
+ list_add GCC_10_COMPILER d &&
+ list_add GCC_10_COMPILER fortran &&
+ list_add GCC_10_COMPILER objc &&
+ list_add GCC_10_COMPILER obj-c++
+fi
diff --git a/gnu/gcc-10/PRE_BUILD b/gnu/gcc-10/PRE_BUILD
new file mode 100755
index 0000000..33ea740
--- /dev/null
+++ b/gnu/gcc-10/PRE_BUILD
@@ -0,0 +1,47 @@
+default_pre_build &&
+
+if [[ "$GCC_10_CLOOG" == "y" ]]; then
+ cd "$SOURCE_DIRECTORY" &&
+ unpack_file 3 &&
+ mv isl-$ISL_VERSION isl
+fi &&
+
+if list_find "$GCC_10_COMPILER" "ada" ; then
+ cd $SOURCE_DIRECTORY &&
+
+ mkdir ${SOURCE13/.tar.bz2} &&
+ cd ${SOURCE13/.tar.bz2} &&
+ unpack_file 13 &&
+
+ #
+ # This section is used to build a gnat bootstrap cache
+ #
+ touch $SOURCE_DIRECTORY/gcc/cstamp-h.in &&
+ touch $SOURCE_DIRECTORY/gcc/ada/[es]info.h &&
+ touch $SOURCE_DIRECTORY/gcc/ada/nmake.ad[bs] &&
+
+
+ sedit 's:and Nam is "gnatgcc":and Nam is "gcc":' \
+ $SOURCE_DIRECTORY/gcc/ada/osint.ads &&
+ cd ${SOURCE_DIRECTORY}
+ #
+ # End Ada bootstrap cache code
+ #
+fi &&
+
+mk_source_dir "$SOURCE_DIRECTORY.bld" &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches &&
+
+# Drop .la files like everyone else.
+find . -name Makefile.in \
+| xargs sed -i
's,^\(LIBTOOL[[:space:]]*=[[:space:]]*\),\1'"$GRIMOIRE"'/libtool-nola ,' &&
+
+sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in &&
+sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in &&
+
+case "$HOST" in
+(*-musl)
+ patch -fp1 -i "$SPELL_DIRECTORY/ssp_nonshared.diff"
+ ;;
+esac
diff --git a/gnu/gcc-10/PRE_SUB_DEPENDS b/gnu/gcc-10/PRE_SUB_DEPENDS
new file mode 100755
index 0000000..ee3c574
--- /dev/null
+++ b/gnu/gcc-10/PRE_SUB_DEPENDS
@@ -0,0 +1,11 @@
+case $THIS_SUB_DEPENDS in
+ ADA) list_find "$GCC_10_COMPILER" ada ;;
+ BRIG) list_find "$GCC_10_COMPILER" brig ;;
+ D) list_find "$GCC_10_COMPILER" d ;;
+ CXX) true ;;
+ FORTRAN) list_find "$GCC_10_COMPILER" fortran ;;
+ OBJC) list_find "$GCC_10_COMPILER" objc ;;
+ OBJCXX) list_find "$GCC_10_COMPILER" objc-c++ ;;
+ *) message "${PROBLEM_COLOR}bogus sub_depends: $SPELL
$THIS_SUB_DEPENDS${DEFAULT_COLOR}" ;
+ return 1;;
+esac
diff --git a/gnu/gcc-10/SUB_DEPENDS b/gnu/gcc-10/SUB_DEPENDS
new file mode 100755
index 0000000..195dd0c
--- /dev/null
+++ b/gnu/gcc-10/SUB_DEPENDS
@@ -0,0 +1,12 @@
+persistent_add GCC_10_COMPILER &&
+case $THIS_SUB_DEPENDS in
+ ADA) list_add GCC_10_COMPILER ada ;;
+ BRIG) list_add GCC_10_COMPILER brig ;;
+ D) list_add GCC_10_COMPILER d ;;
+ CXX) true ;;
+ FORTRAN) list_add GCC_10_COMPILER fortran ;;
+ OBJC) list_add GCC_10_COMPILER objc ;;
+ OBJCXX) list_add GCC_10_COMPILER objc-c++ ;;
+ *) message "${PROBLEM_COLOR}bogus sub_depends: $SPELL
$THIS_SUB_DEPENDS${DEFAULT_COLOR}" ;
+ return 1;;
+esac
diff --git
a/gnu/gcc-10/patches/0001-Allow-transformations-on-info-file-names.patch
b/gnu/gcc-10/patches/0001-Allow-transformations-on-info-file-names.patch
new file mode 100644
index 0000000..46dc4e5
--- /dev/null
+++ b/gnu/gcc-10/patches/0001-Allow-transformations-on-info-file-names.patch
@@ -0,0 +1,683 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Matthias Klose <doko AT debian.org>
+Date: Tue, 17 Feb 2004 00:00:00 +0000
+Subject: Allow transformations on info file names
+
+Apply program_transform_name to info files too, to enable concurrent
+installation with other GCC versions.
+
+[ismael AT sourcemage.org: Edited patch description.
+ Fixed CLEANFILES and MAINTAINERCLEANFILES.
+ Fixed libgomp info file name]
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+
+Origin: Debian
+Upstream-Status: Unknown
+---
+ gcc/Makefile.in | 93
+++++++++++++++++++++++++++++++++++--------
+ gcc/ada/gnat-style.texi | 2
+ gcc/ada/gnat_rm.texi | 2
+ gcc/doc/cpp.texi | 2
+ gcc/doc/cppinternals.texi | 2
+ gcc/doc/extend.texi | 2
+ gcc/doc/gcc.texi | 2
+ gcc/doc/gccint.texi | 4 -
+ gcc/doc/install.texi | 2
+ gcc/doc/invoke.texi | 8 +--
+ gcc/doc/libgcc.texi | 2
+ gcc/doc/standards.texi | 2
+ gcc/fortran/Make-lang.in | 11 ++---
+ gcc/fortran/gfortran.texi | 2
+ gcc/go/Make-lang.in | 13 +++---
+ gcc/go/gccgo.texi | 4 -
+ libgomp/Makefile.am | 10 ++--
+ libgomp/Makefile.in | 14 +++---
+ libgomp/libgomp.texi | 2
+ libitm/Makefile.am | 11 +++--
+ libitm/Makefile.in | 11 +++--
+ libitm/libitm.texi | 2
+ libquadmath/Makefile.am | 12 +++--
+ libquadmath/Makefile.in | 15 +++---
+ libquadmath/libquadmath.texi | 2
+ 25 files changed, 153 insertions(+), 79 deletions(-)
+
+--- a/gcc/fortran/gfortran.texi
++++ b/gcc/fortran/gfortran.texi
+@@ -101,7 +101,7 @@ Texts being (a) (see below), and with th
+ @ifinfo
+ @dircategory Software development
+ @direntry
+-* gfortran: (gfortran). The GNU Fortran Compiler.
++* @value{fngfortran}: (@value{fngfortran}). The GNU
Fortran Compiler.
+ @end direntry
+ This file documents the use and the internals of
+ the GNU Fortran compiler, (@command{gfortran}).
+--- a/gcc/fortran/Make-lang.in
++++ b/gcc/fortran/Make-lang.in
+@@ -114,7 +114,8 @@ fortran.tags: force
+ cd $(srcdir)/fortran; etags -o TAGS.sub *.c *.h; \
+ etags --include TAGS.sub --include ../TAGS.sub
+
+-fortran.info: doc/gfortran.info doc/gfc-internals.info
++INFO_FORTRAN_NAME = $(shell echo gfortran|sed '$(program_transform_name)')
++fortran.info: doc/$(INFO_FORTRAN_NAME).info
+ fortran.dvi: doc/gfortran.dvi doc/gfc-internals.dvi
+
+ F95_HTMLFILES = $(build_htmldir)/gfortran
+@@ -184,10 +185,10 @@ GFORTRAN_TEXI = \
+ $(srcdir)/doc/include/gcc-common.texi \
+ gcc-vers.texi
+
+-doc/gfortran.info: $(GFORTRAN_TEXI)
++doc/$(INFO_FORTRAN_NAME).info: $(GFORTRAN_TEXI)
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+ rm -f doc/gfortran.info-*; \
+- $(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \
++ $(MAKEINFO) $(MAKEINFODEFS) -I $(srcdir)/doc/include -I
$(srcdir)/fortran \
+ -o $@ $<; \
+ else true; fi
+
+@@ -252,7 +253,7 @@ fortran.install-common: install-finclude
+
+ fortran.install-plugin:
+
+-fortran.install-info: $(DESTDIR)$(infodir)/gfortran.info
++fortran.install-info: $(DESTDIR)$(infodir)/$(INFO_FORTRAN_NAME).info
+
+ fortran.install-man: $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext)
+
+@@ -270,7 +271,7 @@ fortran.uninstall:
+ rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
+ rm -rf $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext); \
+ rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
+- rm -rf $(DESTDIR)$(infodir)/gfortran.info*
++ rm -rf $(DESTDIR)$(infodir)/$(INFO_FORTRAN_NAME).info*
+
+ #
+ # Clean hooks:
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -3223,8 +3223,31 @@ install-no-fixedincludes:
+
+ doc: $(BUILD_INFO) $(GENERATED_MANPAGES)
+
+-INFOFILES = doc/cpp.info doc/gcc.info doc/gccint.info \
+- doc/gccinstall.info doc/cppinternals.info
++INFO_CPP_NAME = $(shell echo cpp|sed '$(program_transform_name)')
++INFO_GCC_NAME = $(shell echo gcc|sed '$(program_transform_name)')
++INFO_GXX_NAME = $(shell echo g++|sed '$(program_transform_name)')
++INFO_GCCINT_NAME = $(shell echo gccint|sed '$(program_transform_name)')
++INFO_GCCINSTALL_NAME = $(shell echo gccinstall|sed
'$(program_transform_name)')
++INFO_CPPINT_NAME = $(shell echo cppinternals|sed
'$(program_transform_name)')
++
++INFO_FORTRAN_NAME = $(shell echo gfortran|sed '$(program_transform_name)')
++INFO_GCCGO_NAME = $(shell echo gccgo|sed '$(program_transform_name)')
++
++INFOFILES = doc/$(INFO_CPP_NAME).info doc/$(INFO_GCC_NAME).info \
++ doc/$(INFO_GCCINT_NAME).info \
++ doc/$(INFO_GCCINSTALL_NAME).info doc/$(INFO_CPPINT_NAME).info
++
++MAKEINFODEFS = -D 'fncpp $(INFO_CPP_NAME)' \
++ -D 'fngcc $(INFO_GCC_NAME)' \
++ -D 'fngcov $(INFO_GCC_NAME)' \
++ -D 'fngcovtool $(INFO_GCC_NAME)' \
++ -D 'fngcovdump $(INFO_GCC_NAME)' \
++ -D 'fngxx $(INFO_GXX_NAME)' \
++ -D 'fngccint $(INFO_GCCINT_NAME)' \
++ -D 'fngccinstall $(INFO_GCCINSTALL_NAME)' \
++ -D 'fncppint $(INFO_CPPINT_NAME)' \
++ -D 'fngfortran $(INFO_FORTRAN_NAME)' \
++ -D 'fngccgo $(INFO_GCCGO_NAME)'
+
+ info: $(INFOFILES) lang.info @GENINSRC@ srcinfo lang.srcinfo
+
+@@ -3272,7 +3295,20 @@ gcc-vers.texi: $(BASEVER) $(DEVPHASE)
+ if [ -n "$(PKGVERSION)" ]; then \
+ echo "@set VERSION_PACKAGE $(PKGVERSION)" >> $@T; \
+ fi
+- echo "@set BUGURL $(BUGURL_TEXI)" >> $@T; \
++ echo "@set BUGURL $(BUGURL_TEXI)" >> $@T
++ ( \
++ echo '@set fncpp $(INFO_CPP_NAME)'; \
++ echo '@set fngcc $(INFO_GCC_NAME)'; \
++ echo '@set fngcov $(INFO_GCC_NAME)'; \
++ echo '@set fngcovtool $(INFO_GCC_NAME)'; \
++ echo '@set fngcovdump $(INFO_GCC_NAME)'; \
++ echo '@set fngxx $(INFO_GXX_NAME)'; \
++ echo '@set fngccint $(INFO_GCCINT_NAME)'; \
++ echo '@set fngccinstall $(INFO_GCCINSTALL_NAME)'; \
++ echo '@set fncppint $(INFO_CPPINT_NAME)'; \
++ echo '@set fngfortran $(INFO_FORTRAN_NAME)'; \
++ echo '@set fngccgo $(INFO_GCCGO_NAME)'; \
++ ) >> $@T
+ mv -f $@T $@
+
+
+@@ -3280,21 +3316,41 @@ gcc-vers.texi: $(BASEVER) $(DEVPHASE)
+ # patterns. To use them, put each of the specific targets with its
+ # specific dependencies but no build commands.
+
+-doc/cpp.info: $(TEXI_CPP_FILES)
+-doc/gcc.info: $(TEXI_GCC_FILES)
+-doc/gccint.info: $(TEXI_GCCINT_FILES)
+-doc/cppinternals.info: $(TEXI_CPPINT_FILES)
+-
++# Generic entry to handle info files, which are not renamed (currently Ada)
+ doc/%.info: %.texi
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+ $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \
+ -I $(gcc_docdir)/include -o $@ $<; \
+ fi
+
++doc/$(INFO_CPP_NAME).info: $(TEXI_CPP_FILES)
++ if [ x$(BUILD_INFO) = xinfo ]; then \
++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir)
\
++ -I $(gcc_docdir)/include -o $@ $<; \
++ fi
++
++doc/$(INFO_GCC_NAME).info: $(TEXI_GCC_FILES)
++ if [ x$(BUILD_INFO) = xinfo ]; then \
++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir)
\
++ -I $(gcc_docdir)/include -o $@ $<; \
++ fi
++
++doc/$(INFO_GCCINT_NAME).info: $(TEXI_GCCINT_FILES)
++ if [ x$(BUILD_INFO) = xinfo ]; then \
++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir)
\
++ -I $(gcc_docdir)/include -o $@ $<; \
++ fi
++
++doc/$(INFO_CPPINT_NAME).info: $(TEXI_CPPINT_FILES)
++ if [ x$(BUILD_INFO) = xinfo ]; then \
++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir)
\
++ -I $(gcc_docdir)/include -o $@ $<; \
++ fi
++
+ # Duplicate entry to handle renaming of gccinstall.info
+-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES)
++doc/$(INFO_GCCINSTALL_NAME).info: $(TEXI_GCCINSTALL_FILES)
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir)
\
+ -I $(gcc_docdir)/include -o $@ $<; \
+ fi
+
+@@ -3701,11 +3757,11 @@ install-driver: installdirs xgcc$(exeext
+ # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
+ # to do the install.
+ install-info:: doc installdirs \
+- $(DESTDIR)$(infodir)/cpp.info \
+- $(DESTDIR)$(infodir)/gcc.info \
+- $(DESTDIR)$(infodir)/cppinternals.info \
+- $(DESTDIR)$(infodir)/gccinstall.info \
+- $(DESTDIR)$(infodir)/gccint.info \
++ $(DESTDIR)$(infodir)/$(INFO_CPP_NAME).info \
++ $(DESTDIR)$(infodir)/$(INFO_GCC_NAME).info \
++ $(DESTDIR)$(infodir)/$(INFO_CPPINT_NAME).info \
++ $(DESTDIR)$(infodir)/$(INFO_GCCINSTALL_NAME).info \
++ $(DESTDIR)$(infodir)/$(INFO_GCCINT_NAME).info \
+ lang.install-info
+
+ $(DESTDIR)$(infodir)/%.info: doc/%.info installdirs
+@@ -3932,8 +3988,11 @@ uninstall: lang.uninstall
+ -rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
+ -rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext)
+- -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
+- -rm -f $(DESTDIR)$(infodir)/cppinternals.info*
$(DESTDIR)$(infodir)/gccint.info*
++ -rm -f $(DESTDIR)$(infodir)/$(INFO_CPP_NAME).info*
++ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCC_NAME).info*
++ -rm -f $(DESTDIR)$(infodir)/$(INFO_CPPINT_NAME).info*
++ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCCINT_NAME).info*
++ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCCINSTALL_NAME).info*
+ for i in ar nm ranlib ; do \
+ install_name=`echo gcc-$$i|sed
'$(program_transform_name)'`$(exeext) ;\
+ target_install_name=$(target_noncanonical)-`echo gcc-$$i|sed
'$(program_transform_name)'`$(exeext) ; \
+--- a/gcc/ada/gnat-style.texi
++++ b/gcc/ada/gnat-style.texi
+@@ -31,7 +31,7 @@ Texts. A copy of the license is include
+
+ @dircategory Software development
+ @direntry
+-* gnat-style: (gnat-style). GNAT Coding Style
++* gnat-style: (gnat-style-10). GNAT Coding Style
+ @end direntry
+
+ @macro syntax{element}
+--- a/gcc/ada/gnat_rm.texi
++++ b/gcc/ada/gnat_rm.texi
+@@ -12,7 +12,7 @@
+ @finalout
+ @dircategory GNU Ada Tools
+ @direntry
+-* gnat_rm: (gnat_rm.info). gnat_rm
++* GNAT Reference Manual: (gnat_rm-10). Reference Manual for GNU Ada tools.
+ @end direntry
+
+ @definfoenclose strong,`,'
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -14413,7 +14413,7 @@ One of the standard libraries bypassed b
+ @option{-nodefaultlibs} is @file{libgcc.a}, a library of internal
subroutines
+ which GCC uses to overcome shortcomings of particular machines, or special
+ needs for some languages.
+-(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler
++(@xref{Interface,,Interfacing to GCC Output,@value{fngccint},GNU Compiler
+ Collection (GCC) Internals},
+ for more discussion of @file{libgcc.a}.)
+ In most cases, you need @file{libgcc.a} even when you want to avoid
+@@ -14422,7 +14422,7 @@ or @option{-nodefaultlibs} you should us
+ This ensures that you have no unresolved references to internal GCC
+ library subroutines.
+ (An example of such an internal subroutine is @code{__main}, used to ensure
C++
+-constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
++constructors are called; @pxref{Collect2,,@code{collect2}, @value{fngccint},
+ GNU Compiler Collection (GCC) Internals}.)
+
+ @item -e @var{entry}
+@@ -31072,7 +31072,7 @@ Note that you can also specify places to
+ @option{-B}, @option{-I} and @option{-L} (@pxref{Directory Options}). These
+ take precedence over places specified using environment variables, which
+ in turn take precedence over those specified by the configuration of GCC@.
+-@xref{Driver,, Controlling the Compilation Driver @file{gcc}, gccint,
++@xref{Driver,, Controlling the Compilation Driver @file{gcc},
@value{fngccint},
+ GNU Compiler Collection (GCC) Internals}.
+
+ @table @env
+@@ -31232,7 +31232,7 @@ the headers it contains change.
+
+ A precompiled header file is searched for when @code{#include} is
+ seen in the compilation. As it searches for the included file
+-(@pxref{Search Path,,Search Path,cpp,The C Preprocessor}) the
++(@pxref{Search Path,,Search Path,@value{fncpp},The C Preprocessor}) the
+ compiler looks for a precompiled header in each directory just before it
+ looks for the include file in that directory. The name searched for is
+ the name specified in the @code{#include} with @samp{.gch} appended. If
+--- a/gcc/doc/extend.texi
++++ b/gcc/doc/extend.texi
+@@ -24519,7 +24519,7 @@ want to write code that checks whether t
+ test for the GNU compiler the same way as for C programs: check for a
+ predefined macro @code{__GNUC__}. You can also use @code{__GNUG__} to
+ test specifically for GNU C++ (@pxref{Common Predefined Macros,,
+-Predefined Macros,cpp,The GNU C Preprocessor}).
++Predefined Macros,@value{fncpp},The GNU C Preprocessor}).
+
+ @menu
+ * C++ Volatiles:: What constitutes an access to a volatile object.
+--- a/gcc/doc/standards.texi
++++ b/gcc/doc/standards.texi
+@@ -332,5 +332,5 @@ specification, described at @uref{https:
+ GNAT Reference Manual}, for information on standard
+ conformance and compatibility of the Ada compiler.
+
+-@xref{Standards,,Standards, gfortran, The GNU Fortran Compiler}, for details
++@xref{Standards,,Standards, @value{fngfortran}, The GNU Fortran Compiler},
for details
+ of standards supported by GNU Fortran.
+--- a/gcc/doc/libgcc.texi
++++ b/gcc/doc/libgcc.texi
+@@ -24,7 +24,7 @@ that needs them.
+ GCC will also generate calls to C library routines, such as
+ @code{memcpy} and @code{memset}, in some cases. The set of routines
+ that GCC may possibly use is documented in @ref{Other
+-Builtins,,,gcc, Using the GNU Compiler Collection (GCC)}.
++Builtins,,,@value{fngcc}, Using the GNU Compiler Collection (GCC)}.
+
+ These routines take arguments and return values of a specific machine
+ mode, not a specific C type. @xref{Machine Modes}, for an explanation
+--- a/gcc/doc/gccint.texi
++++ b/gcc/doc/gccint.texi
+@@ -49,7 +49,7 @@ Texts being (a) (see below), and with th
+ @ifnottex
+ @dircategory Software development
+ @direntry
+-* gccint: (gccint). Internals of the GNU Compiler Collection.
++* @value{fngccint}: (@value{fngccint}). Internals of the GNU
Compiler Collection.
+ @end direntry
+ This file documents the internals of the GNU compilers.
+ @sp 1
+@@ -81,7 +81,7 @@ write front ends for new languages. It
+ @value{VERSION_PACKAGE}
+ @end ifset
+ version @value{version-GCC}. The use of the GNU compilers is documented in
a
+-separate manual. @xref{Top,, Introduction, gcc, Using the GNU
++separate manual. @xref{Top,, Introduction, @value{fngcc}, Using the GNU
+ Compiler Collection (GCC)}.
+
+ This manual is mainly a reference manual rather than a tutorial. It
+--- a/gcc/doc/cpp.texi
++++ b/gcc/doc/cpp.texi
+@@ -50,7 +50,7 @@ This manual contains no Invariant Sectio
+ @ifinfo
+ @dircategory Software development
+ @direntry
+-* Cpp: (cpp). The GNU C preprocessor.
++* @value{fncpp}: (@value{fncpp}). The GNU C preprocessor.
+ @end direntry
+ @end ifinfo
+
+--- a/gcc/doc/gcc.texi
++++ b/gcc/doc/gcc.texi
+@@ -129,7 +129,7 @@ version @value{version-GCC}.
+ The internals of the GNU compilers, including how to port them to new
+ targets and some information about how to write front ends for new
+ languages, are documented in a separate manual. @xref{Top,,
+-Introduction, gccint, GNU Compiler Collection (GCC) Internals}.
++Introduction, @value{fngccint}, GNU Compiler Collection (GCC) Internals}.
+
+ @menu
+ * G++ and GCC:: You can compile C or C++ programs.
+--- a/gcc/doc/install.texi
++++ b/gcc/doc/install.texi
+@@ -93,7 +93,7 @@ Free Documentation License}''.
+ @end ifinfo
+ @dircategory Software development
+ @direntry
+-* gccinstall: (gccinstall). Installing the GNU Compiler Collection.
++* @value{fngccinstall}: (@value{fngccinstall}). Installing the GNU
Compiler Collection.
+ @end direntry
+
+ @c Part 3 Titlepage and Copyright
+--- a/gcc/doc/cppinternals.texi
++++ b/gcc/doc/cppinternals.texi
+@@ -7,7 +7,7 @@
+ @ifinfo
+ @dircategory Software development
+ @direntry
+-* Cpplib: (cppinternals). Cpplib internals.
++* @value{fncppint}: (@value{fncppint}). Cpplib internals.
+ @end direntry
+ @end ifinfo
+
+--- a/libgomp/libgomp.texi
++++ b/libgomp/libgomp.texi
+@@ -31,7 +31,7 @@ texts being (a) (see below), and with th
+ @ifinfo
+ @dircategory GNU Libraries
+ @direntry
+-* libgomp: (libgomp). GNU Offloading and Multi Processing Runtime
Library.
++* @value{fnlibgomp}: (@value{fnlibgomp}). GNU Offloading and Multi
Processing Runtime Library.
+ @end direntry
+
+ This manual documents libgomp, the GNU Offloading and Multi Processing
+--- a/libgomp/Makefile.in
++++ b/libgomp/Makefile.in
+@@ -310,13 +310,13 @@
+ am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+ am__v_texidevnull_0 = > /dev/null
+ am__v_texidevnull_1 =
+-INFO_DEPS = libgomp.info
++INFO_DEPS = $(INFO_LIBGOMP_NAME).info
+ am__TEXINFO_TEX_DIR = $(srcdir)/../gcc/doc/include
+-DVIS = libgomp.dvi
+-PDFS = libgomp.pdf
+-PSS = libgomp.ps
+-HTMLS = libgomp.html
+-TEXINFOS = libgomp.texi
++DVIS = $(INFO_LIBGOMP_NAME).dvi
++PDFS = $(INFO_LIBGOMP_NAME).pdf
++PSS = $(INFO_LIBGOMP_NAME).ps
++HTMLS = $(INFO_LIBGOMP_NAME).html
++TEXINFOS = $(INFO_LIBGOMP_NAME).texi
+ TEXI2DVI = texi2dvi
+ TEXI2PDF = $(TEXI2DVI) --pdf --batch
+ MAKEINFOHTML = $(MAKEINFO) --html
+@@ -636,7 +636,8 @@ info_TEXINFOS = libgomp.texi
+
+ # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
+ @BUILD_INFO_TRUE@STAMP_BUILD_INFO = stamp-build-info
++INFO_LIBGOMP_NAME = $(shell echo libgomp|sed '$(program_transform_name)')
+ CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO)
+-MAINTAINERCLEANFILES = $(srcdir)/libgomp.info
++MAINTAINERCLEANFILES = $(srcdir)/$(INFO_LIBGOMP_NAME).info
+ MULTISRCTOP =
+ MULTIBUILDTOP =
+@@ -1425,15 +1426,16 @@ env.lo: libgomp_f.h
+ env.o: libgomp_f.h
+
+ all-local: $(STAMP_GENINSRC)
+-
+-stamp-geninsrc: libgomp.info
+- cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info
++stamp-geninsrc: $(INFO_LIBGOMP_NAME).info
++ cp -p $(top_builddir)/$(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.info
+ @touch $@
+
+-libgomp.info: $(STAMP_BUILD_INFO)
++libgomp.info: $(INFO_LIBGOMP_NAME).info
++ [ "$(INFO_LIBGOMP_NAME).info" = libgomp.info ] || cp
$(INFO_LIBGOMP_NAME).info libgomp.info
++$(INFO_LIBGOMP_NAME).info: $(STAMP_BUILD_INFO)
+
+ stamp-build-info: libgomp.texi
+- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o
libgomp.info $(srcdir)/libgomp.texi
++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibgomp
$(INFO_LIBGOMP_NAME)' -I $(srcdir) -o $(INFO_LIBGOMP_NAME).info
$(srcdir)/libgomp.texi
+ @touch $@
+
+ # GNU Make needs to see an explicit $(MAKE) variable in the command it
+--- a/libgomp/Makefile.am
++++ b/libgomp/Makefile.am
+@@ -127,14 +127,16 @@ endif
+
+ all-local: $(STAMP_GENINSRC)
+
+-stamp-geninsrc: libgomp.info
+- cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info
++stamp-geninsrc: $(INFO_LIBGOMP_NAME).info
++ cp -p $(top_builddir)/$(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.info
+ @touch $@
+
+-libgomp.info: $(STAMP_BUILD_INFO)
++libgomp.info: $(INFO_LIBGOMP_NAME).info
++ cp $(INFO_LIBGOMP_NAME).info libgomp.info
++$(INFO_LIBGOMP_NAME).info: $(STAMP_BUILD_INFO)
+
+ stamp-build-info: libgomp.texi
+- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o
libgomp.info $(srcdir)/libgomp.texi
++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibgomp
$(INFO_LIBGOMP_NAME)' -I $(srcdir) -o $(INFO_LIBGOMP_NAME).info
$(srcdir)/libgomp.texi
+ @touch $@
+
+
+--- a/libitm/libitm.texi
++++ b/libitm/libitm.texi
+@@ -20,7 +20,7 @@ Free Documentation License''.
+ @ifinfo
+ @dircategory GNU Libraries
+ @direntry
+-* libitm: (libitm). GNU Transactional Memory Library
++* @value{fnlibitm}: (@value{fnlibitm}). GNU
Transactional Memory Library
+ @end direntry
+
+ This manual documents the GNU Transactional Memory Library.
+--- a/libitm/Makefile.am
++++ b/libitm/Makefile.am
+@@ -107,14 +107,17 @@ endif
+
+ all-local: $(STAMP_GENINSRC)
+
+-stamp-geninsrc: libitm.info
+- cp -p $(top_builddir)/libitm.info $(srcdir)/libitm.info
++INFO_LIBITM_NAME = $(shell echo libitm|sed '$(program_transform_name)')
++stamp-geninsrc: $(INFO_LIBITM_NAME).info
++ cp -p $(top_builddir)/$(INFO_LIBITM_NAME).info $(srcdir)/libitm.info
+ @touch $@
+
+-libitm.info: $(STAMP_BUILD_INFO)
++libitm.info: $(INFO_LIBITM_NAME).info
++ cp $(INFO_LIBITM_NAME).info libitm.info
++$(INFO_LIBITM_NAME).info: $(STAMP_BUILD_INFO)
+
+ stamp-build-info: libitm.texi
+- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o
libitm.info $(srcdir)/libitm.texi
++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -D
'fnlibitm $(INFO_LIBITM_NAME)'-o $(INFO_LIBITM_NAME).info
$(srcdir)/libitm.texi
+ @touch $@
+
+
+--- a/libitm/Makefile.in
++++ b/libitm/Makefile.in
+@@ -1186,14 +1186,17 @@ vpath % $(strip $(search_path))
+
+ all-local: $(STAMP_GENINSRC)
+
+-stamp-geninsrc: libitm.info
+- cp -p $(top_builddir)/libitm.info $(srcdir)/libitm.info
++INFO_LIBITM_NAME = $(shell echo libitm|sed '$(program_transform_name)')
++stamp-geninsrc: $(INFO_LIBITM_NAME).info
++ cp -p $(top_builddir)/$(INFO_LIBITM_NAME).info $(srcdir)/libitm.info
+ @touch $@
+
+-libitm.info: $(STAMP_BUILD_INFO)
++libitm.info: $(INFO_LIBITM_NAME).info
++ cp $(INFO_LIBITM_NAME).info libitm.info
++$(INFO_LIBITM_NAME).info: $(STAMP_BUILD_INFO)
+
+ stamp-build-info: libitm.texi
+- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o
libitm.info $(srcdir)/libitm.texi
++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -D
'fnlibitm $(INFO_LIBITM_NAME)' -o $(INFO_LIBITM_NAME).info
$(srcdir)/libitm.texi
+ @touch $@
+
+ # GNU Make needs to see an explicit $(MAKE) variable in the command it
+--- a/gcc/go/Make-lang.in
++++ b/gcc/go/Make-lang.in
+@@ -91,10 +91,11 @@ GO_TEXI_FILES = \
+ $(gcc_docdir)/include/gcc-common.texi \
+ gcc-vers.texi
+
+-doc/gccgo.info: $(GO_TEXI_FILES)
++INFO_GCCGO_NAME = $(shell echo gccgo|sed '$(program_transform_name)')
++doc/$(INFO_GCCGO_NAME).info: $(GO_TEXI_FILES)
+ if test "x$(BUILD_INFO)" = xinfo; then \
+- rm -f doc/gccgo.info*; \
+- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
++ rm -f doc/$(INFO_GCCGO_NAME).info*; \
++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
+ -I $(gcc_docdir)/include -o $@ $<; \
+ else true; fi
+
+@@ -120,7 +121,7 @@ gccgo.pod: go/gccgo.texi
+ go.all.cross: gccgo-cross$(exeext)
+ go.start.encap: gccgo$(exeext)
+ go.rest.encap:
+-go.info: doc/gccgo.info
++go.info: doc/$(INFO_GCCGO_NAME).info
+ go.dvi: doc/gccgo.dvi
+ go.pdf: doc/gccgo.pdf
+ go.html: $(build_htmldir)/go/index.html
+@@ -159,7 +160,7 @@ go.install-common: installdirs
+
+ go.install-plugin:
+
+-go.install-info: $(DESTDIR)$(infodir)/gccgo.info
++go.install-info: $(DESTDIR)$(infodir)/$(INFO_GCCGO_NAME).info
+
+ go.install-pdf: doc/gccgo.pdf
+ @$(NORMAL_INSTALL)
+@@ -199,7 +200,7 @@ go.uninstall:
+ rm -rf $(DESTDIR)$(bindir)/$(GCCGO_INSTALL_NAME)$(exeext)
+ rm -rf $(DESTDIR)$(man1dir)/$(GCCGO_INSTALL_NAME)$(man1ext)
+ rm -rf $(DESTDIR)$(bindir)/$(GCCGO_TARGET_INSTALL_NAME)$(exeext)
+- rm -rf $(DESTDIR)$(infodir)/gccgo.info*
++ rm -rf $(DESTDIR)$(infodir)/$(INFO_GCCGO_NAME).info*
+
+ # Clean hooks.
+
+--- a/gcc/go/gccgo.texi
++++ b/gcc/go/gccgo.texi
+@@ -50,7 +50,7 @@ man page gfdl(7).
+ @format
+ @dircategory Software development
+ @direntry
+-* Gccgo: (gccgo). A GCC-based compiler for the Go language
++* @value{fngccgo}: (@value{fngccgo}). A GCC-based compiler for
the Go language
+ @end direntry
+ @end format
+
+@@ -124,7 +124,7 @@ and the Info entries for @file{gccgo} an
+
+ The @command{gccgo} command is a frontend to @command{gcc} and
+ supports many of the same options. @xref{Option Summary, , Option
+-Summary, gcc, Using the GNU Compiler Collection (GCC)}. This manual
++Summary, @value{fngcc}, Using the GNU Compiler Collection (GCC)}. This
manual
+ only documents the options specific to @command{gccgo}.
+
+ The @command{gccgo} command may be used to compile Go source code into
+--- a/libquadmath/libquadmath.texi
++++ b/libquadmath/libquadmath.texi
+@@ -25,7 +25,7 @@ copy and modify this GNU manual.
+ @ifinfo
+ @dircategory GNU Libraries
+ @direntry
+-* libquadmath: (libquadmath). GCC Quad-Precision Math
Library
++* @value{fnlibquadmath}: (@value{fnlibquadmath}). GCC
Quad-Precision Math Library
+ @end direntry
+
+ This manual documents the GCC Quad-Precision Math Library API.
+--- a/libquadmath/Makefile.am
++++ b/libquadmath/Makefile.am
+@@ -134,16 +134,18 @@ STAMP_BUILD_INFO =
+ endif
+
+
+-stamp-geninsrc: libquadmath.info
+- cp -p $(top_builddir)/libquadmath.info $(srcdir)/libquadmath.info
++INFO_LIBQMATH_NAME = $(shell echo libquadmath|sed
'$(program_transform_name)')
++
++stamp-geninsrc: $(INFO_LIBQMATH_NAME).info
++ cp -p $(top_builddir)/$(INFO_LIBQMATH_NAME).info
$(srcdir)/libquadmath.info
+ @touch $@
+
+ stamp-build-info: libquadmath.texi $(libquadmath_TEXINFOS)
+- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o
libquadmath.info $(srcdir)/libquadmath.texi
++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o
$(INFO_LIBQMATH_NAME).info $(srcdir)/libquadmath.texi
+ @touch $@
+
+ CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO)
+-MAINTAINERCLEANFILES = $(srcdir)/libquadmath.info
++MAINTAINERCLEANFILES = $(srcdir)/$(INFO_LIBQMATH_NAME).info
+
+ endif BUILD_LIBQUADMATH
+
+--- a/libquadmath/Makefile.in
++++ b/libquadmath/Makefile.in
+@@ -283,7 +283,8 @@ AM_V_texidevnull = $(am__v_texidevnull_@
+ am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+ am__v_texidevnull_0 = > /dev/null
+ am__v_texidevnull_1 =
+-INFO_DEPS = libquadmath.info
++INFO_LIBQMATH_NAME = $(shell echo libquadmath|sed
'$(program_transform_name)')
++INFO_DEPS = $(INFO_LIBQMATH_NAME).info
+ am__TEXINFO_TEX_DIR = $(srcdir)/../gcc/doc/include
+ DVIS = libquadmath.dvi
+ PDFS = libquadmath.pdf
+@@ -552,8 +553,8 @@ AUTOMAKE_OPTIONS = foreign info-in-build
+
+ # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
+ @BUILD_INFO_TRUE@@BUILD_LIBQUADMATH_TRUE@STAMP_BUILD_INFO = stamp-build-info
+ @BUILD_LIBQUADMATH_TRUE@CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO)
+-@BUILD_LIBQUADMATH_TRUE@MAINTAINERCLEANFILES = $(srcdir)/libquadmath.info
++@BUILD_LIBQUADMATH_TRUE@MAINTAINERCLEANFILES =
$(srcdir)/$(INFO_LIBQMATH_NAME).info
+
+ # Automake Documentation:
+ # If your package has Texinfo files in many directories, you can use the
+@@ -1434,19 +1435,19 @@ uninstall-am: uninstall-dvi-am uninstall
+
@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@
sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
+
@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@
> $@ || (rm -f $@ ; exit 1)
+
+-@BUILD_LIBQUADMATH_TRUE@stamp-geninsrc: libquadmath.info
+-@BUILD_LIBQUADMATH_TRUE@ cp -p $(top_builddir)/libquadmath.info
$(srcdir)/libquadmath.info
++@BUILD_LIBQUADMATH_TRUE@stamp-geninsrc: $(INFO_LIBQMATH_NAME).info
++@BUILD_LIBQUADMATH_TRUE@ cp -p
$(top_builddir)/$(INFO_LIBQMATH_NAME).info
$(srcdir)/$(INFO_LIBQMATH_NAME).info
+ @BUILD_LIBQUADMATH_TRUE@ @touch $@
+
+ @BUILD_LIBQUADMATH_TRUE@stamp-build-info: libquadmath.texi
$(libquadmath_TEXINFOS)
+-@BUILD_LIBQUADMATH_TRUE@ $(MAKEINFO) $(AM_MAKEINFOFLAGS)
$(MAKEINFOFLAGS) -I $(srcdir) -o libquadmath.info $(srcdir)/libquadmath.texi
++@BUILD_LIBQUADMATH_TRUE@ $(MAKEINFO) $(AM_MAKEINFOFLAGS)
$(MAKEINFOFLAGS) -I $(srcdir) -o $(INFO_LIBQMATH_NAME).info
$(srcdir)/libquadmath.texi
+ @BUILD_LIBQUADMATH_TRUE@ @touch $@
+
+ all-local: $(ALL_LOCAL_DEPS)
+
+ # Unconditionally override this target, so that automake's definition
+ # does not wrongly interfere.
+-libquadmath.info: $(STAMP_BUILD_INFO)
++$(INFO_LIBQMATH_NAME).info: $(STAMP_BUILD_INFO)
+
+ libquadmath-vers.texi:
+ echo "@set BUGURL $(REPORT_BUGS_TEXI)" > $@
diff --git
a/gnu/gcc-10/patches/0001-Remove-conflicting-duplicated-manpages.patch
b/gnu/gcc-10/patches/0001-Remove-conflicting-duplicated-manpages.patch
new file mode 100644
index 0000000..303d4aa
--- /dev/null
+++ b/gnu/gcc-10/patches/0001-Remove-conflicting-duplicated-manpages.patch
@@ -0,0 +1,33 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT sourcemage.org>
+Date: Mon, 10 Jul 2023 21:58:03 +0000
+Subject: [PATCH] Remove conflicting/duplicated manpages
+
+The fsf-funding.7, gfdl.7, and gpl.7 files conflict with other
+installed instances of GCC. Since there's no point in having
+different versions of these files, just remove them from the
+installation.
+
+Origin: Source Mage
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+Upstream-Status: Inappropiate
+---
+ Makefile.in | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 5ac87c98230c..fdc40d7ce1d7 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -3756,10 +3756,7 @@ install-man: lang.install-man \
+ $(DESTDIR)$(man1dir)/$(GCOV_INSTALL_NAME)$(man1ext) \
+ $(DESTDIR)$(man1dir)/$(GCOV_TOOL_INSTALL_NAME)$(man1ext) \
+ $(DESTDIR)$(man1dir)/$(GCOV_DUMP_INSTALL_NAME)$(man1ext) \
+- $(if $(filter
yes,@enable_lto@),$(DESTDIR)$(man1dir)/$(LTO_DUMP_INSTALL_NAME)$(man1ext)) \
+- $(DESTDIR)$(man7dir)/fsf-funding$(man7ext) \
+- $(DESTDIR)$(man7dir)/gfdl$(man7ext) \
+- $(DESTDIR)$(man7dir)/gpl$(man7ext)
++ $(if $(filter
yes,@enable_lto@),$(DESTDIR)$(man1dir)/$(LTO_DUMP_INSTALL_NAME)$(man1ext))
+
+ $(DESTDIR)$(man7dir)/%$(man7ext): doc/%.7 installdirs
+ -rm -f $@
diff --git
a/gnu/gcc-10/patches/0001-musl-always-use--lib--directory-for-all-x86_64-ABIs.patch

b/gnu/gcc-10/patches/0001-musl-always-use--lib--directory-for-all-x86_64-ABIs.patch
new file mode 100644
index 0000000..80fa28c
--- /dev/null
+++
b/gnu/gcc-10/patches/0001-musl-always-use--lib--directory-for-all-x86_64-ABIs.patch
@@ -0,0 +1,116 @@
+From f313773d9087298a3f0ab45602791946debff8b7 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox AT gentoo.org>
+Date: Mon, 05 Jul 2021 18:15:44 +0000
+Subject: [PATCH] musl: always use 'lib' directory for all x86_64 ABIs
[PR90077]
+Message-ID: <20210705181544.1519647-1-slyfox AT gentoo.org>
+
+From: Sergei Trofimovich <siarheit AT google.com>
+
+musl library intentionally does not support glibc-style multilib layout
+and usually assumes --libdir=lib (Gentoo and Alpine Linux both use it).
+
+Before the change --disable-multilib x86_64-gentoo-linux-musl returned:
+
+ $ gcc -print-multi-os-directory
+ ../lib64
+ $ gcc -print-multi-os-directory -m32
+ ../lib32
+ $ gcc -print-multi-os-directory -mx32
+ ../libx32
+
+After the change the layout is always the same:
+
+ $ gcc -print-multi-os-directory
+ ../lib
+ $ gcc -print-multi-os-directory -m32
+ ../lib
+ $ gcc -print-multi-os-directory -mx32
+ ../lib
+
+The discrepancy was noticed in meson build system which uses
+-print-multi-os-directory to find out target directory.
+
+Debian's multi-arch setup should not change.
+
+ PR target/90077
+
+gcc/ChangeLog
+
+ * gcc/config.gcc: Specal case musl to t-linux64-musl.
+
+ * gcc/config/i386/t-linux64-musl: New file based on t-linux64
+ that pins MULTILIB_OSDIRNAMES to lib.
+
+Origin: Gentoo
+Upstream-Status: Submitted
[https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574482.html]
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ gcc/config.gcc | 10 ++++++++--
+ gcc/config/i386/t-linux64-musl | 28 ++++++++++++++++++++++++++++
+ 2 files changed, 36 insertions(+), 2 deletions(-)
+ create mode 100644 gcc/config/i386/t-linux64-musl
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 0230bb88861..a87a59c9403 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -1923,7 +1923,10 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu |
i[34567]86-*-gnu* | i[34567]8
+ if test x$enable_targets = xall; then
+ tm_file="${tm_file} i386/x86-64.h
i386/gnu-user-common.h i386/gnu-user64.h i386/linux-common.h i386/linux64.h"
+ tm_defines="${tm_defines} TARGET_BI_ARCH=1"
+- tmake_file="${tmake_file} i386/t-linux64"
++ case $target in
++ *-*-*musl*) tmake_file="${tmake_file}
i386/t-linux64-musl";;
++ *) tmake_file="${tmake_file} i386/t-linux64";;
++ esac
+ x86_multilibs="${with_multilib_list}"
+ if test "$x86_multilibs" = "default"; then
+ x86_multilibs="m64,m32"
+@@ -1983,7 +1986,10 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
+ tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h"
+ ;;
+ esac
+- tmake_file="${tmake_file} i386/t-linux64"
++ case $target in
++ *-*-*musl*) tmake_file="${tmake_file} i386/t-linux64-musl";;
++ *) tmake_file="${tmake_file} i386/t-linux64";;
++ esac
+ x86_multilibs="${with_multilib_list}"
+ if test "$x86_multilibs" = "default"; then
+ case ${with_abi} in
+diff --git a/gcc/config/i386/t-linux64-musl b/gcc/config/i386/t-linux64-musl
+new file mode 100644
+index 00000000000..58e23c3c7dc
+--- /dev/null
++++ b/gcc/config/i386/t-linux64-musl
+@@ -0,0 +1,28 @@
++# Copyright (C) 2002-2021 Free Software Foundation, Inc.
++#
++# This file is part of GCC.
++#
++# GCC is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++#
++# GCC is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with GCC; see the file COPYING3. If not see
++# &lt;<a
href="http://www.gnu.org/licenses/";>http://www.gnu.org/licenses/</a>&gt;.
++
++# musl explicitly does not support lib/lib32/lib64 layouts and always
++# uses lib layout. On debian full arch suffix is used. Thus we populate
++# all the m32/m64/mx32 with the same lib and apply multiarch suffix.
++
++comma=,
++MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
++MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
++MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu)
++MULTILIB_OSDIRNAMES+= m32=../lib$(call if_multiarch,:i386-linux-gnu)
++MULTILIB_OSDIRNAMES+= mx32=../lib$(call if_multiarch,:x86_64-linux-gnux32)
+--
+2.32.0
diff --git a/gnu/gcc-10/patches/50_all_posix_memalign.patch
b/gnu/gcc-10/patches/50_all_posix_memalign.patch
new file mode 100644
index 0000000..d974b56
--- /dev/null
+++ b/gnu/gcc-10/patches/50_all_posix_memalign.patch
@@ -0,0 +1,31 @@
+Origin: Gentoo
+
+diff -Naur gcc-7.1.0.orig/gcc/config/i386/pmm_malloc.h
gcc-7.1.0/gcc/config/i386/pmm_malloc.h
+--- gcc-7.1.0.orig/gcc/config/i386/pmm_malloc.h 2017-01-01
04:07:43.000000000 -0800
++++ gcc-7.1.0/gcc/config/i386/pmm_malloc.h 2017-05-07 11:35:22.878398460
-0700
+@@ -27,12 +27,13 @@
+ #include <stdlib.h>
+
+ /* We can't depend on <stdlib.h> since the prototype of posix_memalign
+- may not be visible. */
++ may not be visible and we can't pollute the namespace either. */
+ #ifndef __cplusplus
+-extern int posix_memalign (void **, size_t, size_t);
++extern int __gcc_posix_memalign (void **, size_t, size_t)
+ #else
+-extern "C" int posix_memalign (void **, size_t, size_t) throw ();
++extern "C" int __gcc_posix_memalign (void **, size_t, size_t) throw ()
+ #endif
++__asm__("posix_memalign");
+
+ static __inline void *
+ _mm_malloc (size_t __size, size_t __alignment)
+@@ -42,7 +43,7 @@
+ return malloc (__size);
+ if (__alignment == 2 || (sizeof (void *) == 8 && __alignment == 4))
+ __alignment = sizeof (void *);
+- if (posix_memalign (&__ptr, __alignment, __size) == 0)
++ if (__gcc_posix_memalign (&__ptr, __alignment, __size) == 0)
+ return __ptr;
+ else
+ return NULL;
diff --git a/gnu/gcc-10/ssp_nonshared.diff b/gnu/gcc-10/ssp_nonshared.diff
new file mode 100644
index 0000000..2d3e586
--- /dev/null
+++ b/gnu/gcc-10/ssp_nonshared.diff
@@ -0,0 +1,14 @@
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index c48178f1aa3..e2fae4ef055 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -863,7 +863,8 @@ proper position among the other output files. */
+ #ifndef LINK_SSP_SPEC
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+- "|fstack-protector-strong|fstack-protector-explicit:}"
++ "|fstack-protector-strong|fstack-protector-explicit" \
++ ":-lssp_nonshared}"
+ #else
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+ "|fstack-protector-strong|fstack-protector-explicit" \
diff --git a/gnu/gcc/HISTORY b/gnu/gcc/HISTORY
index 127d541..bbca0b6 100644
--- a/gnu/gcc/HISTORY
+++ b/gnu/gcc/HISTORY
@@ -1,3 +1,18 @@
+2023-07-11 Ismael Luceno <ismael AT sourcemage.org>
+ * PRE_BUILD: enabled patch application again
+ * patches/0001-libgo-make-match.sh-POSIX-shell-compatible.patch:
+ removed, applied by upstream
+ * patches/0001-libgo-Add-support-for-libucontext.patch,
+
patches/0001-libgo-include-asm-ptrace.h-for-pt_regs-definition-on-PowerPC.patch,
+ patches/0034-Use-generic-errstr.go-implementation-on-musl.patch,
+
patches/0037-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch,
+
patches/0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch,
+ patches/0041-go-gospec-forcibly-disable-fsplit-stack-support.patch,
+ patches/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch,
+ patches/0049-libgo-adjust-name-of-union-in-sigevent-struct.patch,
+
patches/0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch:
+ removed, no longer needed
+
2023-04-26 Treeve Jelbert <treeve AT sourcemage.org>
* DETAILS: version 13.1.0
* PRE_BUILD: disable all patches, most fail
diff --git a/gnu/gcc/PRE_BUILD b/gnu/gcc/PRE_BUILD
index 7740fd1..1f89668 100755
--- a/gnu/gcc/PRE_BUILD
+++ b/gnu/gcc/PRE_BUILD
@@ -31,7 +31,7 @@ fi &&

cd ${SOURCE_DIRECTORY} &&

-#apply_patch_dir patches &&
+apply_patch_dir patches &&

# Drop .la files like everyone else.
find . -name Makefile.in \
diff --git a/gnu/gcc/patches/0001-libgo-Add-support-for-libucontext.patch
b/gnu/gcc/patches/0001-libgo-Add-support-for-libucontext.patch
deleted file mode 100644
index 76e9e67..0000000
--- a/gnu/gcc/patches/0001-libgo-Add-support-for-libucontext.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 0631e2b9453b33c42e12a14c11e8257d470016c5 Mon Sep 17 00:00:00 2001
-From: Ismael Luceno <ismael AT sourcemage.org>
-Date: Sun, 11 Dec 2022 23:55:56 +0100
-Subject: [PATCH] libgo: Add support for libucontext
-
-Test and link to libucontext if detected; additionally: undefine
-SETCONTEXT_CLOBBERS_TLS in runtime/proc.c to prevent the use of
-makecontext/swapcontext, not supported by libucontext.
-
-[ismael AT iodev.co.uk: Fixed to work with glibc too, tests for libucontext
- properly; improved commit message]
-
-Based on a patch by Sören Tempel <soeren+git AT soeren-tempel.net>.
-
-Upstream-Status: Pending
-Origin: Unknown
-Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
----
- Makefile.in | 2 ++
- libgo/runtime/proc.c | 6 ++++++
- 2 files changed, 8 insertions(+)
-
-diff --git a/Makefile.in b/Makefile.in
-index 593495e1650..c3e5d489bc0 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -52801,6 +52801,8 @@ configure-target-libgo:
- esac; \
- module_srcdir=libgo; \
- rm -f no-such-file || : ; \
-+ LIBS="`printf 'int main(){return 0;}' | $(CC) -x c -o /dev/null \
-+ - -lucontext && printf -lucontext` $$LIBS" \
- CONFIG_SITE=no-such-file $(SHELL) \
- $$s/$$module_srcdir/configure \
- --srcdir=$${topdir}/$$module_srcdir \
-diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
-index 3a30748d329..a987678fa84 100644
---- a/libgo/runtime/proc.c
-+++ b/libgo/runtime/proc.c
-@@ -66,6 +66,12 @@ static void gscanstack(G*);
-
- __thread G *g __asm__(GOSYM_PREFIX "runtime.g");
-
-+/* libucontext does not seem to support tlsbase, undef the macro
-+ * here to make sure we define initcontext and fixcontext as dummies. */
-+#if !defined(__GLIBC__) && defined(__linux__)
-+#undef SETCONTEXT_CLOBBERS_TLS
-+#endif
-+
- #ifndef SETCONTEXT_CLOBBERS_TLS
-
- static inline void
diff --git
a/gnu/gcc/patches/0001-libgo-include-asm-ptrace.h-for-pt_regs-definition-on-PowerPC.patch

b/gnu/gcc/patches/0001-libgo-include-asm-ptrace.h-for-pt_regs-definition-on-PowerPC.patch
deleted file mode 100644
index 61875e2..0000000
---
a/gnu/gcc/patches/0001-libgo-include-asm-ptrace.h-for-pt_regs-definition-on-PowerPC.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From cf41d579088e1c0b5c33c93657ad041e797b5905 Mon Sep 17 00:00:00 2001
-From: Sören Tempel <soeren AT soeren-tempel.net>
-Date: Sun, 2 Jan 2022 01:07:03 +0100
-Subject: [PATCH] libgo: include asm/ptrace.h for pt_regs definition on
PowerPC
-
-Both glibc and musl libc declare pt_regs as an incomplete type. This
-type has to be completed by inclusion of another header. On Linux, the
-asm/ptrace.h header file provides this type definition. Without
-including this header file, it is not possible to access the regs member
-of the mcontext_t struct as done in libgo/runtime/go-signal.c. On glibc,
-other headers (e.g. sys/user.h) include asm/ptrace.h but on musl
-asm/ptrace.h is not included by other headers and thus the
-aforementioned files do not compile without an explicit include of
-asm/ptrace.h:
-
- libgo/runtime/go-signal.c: In function 'getSiginfo':
- libgo/runtime/go-signal.c:227:63: error: invalid use of undefined
type 'struct pt_regs'
- 227 | ret.sigpc =
((ucontext_t*)(context))->uc_mcontext.regs->nip;
- |
-
-Instead of including the asm/ptrace.h header conditionally on PowerPC
-only it would alternatively also be possible to include it
-unconditionally.
-
-See also:
-
-*
https://git.musl-libc.org/cgit/musl/commit/?id=c2518a8efb6507f1b41c3b12e03b06f8f2317a1f
-*
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d57cb31910ca5c200e4172276749a7f8bd17ae3c
-* https://github.com/kaniini/libucontext/issues/36
-
-Signed-off-by: Sören Tempel <soeren AT soeren-tempel.net>
-Origin: Alpine Linux
----
- libgo/runtime/go-signal.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
-index 528d9b6d9fe..c67503f0a79 100644
---- a/libgo/runtime/go-signal.c
-+++ b/libgo/runtime/go-signal.c
-@@ -10,6 +10,12 @@
- #include <sys/time.h>
- #include <ucontext.h>
-
-+// On PowerPC, ucontext.h uses a pt_regs struct as an incomplete
-+// type. This type must be completed by including asm/ptrace.h.
-+#ifdef __PPC__
-+#include <asm/ptrace.h>
-+#endif
-+
- #include "runtime.h"
-
- #ifndef SA_RESTART
diff --git
a/gnu/gcc/patches/0001-libgo-make-match.sh-POSIX-shell-compatible.patch
b/gnu/gcc/patches/0001-libgo-make-match.sh-POSIX-shell-compatible.patch
deleted file mode 100644
index 84bca89..0000000
--- a/gnu/gcc/patches/0001-libgo-make-match.sh-POSIX-shell-compatible.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 75a430f66760802bf1ac5afcd716613e3cf8c77d Mon Sep 17 00:00:00 2001
-From: Sören Tempel <soeren+git AT soeren-tempel.net>
-Date: Tue, 19 Jul 2022 07:15:25 +0200
-Subject: [PATCH] libgo: make match.sh POSIX-shell compatible
-
-The `(( expression ))` syntax is a Bash extension. However, the
-arithmetic expressions used by the gobuild() function can also
-be expressed using Arithmetic POSIX Expansion with `$(( expression ))`.
-Contrary to the Bash expression, the Arithmetic Expansion doesn't set
-the return value if the expression is non-zero but instead just prints
-the expression result. Hence, the expression also needs to be negated.
----
- libgo/match.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libgo/match.sh b/libgo/match.sh
-index 7ed587ff794..b355d47429a 100755
---- a/libgo/match.sh
-+++ b/libgo/match.sh
-@@ -111,7 +111,7 @@ gobuild() {
- if test "$goarch" != "386"; then
- line=$(echo "$line" | sed -e
"s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g")
- fi
-- (($line))
-+ return $((!line))
- }
-
- matched=
diff --git
a/gnu/gcc/patches/0034-Use-generic-errstr.go-implementation-on-musl.patch
b/gnu/gcc/patches/0034-Use-generic-errstr.go-implementation-on-musl.patch
deleted file mode 100644
index a5ad797..0000000
--- a/gnu/gcc/patches/0034-Use-generic-errstr.go-implementation-on-musl.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-From b3840bdcc0eee2a4d099a9af52199944ade7acb9 Mon Sep 17 00:00:00 2001
-From: Ian Lance Taylor <iant AT golang.org>
-Date: Tue, 29 Nov 2022 17:28:44 -0800
-Subject: [PATCH] syscall, runtime: always call XSI strerror_r
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This does the right thing for either glibc or musl on GNU/Linux.
-
-Based on patch by Sören Tempel.
-
-Change-Id: If2969e131f0fae456d58b35d839d8abe191fcc59
-Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/454176
-Reviewed-by: Cherry Mui <cherryyz AT google.com>
-Reviewed-by: Ian Lance Taylor <iant AT google.com>
-TryBot-Bypass: Ian Lance Taylor <iant AT google.com>
----
- libgo/Makefile.am | 1 +
- libgo/Makefile.in | 6 +++++-
- libgo/go/syscall/errstr.go | 22 ++++++++-----------
- libgo/go/syscall/errstr_glibc.go | 33 ----------------------------
- libgo/runtime/go-strerror.c | 37 ++++++++++++++++++++++++++++++++
- 5 files changed, 52 insertions(+), 47 deletions(-)
- delete mode 100644 libgo/go/syscall/errstr_glibc.go
- create mode 100644 libgo/runtime/go-strerror.c
-
-diff --git a/libgo/Makefile.am b/libgo/Makefile.am
-index e0a1eec5..df568743 100644
---- a/libgo/Makefile.am
-+++ b/libgo/Makefile.am
-@@ -465,6 +465,7 @@ runtime_files = \
- runtime/go-nanotime.c \
- runtime/go-now.c \
- runtime/go-nosys.c \
-+ runtime/go-strerror.c \
- runtime/go-reflect-call.c \
- runtime/go-setenv.c \
- runtime/go-signal.c \
-diff --git a/libgo/Makefile.in b/libgo/Makefile.in
-index 7bef5df9..f2f3f0fc 100644
---- a/libgo/Makefile.in
-+++ b/libgo/Makefile.in
-@@ -247,7 +247,7 @@ am__objects_4 = runtime/aeshash.lo runtime/go-assert.lo \
- runtime/go-fieldtrack.lo runtime/go-matherr.lo \
- runtime/go-memclr.lo runtime/go-memmove.lo \
- runtime/go-memequal.lo runtime/go-nanotime.lo \
-- runtime/go-now.lo runtime/go-nosys.lo \
-+ runtime/go-now.lo runtime/go-nosys.lo runtime/go-strerror.lo \
- runtime/go-reflect-call.lo runtime/go-setenv.lo \
- runtime/go-signal.lo runtime/go-unsafe-pointer.lo \
- runtime/go-unsetenv.lo runtime/go-unwind.lo \
-@@ -917,6 +917,7 @@ runtime_files = \
- runtime/go-nanotime.c \
- runtime/go-now.c \
- runtime/go-nosys.c \
-+ runtime/go-strerror.c \
- runtime/go-reflect-call.c \
- runtime/go-setenv.c \
- runtime/go-signal.c \
-@@ -1390,6 +1391,8 @@ runtime/go-now.lo: runtime/$(am__dirstamp) \
- runtime/$(DEPDIR)/$(am__dirstamp)
- runtime/go-nosys.lo: runtime/$(am__dirstamp) \
- runtime/$(DEPDIR)/$(am__dirstamp)
-+runtime/go-strerror.lo: runtime/$(am__dirstamp) \
-+ runtime/$(DEPDIR)/$(am__dirstamp)
- runtime/go-reflect-call.lo: runtime/$(am__dirstamp) \
- runtime/$(DEPDIR)/$(am__dirstamp)
- runtime/go-setenv.lo: runtime/$(am__dirstamp) \
-@@ -1457,6 +1460,7 @@ distclean-compile:
- @AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-reflect-call.Plo@am__quote@
- @AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-setenv.Plo@am__quote@
- @AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-signal.Plo@am__quote@
-+@AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-strerror.Plo@am__quote@
- @AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-unsafe-pointer.Plo@am__quote@
- @AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-unsetenv.Plo@am__quote@
- @AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-unwind.Plo@am__quote@
-diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go
-index 6c2441d3..9f688e2a 100644
---- a/libgo/go/syscall/errstr.go
-+++ b/libgo/go/syscall/errstr.go
-@@ -4,23 +4,19 @@
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
--// +build !hurd
--// +build !linux
--
- package syscall
-
--//sysnb strerror_r(errnum int, buf []byte) (err Errno)
--//strerror_r(errnum _C_int, buf *byte, buflen Size_t) _C_int
-+import "internal/bytealg"
-+
-+//extern go_strerror
-+func go_strerror(_C_int, *byte, Size_t) _C_int
-
- func Errstr(errnum int) string {
-- for len := 128; ; len *= 2 {
-- b := make([]byte, len)
-- errno := strerror_r(errnum, b)
-+ for size := 128; ; size *= 2 {
-+ b := make([]byte, size)
-+ errno := go_strerror(_C_int(errnum), &b[0], Size_t(len(b)))
- if errno == 0 {
-- i := 0
-- for b[i] != 0 {
-- i++
-- }
-+ i := bytealg.IndexByte(b, 0)
- // Lowercase first letter: Bad -> bad, but
- // STREAM -> STREAM.
- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1]
&& b[1] <= 'z' {
-@@ -29,7 +25,7 @@ func Errstr(errnum int) string {
- return string(b[:i])
- }
- if errno != ERANGE {
-- return "errstr failure"
-+ return "strerror_r failure"
- }
- }
- }
-diff --git a/libgo/go/syscall/errstr_glibc.go
b/libgo/go/syscall/errstr_glibc.go
-deleted file mode 100644
-index 5b19e6f2..00000000
---- a/libgo/go/syscall/errstr_glibc.go
-+++ /dev/null
-@@ -1,33 +0,0 @@
--// errstr_glibc.go -- GNU/Linux and GNU/Hurd specific error strings.
--
--// Copyright 2010 The Go Authors. All rights reserved.
--// Use of this source code is governed by a BSD-style
--// license that can be found in the LICENSE file.
--
--// We use this rather than errstr.go because on GNU/Linux sterror_r
--// returns a pointer to the error message, and may not use buf at all.
--
--// +build hurd linux
--
--package syscall
--
--import "unsafe"
--
--//sysnb strerror_r(errnum int, b []byte) (errstr *byte)
--//strerror_r(errnum _C_int, b *byte, len Size_t) *byte
--
--func Errstr(errnum int) string {
-- a := make([]byte, 128)
-- p := strerror_r(errnum, a)
-- b := (*[1000]byte)(unsafe.Pointer(p))
-- i := 0
-- for b[i] != 0 {
-- i++
-- }
-- // Lowercase first letter: Bad -> bad, but STREAM -> STREAM.
-- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
-- c := b[0] + 'a' - 'A'
-- return string(c) + string(b[1:i])
-- }
-- return string(b[:i])
--}
-diff --git a/libgo/runtime/go-strerror.c b/libgo/runtime/go-strerror.c
-new file mode 100644
-index 00000000..13d1d91d
---- /dev/null
-+++ b/libgo/runtime/go-strerror.c
-@@ -0,0 +1,37 @@
-+/* go-strerror.c -- wrapper around XSI-compliant strerror_r.
-+
-+ Copyright 2022 The Go Authors. All rights reserved.
-+ Use of this source code is governed by a BSD-style
-+ license that can be found in the LICENSE file. */
-+
-+/* There are two version of strerror_r on GNU/Linux: a GNU-specific
-+ and an XSI-compliant version. The former version is only available
-+ on glibc. Since glibc 2.13, the XSI-compliant version is also
-+ provided by glibc if _GNU_SOURCE is not defined. Since the
-+ entirety of gofrontend is compiled with _GNU_SOURCE, this file
-+ exists to selectively undefine it and provides an alias to the
-+ XSI-compliant version of strerror_r(3). */
-+
-+#ifdef __linux__
-+
-+/* Force selection of XSI-compliant strerror_r by glibc. */
-+#undef XOPEN_SOURCE
-+#define XOPEN_SOURCE 600
-+#undef _POSIX_C_SOURCE
-+#define _POSIX_C_SOURCE 200112L
-+#undef _GNU_SOURCE
-+
-+#endif /* __linux__ */
-+
-+#include <string.h>
-+
-+#ifndef HAVE_STRERROR_R
-+// Provided by go-nosys.c if not provided by libc itself.
-+extern int strerror_r (int, char *, size_t);
-+#endif
-+
-+int
-+go_strerror (int errnum, char *buf, size_t buflen)
-+{
-+ return strerror_r (errnum, buf, buflen);
-+}
diff --git
a/gnu/gcc/patches/0037-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch

b/gnu/gcc/patches/0037-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
deleted file mode 100644
index e0423d4..0000000
---
a/gnu/gcc/patches/0037-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
+++ /dev/null
@@ -1,199 +0,0 @@
-From 3b9243b891cc06373639a23ed5717b0d1c2d8ea6 Mon Sep 17 00:00:00 2001
-From: Ian Lance Taylor <iant AT golang.org>
-Date: Tue, 14 Jun 2022 06:13:43 -0700
-Subject: [PATCH] libgo: permit loff_t and off_t to be macros
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-They are macros in musl libc, rather than typedefs, and -fgo-dump-spec
-doesn't handle that case.
-
-Based on patch by Sören Tempel.
-
-Change-Id: Ic9a608fd964a6f78e754aa8e3100aff06ab3dade
-Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/412075
-Reviewed-by: Ian Lance Taylor <iant AT google.com>
-Reviewed-by: Cherry Mui <cherryyz AT google.com>
-
-libgo: #include <sys/types.h> when checking for loff_t
-
-Fixes https://gcc.gnu.org/PR106033
-Fixes golang/go#53469
-
-Change-Id: I060021b7bb9334949b567442448abb6822fd6d35
-Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/413214
-Reviewed-by: Cherry Mui <cherryyz AT google.com>
-Reviewed-by: Than McIntosh <thanm AT google.com>
----
- libgo/config.h.in | 3 +++
- libgo/configure | 12 ++++++++++--
- libgo/configure.ac | 11 +++++++++--
- libgo/go/syscall/libcall_linux.go | 17 +++++++++--------
- libgo/mksysinfo.sh | 6 +-----
- libgo/sysinfo.c | 15 ++++++++++++++-
- 6 files changed, 46 insertions(+), 18 deletions(-)
-
-diff --git a/libgo/config.h.in b/libgo/config.h.in
-index 25b8ab8f9ee..2c3c7469675 100644
---- a/libgo/config.h.in
-+++ b/libgo/config.h.in
-@@ -70,6 +70,9 @@
- /* Define to 1 if you have the `fchownat' function. */
- #undef HAVE_FCHOWNAT
-
-+/* Define to 1 if you have the <fcntl.h> header file. */
-+#undef HAVE_FCNTL_H
-+
- /* Define to 1 if you have the `futimesat' function. */
- #undef HAVE_FUTIMESAT
-
-diff --git a/libgo/configure b/libgo/configure
-index ffe17c9be55..61a49947eb9 100755
---- a/libgo/configure
-+++ b/libgo/configure
-@@ -15249,7 +15249,7 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
- fi
-
-
--for ac_header in port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h
sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h
sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h
net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h
sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h
linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h
netinet/ip_mroute.h netinet/if_ether.h lwp.h
-+for ac_header in fcntl.h port.h sched.h semaphore.h sys/file.h sys/mman.h
syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h
sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h
net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h
sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h
linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h
netinet/ip_mroute.h netinet/if_ether.h lwp.h
- do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
- ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header"
"$ac_includes_default"
-@@ -15546,7 +15546,14 @@ _ACEOF
-
- fi
-
--ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t"
"$ac_includes_default"
-+
-+CFLAGS_hold="$CFLAGS"
-+CFLAGS="$OSCFLAGS $CFLAGS"
-+ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "
-+#include <sys/types.h>
-+#include <fcntl.h>
-+
-+"
- if test "x$ac_cv_type_loff_t" = xyes; then :
-
- cat >>confdefs.h <<_ACEOF
-@@ -15556,6 +15563,7 @@ _ACEOF
-
- fi
-
-+CFLAGS="$CFLAGS_hold"
-
- LIBS_hold="$LIBS"
- LIBS="$LIBS -lm"
-diff --git a/libgo/configure.ac b/libgo/configure.ac
-index 7e2b98ba67c..274fcfc35c7 100644
---- a/libgo/configure.ac
-+++ b/libgo/configure.ac
-@@ -579,7 +579,7 @@ AC_C_BIGENDIAN
-
- GCC_CHECK_UNWIND_GETIPINFO
-
--AC_CHECK_HEADERS(port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h
sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h
sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h
net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h
sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h
linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h
netinet/ip_mroute.h netinet/if_ether.h lwp.h)
-+AC_CHECK_HEADERS(fcntl.h port.h sched.h semaphore.h sys/file.h sys/mman.h
syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h
sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h
net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h
sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h
linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h
netinet/ip_mroute.h netinet/if_ether.h lwp.h)
-
- AC_CHECK_HEADERS([netinet/icmp6.h], [], [],
- [#include <netinet/in.h>
-@@ -601,7 +601,14 @@ AC_STRUCT_DIRENT_D_TYPE
-
- AC_CHECK_FUNCS(accept4 dup3 epoll_create1 faccessat fallocate fchmodat
fchownat futimesat getxattr inotify_add_watch inotify_init inotify_init1
inotify_rm_watch listxattr mkdirat mknodat open64 openat pipe2 removexattr
renameat setxattr sync_file_range splice syscall tee unlinkat unshare
utimensat)
- AC_TYPE_OFF_T
--AC_CHECK_TYPES([loff_t])
-+
-+CFLAGS_hold="$CFLAGS"
-+CFLAGS="$OSCFLAGS $CFLAGS"
-+AC_CHECK_TYPES([loff_t], [], [], [[
-+#include <sys/types.h>
-+#include <fcntl.h>
-+]])
-+CFLAGS="$CFLAGS_hold"
-
- LIBS_hold="$LIBS"
- LIBS="$LIBS -lm"
-diff --git a/libgo/go/syscall/libcall_linux.go
b/libgo/go/syscall/libcall_linux.go
-index 96974bd3269..65eb1a745f7 100644
---- a/libgo/go/syscall/libcall_linux.go
-+++ b/libgo/go/syscall/libcall_linux.go
-@@ -209,19 +209,20 @@ func Gettid() (tid int) {
- //sys Setxattr(path string, attr string, data []byte, flags int) (err error)
- //setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int)
_C_int
-
--//sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags
int) (n int64, err error)
--//splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t,
flags _C_uint) Ssize_t
-+//sys splice(rfd int, roff *_libgo_loff_t_type, wfd int, woff
*_libgo_loff_t_type, len int, flags int) (n int64, err error)
-+//splice(rfd _C_int, roff *_libgo_loff_t_type, wfd _C_int, woff
*_libgo_loff_t_type, len Size_t, flags _C_uint) Ssize_t
-+
- func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int)
(n int64, err error) {
-- var lroff _loff_t
-- var plroff *_loff_t
-+ var lroff _libgo_loff_t_type
-+ var plroff *_libgo_loff_t_type
- if roff != nil {
-- lroff = _loff_t(*roff)
-+ lroff = _libgo_loff_t_type(*roff)
- plroff = &lroff
- }
-- var lwoff _loff_t
-- var plwoff *_loff_t
-+ var lwoff _libgo_loff_t_type
-+ var plwoff *_libgo_loff_t_type
- if woff != nil {
-- lwoff = _loff_t(*woff)
-+ lwoff = _libgo_loff_t_type(*woff)
- plwoff = &lwoff
- }
- n, err = splice(rfd, plroff, wfd, plwoff, len, flags)
-diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
-index 0c52ea5d71a..5aa309155c3 100755
---- a/libgo/mksysinfo.sh
-+++ b/libgo/mksysinfo.sh
-@@ -403,11 +403,7 @@ fi
- # Some basic types.
- echo 'type Size_t _size_t' >> ${OUT}
- echo "type Ssize_t _ssize_t" >> ${OUT}
--if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then
-- echo "type Offset_t _off64_t" >> ${OUT}
--else
-- echo "type Offset_t _off_t" >> ${OUT}
--fi
-+echo "type Offset_t _libgo_off_t_type" >> ${OUT}
- echo "type Mode_t _mode_t" >> ${OUT}
- echo "type Pid_t _pid_t" >> ${OUT}
- echo "type Uid_t _uid_t" >> ${OUT}
-diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
-index 336a5983750..fc0210992fa 100644
---- a/libgo/sysinfo.c
-+++ b/libgo/sysinfo.c
-@@ -354,6 +354,18 @@ enum {
- };
- #endif
-
-+#if defined(HAVE_LOFF_T)
-+// loff_t can be defined as a macro; for -fgo-dump-spec make sure we
-+// see a typedef.
-+typedef loff_t libgo_loff_t_type;
-+#endif
-+
-+#if defined(HAVE_OFF64_T)
-+typedef off64_t libgo_off_t_type;
-+#else
-+typedef off_t libgo_off_t_type;
-+#endif
-+
- // The following section introduces explicit references to types and
- // constants of interest to support bootstrapping libgo using a
- // compiler that doesn't support -fdump-go-spec (e.g., clang), via
-@@ -534,7 +546,8 @@ SREF(timex);
- // From sys/types.h
- TREF(pid_t);
- TREF(off_t);
--TREF(loff_t);
-+TREF(libgo_loff_t_type);
-+TREF(libgo_off_t_type);
- TREF(size_t);
- TREF(ssize_t);
- TREF(mode_t);
diff --git
a/gnu/gcc/patches/0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch

b/gnu/gcc/patches/0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
deleted file mode 100644
index 94bb9fc..0000000
---
a/gnu/gcc/patches/0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 5e658f4659c551330ea68f5667e4f951b218f32d Mon Sep 17 00:00:00 2001
-From: Ian Lance Taylor <iant AT golang.org>
-Date: Wed, 26 Oct 2022 17:23:42 -0700
-Subject: [PATCH] runtime: use _libgo_off_t_type when calling C mmap
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The last argument to the C mmap function is type off_t, not uintptr.
-On some 32-bit systems, off_t is larger than uintptr.
-
-Based on patch by Sören Tempel.
-
-Change-Id: Ib6f9d5bcd4734f99a72889e2282b97ec3c8fbd34
-Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/445735
-Reviewed-by: Cherry Mui <cherryyz AT google.com>
-Reviewed-by: Than McIntosh <thanm AT google.com>
----
- libgo/go/runtime/mem_gccgo.go | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgo/go/runtime/mem_gccgo.go b/libgo/go/runtime/mem_gccgo.go
-index fa3389d8..1e84f4f5 100644
---- a/libgo/go/runtime/mem_gccgo.go
-+++ b/libgo/go/runtime/mem_gccgo.go
-@@ -15,7 +15,7 @@ import (
- //go:linkname sysFree
-
- //extern mmap
--func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off
uintptr) unsafe.Pointer
-+func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off
_libgo_off_t_type) unsafe.Pointer
-
- //extern munmap
- func munmap(addr unsafe.Pointer, length uintptr) int32
-@@ -38,7 +38,7 @@ func init() {
- }
-
- func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off
uintptr) (unsafe.Pointer, int) {
-- p := sysMmap(addr, n, prot, flags, fd, off)
-+ p := sysMmap(addr, n, prot, flags, fd, _libgo_off_t_type(off))
- if uintptr(p) == _MAP_FAILED {
- return nil, errno()
- }
diff --git
a/gnu/gcc/patches/0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
b/gnu/gcc/patches/0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
deleted file mode 100644
index 5cebe74..0000000
---
a/gnu/gcc/patches/0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From c86b726c048eddc1be320c0bf64a897658bee13d Mon Sep 17 00:00:00 2001
-From: Uros Bizjak <ubizjak AT gmail.com>
-Date: Wed, 18 May 2022 20:03:26 +0200
-Subject: [PATCH] x86: Fix -fsplit-stack feature detection via
- TARGET_CAN_SPLIT_STACK
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Since commit c163647ffbc9a20c8feb6e079dbecccfe016c82e -fsplit-stack
-is only supported on glibc targets. However, this original commit
-required some fixups. As part of the fixup, the changes to the
-gnu-user-common.h and gnu.h were partially reverted in commit
-60953a23d57b13a672f751bec0c6eefc059eb1ab thus causing TARGET_CAN_SPLIT_STACK
-to be defined for non-glibc targets even though -fsplit-stack is
-actually not supported and attempting to use it causes a runtime error.
-
-This causes gcc internal code, such as ./gcc/go/gospec.c to not
-correctly detect that -fsplit-stack is not supported and thus causes
-gccgo to fail compilation on non-glibc targets.
-
-This commit ensures that TARGET_CAN_SPLIT_STACK is only set if the
-default libc is glibc. It is presently unclear to me if there is a
-better way to detect glibc at pre-processor time.
-
-The proposed changes have been tested on x86 and x86_64 Alpine Linux
-(which uses musl libc) and fix compilation of gccgo for this target.
-
-Signed-off-by: Sören Tempel <soeren AT soeren-tempel.net>
-
-gcc/ChangeLog:
-
- * config/i386/gnu-user-common.h (defined): Only define
- TARGET_CAN_SPLIT_STACK for glibc targets.
- * config/i386/gnu.h (defined): Ditto.
----
- gcc/config/i386/gnu-user-common.h | 5 +++--
- gcc/config/i386/gnu.h | 5 +++--
- 2 files changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/config/i386/gnu-user-common.h
b/gcc/config/i386/gnu-user-common.h
-index 23b54c5be52..cab9be2bfb7 100644
---- a/gcc/config/i386/gnu-user-common.h
-+++ b/gcc/config/i386/gnu-user-common.h
-@@ -66,7 +66,8 @@ along with GCC; see the file COPYING3. If not see
- #define STACK_CHECK_STATIC_BUILTIN 1
-
- /* We only build the -fsplit-stack support in libgcc if the
-- assembler has full support for the CFI directives. */
--#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
-+ assembler has full support for the CFI directives. Also
-+ we only support -fsplit-stack on glibc targets. */
-+#if (DEFAULT_LIBC == LIBC_GLIBC) && HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
- #define TARGET_CAN_SPLIT_STACK
- #endif
-diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
-index 401e60c9a02..fb8d69a97d8 100644
---- a/gcc/config/i386/gnu.h
-+++ b/gcc/config/i386/gnu.h
-@@ -41,8 +41,9 @@ along with GCC. If not, see
<http://www.gnu.org/licenses/>.
- #define TARGET_THREAD_SSP_OFFSET 0x14
-
- /* We only build the -fsplit-stack support in libgcc if the
-- assembler has full support for the CFI directives. */
--#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
-+ assembler has full support for the CFI directives. Also
-+ we only support -fsplit-stack on glibc targets. */
-+#if (DEFAULT_LIBC == LIBC_GLIBC) && HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
- #define TARGET_CAN_SPLIT_STACK
- #endif
- /* We steal the last transactional memory word. */
diff --git
a/gnu/gcc/patches/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
b/gnu/gcc/patches/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
deleted file mode 100644
index db38df3..0000000
--- a/gnu/gcc/patches/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 548720bca6bff21ebc9aba22249d9ce45bbd90c7 Mon Sep 17 00:00:00 2001
-From: Ian Lance Taylor <iant AT golang.org>
-Date: Wed, 29 Jun 2022 15:32:04 -0700
-Subject: [PATCH] libgo: handle stat st_atim32 field and SYS_SECCOMP
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Patches for musl support, from Sören Tempel.
-
-Fixes https://gcc.gnu.org/PR105225
-
-Change-Id: If396877d4a4c7d27962226d7a6e3bb91b1344413
-Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/415294
-Reviewed-by: Than McIntosh <thanm AT google.com>
-Reviewed-by: Ian Lance Taylor <iant AT google.com>
----
- libgo/mksysinfo.sh | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
-index 5aa30915..ea1fa17d 100755
---- a/libgo/mksysinfo.sh
-+++ b/libgo/mksysinfo.sh
-@@ -127,6 +127,7 @@ fi
-
- # The syscall numbers. We force the names to upper case.
- grep '^const _SYS_' gen-sysinfo.go | \
-+ grep -v '^const _SYS_SECCOMP = ' | \
- sed -e 's/const _\(SYS_[^= ]*\).*$/\1/' | \
- while read sys; do
- sup=`echo $sys | tr abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ`
-@@ -506,7 +507,7 @@ fi
-
- # For historical reasons Go uses the suffix "timespec" instead of "tim" for
- # stat_t's time fields on NetBSD.
--st_times='-e s/st_atim/Atim/ -e s/st_mtim/Mtim/ -e s/st_ctim/Ctim/'
-+st_times='-e s/st_atim/Atim/g -e s/st_mtim/Mtim/g -e s/st_ctim/Ctim/g'
- if test "${GOOS}" = "netbsd"; then
- st_times='-e s/st_atim/Atimespec/ -e s/st_mtim/Mtimespec/ -e
s/st_ctim/Ctimespec/'
- fi
diff --git
a/gnu/gcc/patches/0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
b/gnu/gcc/patches/0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
deleted file mode 100644
index 0f949be..0000000
--- a/gnu/gcc/patches/0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From 8f1a91aeff400d572857895b7f5e863ec5a4d93e Mon Sep 17 00:00:00 2001
-From: Ian Lance Taylor <iant AT golang.org>
-Date: Mon, 26 Sep 2022 15:03:53 -0400
-Subject: [PATCH] runtime: portable access to sigev_notify_thread_id
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Previously, libgo relied on the _sigev_un implementation-specific
-field in struct sigevent, which is only available on glibc.
-This patch uses the sigev_notify_thread_id macro instead which is
-mandated by timer_create(2). In theory, this should work with any libc
-implementation for Linux. Unfortunately, there is an open glibc bug
-as glibc does not define this macro. For this reason, a glibc-specific
-workaround is required. Other libcs (such as musl) define the macro
-and don't require the workaround.
-
-See https://sourceware.org/bugzilla/show_bug.cgi?id=27417
-
-This makes libgo compatible with musl libc.
-
-Based on patch by Sören Tempel.
-
-Change-Id: I0924a53d5212730ebc395ecf9199f85967be8cc6
-Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/434755
-Reviewed-by: Cherry Mui <cherryyz AT google.com>
-Reviewed-by: Than McIntosh <thanm AT google.com>
----
- libgo/go/runtime/os_linux.go | 12 +++++++++++-
- libgo/runtime/go-signal.c | 18 ++++++++++++++++++
- 2 files changed, 29 insertions(+), 1 deletion(-)
-
-diff --git a/libgo/go/runtime/os_linux.go b/libgo/go/runtime/os_linux.go
-index 96fb1788..2b2d827c 100644
---- a/libgo/go/runtime/os_linux.go
-+++ b/libgo/go/runtime/os_linux.go
-@@ -22,6 +22,12 @@ type mOS struct {
- profileTimerValid uint32
- }
-
-+// setSigeventTID is written in C to set the sigev_notify_thread_id
-+// field of a sigevent struct.
-+//
-+//go:noescape
-+func setSigeventTID(*_sigevent, int32)
-+
- func getProcID() uint64 {
- return uint64(gettid())
- }
-@@ -52,9 +58,12 @@ const (
- )
-
- // Atomically,
-+//
- // if(*addr == val) sleep
-+//
- // Might be woken up spuriously; that's allowed.
- // Don't sleep longer than ns; ns < 0 means forever.
-+//
- //go:nosplit
- func futexsleep(addr *uint32, val uint32, ns int64) {
- // Some Linux kernels have a bug where futex of
-@@ -73,6 +82,7 @@ func futexsleep(addr *uint32, val uint32, ns int64) {
- }
-
- // If any procs are sleeping on addr, wake up at most cnt.
-+//
- //go:nosplit
- func futexwakeup(addr *uint32, cnt uint32) {
- ret := futex(unsafe.Pointer(addr), _FUTEX_WAKE_PRIVATE, cnt, nil,
nil, 0)
-@@ -365,7 +375,7 @@ func setThreadCPUProfiler(hz int32) {
- var sevp _sigevent
- sevp.sigev_notify = _SIGEV_THREAD_ID
- sevp.sigev_signo = _SIGPROF
-- *((*int32)(unsafe.Pointer(&sevp._sigev_un))) = int32(mp.procid)
-+ setSigeventTID(&sevp, int32(mp.procid))
- ret := timer_create(_CLOCK_THREAD_CPUTIME_ID, &sevp, &timerid)
- if ret != 0 {
- // If we cannot create a timer for this M, leave
profileTimerValid false
-diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
-index 528d9b6d..aa1b6305 100644
---- a/libgo/runtime/go-signal.c
-+++ b/libgo/runtime/go-signal.c
-@@ -183,6 +183,24 @@ setSigactionHandler(struct sigaction* sa, uintptr
handler)
- sa->sa_sigaction = (void*)(handler);
- }
-
-+#ifdef __linux__
-+
-+// Workaround for https://sourceware.org/bugzilla/show_bug.cgi?id=27417
-+#ifndef sigev_notify_thread_id
-+ #define sigev_notify_thread_id _sigev_un._tid
-+#endif
-+
-+void setSigeventTID(struct sigevent*, int32_t)
-+ __asm__ (GOSYM_PREFIX "runtime.setSigeventTID");
-+
-+void
-+setSigeventTID(struct sigevent *sev, int32_t v)
-+{
-+ sev->sigev_notify_thread_id = v;
-+}
-+
-+#endif // defined(__linux__)
-+
- // C code to fetch values from the siginfo_t and ucontext_t pointers
- // passed to a signal handler.
-
diff --git
a/gnu/gcc/patches/0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch

b/gnu/gcc/patches/0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch
deleted file mode 100644
index f2f0191..0000000
---
a/gnu/gcc/patches/0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From d53e8a0e94e34dc609e34dd5e404debda2640cfb Mon Sep 17 00:00:00 2001
-From: Ian Lance Taylor <iant AT golang.org>
-Date: Sat, 30 Jul 2022 07:29:28 -0700
-Subject: [PATCH] libgo: use SYS_timer_settime32
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Musl defines SYS_timer_settime32, not SYS_timer_settime, on 32-bit systems.
-
-Based on patch by Sören Tempel.
-
-Change-Id: I1f3485028d132ceca1aba595325af24b4d72b894
-Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/420222
-Reviewed-by: Ian Lance Taylor <iant AT google.com>
-Reviewed-by: Cherry Mui <cherryyz AT google.com>
----
- libgo/sysinfo.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
-index fc021099..180f5c31 100644
---- a/libgo/sysinfo.c
-+++ b/libgo/sysinfo.c
-@@ -354,6 +354,11 @@ enum {
- };
- #endif
-
-+#if !defined(SYS_timer_settime) && defined(SYS_timer_settime32)
-+// musl defines SYS_timer_settim32 on 32-bit systems.
-+#define SYS_timer_settime SYS_timer_settime32
-+#endif
-+
- #if defined(HAVE_LOFF_T)
- // loff_t can be defined as a macro; for -fgo-dump-spec make sure we
- // see a typedef.



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (30181345bccb302920b79429f96889285682b18f), Ismael Luceno, 07/11/2023

Archive powered by MHonArc 2.6.24.

Top of Page