summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorOleksandr Hnatiuk <ohnatiuk@cisco.com>2024-07-12 11:58:21 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-07-13 23:28:31 +0100
commitc63b8f28ac52047fad689b78d605aa792baf1ad8 (patch)
tree9357642d677180e7362ad8b13e420858b8e01904 /meta
parent2c2e1becd682742f13d186faae5f013a0b91c5ab (diff)
downloadpoky-c63b8f28ac52047fad689b78d605aa792baf1ad8.tar.gz
icu: remove host references in nativesdk to fix reproducibility
Fix is only done for target. Use same code for nativesdk. (From OE-Core rev: dc6306883cc2c7d4d98d595442e5bf4037a160c5) Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Oleksandr Hnatiuk <ohnatiuk@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/icu/icu_75-1.bb33
1 files changed, 24 insertions, 9 deletions
diff --git a/meta/recipes-support/icu/icu_75-1.bb b/meta/recipes-support/icu/icu_75-1.bb
index 27fe392e4d..57c9fc0361 100644
--- a/meta/recipes-support/icu/icu_75-1.bb
+++ b/meta/recipes-support/icu/icu_75-1.bb
@@ -30,7 +30,7 @@ TARGET_CXXFLAGS:append = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', '
30 30
31ASNEEDED = "" 31ASNEEDED = ""
32 32
33do_compile:prepend:class-target () { 33remove_build_host_references_from_libicutu () {
34 # Make sure certain build host references do not end up being compiled 34 # Make sure certain build host references do not end up being compiled
35 # in the image. This only affects libicutu and icu-dbg 35 # in the image. This only affects libicutu and icu-dbg
36 sed \ 36 sed \
@@ -39,6 +39,14 @@ do_compile:prepend:class-target () {
39 -i ${B}/tools/toolutil/Makefile 39 -i ${B}/tools/toolutil/Makefile
40} 40}
41 41
42do_compile:prepend:class-target () {
43 remove_build_host_references_from_libicutu
44}
45
46do_compile:prepend:class-nativesdk () {
47 remove_build_host_references_from_libicutu
48}
49
42PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}" 50PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}"
43do_install:append:class-native() { 51do_install:append:class-native() {
44 mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config 52 mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config
@@ -49,6 +57,15 @@ do_install:append:class-native() {
49 cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE} 57 cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE}
50} 58}
51 59
60remove_build_host_references() {
61 sed -i \
62 -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
63 -e 's|${DEBUG_PREFIX_MAP}||g' \
64 -e 's:${HOSTTOOLS_DIR}/::g' \
65 ${D}/${libdir}/${BPN}/${@icu_install_folder(d)}/Makefile.inc \
66 ${D}/${libdir}/${BPN}/${@icu_install_folder(d)}/pkgdata.inc
67}
68
52do_install:append:class-target() { 69do_install:append:class-target() {
53 # The native pkgdata can not generate the correct data file. 70 # The native pkgdata can not generate the correct data file.
54 # Use icupkg to re-generate it. 71 # Use icupkg to re-generate it.
@@ -56,14 +73,12 @@ do_install:append:class-target() {
56 rm -f ${D}/${datadir}/${BPN}/${@icu_install_folder(d)}/icudt${ICU_MAJOR_VER}b.dat 73 rm -f ${D}/${datadir}/${BPN}/${@icu_install_folder(d)}/icudt${ICU_MAJOR_VER}b.dat
57 icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${@icu_install_folder(d)}/icudt${ICU_MAJOR_VER}b.dat 74 icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${@icu_install_folder(d)}/icudt${ICU_MAJOR_VER}b.dat
58 fi 75 fi
59 76
60 # Remove build host references... 77 remove_build_host_references
61 sed -i \ 78}
62 -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ 79
63 -e 's|${DEBUG_PREFIX_MAP}||g' \ 80do_install:append:class-nativesdk() {
64 -e 's:${HOSTTOOLS_DIR}/::g' \ 81 remove_build_host_references
65 ${D}/${libdir}/${BPN}/${@icu_install_folder(d)}/Makefile.inc \
66 ${D}/${libdir}/${BPN}/${@icu_install_folder(d)}/pkgdata.inc
67} 82}
68 83
69PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio" 84PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio"