https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104973
--- Comment #2 from Ian Lance Taylor <ian at airs dot com> --- Your build log shows a line like this: libtool: compile: /var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./gcc/gccgo -B/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -minline-all-stringops -O2 -g -I . -c -fgo-pkgpath=internal/cpu /var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/libgo/go/internal/cpu/cpu.go /var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/libgo/go/internal/cpu/cpu_amd64.go /var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/libgo/go/internal/cpu/cpu_x86.go cpugen.go My build log shows a line like this: libtool: compile: /home/iant/gcc/gcc-11-objdir/./gcc/gccgo -B/home/iant/gcc/gcc-11-objdir/./gcc/ -B/home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/bin/ -B/home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/lib/ -isystem /home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/include -isystem /home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/sys-include -fchecking=1 -minline-all-stringops -O2 -g -I . -c -fgo-pkgpath=internal/cpu ../../../gcc-11-branch/libgo/go/internal/cpu/cpu.go ../../../gcc-11-branch/libgo/go/internal/cpu/cpu_amd64.go ../../../gcc-11-branch/libgo/go/internal/cpu/cpu_x86.go cpugen.go -fPIC -o internal/.libs/cpu.o Note that my line has a -o ption at the end but yours does not. I think that is the root of the problem. Earlier your log has this: /usr/sbin/mkdir -p internal; files=`echo /var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/libgo/go/internal/cpu/cpu.go /var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/libgo/go/internal/cpu/cpu_amd64.go /var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/libgo/go/internal/cpu/cpu_x86.go cpugen.go | sed -e 's/[^ ]*\.gox//g' -e 's/[^ ]*\.dep//'`; /bin/bash ./libtool --tag GO --mode=compile /var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./gcc/gccgo -B/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -minline-all-stringops -O2 -g -I . -c -fgo-pkgpath=`echo internal/cpu.lo | sed -e 's/.lo$//'` -o internal/cpu.lo $files My log has this: /bin/mkdir -p internal; files=`echo ../../../gcc-11-branch/libgo/go/internal/cpu/cpu.go ../../../gcc-11-branch/libgo/go/internal/cpu/cpu_amd64.go ../../../gcc-11-branch/libgo/go/internal/cpu/cpu_x86.go cpugen.go | sed -e 's/[^ ]*\.gox//g' -e 's/[^ ]*\.dep//'`; /bin/sh ./libtool --tag GO --mode=compile /home/iant/gcc/gcc-11-objdir/./gcc/gccgo -B/home/iant/gcc/gcc-11-objdir/./gcc/ -B/home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/bin/ -B/home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/lib/ -isystem /home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/include -isystem /home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/sys-include -fchecking=1 -minline-all-stringops -O2 -g -I . -c -fgo-pkgpath=`echo internal/cpu.lo | sed -e 's/.lo$//'` -o internal/cpu.lo $files Here the -o option is present in both cases. So why does the -o option disappear? Could this be somehow due to the patches being applied at the start of your build log?