diff options
author | Charles Baylis <charles.baylis@linaro.org> | 2017-04-27 09:33:22 +0100 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2017-04-27 11:53:09 +0000 |
commit | 336ef8a599afafb5b3c9a30775d6aaa33e07e7bf (patch) | |
tree | ef3f368338db64d72b55f9439359bf3b17457c36 | |
parent | 11a33ba7457af460179fea487d92e337c87edd45 (diff) |
Touch all C files after checkout.stable
In order to avoid unpredictable behaviour during builds, we want
to avoid rebuilding auto-generated files. To do this, we touch all
C files for projects which do not maintain their own scripts for
doing so.
This is intended to fix random build failures in binutils
affecting ldlex-wrapper.o.
Change-Id: Ifd2ff64011510ffd8f5d1686ca7e3843db3303de
-rw-r--r-- | lib/checkout.sh | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/lib/checkout.sh b/lib/checkout.sh index 936cf5a4..584a1595 100644 --- a/lib/checkout.sh +++ b/lib/checkout.sh @@ -249,22 +249,12 @@ checkout() # build behavior. dryrun "(cd ${srcdir} && ./contrib/gcc_update --touch)" ;; - gdb|binutils) - # Sometimes the timestamps are wrong after checkout causing - # useless rebuilds. In the case of intl/plural.[cy], it's - # causing build failures because plural.y is very old, and the - # file generated by a modern bison cannot be compiled. The - # clean fix would be to merge intl/ with newer gettext in - # binutils-gdb. Quick hack: force plural.c to be more recent - # than plural.y. - dryrun "touch ${srcdir}/intl/plural.c" - ;; - eglibc) - # Like gdb and binutils, eglibc can be affected by a timestamps - # issue, and force a plural.c re-build. Only the path differs - # in this case. - dryrun "touch ${srcdir}/libc/intl/plural.c" - ;; + *) + # Avoid rebuilding of auto-generated C files. Rather than + # try to determine which are auto-generated, touch all of them. + # If a C file is not autogenerated, it does no harm to update + # its timestamp. + dryrun "cd ${srcdir} && git ls-files -z '*.c' | xargs -0 touch" esac fi |