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の1つに宣言が必要です。

変化

CC=i686-cm-linux-gcc

到着

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

おすすめ記事