summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-27 01:33:07 +0100
committerSam James <sam@gentoo.org>2023-04-27 01:33:07 +0100
commit0718a38e9dec1aff622d0a6ccb777c3d22db3cbc (patch)
tree09fa3dde918a4a91832128f12a1e2dac3e021408 /eclass
parentsys-devel/gcc: add 10.4.1_p20230426 (diff)
downloadgentoo-0718a38e9dec1aff622d0a6ccb777c3d22db3cbc.tar.gz
gentoo-0718a38e9dec1aff622d0a6ccb777c3d22db3cbc.tar.bz2
gentoo-0718a38e9dec1aff622d0a6ccb777c3d22db3cbc.zip
toolchain.eclass: record EGIT_VERSION correctly in gcc --version for live ebuilds
Without this, gcc --version ends up only showing the commit resulting from applying our patches on top. With this fixed, gcc --version shows both the upstream commit & the commit hash after applying patches. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index fab34914ab3f..16ce534d3465 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -649,6 +649,11 @@ toolchain_src_unpack() {
if tc_is_live ; then
git-r3_src_unpack
+ # Needed for gcc --version to include the upstream commit used
+ # rather than only the commit after we apply our patches.
+ # It includes both with this.
+ echo "${EGIT_VERSION}" > "${S}"/gcc/REVISION || die
+
if [[ -z ${PATCH_VER} ]] && ! use vanilla ; then
toolchain_fetch_git_patches
fi