https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112299
Bug ID: 112299
Summary: Cross compiling to loongarch64-linux-gnuf64 fails
because "HAVE_AS_TLS was not declared" after
r14-4925-g1b30ef7cea773e
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: jamborm at gcc dot gnu.org
CC: chenxiaolong at loongson dot cn
Target Milestone: ---
Host: x86_64-linux-gnu
Target: loongarch64-linux-gnuf64
Starting with r14-4925-g1b30ef7cea773e, when I try to test that cross
compilation to target loongarch64-linux-gnuf64 still works by configuring gcc
with:
$ ../src/configure --target=loongarch64-linux-gnuf64 --disable-bootstrap
--enable-languages=c,c++ --disable-multilib --enable-obsolete
and then building just the compiler with:
$ make -j64 all-host CXXFLAGS="-O0 -g" CFLAGS="-O0 -g"
The compilation fails with:
../../src/gcc/config/loongarch/loongarch.md:3655:2: error: ‘HAVE_AS_TLS’ was
not declared in this scope
3655 | "HAVE_AS_TLS"
| ^~~~~~~~~~~
config.status: executing libtool commands
../../src/gcc/config/loongarch/loongarch.md:3655:2: error: ‘HAVE_AS_TLS’ was
not declared in this scope
3655 | "HAVE_AS_TLS"
| ^~~~~~~~~~~
../../src/gcc/config/loongarch/loongarch.md:3655:2: error: ‘HAVE_AS_TLS’ was
not declared in this scope
3655 | "HAVE_AS_TLS"
| ^~~~~~~~~~~
../../src/gcc/config/loongarch/loongarch.md:3655:2: error: ‘HAVE_AS_TLS’ was
not declared in this scope
3655 | "HAVE_AS_TLS"
| ^~~~~~~~~~~
make[1]: *** [Makefile:2958: build/gencondmd.o] Error 1
make[1]: *** Waiting for unfinished jobs....
rm gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod cpp.pod
gcov.pod lto-dump.pod
make[1]: Leaving directory '/home/mjambor/gcc/mine/obj/gcc'
According to our buildbot, building a cross for loongarch64-linux-gnuf32 and
loongarch64-linux-gnusf also fails, likely because of the same issue.