https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97787
--- Comment #14 from Xi Ruoyao <xry111 at mengyan1223 dot wang> --- (In reply to Richard Biener from comment #13) > (In reply to Xi Ruoyao from comment #9) > > (In reply to rguent...@suse.de from comment #8) > > > > > I guess it is because -mxgot is supposed to be handled by the assembler? > > > I see > > > > > > %{mgp32} %{mgp64} %{march=*} %{mxgot:-xgot} \ > > > > > > in ASM_SPEC. I guess this doesn't make it to COLLECT_AS_OPTIONS > > > and eventually makes it dropped from COLLECT_GCC_OPTIONS as well. > > > > I don't think so. > > > > I can reproduce this issue compiling spidermonkey (js interpreter) from > > firefox-78 ESR. I'm using "-pipe" so I can easily find the parameters > > passed to "as", using "ps -aux". "-xgot" is passed correctly. > > > > > Can you attach the full output of compiling & linking with -v added? > > ^^^ (output aka output on the console) Reproduced again, building libsass. The output without -mxgot: https://bf.mengyan1223.wang/assets/gcc-97787/libsass_so_lto_output.tar.xz The output with -mxgot: https://bf.mengyan1223.wang/assets/gcc-97787/libsass_so_lto_output_mxgot.tar.xz Full console output with --verbose is included in the tarballs, named console.log. > I think the issue should be visible from a simple hello world compiled > with LTO and -mxgot (aka not using -xgot in the approproate places in the > end, not failing the link in the end). Actually I don't think it's a xgot issue... With or without -mxgot I got exactly same error message.