Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
dev-lang/perl: fix segfault in perl-cross
Browse files Browse the repository at this point in the history
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
Dongsu Park committed Feb 26, 2019
1 parent 2616492 commit d1d183a
Show file tree
Hide file tree
Showing 3 changed files with 585 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dev-lang/perl/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DIST perl-5.24.1-patches-3.tar.xz 24012 BLAKE2B b215bb7800c157d6ef1461bd898be3b51272b4aaa1d9022602eb319d35018c2adf4186a0bf5da2a22120e8176248940887bce828dcb3d19f3ffa804d45994be6 SHA512 1af59b80fca8317fe8df171eba6fcc0830c65f94ad7f73bac611877afdd6e5dfe9ce7c67205a860703fcf6c5b87ba14a0163196e1b833a20562525d06b26b6f3
DIST perl-5.24.1.tar.xz 11569284 BLAKE2B 0db211fcfda401d6fc6818aa45b024cebc413360dae14948c2c22c3d546e23d160f84382afdd38619e8766281be81e381d296bae9f34e8582db1a41847f2a1bf SHA512 9429608eb4d7f6a01b5a7df8601e0757acdf3e6d5af960d5cf710f8e4fd20ffe082bb42eedc2cd079d5173e48cf5574d55477e1c51f7f53b32fb5d1b89f6db8c
DIST perl-cross-1.2.2.tar.gz 106073 BLAKE2B c4eaf5d60dd0ac88a9653cea399f5583a699d35f94a69a36ef9d3cde0017901ff68029f12a3af6e0fd34d46accbb6be009167fadb790da8065f6b85115f1c9b8 SHA512 49dc190018b891daac68a954e2a9bab6294920f02b585c530dcc47af03e8ab51d402455202d45121fa206ee743986ddd50323658c179d2c15cb6af7a2eb0958c
14 changes: 14 additions & 0 deletions dev-lang/perl/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>[email protected]</email>
<name>Gentoo Perl Project</name>
</maintainer>
<use>
<flag name="ithreads">Enable Perl threads, has some compatibility problems</flag>
</use>
<upstream>
<remote-id type="github">arsv/perl-cross</remote-id>
</upstream>
</pkgmetadata>
Loading

0 comments on commit d1d183a

Please sign in to comment.