From a72dc751fbb1d62d8adeea05a13d290caddcf56a Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Mon, 30 Aug 2021 14:11:16 +0000 Subject: [PATCH] coreos/config: add fix for perl cross-compilation Current cross builds of perl segfault on simple operations such as `perl -V`. This appears to be due to the cross-build not getting `-fwrapv -fno-strict-aliasing` passed from the configure script. While we try to get this fixed upstream, we can monkeypatch our old version of perl to fix this. Signed-off-by: Jeremi Piotrowski --- .../coreos-overlay/coreos/config/env/dev-lang/perl | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/config/env/dev-lang/perl diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/dev-lang/perl b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/dev-lang/perl new file mode 100644 index 0000000000..38d1bf6f8d --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/dev-lang/perl @@ -0,0 +1,5 @@ +if [[ ${EBUILD_PHASE} == configure ]]; then + if tc-is-cross-compiler; then + append-cflags "-fwrapv -fno-strict-aliasing" + fi +fi