Page MenuHomeFreeBSD

powerpc64*: workaround for broken binaries generated with llvm12
AbandonedPublic

Authored by alfredo on Aug 23 2021, 2:05 PM.
Referenced Files
Unknown Object (File)
Tue, Apr 7, 3:15 PM
Unknown Object (File)
Mon, Apr 6, 12:29 PM
Unknown Object (File)
Sun, Apr 5, 11:28 AM
Unknown Object (File)
Fri, Apr 3, 6:59 AM
Unknown Object (File)
Mon, Mar 30, 3:14 PM
Unknown Object (File)
Wed, Mar 25, 9:23 AM
Unknown Object (File)
Sat, Mar 21, 2:44 AM
Unknown Object (File)
Fri, Mar 20, 4:48 AM

Details

Summary

powerpc64 and powerpc64 binaries are crashing with segmentation fault when -fstack-protector-strong is used with any optimization level. The binaries seem correct if one of -fstack-protector or -O[0|1|2|3] is ommited.

This patch add a temporary workaround while root cause is being investigated.

MFC after: 1 day

Test Plan

buildworld + chroot
run binaries like clang, ld.lld, llvm-objdump, ls, cp, echo

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41168
Build 38057: arc lint + arc unit

Event Timeline

alfredo edited reviewers, added: luporl; removed: leandro.lupori_gmail.com.

is there a PR to reference here?

Move logic to BROKEN_OPTIONS as suggested by @jhibbits

is there a PR to reference here?

A PR against LLVM? Not yet. I reduced it to a test program available at https://people.freebsd.org/~alfredo/tmp/llvm12_crash/. I should file a PR later today.
On FreeBSD side there a report from a user on freebsd-ppc mailing list: https://lists.freebsd.org/archives/freebsd-ppc/2021-August/000035.html

Move logic to BROKEN_OPTIONS as suggested by @jhibbits

This will work for src itself, but I think it won't work with ports that use /usr/share/mk?

Move logic to BROKEN_OPTIONS as suggested by @jhibbits

This will work for src itself, but I think it won't work with ports that use /usr/share/mk?

I talked to @pkubaj on IRC, he should take care of ports side after this patch is commited