Upgrade to GCC 14.1.0
GCC
- Package name: gcc
- Package version: 14.1.0
- Alpine version: 3.20
- Alpine architecture: all
Summary
Last month GCC 14.1.0 was released, brining many benefits such as treating implicitly defined functions as errors.
This previously has lead to bugs, due to false function signatures. Such as #67860 GCC known threats this behaviour as an error, this will lead to more stabile software and improve the usability of alpine, as the amount of undefined behaviour and segfaults will be reduced during compilation.
This is my initial patch.
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index e0566239c7b..fba9f49c48f 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -2,7 +2,7 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Ariadne Conill <ariadne@dereferenced.org>
pkgname=gcc
-pkgver=14.1.0_git20240507
+pkgver=13.2.1_git20240309
# i.e. 13.2.1, must match gcc/BASE-VER
_pkgbase="${pkgver%%_git*}"
# date component from snapshots
@@ -211,6 +211,7 @@ fi
makedepends="$makedepends_build $makedepends_host"
# when using upstream releases, use this URI template
# https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
#
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
@@ -218,9 +219,8 @@ makedepends="$makedepends_build $makedepends_host"
# README) matches the base commit on the version-specific branch in the Git repository below.
#
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
-# https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
# so that they can be properly tracked and easily rebased if needed.
-source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
+source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
0001-posix_memalign.patch
0002-gcc-poison-system-directories.patch
0003-specs-turn-on-Wl-z-now-by-default.patch
@@ -775,7 +775,7 @@ gdb() {
}
sha512sums="
-e9e224f2b26646fcf038d28dfa08b94c623bc57941f99894a321d01c600f7c68aff6b8837fd25e73e540de1f8de5606e98694a62cdcdfb525ce768b3ef6879ea gcc-14.1.0.tar.xz
+2d1e0374ebdee526f0549319fc9c364968c52a0d4aaa16759f00453cb083fe58d8f463c47d97f3bb74a0a92e251989eb75a50ee5800b4569978c72d25446b44e gcc-13-20240309.tar.xz
1ecffba1b07d60e1b4422302b032bbea918b674c8e12b30aa6965b544d700ce86b61e9f7b8d402c6caf59257f491a394dd0912f0948565d6eae9335ee54f3b35 0001-posix_memalign.patch
163f282455b6a4df33f011bcd8b0440566ba0ffaeeab30d8ac52d39948980a56881ca0eff60687129d59556389a58b9d64e7768750bd70b1fe0fedbc9fc30dc2 0002-gcc-poison-system-directories.patch
3f24bb6a50d3c45b71ea05590e32fe3e69b91377ab185352891d5035c76ed193117c6d0b314a4c364bcf136b9a9dd5c926d6c7c30ab436976c121ebfea8d3ddd 0003-specs-turn-on-Wl-z-now-by-default.patch
I am unsure if upstream GCC can be used directly or what needs to be done to patch it.