summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-devtools/gcc')
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-14.2.inc (renamed from poky/meta/recipes-devtools/gcc/gcc-14.1.inc)9
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-common.inc26
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-configure-common.inc1
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc5
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-cross-canadian_14.2.bb (renamed from poky/meta/recipes-devtools/gcc/gcc-cross-canadian_14.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-cross.inc18
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-cross_14.2.bb (renamed from poky/meta/recipes-devtools/gcc/gcc-cross_14.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-crosssdk_14.2.bb (renamed from poky/meta/recipes-devtools/gcc/gcc-crosssdk_14.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-runtime.inc4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-runtime_14.2.bb (renamed from poky/meta/recipes-devtools/gcc/gcc-runtime_14.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-sanitizers_14.2.bb (renamed from poky/meta/recipes-devtools/gcc/gcc-sanitizers_14.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-source_14.2.bb (renamed from poky/meta/recipes-devtools/gcc/gcc-source_14.1.bb)1
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-target.inc47
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-testsuite.inc2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch10
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch14
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch10
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch10
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0008-libtool.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch14
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch26
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0026-libstdc-Fix-typo-in-_Grapheme_cluster_view-_Iterator.patch76
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/gcc.git-ab884fffe3fc82a710bea66ad651720d71c938b8.patch549
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc_14.2.bb (renamed from poky/meta/recipes-devtools/gcc/gcc_14.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/libgcc-common.inc5
-rw-r--r--poky/meta/recipes-devtools/gcc/libgcc-initial_14.2.bb (renamed from poky/meta/recipes-devtools/gcc/libgcc-initial_14.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/libgcc_14.2.bb (renamed from poky/meta/recipes-devtools/gcc/libgcc_14.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/libgfortran.inc5
-rw-r--r--poky/meta/recipes-devtools/gcc/libgfortran_14.2.bb (renamed from poky/meta/recipes-devtools/gcc/libgfortran_14.1.bb)0
47 files changed, 671 insertions, 207 deletions
diff --git a/poky/meta/recipes-devtools/gcc/gcc-14.1.inc b/poky/meta/recipes-devtools/gcc/gcc-14.2.inc
index 17a9c51d71..9cfb246294 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-14.1.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-14.2.inc
@@ -2,11 +2,11 @@ require gcc-common.inc
# Third digit in PV should be incremented after a minor release
-PV = "14.1.0"
+PV = "14.2.0"
# BINV should be incremented to a revision after a minor gcc release
-BINV = "14.1.0"
+BINV = "14.2.0"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
@@ -40,7 +40,7 @@ LIC_FILES_CHKSUM = "\
RELEASE ?= "${PV}"
BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz"
SOURCEDIR ?= "gcc-${PV}"
-SRC_URI[sha256sum] = "e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840"
+SRC_URI[sha256sum] = "a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9"
SRC_URI = "${BASEURI} \
file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
@@ -68,7 +68,7 @@ SRC_URI = "${BASEURI} \
file://0023-Fix-install-path-of-linux64.h.patch \
file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \
file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \
- file://0026-libstdc-Fix-typo-in-_Grapheme_cluster_view-_Iterator.patch \
+ file://gcc.git-ab884fffe3fc82a710bea66ad651720d71c938b8.patch \
"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${SOURCEDIR}"
@@ -110,3 +110,4 @@ EXTRA_OECONF_INITIAL = "\
"
CVE_STATUS[CVE-2021-37322] = "cpe-incorrect: Is a binutils 2.26 issue, not gcc"
+CVE_STATUS[CVE-2023-4039] = "fixed-version: Fixed from version 14.0+"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-common.inc b/poky/meta/recipes-devtools/gcc/gcc-common.inc
index 5ac82b1b57..01de93cc3c 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-common.inc
@@ -116,3 +116,29 @@ target_prefix ?= "${prefix}"
# The real WORKDIR location isn't a dependency for the shared workdir.
src_patches[vardepsexclude] = "WORKDIR"
should_apply[vardepsexclude] += "PN"
+
+remove_sysroot_paths_from_configargs () {
+ replacement=${1}
+ # Prevent sysroot path from being used in configargs.h header, as it will
+ # be rewritten when used by other sysroots preventing support for gcc
+ # plugins. Additionally the path is embeddeded into the output binary, this
+ # prevents building a reproducible binary.
+ oe_runmake configure-gcc
+ sed -i "s@${STAGING_DIR_TARGET}@$replacement@g" ${B}/gcc/configargs.h
+ sed -i "s@${STAGING_DIR_HOST}@/$replacement@g" ${B}/gcc/configargs.h
+}
+
+remove_sysroot_paths_from_checksum_options () {
+ stagingdir=${1}
+ replacement=${2}
+ # Prevent sysroot/workdir paths from being used in checksum-options.
+ # checksum-options is used to generate a checksum which is embedded into
+ # the output binary.
+ oe_runmake TARGET-gcc=checksum-options all-gcc
+ sed -i "s@${DEBUG_PREFIX_MAP}@@g" ${B}/gcc/checksum-options
+ sed -i "s@$stagingdir@$replacement@g" ${B}/gcc/checksum-options
+}
+
+cleanup_installed_include_fixed () {
+ find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f
+}
diff --git a/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc b/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
index d77b2ec3d1..5c79936242 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -119,4 +119,3 @@ do_configure () {
oe_runconf
}
-
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 7c4233c211..bbe91ad0f9 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -64,6 +64,9 @@ do_configure () {
}
do_compile () {
+ remove_sysroot_paths_from_configargs '/host'
+ remove_sysroot_paths_from_checksum_options '${STAGING_DIR_HOST}' '/host'
+
oe_runmake all-host configure-target-libgcc
(cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
}
@@ -172,6 +175,8 @@ do_install () {
done
done
done
+
+ cleanup_installed_include_fixed
}
ELFUTILS = "nativesdk-elfutils"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_14.1.bb b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_14.2.bb
index bf53c5cd78..bf53c5cd78 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_14.1.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_14.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross.inc b/poky/meta/recipes-devtools/gcc/gcc-cross.inc
index 5b0ca15d47..f85ccd5c23 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -34,6 +34,7 @@ EXTRA_OECONF += "\
EXTRA_OECONF:append:libc-baremetal = " --without-headers"
EXTRA_OECONF:remove:libc-baremetal = "--enable-threads=posix"
EXTRA_OECONF:remove:libc-newlib = "--enable-threads=posix"
+EXTRA_OECONF:remove:libc-picolibc = "--enable-threads=posix"
EXTRA_OECONF_PATHS = "\
--with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
@@ -62,19 +63,8 @@ do_compile () {
export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
- # Prevent native/host sysroot path from being used in configargs.h header,
- # as it will be rewritten when used by other sysroots preventing support
- # for gcc plugins
- oe_runmake configure-gcc
- sed -i 's@${STAGING_DIR_TARGET}@/host@g' ${B}/gcc/configargs.h
- sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/configargs.h
-
- # Prevent sysroot/workdir paths from being used in checksum-options.
- # checksum-options is used to generate a checksum which is embedded into
- # the output binary.
- oe_runmake TARGET-gcc=checksum-options all-gcc
- sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options
- sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/checksum-options
+ remove_sysroot_paths_from_configargs '/host'
+ remove_sysroot_paths_from_checksum_options '${STAGING_DIR_HOST}' '/host'
oe_runmake all-host configure-target-libgcc
(cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
@@ -120,7 +110,7 @@ do_install () {
cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
- find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f
+ cleanup_installed_include_fixed
# install LTO linker plugins where binutils tools can find it
install -d ${D}${libdir}/bfd-plugins
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross_14.1.bb b/poky/meta/recipes-devtools/gcc/gcc-cross_14.2.bb
index b43cca0c52..b43cca0c52 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-cross_14.1.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross_14.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-crosssdk_14.1.bb b/poky/meta/recipes-devtools/gcc/gcc-crosssdk_14.2.bb
index 40a6c4feff..40a6c4feff 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-crosssdk_14.1.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc-crosssdk_14.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-runtime.inc b/poky/meta/recipes-devtools/gcc/gcc-runtime.inc
index ad9798530f..7afe34ebed 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -17,6 +17,7 @@ EXTRA_OECONF_PATHS = "\
EXTRA_OECONF:append:linuxstdbase = " --enable-clocale=gnu"
EXTRA_OECONF:append = " --cache-file=${B}/config.cache"
EXTRA_OECONF:append:libc-newlib = " --with-newlib --with-target-subdir"
+EXTRA_OECONF:append:libc-picolibc = " --with-newlib --with-target-subdir"
EXTRA_OECONF:append:libc-baremetal = " --with-target-subdir"
# Disable ifuncs for libatomic on arm conflicts -march/-mcpu
@@ -27,6 +28,7 @@ DISABLE_STATIC:class-nativesdk ?= ""
# Newlib does not support symbol versioning on libsdtcc++
SYMVERS_CONF:libc-newlib = ""
+SYMVERS_CONF:libc-picolibc = ""
# Building with thumb enabled on armv6t fails
ARM_INSTRUCTION_SET:armv6 = "arm"
@@ -47,6 +49,7 @@ RUNTIMETARGET = "${RUNTIMELIBSSP} libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM
"
# Only build libstdc++ for newlib
RUNTIMETARGET:libc-newlib = "libstdc++-v3"
+RUNTIMETARGET:libc-picolibc = "libstdc++-v3"
# libiberty
# libgfortran needs separate recipe due to libquadmath dependency
@@ -289,6 +292,7 @@ do_check[prefuncs] += "extend_recipe_sysroot"
do_check[prefuncs] += "check_prepare"
do_check[dirs] = "${WORKDIR}/dejagnu ${B}"
do_check[nostamp] = "1"
+do_check[network] = "1"
do_check() {
export DEJAGNU="${WORKDIR}/dejagnu/site.exp"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-runtime_14.1.bb b/poky/meta/recipes-devtools/gcc/gcc-runtime_14.2.bb
index dd430b57eb..dd430b57eb 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-runtime_14.1.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc-runtime_14.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-sanitizers_14.1.bb b/poky/meta/recipes-devtools/gcc/gcc-sanitizers_14.2.bb
index 8bda2ccad6..8bda2ccad6 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-sanitizers_14.1.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc-sanitizers_14.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-source_14.1.bb b/poky/meta/recipes-devtools/gcc/gcc-source_14.2.bb
index b890fa33ea..be11fa2fcc 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-source_14.1.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc-source_14.2.bb
@@ -1,4 +1,5 @@
require recipes-devtools/gcc/gcc-${PV}.inc
require recipes-devtools/gcc/gcc-source.inc
+BPN = "gcc-source"
EXCLUDE_FROM_WORLD = "1"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-target.inc b/poky/meta/recipes-devtools/gcc/gcc-target.inc
index e9187fc444..6b47c10413 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-target.inc
@@ -132,20 +132,8 @@ FILES:${PN}-doc = "\
"
do_compile () {
- # Prevent full target sysroot path from being used in configargs.h header,
- # as it will be rewritten when used by other sysroots preventing support
- # for gcc plugins. Additionally the path is embeddeded into the output
- # binary, this prevents building a reproducible binary.
- oe_runmake configure-gcc
- sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h
- sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h
-
- # Prevent sysroot/workdir paths from being used in checksum-options.
- # checksum-options is used to generate a checksum which is embedded into
- # the output binary.
- oe_runmake TARGET-gcc=checksum-options all-gcc
- sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options
- sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/checksum-options
+ remove_sysroot_paths_from_configargs '/'
+ remove_sysroot_paths_from_checksum_options '${STAGING_DIR_TARGET}' '/'
oe_runmake all-host
}
@@ -205,37 +193,8 @@ do_install () {
install -d ${D}${libdir}/bfd-plugins
ln -sf ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so
chown -R root:root ${D}
-}
-do_install:append () {
- #
- # Thefixinc.sh script, run on the gcc's compile phase, looks into sysroot header
- # files and places the modified files into
- # {D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed folder. This makes the
- # build not deterministic. The following code prunes all those headers
- # except those under include-fixed/linux, *limits.h and README, yielding
- # the same include-fixed folders no matter what sysroot
-
- include_fixed="${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed"
- for f in $(find ${include_fixed} -type f); do
- case $f in
- */include-fixed/linux/*)
- continue
- ;;
- */include-fixed/*limits.h)
- continue
- ;;
- */include-fixed/README)
- continue
- ;;
- *)
- # remove file and directory if empty
- bbdebug 2 "Pruning $f"
- rm $f
- find $(dirname $f) -maxdepth 0 -empty -exec rmdir {} \;
- ;;
- esac
- done
+ cleanup_installed_include_fixed
}
# Installing /usr/lib/gcc/* means we'd have two copies, one from gcc-cross
diff --git a/poky/meta/recipes-devtools/gcc/gcc-testsuite.inc b/poky/meta/recipes-devtools/gcc/gcc-testsuite.inc
index f16d471478..0a950b6c9e 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-testsuite.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-testsuite.inc
@@ -101,7 +101,7 @@ python check_prepare() {
f.write(generate_qemu_linux_user_config(d))
# write out target ssh board config
- with open(os.path.join(dejagnudir, "ssh.exp"), "w") as f:
+ with open(os.path.join(dejagnudir, "linux-ssh.exp"), "w") as f:
f.write(generate_remote_ssh_linux_config(d))
# generate site.exp to provide boards
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
index 0b7c0af86f..4693e948e8 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -1,4 +1,4 @@
-From 76ef337260aadeb475fd380ff9aca31ea1731345 Mon Sep 17 00:00:00 2001
+From 5f2881333e6ba6eb055f590982c2a2eb3fcbee2c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 08:37:11 +0400
Subject: [PATCH] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
@@ -12,10 +12,10 @@ Upstream-Status: Inappropriate [embedded specific]
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
-index 02b435c1163..85a82fad302 100755
+index 3b0abeb8b2e..2590471a021 100755
--- a/configure
+++ b/configure
-@@ -10387,7 +10387,7 @@ fi
+@@ -10467,7 +10467,7 @@ fi
# for target_alias and gcc doesn't manage it consistently.
target_configargs="--cache-file=./config.cache ${target_configargs}"
@@ -25,10 +25,10 @@ index 02b435c1163..85a82fad302 100755
*" newlib "*)
case " $target_configargs " in
diff --git a/configure.ac b/configure.ac
-index 1a19c07a27b..bc8e1b8c4ef 100644
+index 042681c27be..0d9b39c541a 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -3509,7 +3509,7 @@ fi
+@@ -3539,7 +3539,7 @@ fi
# for target_alias and gcc doesn't manage it consistently.
target_configargs="--cache-file=./config.cache ${target_configargs}"
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch b/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
index 76aa69c26e..ca75d08f59 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
@@ -1,4 +1,4 @@
-From 05be69910c99d739ce9246a3bb9426fa6d9f19d4 Mon Sep 17 00:00:00 2001
+From 838daab44918ef738402a2dd069537c6ac519305 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 8 Mar 2021 16:04:20 -0800
Subject: [PATCH] gcc: poison-system-directories
@@ -61,7 +61,7 @@ index f3de4ba6776..3ce3113510b 100644
optimizer and back end) to be checked for dynamic type safety at runtime.
This is quite expensive. */
diff --git a/gcc/configure b/gcc/configure
-index 266ab8f84b2..3c346acbce0 100755
+index abc8bfdc244..d3fa80408f4 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -1050,6 +1050,7 @@ enable_maintainer_mode
@@ -81,7 +81,7 @@ index 266ab8f84b2..3c346acbce0 100755
--enable-plugin enable plugin support
--enable-host-shared build host code as shared libraries
--enable-host-pie build host code as PIE
-@@ -34020,6 +34023,22 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
+@@ -34028,6 +34031,22 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
fi
@@ -105,10 +105,10 @@ index 266ab8f84b2..3c346acbce0 100755
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index a5aec1bc967..4d8123085b8 100644
+index 1d2cefa3f6a..2760b6c540c 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -7518,6 +7518,22 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
+@@ -7527,6 +7527,22 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
[specify that runtime libraries should be
installed in a compiler-specific directory])])
@@ -132,7 +132,7 @@ index a5aec1bc967..4d8123085b8 100644
AC_SUBST(subdirs)
AC_SUBST(srcdir)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 1006510fc6a..389155f8ed5 100644
+index f82f7d2817b..1da91813b0e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -391,6 +391,7 @@ Objective-C and Objective-C++ Dialects}.
@@ -143,7 +143,7 @@ index 1006510fc6a..389155f8ed5 100644
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls
-Wrestrict -Wno-return-local-addr -Wreturn-type
-Wno-scalar-storage-order -Wsequence-point
-@@ -8860,6 +8861,14 @@ made up of data only and thus requires no special treatment. But, for
+@@ -8861,6 +8862,14 @@ made up of data only and thus requires no special treatment. But, for
most targets, it is made up of code and thus requires the stack to be
made executable in order for the program to work properly.
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch b/poky/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch
index dfd370aba9..55471b37cd 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch
@@ -1,4 +1,4 @@
-From 25bc008191c9b518f30e3ed87e204e25bdafb854 Mon Sep 17 00:00:00 2001
+From 33f9c4e4f0a5c2af8ab12612c28ba218ae491587 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:10:06 +0400
Subject: [PATCH] 64-bit multilib hack
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch b/poky/meta/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch
index 35e92a6a9e..2dc6b13bfb 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch
@@ -1,4 +1,4 @@
-From 5bef09b829ab8042acc045474cf10f4c4fb15dd5 Mon Sep 17 00:00:00 2001
+From 40c537352e085df2157cf907da6d694266ab74fe Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Thu, 28 Oct 2021 11:33:40 +0100
Subject: [PATCH] Pass CXXFLAGS_FOR_BUILD in a couple of places to avoid these
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/poky/meta/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
index 8c6ae38e95..c386b502aa 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
@@ -1,4 +1,4 @@
-From fd3f513fa7e4f63a2b28b31ed5a4ddf8f5c543c0 Mon Sep 17 00:00:00 2001
+From d145dd6dec6863aa303503643b2d3ed470936dd0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:17:25 +0400
Subject: [PATCH] Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}
@@ -39,10 +39,10 @@ index a74761b7ab3..956437df95b 100644
TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
diff --git a/gcc/configure b/gcc/configure
-index 3c346acbce0..3870d6e9b6d 100755
+index d3fa80408f4..f2706f94062 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -15155,8 +15155,8 @@ for f in $tm_file; do
+@@ -15161,8 +15161,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
@@ -54,10 +54,10 @@ index 3c346acbce0..3870d6e9b6d 100755
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 4d8123085b8..15670de1706 100644
+index 2760b6c540c..3f972dea24f 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -2383,8 +2383,8 @@ for f in $tm_file; do
+@@ -2390,8 +2390,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch b/poky/meta/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch
index e0d6aea46b..ca1158ee27 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch
@@ -1,4 +1,4 @@
-From 970960876045c99011658836f385c6f4d6d78fa6 Mon Sep 17 00:00:00 2001
+From 429711e243bbda4d662d687c1a6fea24fcb34827 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:22:00 +0400
Subject: [PATCH] cpp: honor sysroot.
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/poky/meta/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
index eacdbd1dbe..4ed5501551 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -1,4 +1,4 @@
-From bce0b7e2e130a069a93c839b856aa19b64d5ca54 Mon Sep 17 00:00:00 2001
+From 4067ae345f0ff1fbf37c0348f2af09257513b817 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:24:50 +0400
Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
@@ -184,7 +184,7 @@ index e5d84e180e3..98cb49c189f 100644
#undef GNU_USER_TARGET_LINK_SPEC
#define GNU_USER_TARGET_LINK_SPEC \
diff --git a/gcc/config/microblaze/linux.h b/gcc/config/microblaze/linux.h
-index 5ed8ee518be..5553e7cac21 100644
+index 5ed8ee518be..299d1a62c81 100644
--- a/gcc/config/microblaze/linux.h
+++ b/gcc/config/microblaze/linux.h
@@ -28,7 +28,7 @@
@@ -192,7 +192,7 @@ index 5ed8ee518be..5553e7cac21 100644
#define TLS_NEEDS_GOT 1
-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld.so.1"
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
@@ -266,7 +266,7 @@ index 06c442e85f4..b21a3c076c9 100644
#undef LINK_SPEC
#define LINK_SPEC LINK_SPEC_ENDIAN \
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
-index 15851f653bc..d8aaab9631f 100644
+index 3c356227134..4d16bae86db 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see
@@ -391,7 +391,7 @@ index 9646fa9c41e..396fb047fac 100644
#undef LINK_SPEC
#define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
-index 1e2e4aef2ad..25fcc37eca2 100644
+index 83e0d6874d9..9a32d2cfff5 100644
--- a/gcc/config/sparc/linux64.h
+++ b/gcc/config/sparc/linux64.h
@@ -78,8 +78,8 @@ along with GCC; see the file COPYING3. If not see
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0008-libtool.patch b/poky/meta/recipes-devtools/gcc/gcc/0008-libtool.patch
index 9b78377493..b8081d4614 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0008-libtool.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0008-libtool.patch
@@ -1,4 +1,4 @@
-From 869295f6f1095b6334c1ea34f8d11a676c67e256 Mon Sep 17 00:00:00 2001
+From 462e2111804490fcdbb9fd87a86b1e7ac1805803 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:29:11 +0400
Subject: [PATCH] libtool
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/poky/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
index 3e24e53d7b..015777c35b 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
@@ -1,4 +1,4 @@
-From 19279e08417124b4567fafdf9300b779ce1a1e1c Mon Sep 17 00:00:00 2001
+From 702550757997de7013c96047dbc07791e5ff1d32 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:30:32 +0400
Subject: [PATCH] gcc: armv4: pass fix-v4bx to linker to support EABI.
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/poky/meta/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch
index c3484360ee..9920e61a7f 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch
@@ -1,4 +1,4 @@
-From 7e5706e74643d8bf78b117620849e546a31295c5 Mon Sep 17 00:00:00 2001
+From 818edee70eb8c5471a9d2924dd50f7cdd9774c12 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:33:04 +0400
Subject: [PATCH] Use the multilib config files from ${B} instead of using the
@@ -18,10 +18,10 @@ Upstream-Status: Inappropriate [configuration]
2 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/gcc/configure b/gcc/configure
-index 3870d6e9b6d..07a0b8571d2 100755
+index f2706f94062..135c557b595 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -15135,10 +15135,20 @@ done
+@@ -15141,10 +15141,20 @@ done
tmake_file_=
for f in ${tmake_file}
do
@@ -46,7 +46,7 @@ index 3870d6e9b6d..07a0b8571d2 100755
done
tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
-@@ -15149,6 +15159,10 @@ tm_file_list="options.h"
+@@ -15155,6 +15165,10 @@ tm_file_list="options.h"
tm_include_list="options.h insn-constants.h"
for f in $tm_file; do
case $f in
@@ -58,10 +58,10 @@ index 3870d6e9b6d..07a0b8571d2 100755
f=`echo $f | sed 's/^..//'`
tm_file_list="${tm_file_list} $f"
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 15670de1706..fd96dd7ba49 100644
+index 3f972dea24f..cbf8fea3ca1 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -2363,10 +2363,20 @@ done
+@@ -2370,10 +2370,20 @@ done
tmake_file_=
for f in ${tmake_file}
do
@@ -86,7 +86,7 @@ index 15670de1706..fd96dd7ba49 100644
done
tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
-@@ -2377,6 +2387,10 @@ tm_file_list="options.h"
+@@ -2384,6 +2394,10 @@ tm_file_list="options.h"
tm_include_list="options.h insn-constants.h"
for f in $tm_file; do
case $f in
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch b/poky/meta/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch
index 8633f7c436..0b19de57c0 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch
@@ -1,4 +1,4 @@
-From 0671715ae6d411b5d2d4c53fee42a6e9fe2562c2 Mon Sep 17 00:00:00 2001
+From 875975598d5a1000b8c8ad7596178d0a64f9e0cb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 31 Jan 2023 22:03:38 -0800
Subject: [PATCH] aarch64: Fix include paths when S != B
@@ -28,7 +28,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
-index 45e901cda64..591062d4b39 100644
+index 4fa1dfc7906..63c9a832d1c 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -170,9 +170,9 @@ enum class aarch64_feature : unsigned char {
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/poky/meta/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
index 2f6ecd53bb..6eb5bceebd 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
@@ -1,4 +1,4 @@
-From a40108180f552788bb321a853ed4d5f034866a48 Mon Sep 17 00:00:00 2001
+From b38add903c7f701e5b79dd7d93fb7dc61d8252c7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 20 Feb 2015 09:39:38 +0000
Subject: [PATCH] Avoid using libdir from .la which usually points to a host
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch b/poky/meta/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch
index eb4f0b3045..32a126ac8a 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch
@@ -1,4 +1,4 @@
-From 6ad8db533c7d53a85e6280da1ad88ed4077258fb Mon Sep 17 00:00:00 2001
+From 304299aef8b1ae1f89a0fabbceed0d48091b569b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 20 Feb 2015 10:25:11 +0000
Subject: [PATCH] Ensure target gcc headers can be included
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/poky/meta/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch
index a9cbc08f1a..5f48dccc0a 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch
@@ -1,4 +1,4 @@
-From e0d53bf9d59438a1dce0774163fa8c41cf32f306 Mon Sep 17 00:00:00 2001
+From a32cbf0d1c036e6435469898829f96a02c5993a8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 3 Mar 2015 08:21:19 +0000
Subject: [PATCH] Don't search host directory during "relink" if $inst_prefix
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/poky/meta/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch
index 8eb00287fc..e34e65e479 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch
@@ -1,4 +1,4 @@
-From c2ea8aaa7b00c519c9c269c23ff840138ae491ac Mon Sep 17 00:00:00 2001
+From 6721497a3b4b575e5f9eae785dd4eca0f87b4a5b Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Sun, 5 Jul 2015 20:25:18 -0700
Subject: [PATCH] libcc1: fix libcc1's install path and rpath
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch b/poky/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch
index 82342b0532..edd100ee46 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch
@@ -1,4 +1,4 @@
-From 82da570396a6835e7208c8bb508220524b3a07c7 Mon Sep 17 00:00:00 2001
+From 3f5ac862051e1c77dcca3e63a912f43d66ccdb6f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 7 Dec 2015 23:39:54 +0000
Subject: [PATCH] handle sysroot support for nativesdk-gcc
@@ -46,7 +46,7 @@ Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
8 files changed, 95 insertions(+), 73 deletions(-)
diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc
-index be3058dca63..0be85374760 100644
+index f4dced8d826..911aeb68d2d 100644
--- a/gcc/c-family/c-opts.cc
+++ b/gcc/c-family/c-opts.cc
@@ -1542,8 +1542,8 @@ add_prefixed_path (const char *suffix, incpath_kind chain)
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/poky/meta/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch
index f87461bcaf..39c3bab9cc 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch
@@ -1,4 +1,4 @@
-From cafcdfea0526dda5377a999dd9b1b8c805eafe0a Mon Sep 17 00:00:00 2001
+From b2d95de58356c242abfe35467c2366d4e4b842ce Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 7 Dec 2015 23:41:45 +0000
Subject: [PATCH] Search target sysroot gcc version specific dirs with
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/poky/meta/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
index 71e43e556d..76da0f79bf 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
@@ -1,4 +1,4 @@
-From f2ad66276fd197cc088d7316662b1d792357ef6c Mon Sep 17 00:00:00 2001
+From e420858f23a1fe58e840bd5ae21cb5a964b27f0b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 27 Jun 2017 18:10:54 -0700
Subject: [PATCH] Add ssp_nonshared to link commandline for musl targets
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch b/poky/meta/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch
index 7f92dea0c6..05f2e96947 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch
@@ -1,4 +1,4 @@
-From 65baa3804819fbcd540be48f4c4611be5cba43c4 Mon Sep 17 00:00:00 2001
+From edc8f1cee2c9c4a441032fa22d0272b41b829dc6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 6 Jun 2018 12:10:22 -0700
Subject: [PATCH] Re-introduce spe commandline options
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 13 insertions(+)
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
-index 83197681b66..04bea50b894 100644
+index e8ca70340df..5c8545d4f1b 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -344,6 +344,19 @@ mdebug=
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/poky/meta/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
index c5f43f5ba4..3086841021 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
@@ -1,4 +1,4 @@
-From 18b0057e4e2c5cf6fc6541670418f43f0381db3e Mon Sep 17 00:00:00 2001
+From 83a61604293c6f7a131bccaf7454e69eeed301fd Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 24 Oct 2015 20:09:53 +0000
Subject: [PATCH] libgcc_s: Use alias for __cpu_indicator_init instead of
@@ -39,7 +39,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
-index 8bb8f21e686..bcf976aa1b9 100644
+index 51efe6fdd7d..a8ee883a74d 100644
--- a/gcc/config/i386/i386-expand.cc
+++ b/gcc/config/i386/i386-expand.cc
@@ -13087,10 +13087,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch b/poky/meta/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
index dce2c047d0..f459a542da 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
@@ -1,4 +1,4 @@
-From a9bb04b7cf02b2f2d16f68733488f9e48fc7e7a9 Mon Sep 17 00:00:00 2001
+From 33eb17881ca90cff733070c5b630501fb0a8bd58 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Tue, 10 Mar 2020 08:26:53 -0700
Subject: [PATCH] gentypes/genmodes: Do not use __LINE__ for maintaining
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch b/poky/meta/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch
index d710b50594..169db188df 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch
@@ -1,4 +1,4 @@
-From db4380eac3cd9baa2f31bcd2fb936ed51f27b415 Mon Sep 17 00:00:00 2001
+From 6ebeb70ce2e78a84295f4e392602ae3c4026783a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 13 May 2020 15:10:38 -0700
Subject: [PATCH] libatomic: Do not enforce march on aarch64
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch b/poky/meta/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch
index 7f1cd0b3d8..300ad393e3 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch
@@ -1,4 +1,4 @@
-From 92a77026cc64f5eab4cb6b35e4a7c59e6ab8aa20 Mon Sep 17 00:00:00 2001
+From aecde58d433123e8fb76ca2c56a0632d7b104b83 Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei.gherzan@huawei.com>
Date: Wed, 22 Dec 2021 12:49:25 +0100
Subject: [PATCH] Fix install path of linux64.h
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch b/poky/meta/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch
index a34e6afdb4..4f3b722bcf 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch
@@ -1,4 +1,4 @@
-From c6fc577e9e89dc16d3e971aa165602746232de4c Mon Sep 17 00:00:00 2001
+From 483baf290597eed2ac01c7974f1b567c95503da5 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Sat, 20 Aug 2022 09:04:14 -0700
Subject: [PATCH] Avoid hardcoded build paths into ppc libgcc
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch b/poky/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch
index 454d05d473..09d6c7fffd 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch
@@ -1,4 +1,4 @@
-From 8845248c81c0695ccc65311017deef824fa538fa Mon Sep 17 00:00:00 2001
+From 46987c9092d52ee47071be563f48ee80a3c4f71f Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Thu, 17 Aug 2023 09:01:40 -0700
Subject: [PATCH] gcc testsuite tweaks for mips/OE
@@ -92,7 +92,7 @@ index 228c21d1207..d3b88e0419e 100644
"preprocess" {
set compile_type "preprocess"
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
-index 45435586de2..04942540d8b 100644
+index d8b5a06a422..f66f5fea58e 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2483,14 +2483,7 @@ proc check_mips_loongson_mmi_hw_available { } {
@@ -142,7 +142,7 @@ index 45435586de2..04942540d8b 100644
}
}]
}
-@@ -9897,6 +9868,7 @@ proc is-effective-target-keyword { arg } {
+@@ -9900,6 +9871,7 @@ proc is-effective-target-keyword { arg } {
proc et-dg-runtest { runtest testcases flags default-extra-flags } {
global dg-do-what-default
@@ -150,7 +150,7 @@ index 45435586de2..04942540d8b 100644
global EFFECTIVE_TARGETS
global et_index
-@@ -9904,6 +9876,7 @@ proc et-dg-runtest { runtest testcases flags default-extra-flags } {
+@@ -9907,6 +9879,7 @@ proc et-dg-runtest { runtest testcases flags default-extra-flags } {
foreach target $EFFECTIVE_TARGETS {
set target_flags $flags
set dg-do-what-default compile
@@ -158,7 +158,7 @@ index 45435586de2..04942540d8b 100644
set et_index [lsearch -exact $EFFECTIVE_TARGETS $target]
if { [info procs add_options_for_${target}] != [list] } {
set target_flags [add_options_for_${target} "$flags"]
-@@ -9911,8 +9884,10 @@ proc et-dg-runtest { runtest testcases flags default-extra-flags } {
+@@ -9914,8 +9887,10 @@ proc et-dg-runtest { runtest testcases flags default-extra-flags } {
if { [info procs check_effective_target_${target}_runtime]
!= [list] && [check_effective_target_${target}_runtime] } {
set dg-do-what-default run
@@ -169,7 +169,7 @@ index 45435586de2..04942540d8b 100644
}
} else {
set et_index 0
-@@ -11606,6 +11581,7 @@ proc check_effective_target_sigsetjmp {} {
+@@ -11620,6 +11595,7 @@ proc check_effective_target_sigsetjmp {} {
proc check_vect_support_and_set_flags { } {
global DEFAULT_VECTCFLAGS
global dg-do-what-default
@@ -177,7 +177,7 @@ index 45435586de2..04942540d8b 100644
global EFFECTIVE_TARGETS
if [istarget powerpc-*paired*] {
-@@ -11614,6 +11590,7 @@ proc check_vect_support_and_set_flags { } {
+@@ -11628,6 +11604,7 @@ proc check_vect_support_and_set_flags { } {
set dg-do-what-default run
} else {
set dg-do-what-default compile
@@ -185,7 +185,7 @@ index 45435586de2..04942540d8b 100644
}
} elseif [istarget powerpc*-*-*] {
# Skip targets not supporting -maltivec.
-@@ -11644,6 +11621,7 @@ proc check_vect_support_and_set_flags { } {
+@@ -11658,6 +11635,7 @@ proc check_vect_support_and_set_flags { } {
set DEFAULT_VECTCFLAGS [linsert $DEFAULT_VECTCFLAGS 0 "-mcpu=970"]
}
set dg-do-what-default compile
@@ -193,7 +193,7 @@ index 45435586de2..04942540d8b 100644
}
} elseif { [istarget i?86-*-*] || [istarget x86_64-*-*] } {
lappend DEFAULT_VECTCFLAGS "-msse2"
-@@ -11651,6 +11629,7 @@ proc check_vect_support_and_set_flags { } {
+@@ -11665,6 +11643,7 @@ proc check_vect_support_and_set_flags { } {
set dg-do-what-default run
} else {
set dg-do-what-default compile
@@ -201,7 +201,7 @@ index 45435586de2..04942540d8b 100644
}
} elseif { [istarget mips*-*-*]
&& [check_effective_target_nomips16] } {
-@@ -11670,6 +11649,7 @@ proc check_vect_support_and_set_flags { } {
+@@ -11684,6 +11663,7 @@ proc check_vect_support_and_set_flags { } {
set dg-do-what-default run
} else {
set dg-do-what-default compile
@@ -209,7 +209,7 @@ index 45435586de2..04942540d8b 100644
}
} elseif [istarget alpha*-*-*] {
# Alpha's vectorization capabilities are extremely limited.
-@@ -11683,6 +11663,7 @@ proc check_vect_support_and_set_flags { } {
+@@ -11697,6 +11677,7 @@ proc check_vect_support_and_set_flags { } {
set dg-do-what-default run
} else {
set dg-do-what-default compile
@@ -217,7 +217,7 @@ index 45435586de2..04942540d8b 100644
}
} elseif [istarget ia64-*-*] {
set dg-do-what-default run
-@@ -11696,6 +11677,7 @@ proc check_vect_support_and_set_flags { } {
+@@ -11710,6 +11691,7 @@ proc check_vect_support_and_set_flags { } {
set dg-do-what-default run
} else {
set dg-do-what-default compile
@@ -225,7 +225,7 @@ index 45435586de2..04942540d8b 100644
}
} elseif [istarget aarch64*-*-*] {
set dg-do-what-default run
-@@ -11720,6 +11702,7 @@ proc check_vect_support_and_set_flags { } {
+@@ -11734,6 +11716,7 @@ proc check_vect_support_and_set_flags { } {
} else {
lappend DEFAULT_VECTCFLAGS "-march=z14" "-mzarch"
set dg-do-what-default compile
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0026-libstdc-Fix-typo-in-_Grapheme_cluster_view-_Iterator.patch b/poky/meta/recipes-devtools/gcc/gcc/0026-libstdc-Fix-typo-in-_Grapheme_cluster_view-_Iterator.patch
deleted file mode 100644
index 5a465b8c95..0000000000
--- a/poky/meta/recipes-devtools/gcc/gcc/0026-libstdc-Fix-typo-in-_Grapheme_cluster_view-_Iterator.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From c9e05b03c18e898be604ab90401476e9c473cc52 Mon Sep 17 00:00:00 2001
-From: Jonathan Wakely <jwakely@redhat.com>
-Date: Thu, 16 May 2024 17:15:55 +0100
-Subject: [PATCH] libstdc++: Fix typo in _Grapheme_cluster_view::_Iterator
- [PR115119]
-
-libstdc++-v3/ChangeLog:
-
- PR libstdc++/115119
- * include/bits/unicode.h (_Iterator::operator++(int)): Fix typo
- in increment expression.
- * testsuite/ext/unicode/grapheme_view.cc: Check post-increment
- on view's iterator.
-
-Drop it when upgrading to 14.2
-
-Upstream-Status: Backport [https://github.com/gcc-mirror/gcc/commit/c9e05b03c18e898be604ab90401476e9c473cc52]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libstdc++-v3/include/bits/unicode.h | 6 ++++--
- libstdc++-v3/testsuite/ext/unicode/grapheme_view.cc | 11 +++++++++++
- 2 files changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/libstdc++-v3/include/bits/unicode.h b/libstdc++-v3/include/bits/unicode.h
-index 46238143fb6..a14a17c5dfc 100644
---- a/libstdc++-v3/include/bits/unicode.h
-+++ b/libstdc++-v3/include/bits/unicode.h
-@@ -34,10 +34,12 @@
- #include <array>
- #include <bit> // bit_width
- #include <charconv> // __detail::__from_chars_alnum_to_val_table
-+#include <string_view>
- #include <cstdint>
- #include <bits/stl_algo.h>
- #include <bits/stl_iterator.h>
--#include <bits/ranges_base.h>
-+#include <bits/ranges_base.h> // iterator_t, sentinel_t, input_range, etc.
-+#include <bits/ranges_util.h> // view_interface
-
- namespace std _GLIBCXX_VISIBILITY(default)
- {
-@@ -802,7 +804,7 @@ inline namespace __v15_1_0
- operator++(int)
- {
- auto __tmp = *this;
-- ++this;
-+ ++*this;
- return __tmp;
- }
-
-diff --git a/libstdc++-v3/testsuite/ext/unicode/grapheme_view.cc b/libstdc++-v3/testsuite/ext/unicode/grapheme_view.cc
-index ac1e8c50b05..a3bb36e14b8 100644
---- a/libstdc++-v3/testsuite/ext/unicode/grapheme_view.cc
-+++ b/libstdc++-v3/testsuite/ext/unicode/grapheme_view.cc
-@@ -83,10 +83,21 @@ test_breaks()
- VERIFY( iter == gv.end() );
- }
-
-+constexpr void
-+test_pr115119()
-+{
-+ // PR 115119 Typo in _Grapheme_cluster_view::_Iterator::operator++(int)
-+ uc::_Grapheme_cluster_view gv(" "sv);
-+ auto it = std::ranges::begin(gv);
-+ it++;
-+ VERIFY( it == std::ranges::end(gv) );
-+}
-+
- int main()
- {
- auto run_tests = []{
- test_breaks();
-+ test_pr115119();
- return true;
- };
-
diff --git a/poky/meta/recipes-devtools/gcc/gcc/gcc.git-ab884fffe3fc82a710bea66ad651720d71c938b8.patch b/poky/meta/recipes-devtools/gcc/gcc/gcc.git-ab884fffe3fc82a710bea66ad651720d71c938b8.patch
new file mode 100644
index 0000000000..e5abdcc703
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/gcc.git-ab884fffe3fc82a710bea66ad651720d71c938b8.patch
@@ -0,0 +1,549 @@
+From ab884fffe3fc82a710bea66ad651720d71c938b8 Mon Sep 17 00:00:00 2001
+From: Jonathan Wakely <jwakely@redhat.com>
+Date: Tue, 30 Apr 2024 09:52:13 +0100
+Subject: [PATCH] libstdc++: Fix std::chrono::tzdb to work with vanguard format
+
+I found some issues in the std::chrono::tzdb parser by testing the
+tzdata "vanguard" format, which uses new features that aren't enabled in
+the "main" and "rearguard" data formats.
+
+Since 2024a the keyword "minimum" is no longer valid for the FROM and TO
+fields in a Rule line, which means that "m" is now a valid abbreviation
+for "maximum". Previously we expected either "mi" or "ma". For backwards
+compatibility, a FROM field beginning with "mi" is still supported and
+is treated as 1900. The "maximum" keyword is only allowed in TO now,
+because it makes no sense in FROM. To support these changes the
+minmax_year and minmax_year2 classes for parsing FROM and TO are
+replaced with a single years_from_to class that reads both fields.
+
+The vanguard format makes use of %z in Zone FORMAT fields, which caused
+an exception to be thrown from ZoneInfo::set_abbrev because no % or /
+characters were expected when a Zone doesn't use a named Rule. The
+ZoneInfo::to(sys_info&) function now uses format_abbrev_str to replace
+any %z with the current offset. Although format_abbrev_str also checks
+for %s and STD/DST formats, those only make sense when a named Rule is
+in effect, so won't occur when ZoneInfo::to(sys_info&) is used.
+
+Since making this change on trunk, the tzdata-2024b release started
+using %z in the main format, not just vanguard. This makes a backport to
+release branches necessary (see PR 116657).
+
+This change also implements a feature that has always been missing from
+time_zone::_M_get_sys_info: finding the Rule that is active before the
+specified time point, so that we can correctly handle %s in the FORMAT
+for the first new sys_info that gets created. This requires implementing
+a poorly documented feature of zic, to get the LETTERS field from a
+later transition, as described at
+https://mm.icann.org/pipermail/tz/2024-April/058891.html
+In order for this to work we need to be able to distinguish an empty
+letters field (as used by CE%sT where the variable part is either empty
+or "S") from "the letters field is not known for this transition". The
+tzdata file uses "-" for an empty letters field, which libstdc++ was
+previously replacing with "" when the Rule was parsed. Instead, we now
+preserve the "-" in the Rule object, so that "" can be used for the case
+where we don't know the letters (and so need to decide it).
+
+(cherry picked from commit 0ca8d56f2085715f27ee536c6c344bc47af49cdd)
+
+Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=5ceea2ac106d6dd1aa8175670b15a801316cf1c9]
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+---
+ libstdc++-v3/src/c++20/tzdb.cc | 265 +++++++++++-------
+ .../std/time/time_zone/sys_info_abbrev.cc | 106 +++++++
+ libstdc++-v3/testsuite/std/time/tzdb/1.cc | 6 +-
+ 3 files changed, 274 insertions(+), 103 deletions(-)
+ create mode 100644 libstdc++-v3/testsuite/std/time/time_zone/sys_info_abbrev.cc
+
+diff --git a/libstdc++-v3/src/c++20/tzdb.cc b/libstdc++-v3/src/c++20/tzdb.cc
+index c7c7cc9deee6..7e8cce7ce8cf 100644
+--- a/libstdc++-v3/src/c++20/tzdb.cc
++++ b/libstdc++-v3/src/c++20/tzdb.cc
+@@ -342,51 +342,103 @@ namespace std::chrono
+ friend istream& operator>>(istream&, on_day&);
+ };
+
+- // Wrapper for chrono::year that reads a year, or one of the keywords
+- // "minimum" or "maximum", or an unambiguous prefix of a keyword.
+- struct minmax_year
++ // Wrapper for two chrono::year values, which reads the FROM and TO
++ // fields of a Rule line. The FROM field is a year and TO is a year or
++ // one of the keywords "maximum" or "only" (or an abbreviation of those).
++ // For backwards compatibility, the keyword "minimum" is recognized
++ // for FROM and interpreted as 1900.
++ struct years_from_to
+ {
+- year& y;
++ year& from;
++ year& to;
+
+- friend istream& operator>>(istream& in, minmax_year&& y)
++ friend istream& operator>>(istream& in, years_from_to&& yy)
+ {
+- if (ws(in).peek() == 'm') // keywords "minimum" or "maximum"
++ string s;
++ auto c = ws(in).peek();
++ if (c == 'm') [[unlikely]] // keyword "minimum"
+ {
+- string s;
+- in >> s; // extract the rest of the word, but only look at s[1]
+- if (s[1] == 'a')
+- y.y = year::max();
+- else if (s[1] == 'i')
+- y.y = year::min();
+- else
+- in.setstate(ios::failbit);
++ in >> s; // extract the rest of the word
++ yy.from = year(1900);
++ }
++ else if (int num = 0; in >> num) [[likely]]
++ yy.from = year{num};
++
++ c = ws(in).peek();
++ if (c == 'm') // keyword "maximum"
++ {
++ in >> s; // extract the rest of the word
++ yy.to = year::max();
++ }
++ else if (c == 'o') // keyword "only"
++ {
++ in >> s; // extract the rest of the word
++ yy.to = yy.from;
+ }
+ else if (int num = 0; in >> num)
+- y.y = year{num};
++ yy.to = year{num};
++
+ return in;
+ }
+ };
+
+- // As above for minmax_year, but also supports the keyword "only",
+- // meaning that the TO year is the same as the FROM year.
+- struct minmax_year2
++ bool
++ select_std_or_dst_abbrev(string& abbrev, minutes save)
+ {
+- minmax_year to;
+- year from;
++ if (size_t pos = abbrev.find('/'); pos != string::npos)
++ {
++ // Select one of "STD/DST" for standard or daylight.
++ if (save == 0min)
++ abbrev.erase(pos);
++ else
++ abbrev.erase(0, pos + 1);
++ return true;
++ }
++ return false;
++ }
+
+- friend istream& operator>>(istream& in, minmax_year2&& y)
+- {
+- if (ws(in).peek() == 'o') // keyword "only"
+- {
+- string s;
+- in >> s; // extract the whole keyword
+- y.to.y = y.from;
+- }
+- else
+- in >> std::move(y.to);
+- return in;
+- }
+- };
++ // Set the sys_info::abbrev string by expanding any placeholders.
++ void
++ format_abbrev_str(sys_info& info, string_view letters = {})
++ {
++ if (size_t pos = info.abbrev.find('%'); pos != string::npos)
++ {
++ if (info.abbrev[pos + 1] == 's')
++ {
++ // Expand "%s" to the variable part, given by Rule::letters.
++ if (letters == "-")
++ info.abbrev.erase(pos, 2);
++ else
++ info.abbrev.replace(pos, 2, letters);
++ }
++ else if (info.abbrev[pos + 1] == 'z')
++ {
++ // Expand "%z" to the UT offset as +/-hh, +/-hhmm, or +/-hhmmss.
++ hh_mm_ss<seconds> t(info.offset);
++ string z(1, "+-"[t.is_negative()]);
++ long val = t.hours().count();
++ int digits = 2;
++ if (int m = t.minutes().count())
++ {
++ digits = 4;
++ val *= 100;
++ val += m;
++ if (int s = t.seconds().count())
++ {
++ digits = 6;
++ val *= 100;
++ val += s;
++ }
++ }
++ auto sval = std::to_string(val);
++ z += string(digits - sval.size(), '0');
++ z += sval;
++ info.abbrev.replace(pos, 2, z);
++ }
++ }
++ else
++ select_std_or_dst_abbrev(info.abbrev, info.save);
++ }
+
+ // A time zone information record.
+ // Zone NAME STDOFF RULES FORMAT [UNTIL]
+@@ -462,6 +514,7 @@ namespace std::chrono
+ info.offset = offset();
+ info.save = minutes(m_save);
+ info.abbrev = format();
++ format_abbrev_str(info); // expand %z
+ return true;
+ }
+
+@@ -469,12 +522,9 @@ namespace std::chrono
+ friend class time_zone;
+
+ void
+- set_abbrev(const string& abbrev)
++ set_abbrev(string abbrev)
+ {
+- // In practice, the FORMAT field never needs expanding here.
+- if (abbrev.find_first_of("/%") != abbrev.npos)
+- __throw_runtime_error("std::chrono::time_zone: invalid data");
+- m_buf = abbrev;
++ m_buf = std::move(abbrev);
+ m_pos = 0;
+ m_expanded = true;
+ }
+@@ -544,9 +594,7 @@ namespace std::chrono
+
+ // Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+
+- in >> quoted(rule.name)
+- >> minmax_year{rule.from}
+- >> minmax_year2{rule.to, rule.from};
++ in >> quoted(rule.name) >> years_from_to{rule.from, rule.to};
+
+ if (char type; in >> type && type != '-')
+ in.setstate(ios::failbit);
+@@ -557,7 +605,7 @@ namespace std::chrono
+ if (save_time.indicator != at_time::Wall)
+ {
+ // We don't actually store the save_time.indicator, because we
+- // assume that it's always deducable from the actual offset value.
++ // assume that it's always deducible from the offset value.
+ auto expected = save_time.time == 0s
+ ? at_time::Standard
+ : at_time::Daylight;
+@@ -567,8 +615,6 @@ namespace std::chrono
+ rule.save = save_time.time;
+
+ in >> rule.letters;
+- if (rule.letters == "-")
+- rule.letters.clear();
+ return in;
+ }
+
+@@ -719,58 +765,6 @@ namespace std::chrono
+ #endif // TZDB_DISABLED
+ };
+
+-#ifndef TZDB_DISABLED
+- namespace
+- {
+- bool
+- select_std_or_dst_abbrev(string& abbrev, minutes save)
+- {
+- if (size_t pos = abbrev.find('/'); pos != string::npos)
+- {
+- // Select one of "STD/DST" for standard or daylight.
+- if (save == 0min)
+- abbrev.erase(pos);
+- else
+- abbrev.erase(0, pos + 1);
+- return true;
+- }
+- return false;
+- }
+-
+- // Set the sys_info::abbrev string by expanding any placeholders.
+- void
+- format_abbrev_str(sys_info& info, string_view letters = {})
+- {
+- if (size_t pos = info.abbrev.find("%s"); pos != string::npos)
+- {
+- // Expand "%s" to the variable part, given by Rule::letters.
+- info.abbrev.replace(pos, 2, letters);
+- }
+- else if (size_t pos = info.abbrev.find("%z"); pos != string::npos)
+- {
+- // Expand "%z" to the UT offset as +/-hh, +/-hhmm, or +/-hhmmss.
+- hh_mm_ss<seconds> t(info.offset);
+- string z(1, "+-"[t.is_negative()]);
+- long val = t.hours().count();
+- if (minutes m = t.minutes(); m != m.zero())
+- {
+- val *= 100;
+- val += m.count();
+- if (seconds s = t.seconds(); s != s.zero())
+- {
+- val *= 100;
+- val += s.count();
+- }
+- }
+- z += std::to_string(val);
+- info.abbrev.replace(pos, 2, z);
+- }
+- else
+- select_std_or_dst_abbrev(info.abbrev, info.save);
+- }
+- }
+-#endif // TZDB_DISABLED
+-
+ // Implementation of std::chrono::time_zone::get_info(const sys_time<D>&)
+ sys_info
+ time_zone::_M_get_sys_info(sys_seconds tp) const
+@@ -839,12 +833,72 @@ namespace std::chrono
+ info.abbrev = ri.format();
+
+ string_view letters;
+- if (i != infos.begin())
++ if (i != infos.begin() && i[-1].expanded())
++ letters = i[-1].next_letters();
++
++ if (letters.empty())
+ {
+- if (i[-1].expanded())
+- letters = i[-1].next_letters();
+- // XXX else need to find Rule active before this time and use it
+- // to know the initial offset, save, and letters.
++ sys_seconds t = info.begin - seconds(1);
++ const year_month_day date(chrono::floor<days>(t));
++
++ // Try to find a Rule active before this time, to get initial
++ // SAVE and LETTERS values. There may not be a Rule for the period
++ // before the first DST transition, so find the earliest DST->STD
++ // transition and use the LETTERS from that.
++ const Rule* active_rule = nullptr;
++ sys_seconds active_rule_start = sys_seconds::min();
++ const Rule* first_std = nullptr;
++ for (const auto& rule : rules)
++ {
++ if (rule.save == minutes(0))
++ {
++ if (!first_std)
++ first_std = &rule;
++ else if (rule.from < first_std->from)
++ first_std = &rule;
++ else if (rule.from == first_std->from)
++ {
++ if (rule.start_time(rule.from, {})
++ < first_std->start_time(first_std->from, {}))
++ first_std = &rule;
++ }
++ }
++
++ year y = date.year();
++
++ if (y > rule.to) // rule no longer applies at time t
++ continue;
++ if (y < rule.from) // rule doesn't apply yet at time t
++ continue;
++
++ sys_seconds rule_start;
++
++ seconds offset{}; // appropriate for at_time::Universal
++ if (rule.when.indicator == at_time::Wall)
++ offset = info.offset;
++ else if (rule.when.indicator == at_time::Standard)
++ offset = ri.offset();
++
++ // Time the rule takes effect this year:
++ rule_start = rule.start_time(y, offset);
++
++ if (rule_start >= t && rule.from < y)
++ {
++ // Try this rule in the previous year.
++ rule_start = rule.start_time(--y, offset);
++ }
++
++ if (active_rule_start < rule_start && rule_start < t)
++ {
++ active_rule_start = rule_start;
++ active_rule = &rule;
++ }
++ }
++
++ if (active_rule)
++ letters = active_rule->letters;
++ else if (first_std)
++ letters = first_std->letters;
+ }
+
+ const Rule* curr_rule = nullptr;
+@@ -2069,9 +2123,11 @@ namespace std::chrono
+ istringstream in2(std::move(rules));
+ in2 >> rules_time;
+ inf.m_save = duration_cast<minutes>(rules_time.time);
++ // If the FORMAT is "STD/DST" then we can choose the right one
++ // now, so that we store a shorter string.
+ select_std_or_dst_abbrev(fmt, inf.m_save);
+ }
+- inf.set_abbrev(fmt);
++ inf.set_abbrev(std::move(fmt));
+ }
+
+ // YEAR [MONTH [DAY [TIME]]]
+@@ -2082,7 +2138,12 @@ namespace std::chrono
+ abbrev_month m{January};
+ int d = 1;
+ at_time t{};
++ // XXX DAY should support ON format, e.g. lastSun or Sun>=8
+ in >> m >> d >> t;
++ // XXX UNTIL field should be interpreted
++ // "using the rules in effect just before the transition"
++ // so might need to store as year_month_day and hh_mm_ss and only
++ // convert to a sys_time once we know the offset in effect.
+ inf.m_until = sys_days(year(y)/m.m/day(d)) + seconds(t.time);
+ }
+ else
+diff --git a/libstdc++-v3/testsuite/std/time/time_zone/sys_info_abbrev.cc b/libstdc++-v3/testsuite/std/time/time_zone/sys_info_abbrev.cc
+new file mode 100644
+index 000000000000..f1a8fff02f58
+--- /dev/null
++++ b/libstdc++-v3/testsuite/std/time/time_zone/sys_info_abbrev.cc
+@@ -0,0 +1,106 @@
++// { dg-do run { target c++20 } }
++// { dg-require-effective-target tzdb }
++// { dg-require-effective-target cxx11_abi }
++// { dg-xfail-run-if "no weak override on AIX" { powerpc-ibm-aix* } }
++
++#include <chrono>
++#include <fstream>
++#include <testsuite_hooks.h>
++
++static bool override_used = false;
++
++namespace __gnu_cxx
++{
++ const char* zoneinfo_dir_override() {
++ override_used = true;
++ return "./";
++ }
++}
++
++using namespace std::chrono;
++
++void
++test_format()
++{
++ std::ofstream("tzdata.zi") << R"(# version test_1
++Zone Africa/Bissau -1:2:20 - LMT 1912 Ja 1 1u
++ -1 - %z 1975
++ 0 - GMT
++Zon Some/Zone 1:2:3 - %z 1900
++ 1:23:45 - %z 1950
++Zo Another/Zone 1:2:3 - AZ0 1901
++ 1 Roolz A%sZ 2000
++ 1 Roolz SAZ/DAZ 2005
++ 1 Roolz %z
++Rule Roolz 1950 max - April 1 2 1 D
++Rul Roolz 1950 max - Oct 1 1 0 S
++Z Strange/Zone 1 - X%sX 1980
++ 1 - FOO/BAR 1990
++ 2:00 - %zzz 1995
++ 0:9 - %zzz 1996
++ 0:8:7 - %zzz 1997
++ 0:6:5.5 - %zzz 1998
++)";
++
++ const auto& db = reload_tzdb();
++ VERIFY( override_used ); // If this fails then XFAIL for the target.
++ VERIFY( db.version == "test_1" );
++
++ // Test formatting %z as
++ auto tz = locate_zone("Africa/Bissau");
++ auto inf = tz->get_info(sys_days(1974y/1/1));
++ VERIFY( inf.abbrev == "-01" );
++
++ tz = locate_zone("Some/Zone");
++ inf = tz->get_info(sys_days(1899y/1/1));
++ VERIFY( inf.abbrev == "+010203" );
++ inf = tz->get_info(sys_days(1955y/1/1));
++ VERIFY( inf.abbrev == "+012345" );
++
++ tz = locate_zone("Another/Zone");
++ // Test formatting %s as the LETTER/S field from the active Rule.
++ inf = tz->get_info(sys_days(1910y/January/1));
++ VERIFY( inf.abbrev == "ASZ" );
++ inf = tz->get_info(sys_days(1950y/January/1));
++ VERIFY( inf.abbrev == "ASZ" );
++ inf = tz->get_info(sys_days(1950y/June/1));
++ VERIFY( inf.abbrev == "ADZ" );
++ inf = tz->get_info(sys_days(1999y/January/1));
++ VERIFY( inf.abbrev == "ASZ" );
++ inf = tz->get_info(sys_days(1999y/July/1));
++ VERIFY( inf.abbrev == "ADZ" );
++ // Test formatting STD/DST according to the active Rule.
++ inf = tz->get_info(sys_days(2000y/January/2));
++ VERIFY( inf.abbrev == "SAZ" );
++ inf = tz->get_info(sys_days(2001y/January/1));
++ VERIFY( inf.abbrev == "SAZ" );
++ inf = tz->get_info(sys_days(2001y/July/1));
++ VERIFY( inf.abbrev == "DAZ" );
++ // Test formatting %z as the offset determined by the active Rule.
++ inf = tz->get_info(sys_days(2005y/January/2));
++ VERIFY( inf.abbrev == "+01" );
++ inf = tz->get_info(sys_days(2006y/January/1));
++ VERIFY( inf.abbrev == "+01" );
++ inf = tz->get_info(sys_days(2006y/July/1));
++ VERIFY( inf.abbrev == "+02" );
++
++ // Test formatting %z, %s and S/D for a Zone with no associated Rules.
++ tz = locate_zone("Strange/Zone");
++ inf = tz->get_info(sys_days(1979y/January/1));
++ VERIFY( inf.abbrev == "XX" ); // No Rule means nothing to use for %s.
++ inf = tz->get_info(sys_days(1981y/July/1));
++ VERIFY( inf.abbrev == "FOO" ); // Always standard time means first string.
++ inf = tz->get_info(sys_days(1994y/July/1));
++ VERIFY( inf.abbrev == "+02zz" );
++ inf = tz->get_info(sys_days(1995y/July/1));
++ VERIFY( inf.abbrev == "+0009zz" );
++ inf = tz->get_info(sys_days(1996y/July/1));
++ VERIFY( inf.abbrev == "+000807zz" );
++ inf = tz->get_info(sys_days(1997y/July/1));
++ VERIFY( inf.abbrev == "+000606zz" );
++}
++
++int main()
++{
++ test_format();
++}
+diff --git a/libstdc++-v3/testsuite/std/time/tzdb/1.cc b/libstdc++-v3/testsuite/std/time/tzdb/1.cc
+index 796f3a8b4256..7a31c1c20ba7 100644
+--- a/libstdc++-v3/testsuite/std/time/tzdb/1.cc
++++ b/libstdc++-v3/testsuite/std/time/tzdb/1.cc
+@@ -39,11 +39,15 @@ test_locate()
+ const tzdb& db = get_tzdb();
+ const time_zone* tz = db.locate_zone("GMT");
+ VERIFY( tz != nullptr );
+- VERIFY( tz->name() == "Etc/GMT" );
+ VERIFY( tz == std::chrono::locate_zone("GMT") );
+ VERIFY( tz == db.locate_zone("Etc/GMT") );
+ VERIFY( tz == db.locate_zone("Etc/GMT+0") );
+
++ // Since 2022f GMT is now a Zone and Etc/GMT a link instead of vice versa,
++ // but only when using the vanguard format. As of 2024a, the main and
++ // rearguard formats still have Etc/GMT as a Zone and GMT as a link.
++ VERIFY( tz->name() == "GMT" || tz->name() == "Etc/GMT" );
++
+ VERIFY( db.locate_zone(db.current_zone()->name()) == db.current_zone() );
+ }
+
+--
+2.43.5
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc_14.1.bb b/poky/meta/recipes-devtools/gcc/gcc_14.2.bb
index 255fe552bd..255fe552bd 100644
--- a/poky/meta/recipes-devtools/gcc/gcc_14.1.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc_14.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/libgcc-common.inc b/poky/meta/recipes-devtools/gcc/libgcc-common.inc
index d9084af51a..e3db17d700 100644
--- a/poky/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/poky/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -53,6 +53,11 @@ do_install:append:libc-newlib () {
rmdir ${D}${base_libdir}
fi
}
+do_install:append:libc-picolibc () {
+ if [ "${base_libdir}" != "${libdir}" ]; then
+ rmdir ${D}${base_libdir}
+ fi
+}
# No rpm package is actually created but -dev depends on it, avoid dnf error
DEV_PKG_DEPENDENCY:libc-baremetal = ""
diff --git a/poky/meta/recipes-devtools/gcc/libgcc-initial_14.1.bb b/poky/meta/recipes-devtools/gcc/libgcc-initial_14.2.bb
index a259082b47..a259082b47 100644
--- a/poky/meta/recipes-devtools/gcc/libgcc-initial_14.1.bb
+++ b/poky/meta/recipes-devtools/gcc/libgcc-initial_14.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/libgcc_14.1.bb b/poky/meta/recipes-devtools/gcc/libgcc_14.2.bb
index fdcd6cc0da..fdcd6cc0da 100644
--- a/poky/meta/recipes-devtools/gcc/libgcc_14.1.bb
+++ b/poky/meta/recipes-devtools/gcc/libgcc_14.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/libgfortran.inc b/poky/meta/recipes-devtools/gcc/libgfortran.inc
index e810146d4d..2a08872c25 100644
--- a/poky/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/poky/meta/recipes-devtools/gcc/libgfortran.inc
@@ -8,7 +8,7 @@ EXTRA_OECONF_PATHS = "\
# An arm hard float target like raspberrypi4 won't build
# as CFLAGS don't make it to the fortran compiler otherwise
# (the configure script sets FC to $GFORTRAN unconditionally)
-export GFORTRAN = "${FC}"
+export GFORTRAN = "${FC} -fcanon-prefix-map -fdebug-prefix-map=${S}=${TARGET_DBGSRC_DIR} -fdebug-prefix-map=${B}=${TARGET_DBGSRC_DIR} -gno-record-gcc-switches"
do_configure () {
for target in libbacktrace libgfortran
@@ -47,8 +47,9 @@ do_install () {
chown -R root:root ${D}
}
+# avoid virtual/libc
INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS = "gcc-runtime gcc-cross-${TARGET_ARCH}"
+DEPENDS = "virtual/${HOST_PREFIX}gcc virtual/${HOST_PREFIX}compilerlibs"
BBCLASSEXTEND = "nativesdk"
diff --git a/poky/meta/recipes-devtools/gcc/libgfortran_14.1.bb b/poky/meta/recipes-devtools/gcc/libgfortran_14.2.bb
index 71dd8b4bdc..71dd8b4bdc 100644
--- a/poky/meta/recipes-devtools/gcc/libgfortran_14.1.bb
+++ b/poky/meta/recipes-devtools/gcc/libgfortran_14.2.bb