From 53bd6d9f9192478caafe27c274a3584266168b53 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 27 Sep 2023 19:46:37 +0100 Subject: sys-devel/gcc : revision bump --- sys-devel/gcc/Manifest | 3 + .../gcc/files/gcc-13-fix-cross-fixincludes.patch | 19 +++++++ sys-devel/gcc/files/gcc-configure-LANG.patch | 64 +++++++++++++++++++++ sys-devel/gcc/files/gcc-configure-texinfo.patch | 16 ++++++ sys-devel/gcc/gcc-13.2.0-r10.ebuild | 65 ++++++++++++++++++++++ 5 files changed, 167 insertions(+) create mode 100644 sys-devel/gcc/Manifest create mode 100644 sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch create mode 100644 sys-devel/gcc/files/gcc-configure-LANG.patch create mode 100644 sys-devel/gcc/files/gcc-configure-texinfo.patch create mode 100644 sys-devel/gcc/gcc-13.2.0-r10.ebuild (limited to 'sys-devel/gcc') diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest new file mode 100644 index 00000000..e16b8399 --- /dev/null +++ b/sys-devel/gcc/Manifest @@ -0,0 +1,3 @@ +DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69 +DIST gcc-13.2.0-patches-3.tar.xz 30956 BLAKE2B 29ce043b46645640ca1e983397af3e158588ad87575f0bc59451ea4a7dd5e3bb5b190ed031de6a22cd790d423ba111e95d222187dd09985dceb12db9f0a2d907 SHA512 4ffecae7be320124ad0c4e71e39e142b7aa8db0e70b5f486f491d7a33ea31efc6464c6abeea77df02a8bd5cf81f08225d625c8af5c27f9afa32c0d7d989f7a3c +DIST gcc-13.2.0.tar.xz 87858592 BLAKE2B 0034b29d3d6cc05821f0c4253ce077805943aff7b370729dd203bda57d89c107edd657eeddc2fb1e69ea15c7b0323b961f46516c7f4af89a3ccf7fea84701be2 SHA512 d99e4826a70db04504467e349e9fbaedaa5870766cda7c5cab50cdebedc4be755ebca5b789e1232a34a20be1a0b60097de9280efe47bdb71c73251e30b0862a2 diff --git a/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch b/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch new file mode 100644 index 00000000..e4abe01a --- /dev/null +++ b/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch @@ -0,0 +1,19 @@ +Revert of https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=59e4c98173a79fcaa2c33253261409f38856c384 +for now to fix cross fixincludes builds. + +https://bugs.gentoo.org/905118 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -532,11 +532,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h + # Default native SYSTEM_HEADER_DIR, to be overridden by targets. + NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@ + # Default cross SYSTEM_HEADER_DIR, to be overridden by targets. +-ifeq (@includedir@,$(prefix)/include) +- CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ +-else +- CROSS_SYSTEM_HEADER_DIR = @includedir@ +-endif ++CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ + + # autoconf sets SYSTEM_HEADER_DIR to one of the above. + # Purge it of unnecessary internal relative paths diff --git a/sys-devel/gcc/files/gcc-configure-LANG.patch b/sys-devel/gcc/files/gcc-configure-LANG.patch new file mode 100644 index 00000000..d1b1b035 --- /dev/null +++ b/sys-devel/gcc/files/gcc-configure-LANG.patch @@ -0,0 +1,64 @@ +The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in +option parsing, it may break. + +http://bugs.gentoo.org/103483 + +--- configure ++++ configure +@@ -54,6 +54,19 @@ + infodir='${prefix}/info' + mandir='${prefix}/man' + ++# NLS nuisances. ++for as_var in \ ++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ++ LC_TELEPHONE LC_TIME ++do ++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then ++ eval $as_var=C; export $as_var ++ else ++ unset $as_var ++ fi ++done ++ + # Initialize some other variables. + subdirs= + MFLAGS= MAKEFLAGS= +@@ -452,16 +463,6 @@ + esac + done + +-# NLS nuisances. +-# Only set these to C if already set. These must not be set unconditionally +-# because not all systems understand e.g. LANG=C (notably SCO). +-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +-# Non-C LC_CTYPE values break the ctype check. +-if test "${LANG+set}" = set; then LANG=C; export LANG; fi +-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +- + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -rf conftest* confdefs.h + # AIX cpp loses on an empty file, so make sure it contains at least a newline. +@@ -1850,6 +1850,19 @@ + # Compiler output produced by configure, useful for debugging + # configure, is in ./config.log if it exists. + ++# NLS nuisances. ++for as_var in \ ++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ++ LC_TELEPHONE LC_TIME ++do ++ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then ++ eval \$as_var=C; export \$as_var ++ else ++ unset \$as_var ++ fi ++done ++ + ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" + for ac_option + do diff --git a/sys-devel/gcc/files/gcc-configure-texinfo.patch b/sys-devel/gcc/files/gcc-configure-texinfo.patch new file mode 100644 index 00000000..99e90998 --- /dev/null +++ b/sys-devel/gcc/files/gcc-configure-texinfo.patch @@ -0,0 +1,16 @@ +Chances are quite good that the installed makeinfo is sufficient. +So ignore false positives where the makeinfo installed is so new +that it violates the cheesy version grep. + +http://bugs.gentoo.org/198182 + +--- a/configure ++++ b/configure +@@ -3573,6 +3573,6 @@ + : + else +- MAKEINFO="$MISSING makeinfo" ++ : + fi + ;; + diff --git a/sys-devel/gcc/gcc-13.2.0-r10.ebuild b/sys-devel/gcc/gcc-13.2.0-r10.ebuild new file mode 100644 index 00000000..2a428924 --- /dev/null +++ b/sys-devel/gcc/gcc-13.2.0-r10.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="13.2.0" +PATCH_VER="3" +MUSL_VER="2" +MUSL_GCC_VER="13.2.0" + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" + BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} -- cgit v1.2.3