i686-cm-linux-gcc: 명령을 찾을 수 없습니다

i686-cm-linux-gcc: 명령을 찾을 수 없습니다

OpenWRT를 크로스 컴파일할 때 OpenWRT의 툴체인을 툴체인 i686 아키텍처로 대체했습니다. 그러나 아래에 언급된 오류가 발생합니다.

make[5]: Leaving directory `/home/hclintel/pankaj/fresh/trunk/build_dir/target-i386_i486_musl-1.1.10/linux-x86_generic/linux-3.18.18'
./scripts/gcc-version.sh: line 25: i686-cm-linux-gcc: command not found
./scripts/gcc-version.sh: line 26: i686-cm-linux-gcc: command not found
make[5]: Entering directory `/home/hclintel/pankaj/fresh/trunk/build_dir/target-i386_i486_musl-1.1.10/linux-x86_generic/linux-3.18.18'
arch/x86/Makefile:114: stack-protector enabled but compiler support broken
Makefile:657: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
make[5]: i686-cm-linux-gcc: Command not found
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      kernel/bounds.s
/bin/sh: 1: i686-cm-linux-gcc: not found
make[6]: *** [kernel/bounds.s] Error 127
make[5]: *** [prepare0] Error 2
make[5]: Leaving directory `/home/hclintel/pankaj/fresh/trunk/build_dir/target-i386_i486_musl-1.1.10/linux-x86_generic/linux-3.18.18'
make[4]: *** [/home/hclintel/pankaj/fresh/trunk/build_dir/target-i386_i486_musl-1.1.10/linux-x86_generic/linux-3.18.18/.modules] Error 2
make[4]: Leaving directory `/home/hclintel/pankaj/fresh/trunk/target/linux/x86'
make[3]: *** [compile] Error 2
make[3]: Leaving directory `/home/hclintel/pankaj/fresh/trunk/target/linux'
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory `/home/hclintel/pankaj/fresh/trunk'
make[1]: *** [/home/hclintel/pankaj/fresh/trunk/staging_dir/target-i386_i486_musl-1.1.10/stamp/.target_compile] Error 2
make[1]: Leaving directory `/home/hclintel/pankaj/fresh/trunk'
make: *** [world] Error 2
hclintel@hclintel-ThinkCentre-M73:~/pankaj/fresh/trunk$ 

을 실행하면 echo $PATH아래와 같은 결과를 얻습니다.

/home/hclintel/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

구성 파일에서 경로를 수정해야 할 것 같은데, 경로를 수정할 수 있는 적절한 위치를 찾을 수 없습니다.

답변1

1) i686-cm-linux-gcc가 어디에 있는지 찾아야 합니다.

2) OpenWRT를 어떻게 구축하셨나요? 내 추측은 Make를 통한 것입니다. 이렇게 하려면 Makefile을 편집하고 그 안에 경로를 추가해야 합니다. 컴파일러가 배포되는 Makefile 중 하나에 선언이 있어야 합니다.

변화

CC=i686-cm-linux-gcc

도착하다

CC=/path/to/i686-cm-linux-gcc

관련 정보