我想建立的binutils 2.19.1使用下面的命令的MinGW/MSYS:無法建立的binutils我的交叉編譯
export PREFIX=/usr/local/cross
export TARGET=i586-elf
cd /usr/src
mkdir build-binutils
cd /usr/src/build-binutils
../binutils-x.xx/configure --target=$TARGET --prefix=$PREFIX --disable-nls
make all
make install
,並即時得到以下錯誤:
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binuti
ls-2.19.1/bfd -I. -D__USE_MINGW_FSEEK -I. -I../../binutils-2.19.1/bfd -I../..
/binutils-2.19.1/bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-proto
types -Wno-format -Werror -g -O2 -D__USE_MINGW_ACCESS -c -o archive.lo ../../bin
utils-2.19.1/bfd/archive.c
./libtool: line 2258: cygpath: command not found
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19.1/bfd -I. -D__U
SE_MINGW_FSEEK -I. -I../../binutils-2.19.1/bfd -I../../binutils-2.19.1/bfd/../in
clude -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-format -Werror -g -
O2 -D__USE_MINGW_ACCESS -c "" -o archive.o
gcc.exe: error: : No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
make[3]: *** [archive.lo] Error 1
make[3]: Leaving directory `/usr/src/build-binutils/bfd'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/usr/src/build-binutils/bfd'
make[1]: *** [install-bfd] Error 2
make[1]: Leaving directory `/usr/src/build-binutils'
make: *** [install] Error 2
/x.sh: line 8: ../gcc-4.5.0/configure: No such file or directory
make: *** No rule to make target `all-gcc'. Stop.
make: *** No rule to make target `install-gcc'. Stop.
我是得到同樣的錯誤,即使是DIFF binutils的版本,我已經嘗試過的binutils-2.19.1,2.22.0,2.23.1 所以什麼都可以的問題? 也是我的MinGW的gcc編譯器版本是4.6.2
我也一直在嘗試,命令
make CFLAGS="-Os -w"
BT還是一樣的問題仍然存在
有這個答案,但它更多的建議,所以回答刪除。似乎gcc正在尋找封裝在cwd下的兩個目錄。例如-I ../../ binutils-2.19.1/bfd在行中: gcc -DHAVE_CONFIG_H -I。 -I ../../的binutils-2.19.1/BFD 也許你已經設置環境變量錯了嗎? LFS建議從另一個目錄運行./configure http://lfs.loc/chapter05/binutils-pass1.html –