Subject: Re: bug#63365: 30.0.50; GCC 13.1 breaks building Emacs with native-compilation

From: Cyril Arnould <[email-masked]>
Date: Fri, 16 Jun 2023 09:04:16 +0000

I've been playing around with compiler options. From my findings, the
-foptimize-sibling-calls flag breaks the build:

./autogen.sh
CFLAGS='-g3 -O1 -gdwarf-2 -foptimize-sibling-calls' \
./configure --with-native-compilation
make

OTOH, using -O1 with every flag listed under -O2 *but*
-foptimize-sibling-calls results in the build succeeding. The following
works as well for me:

./autogen.sh
CFLAGS='-g3 -O2 -gdwarf-2 -fno-optimize-sibling-calls' \
./configure --with-native-compilation
make