[yocto] [prelink-cross] [PATCH] testsuite/functions.sh: produce deterministic GNU_PRELINK section
Sergei Trofimovich
slyfox at gentoo.org
Wed Oct 10 13:50:10 PDT 2018
Before the change one test failed due to timestamp drift:
FAIL: shuffle7.sh
This happens because prelinking takes time on the file
and timestamp differs slightly.
Avoid timestamp drift by overriding real timestamp
with PRELINK_TIMESTAMP variable.
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
---
testsuite/functions.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/testsuite/functions.sh b/testsuite/functions.sh
index 85bf875..5e98725 100755
--- a/testsuite/functions.sh
+++ b/testsuite/functions.sh
@@ -4,6 +4,12 @@ CCLINK=${CCLINK:-${CC} -Wl,--dynamic-linker=`echo ./ld*.so.*[0-9]`}
CXX="${CXX:-g++} ${LINKOPTS}"
CXXLINK=${CXXLINK:-${CXX} -Wl,--dynamic-linker=`echo ./ld*.so.*[0-9]`}
PRELINK=${PRELINK:-../src/prelink -c ./prelink.conf -C ./prelink.cache --ld-library-path=. --dynamic-linker=`echo ./ld*.so.*[0-9]`}
+
+# force deterministic timestamps to make double prelinking
+# to produce unmodified binary.
+PRELINK_TIMESTAMP=${PRELINK_TIMESTAMP:-12345678}
+export PRELINK_TIMESTAMP
+
srcdir=${srcdir:-`dirname $0`}
savelibs() {
for i in $LIBS $BINS; do cp -p $i $i.orig; done
--
2.19.1
More information about the yocto
mailing list