在 2024/1/13 下午9:05, Xi Ruoyao 写道:
在 2024-01-13星期六的 15:01 +0800,chenglulu写道:
在 2024/1/12 下午7:42, Xi Ruoyao 写道:
在 2024-01-12星期五的 09:46 +0800,chenglulu写道:
I found an issue bootstrapping GCC with -mcmodel=extreme in BOOT_CFLAGS:
we need a target hook to tell the generic code
UNSPEC_LA_PCREL_64_PART{1,2} are just a wrapper around symbols, or we'll
see millions lines of messages like
../../gcc/gcc/tree.h:4171:1: note: non-delegitimized UNSPEC
UNSPEC_LA_PCREL_64_PART1 (42) found in variable location
I build GCC with -mcmodel=extreme in BOOT_CFLAGS, but I haven't reproduced the
problem you mentioned.
$ ../configure --host=loongarch64-linux-gnu
--target=loongarch64-linux-gnu --build=loongarch64-linux-gnu \
--with-arch=loongarch64 --with-abi=lp64d --enable-tls
--enable-languages=c,c++,fortran,lto --enable-plugin \
--disable-multilib --disable-host-shared --enable-bootstrap
--enable-checking=release
$ make BOOT_FLAGS="-mcmodel=extreme"
What did I do wrong?:-(
BOOT_CFLAGS, not BOOT_FLAGS :).
This is so strange. My compilation here stopped due to syntax problems,
and I still haven't reproduced the information you mentioned about
UNSPEC_LA_PCREL_64_PART1.
I used:
../gcc/configure --with-system-zlib --disable-fixincludes \
--enable-default-ssp --enable-default-pie \
--disable-werror --disable-multilib \
--prefix=/home/xry111/gcc-dev
and then
make STAGE1_{C,CXX}FLAGS="-O2 -g" -j8 \
BOOT_{C,CXX}FLAGS="-O2 -g -mcmodel=extreme" &| tee gcc-build.log
I guess "-g" is needed to reproduce the issue as well as the messages
were produced in dwarf generation.
Oh, okay, I'll try this method!:-)