diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD index 864a66cde4c..488dde45dd9 100644 --- a/main/gcc/APKBUILD +++ b/main/gcc/APKBUILD @@ -227,6 +227,12 @@ prepare() { return 1 fi + # genautomata crashes with a "Bus Error" when compiled with PIC + # mostly affecting cross-builds as on native build bootstrapping + # somehow seems to build proper genautomata + sed -i gcc/Makefile.in -e 's|^build/genautomata$(build_exeext) .*|& -fno-PIC|' \ + || return 1 + # enable hardened cflags by default # building gcc wih PIE seem to hit some strange bug. we probably run # out of some resource. so we disable PIE for gcc while enabling it