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 23, 8:14 PM
Unknown Object (File)
Jan 26 2024, 11:36 PM
Unknown Object (File)
Dec 20 2023, 3:48 AM
Unknown Object (File)
Sep 18 2023, 12:06 PM
Unknown Object (File)
Sep 6 2023, 8:02 AM
Unknown Object (File)
Aug 21 2023, 11:31 AM
Unknown Object (File)
Aug 14 2023, 10:01 PM
Unknown Object (File)
Aug 14 2023, 11:23 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