0

我正在 Devuan Chimaera GNU/Linux 系统上构建 GCC 8.5.0(使用 GCC 10)。我已经配置了./configure --disable-gnat,然后运行make。在某些时候,我得到:

echo timestamp > s-selftest-c
rm gcc.pod
make[3]: Leaving directory '/usr/local/src/gcc-8.5.0/host-x86_64-pc-linux-gnu/gcc'
Checking multilib configuration for libgcc...
Configuring stage 1 in x86_64-pc-linux-gnu/libgcc
configure: loading cache ./config.cache
configure: error: `CC' has changed since the previous run:
configure:   former value:  `/usr/local/src/gcc-8.5.0/host-x86_64-pc-linux-gnu/gcc/xgcc -B/usr/local/src/gcc-8.5.0/host-x86_64-pc-linux-gnu/gcc/ -B/opt/gcc-8.5.0/x86_64-pc-linux-gnu/bin/ -B/opt/gcc-8.5.0/x86_64-pc-linux-gnu/lib/ -isystem /opt/gcc-8.5.0/x86_64-pc-linux-gnu/include -isystem /opt/gcc-8.5.0/x86_64-pc-linux-gnu/sys-include   '
configure:   current value: `/usr/local/src/gcc-8.5.0/host-x86_64-pc-linux-gnu/gcc/xgcc -B/usr/local/src/gcc-8.5.0/host-x86_64-pc-linux-gnu/gcc/ -B/usr/local/x86_64-pc-linux-gnu/bin/ -B/usr/local/x86_64-pc-linux-gnu/lib/ -isystem /usr/local/x86_64-pc-linux-gnu/include -isystem /usr/local/x86_64-pc-linux-gnu/sys-include   '
configure: error: in `/usr/local/src/gcc-8.5.0/x86_64-pc-linux-gnu/libgcc':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[2]: *** [Makefile:18716: configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory '/usr/local/src/gcc-8.5.0'
make[1]: *** [Makefile:24352: stage1-bubble] Error 2
make[1]: Leaving directory '/usr/local/src/gcc-8.5.0'
make: *** [Makefile:945: all] Error 2

为什么会这样?我尝试make distclean并重复该过程,但没有帮助。

4

1 回答 1

0

配置 gcc-8.5.0 的示例

tar xvf gcc-8.5.0.tar.xz 
cd gcc-8.5.0/

tar xvf mpfr-4.0.2.tar.xz && mv -v mpfr-4.0.2 mpfr
tar xvf gmp-6.1.2.tar.xz && mv -v gmp-6.1.2 gmp
tar xvf mpc-1.1.0.tar.gz && mv -v mpc-1.1.0 mpc

cd ../
mkdir build-gcc850
cd build-gcc850/

export CC=gcc73 CXX=g++73 && \
../gcc-8.5.0/configure --prefix=/usr/local/gcc85 \
--program-suffix=85 --enable-languages=c,c++,fortran \
--disable-multilib --disable-libstdcxx-pch --with-system-zlib
于 2022-02-08T11:39:01.063 回答