LFS GCC-10.2.0 Pass 2는 crtstuff.c의 소스 코드 오류로 인해 실패합니다.

LFS GCC-10.2.0 Pass 2는 crtstuff.c의 소스 코드 오류로 인해 실패합니다.

LFS(systemd 포함) 책의 6.18장을 실행하려고 하면 파일에 대한 crtstuff.c, line 695정의되지 않은 참조가 있기 때문에 make가 실패합니다 __CTOR_END__. 나에게 이것은 일종의 g++ 버그인 것 같습니다(C에는 생성자가 없으므로 C++인 것 같습니다). 명령어를 몇번 확인해보니 모든 ./configure매개변수가 정확해서 아쉽게도 어디가 문제인지 모르겠습니다.

편집: 해결책을 찾기 위해 동일한 문제를 안고 여기에 왔다면 크로스 gcc 구축을 망친 것입니다. gcc를 다시 빌드하고 주의 깊게 살펴보세요. --disable-initfini-array가 아니라 --enable-initfini-array입니다.

내가 사용하는 명령은 다음과 같습니다.

../configure --build=$(../config.guess) --host=$LFS_TGT --prefix=/usr CC_FOR_TARGET=$LFS_TGT-gcc --with-build-sysroot=$LFS --enable-initfini-array --disable-nls --disable-multilib --disable-decimal-float --disable--libatomic --disable-libgomp --disable-libquadmath --disable-libssp --disable-libvtv --disable-libstdcxx --enable-languages=c,c++ && make && make DESTDIR=$LFS install && ln -sv gcc $LFS/usr/bin/cc

나는 libgcc를 망쳤다고 생각하지 않습니다. 그렇지 않았다면 여기까지 도달하지 못했을 것이라고 생각합니다. 아니면 이것을 완전히 포기했습니까?

편집: 전체 make 오류에 대한 요청을 받았는데 다음과 같습니다.

대부분 make는 이전에 이 명령을 몇 번 실행했기 때문에 아무것도 하지 말라고 말합니다.

