This repository has been archived by the owner on May 30, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-lang/perl: fix segfault in perl-cross
In developer containers or SDK, there has been a bug in cross-compiled perl that it crashes with segmentation fault. It has two different reasons: The first issue is that perl depends on perl-cross 1.1.4, which has a bug with gcc 7.x or newer, so that the necessary CFLAGS `-fwrapv` was not appended. This issue was fixed in perl-cross 1.1.9 or newer. So we just need to upgrade perl-cross to 1.2.2, the newest release. ``` CROSS_VER=1.2.2 ``` The other issue is that the CFLAGS `-O2` was given when building cross-compiled perl. We should replace the optimization flag with `-O0`, when it's built by the cross compiler. Without that, the segfault will not be fixed at all. ``` if tc-is-cross-compiler; then replace-flags -O? -O0 fi ``` How to test inside the Flatcar SDK environment: ``` LD_PRELOAD=/build/amd64-usr/usr/lib/libperl.so.5.24.1 /build/amd64-usr/usr/bin/perl -V ``` See also coreos/bugs#2369 coreos/bugs#2545 arsv/perl-cross#60
- Loading branch information