From 0718a38e9dec1aff622d0a6ccb777c3d22db3cbc Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 27 Apr 2023 01:33:07 +0100 Subject: 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 --- eclass/toolchain.eclass | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'eclass') 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 -- cgit v1.2.3-65-gdbad