<code>
make[1]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build'
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/intl'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/intl'
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/build-x86_64-pc-linux-gnu/libiberty'
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp'
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/libiberty'
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/libbacktrace'
make  all-recursive
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/libdecnumber'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/libdecnumber'
make  all-am
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp'
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/libbacktrace'
true  DO=all multi-do # make
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/build-x86_64-pc-linux-gnu/libiberty/testsuite'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/build-x86_64-pc-linux-gnu/libiberty/testsuite'
Making all in tests
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/libbacktrace'
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/libbacktrace'
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/libiberty/testsuite'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/libiberty/testsuite'
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/build-x86_64-pc-linux-gnu/libiberty'
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests'
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/libiberty'
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/zlib'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=-static-libstdc++ -static-libgcc " "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/usr" "infodir=/usr/share/info" "libdir=/usr/lib" "prefix=/usr" "tooldir=/usr/x86_64-lfs-linux-gnu" "AR=x86_64-lfs-linux-gnu-ar" "AS=x86_64-lfs-linux-gnu-as" "CC=x86_64-lfs-linux-gnu-gcc" "CXX=x86_64-lfs-linux-gnu-g++" "LD=/mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../x86_64-lfs-linux-gnu/bin/ld" "LIBCFLAGS=-g -O2" "NM=x86_64-lfs-linux-gnu-nm" "PICFLAG=" "RANLIB=x86_64-lfs-linux-gnu-ranlib" "DESTDIR=" DO=all multi-do # make
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/zlib'
Making all in .
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests'
make[5]: Nothing to be done for 'all-am'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests'
Making all in devel
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/devel'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/devel'
Making all in mpn
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/build-x86_64-pc-linux-gnu/fixincludes'
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/mpn'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/mpn'
Making all in mpz
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/build-x86_64-pc-linux-gnu/fixincludes'
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/build-x86_64-pc-linux-gnu/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/fixincludes'
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/lto-plugin'
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/mpz'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/mpz'
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/build-x86_64-pc-linux-gnu/libcpp'
Making all in mpq
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/fixincludes'
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/mpq'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/mpq'
Making all in mpf
make  all-am
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/libcpp'
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/lto-plugin'
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/mpf'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/mpf'
Making all in rand
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/rand'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/rand'
Making all in misc
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/lto-plugin'
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/lto-plugin'
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/misc'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/misc'
Making all in cxx
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/cxx'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests/cxx'
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tests'
Making all in mpn
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/mpn'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/mpn'
Making all in mpz
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/mpz'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/mpz'
Making all in mpq
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/mpq'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/mpq'
Making all in mpf
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/mpf'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/mpf'
Making all in printf
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/printf'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/printf'
Making all in scanf
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/scanf'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/scanf'
Making all in rand
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/rand'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/rand'
Making all in cxx
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/cxx'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/cxx'
Making all in demos
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/demos'
Making all in calc
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/demos/calc'
make  all-am
make[6]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/demos/calc'
make[6]: Nothing to be done for 'all-am'.
make[6]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/demos/calc'
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/demos/calc'
Making all in expr
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/demos/expr'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/demos/expr'
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/demos'
make[5]: Nothing to be done for 'all-am'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/demos'
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/demos'
Making all in tune
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tune'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/tune'
Making all in doc
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/doc'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp/doc'
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp'
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp'
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp'
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gmp'
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr'
Making all in doc
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr/doc'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr/doc'
Making all in src
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr/src'
make  all-am
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr/src'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr/src'
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr/src'
Making all in tests
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr/tests'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr/tests'
Making all in tune
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr/tune'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr/tune'
Making all in tools/bench
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr/tools/bench'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr/tools/bench'
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr'
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpfr'
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc'
make  all-recursive
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc'
Making all in src
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/src'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/src'
Making all in tests
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/tests'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/tests'
Making all in doc
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/doc'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/doc'
Making all in tools
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/tools'
Making all in bench
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/tools/bench'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/tools/bench'
Making all in mpcheck
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/tools/mpcheck'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/tools/mpcheck'
make[5]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/tools'
make[5]: Nothing to be done for 'all-am'.
make[5]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/tools'
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc/tools'
make[4]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc'
make[4]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc'
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc'
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/mpc'
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/gcc'
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gcc'
Checking multilib configuration for libgcc...
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/libcc1'
make  all-am
make[2]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/x86_64-lfs-linux-gnu/libgcc'
make[3]: Entering directory '/mnt/lfs/sources/gcc-10.2.0/build/libcc1'
make[3]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/libcc1'
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/libcc1'
# If this is the top-level multilib, build all the other
# multilibs.
x86_64-lfs-linux-gnu-gcc --sysroot=/mnt/lfs   -g -O2 -O2 -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include  -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include   -g0  -finhibit-size-directive -fno-inline -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize -fbuilding-libgcc -fno-stack-protector    -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include  -o crtend.o -MT crtend.o -MD -MP -MF crtend.dep -fno-omit-frame-pointer -fno-asynchronous-unwind-tables  -c ../../../libgcc/crtstuff.c -DCRT_END
x86_64-lfs-linux-gnu-gcc --sysroot=/mnt/lfs   -g -O2 -O2 -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include  -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include   -g0  -finhibit-size-directive -fno-inline -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize -fbuilding-libgcc -fno-stack-protector    -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include  -o crtendS.o -MT crtendS.o -MD -MP -MF crtendS.dep -fno-omit-frame-pointer -fno-asynchronous-unwind-tables  -fpic -c ../../../libgcc/crtstuff.c -DCRT_END -DCRTSTUFFS_O
dest=../.././gcc/include/tmp$$-unwind.h; \
cp unwind.h $dest; \
chmod a+r $dest; \
sh ../../../libgcc/../move-if-change $dest ../.././gcc/include/unwind.h
rm -f libgcc.a
objects="_muldi3.o _negdi2.o _lshrdi3.o _ashldi3.o _ashrdi3.o _cmpdi2.o _ucmpdi2.o _clear_cache.o _trampoline.o __main.o _absvsi2.o _absvdi2.o _addvsi3.o _addvdi3.o _subvsi3.o _subvdi3.o _mulvsi3.o _mulvdi3.o _negvsi2.o _negvdi2.o _ctors.o _ffssi2.o _ffsdi2.o _clz.o _clzsi2.o _clzdi2.o _ctzsi2.o _ctzdi2.o _popcount_tab.o _popcountsi2.o _popcountdi2.o _paritysi2.o _paritydi2.o _powisf2.o _powidf2.o _powixf2.o _mulhc3.o _mulsc3.o _muldc3.o _mulxc3.o _divhc3.o _divsc3.o _divdc3.o _divxc3.o _bswapsi2.o _bswapdi2.o _clrsbsi2.o _clrsbdi2.o _fixunssfsi.o _fixunsdfsi.o _fixunsxfsi.o _fixsfdi.o _fixdfdi.o _fixxfdi.o _fixunssfdi.o _fixunsdfdi.o _fixunsxfdi.o _floatdisf.o _floatdidf.o _floatdixf.o _floatundisf.o _floatundidf.o _floatundixf.o _eprintf.o __gcc_bcmp.o _divdi3.o _moddi3.o _divmoddi4.o _udivdi3.o _umoddi3.o _udivmoddi4.o _udiv_w_sdiv.o cpuinfo.o sfp-exceptions.o addtf3.o divtf3.o multf3.o negtf2.o subtf3.o unordtf2.o fixtfsi.o fixunstfsi.o floatsitf.o floatunsitf.o fixtfdi.o fixunstfdi.o floatditf.o floatunditf.o fixtfti.o fixunstfti.o floattitf.o floatuntitf.o extendsftf2.o extenddftf2.o extendxftf2.o trunctfsf2.o trunctfdf2.o trunctfxf2.o getf2.o letf2.o eqtf2.o _divtc3.o _multc3.o _powitf2.o enable-execute-stack.o avx_savms64.o avx_resms64.o avx_resms64x.o avx_savms64f.o avx_resms64f.o avx_resms64fx.o sse_savms64.o sse_resms64.o sse_resms64x.o sse_savms64f.o sse_resms64f.o sse_resms64fx.o generic-morestack.o generic-morestack-thread.o morestack.o";                                  \
if test -z "$objects"; then                             \
  echo 'int __libgcc_eh_dummy;' > eh_dummy.c;           \
  x86_64-lfs-linux-gnu-gcc --sysroot=/mnt/lfs   -g -O2 -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include  -fpic -mlong-double-80 -DUSE_ELF_SYMVER  -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  -fpic -mlong-double-80 -DUSE_ELF_SYMVER  -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include  -DHAVE_CC_TLS  -DUSE_TLS -fvisibility=hidden -DHIDE_EXPORTS -c eh_dummy.c                \
     -o eh_dummy.o;                             \
  objects=eh_dummy.o;                           \
