I'm running into some strange behavior with gcc while emerging certain packages. If I have -O1, -O2, or -O3 in my COMMON_FLAGS, the build hangs indefinitely at different points for each problematic package. I've been testing mainly against opus, but have seen this behavior when emerging libtool and gcc itself. Omitting the '-O' flag or using '-O0' allows these packages to build, and the majority of packages build without issue with '-O2.'
This behavior is occurring on an armv8 / aarch64 machine.
When emerging opus, compilation hangs on:
Code: Select all
libtool: link: aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a+crc+fp+simd+crypto -mtune=cortex-a73.cortex-a53 -mcpu=cortex-a73.cortex-a53+crc+fp+simd+crypto -ftree-vectorize -fuse-linker-plugin -flto=6 -mfix-cortex-a53-835769 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=256 -fvisibility=hidden -W -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wl,-O1 -Wl,--as-needed -o tests/.libs/test_opus_padding tests/test_opus_padding.o ./.libs/libopus.so -lmEmerging gcc hangs on:
Code: Select all
>>> Configuring source in /var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115 ...One core is pegged at 100% during these hangs. I let opus go overnight for 9 hours last night with no progress. I've tried emerging with --debug but don't receive any additional clues. I don't see any errors logged, and nothing in kernel logs.
I'm not sure where to look for additional clues or how to move past this. Has anyone else experienced this behavior before?

