summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-03 17:31:17 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-24 15:30:06 +0000
commit55d1ee652aa4bd0b43eb5c6a2623a808f520a14f (patch)
tree573720d4630c68c042534dd59ac4d74c21b6427c
parent28882bc0df565f4cdec8960af8152ffc5947f5d0 (diff)
downloadpoky-55d1ee652aa4bd0b43eb5c6a2623a808f520a14f.tar.gz
gcc-shared-source: Fix source date epoch handling
The source date epoch for gcc isn't being transferred from the shared workdir to the current WORKDIR for the specific recipe. This results in the clamping code within sstate.bbclass using a value from 2011 which changes the timestamps of many files. Since this happens part way through the build, if pieces of gcc haven't built, or build/rebuild later, we see things rebuilding when they should not and for generated files, races are possible. Fix this by copying the SDE from the shared workdir into the recipe workdir. [YOCTO #14953] (From OE-Core rev: 2c14f7d70737636f24a044b353e171662113cea0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit b996293b4c8ab7ff3ed852045d17290df29205df) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-shared-source.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-shared-source.inc b/meta/recipes-devtools/gcc/gcc-shared-source.inc
index aac4b49313..cd2e341099 100644
--- a/meta/recipes-devtools/gcc/gcc-shared-source.inc
+++ b/meta/recipes-devtools/gcc/gcc-shared-source.inc
@@ -9,3 +9,13 @@ SRC_URI = ""
9 9
10do_configure[depends] += "gcc-source-${PV}:do_preconfigure" 10do_configure[depends] += "gcc-source-${PV}:do_preconfigure"
11do_populate_lic[depends] += "gcc-source-${PV}:do_unpack" 11do_populate_lic[depends] += "gcc-source-${PV}:do_unpack"
12do_deploy_source_date_epoch[depends] += "gcc-source-${PV}:do_deploy_source_date_epoch"
13
14# Copy the SDE from the shared workdir to the recipe workdir
15do_deploy_source_date_epoch () {
16 sde_file=${SDE_FILE}
17 sde_file=${sde_file#${WORKDIR}/}
18 mkdir -p ${SDE_DEPLOYDIR} $(dirname ${SDE_FILE})
19 cp -p ${S}/../$sde_file ${SDE_DEPLOYDIR}
20 cp -p ${S}/../$sde_file ${SDE_FILE}
21}