fi;                                                     \
/mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../x86_64-lfs-linux-gnu/bin/ar  rc libgcc.a $objects
/mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../x86_64-lfs-linux-gnu/bin/ranlib libgcc.a
../../../libgcc/crtstuff.c: In function '__do_global_ctors_aux':
../../../libgcc/crtstuff.c:695:12: error: '__CTOR_END__' undeclared (first use in this function); did you mean '__TMC_END__'?
  695 |   for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
      |            ^~~~~~~~~~~~
      |            __TMC_END__
../../../libgcc/crtstuff.c:695:12: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [Makefile:1035: crtendS.o] Error 1
make[2]: *** Waiting for unfinished jobs....
../../../libgcc/crtstuff.c: In function '__do_global_ctors_aux':
../../../libgcc/crtstuff.c:695:12: error: '__CTOR_END__' undeclared (first use in this function); did you mean '__TMC_END__'?
  695 |   for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
      |            ^~~~~~~~~~~~
      |            __TMC_END__
../../../libgcc/crtstuff.c:695:12: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [Makefile:1028: crtend.o] Error 1
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/x86_64-lfs-linux-gnu/libgcc'
make[1]: *** [Makefile:12920: all-target-libgcc] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build'
make: *** [Makefile:945: all] Error 2

답변1

다른 사람들도 비슷한 문제를 가지고 여기에 왔습니다. 당신은 trans-GCC를 망쳤습니다. 이 옵션이 설정 되어 있는지 확인하세요 --enable-initfini-array. 나머지 툴체인을 다시 빌드할 필요는 없지만 이에 의존하지는 않습니다.

관련 정보