summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/apt
diff options
context:
space:
mode:
authorRalph Siemsen <ralph.siemsen@linaro.org>2022-04-14 14:12:28 -1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-21 21:26:01 +0100
commit39ba556a2e44d58415d28a513d1adb5903836c00 (patch)
tree3ef35adf5f3c4e23c8f1a79840df5f8167af7b23 /meta/recipes-devtools/apt
parentaee507fe6c5e38a72d79da67ab532a92495ea95c (diff)
downloadpoky-39ba556a2e44d58415d28a513d1adb5903836c00.tar.gz
apt: add -fno-strict-aliasing to CXXFLAGS to fix SHA256 bug
Recently we've begun seeing issues with apt SHA256 generation/checking on some distros (fedora 35, alma 8). The version of apt in dunfell uses its own SHA256 code, not a standard library. Investigation reveals that the issue is related to -fstrict-aliasing enabled by -O2 optimization, so turn it off with -fno-strict-aliasing (From OE-Core rev: dc61dfd7791976c70c93e0d253a8fdbd40d27f3b) Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/apt')
-rw-r--r--meta/recipes-devtools/apt/apt.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc
index ba827848a7..251795eeca 100644
--- a/meta/recipes-devtools/apt/apt.inc
+++ b/meta/recipes-devtools/apt/apt.inc
@@ -37,5 +37,9 @@ do_configure_prepend() {
37 rm -rf ${S}/buildlib/config.guess 37 rm -rf ${S}/buildlib/config.guess
38} 38}
39 39
40# there are code generation issues with some compilers in the SHA256 implementation
41# turn off strict-aliasing to avoid these issues
42CXXFLAGS:append = " -fno-strict-aliasing"
43
40USERADD_PACKAGES = "${PN}" 44USERADD_PACKAGES = "${PN}"
41USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /nonexistent --shell /bin/false --user-group _apt" 45USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /nonexistent --shell /bin/false --user-group _apt"