![크로스 컴파일을 시도할 때 Eglibc가 개체 파일의 접미사를 컴파일할 수 없습니다.](https://linux55.com/image/24811/%ED%81%AC%EB%A1%9C%EC%8A%A4%20%EC%BB%B4%ED%8C%8C%EC%9D%BC%EC%9D%84%20%EC%8B%9C%EB%8F%84%ED%95%A0%20%EB%95%8C%20Eglibc%EA%B0%80%20%EA%B0%9C%EC%B2%B4%20%ED%8C%8C%EC%9D%BC%EC%9D%98%20%EC%A0%91%EB%AF%B8%EC%82%AC%EB%A5%BC%20%EC%BB%B4%ED%8C%8C%EC%9D%BC%ED%95%A0%20%EC%88%98%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
저는 현재 Trac의 CLFS 책을 읽고 있습니다. EGLIBC-2.15의 32비트 버전을 구성하려는 경우 다음 옵션을 사용하십시오.
BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc ${BUILD32}" \ AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \ CFLAGS="-march=$(cut -d- -f1 <<< $CLFS_TARGET32) -mtune=generic -g -O2" \ ../eglibc-2.15/configure --prefix=/tools \ --host=${CLFS_TARGET32} --build=${CLFS_HOST} \ --disable-profile --enable-add-ons \ --with-tls --enable-kernel=2.6.0 --with-__thread \ --with-binutils=/cross-tools/bin --with-headers=/tools/include \ --cache-file=config.cache
다음과 같은 결과가 나타납니다.
configure: loading cache config.cache
checking build system type... x86_64-cross-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for i686-pc-linux-gnu-gcc... x86_64-unknown-linux-gnu-gcc -m32
checking for suffix of object files... configure: error: in `/mnt/lfs/sources/eglibc-build':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
config.log의 내용은 다음과 같습니다.
configure:1879: loading cache config.cache
configure:2029: checking build system type
configure:2047: result: x86_64-cross-linux-gnuconfigure: loading cache config.cache
checking build system type... x86_64-cross-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for i686-pc-linux-gnu-gcc... x86_64-unknown-linux-gnu-gcc -m32
checking for suffix of object files... configure: error: in `/mnt/lfs/sources/eglibc-build':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
configure:2069: checking host system type
configure:2084: result: i686-pc-linux-gnu
configure:2115: checking for i686-pc-linux-gnu-gcc
configure:2142: result: x86_64-unknown-linux-gnu-gcc -m32
configure:2414: checking for C compiler version
configure:2422: x86_64-unknown-linux-gnu-gcc -m32 --version >&5
../eglibc-2.15/configure: line 2424: x86_64-unknown-linux-gnu-gcc: command not found
configure:2426: $? = 127
configure:2433: x86_64-unknown-linux-gnu-gcc -m32 -v >&5
../eglibc-2.15/configure: line 2435: x86_64-unknown-linux-gnu-gcc: command not found
configure:2437: $? = 127
configure:2444: x86_64-unknown-linux-gnu-gcc -m32 -V >&5
../eglibc-2.15/configure: line 2446: x86_64-unknown-linux-gnu-gcc: command not found
configure:2448: $? = 127
configure:2452: checking for suffix of object files
configure:2478: x86_64-unknown-linux-gnu-gcc -m32 -c -march=i686 -mtune=generic -g -O2 conftest.c >&5
../eglibc-2.15/configure: line 2480: x86_64-unknown-linux-gnu-gcc: command not found
configure:2482: $? = 127
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "glibc"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "http://sourceware.org/bugzilla/"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2496: error: in `/mnt/lfs/sources/eglibc-build':
configure:2499: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
CC 인수를 "gcc $BUILD32"로 설정하여 컴파일하려고 하면 트리플이 누락되었다고 불평하기는 하지만 더 많은 정보를 얻을 수 있습니다. 그러나 이렇게 하면 다음이 제공됩니다.
checking for __builtin_expect... no
configure: error: support for __builtin_expect needed
나는 지금 길을 잃었으므로 어떤 조언이라도 대단히 감사하겠습니다.
답변1
arm7..-gcc 경로를 수동으로 입력해야 합니다. 인식되지 않습니다 ${CLFS_TARGET}-gcc
. 대신 다음을 사용하세요.
CC="/mnt/clfs/cross-tools/bin/armv7l-unknown-linux-gnueabihf-gcc"