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)
Thu, Dec 19, 12:23 AM
Unknown Object (File)
Oct 17 2024, 5:57 PM
Unknown Object (File)
Oct 17 2024, 5:56 PM
Unknown Object (File)
Oct 17 2024, 5:56 PM
Unknown Object (File)
Oct 17 2024, 5:27 PM
Unknown Object (File)
Oct 1 2024, 4:12 PM
Unknown Object (File)
Oct 1 2024, 9:22 AM
Unknown Object (File)
Sep 11 2024, 8:54 PM

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