Skip to content

main/gcc: disable -fsplit-stack on non-glibc targets

Sören Tempel requested to merge nmeum/aports:gcc-split-stack into master

The -fsplit-stack option requires specific fields at hardcoded offsets in the pthread_t TCB, musl does not have these fields. Therefore, enabling this compiler option on musl causes silent memory corruptions in the pthread_t TCB (on s390x it presently corrupts the cancel member of the TCB). gcc-go enables this option by default if it is available (x86 and s390x), thereby causing corruption of the TCB on these architectures. This commit fixes these TCB corruptions and thus enables bootstrapping of Google's Go implementation with gcc-go on s390x (see !27944 (merged)).

See https://www.openwall.com/lists/musl/2012/10/16/12

Edited by Sören Tempel

Merge request reports

Loading