我的UBUNTU里随光盘就安装有GCC ,。是一个比较新的版本
我在网上下载了一个交叉编译的一套包,是编译 ARC的。。我是想用来开发ARC的固件。
解压后里面有几个文件夹 [img]PICTURE:/home/diro/.tencent/qq//AppData/file//sendpix0.jpg[/img]PICTURE:/home/diro/.tencent/qq//AppData/file//sendpix0.jpg 按REANDME.ARC里提示的去安装。。 ./configure 可以通过,但make 时出现错误 ..........以上跑了好多了 checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU configure: error: source directory already configured; run "make distclean" there first make[1]: *** [configure-bfd] 错误 1 make[1]:正在离开目录 `/home/diro/arcbuild/ARC/binutils' make: *** [all] 错误 2 diro@diro-laptop:~/arcbuild/ARC/binutils$ diro@diro-laptop:~/arcbuild/ARC/binutils$
按这里提示的错误* [configure-bfd] 错误 1 在MAKEFILE里找在这里面有太多的这个提示了 .PHONY: configure-host configure-host: \ maybe-configure-ash \ maybe-configure-autoconf \ maybe-configure-automake \ maybe-configure-bash \ maybe-configure-bfd \ maybe-configure-opcodes \ maybe-configure-binutils \
.PHONY: configure-bfd maybe-configure-bfd maybe-configure-bfd: maybe-configure-bfd: configure-bfd configure-bfd: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ $(HOST_EXPORTS) \ echo Configuring in $(HOST_SUBDIR)/bfd; \ cd "$(HOST_SUBDIR)/bfd" || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ srcdiroption="--srcdir=$${topdir}/bfd"; \ libsrcdir="$$s/bfd"; \ $(SHELL) $${libsrcdir}/configure \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} $${srcdiroption} \ || exit 1
.PHONY: all-bfd maybe-all-bfd maybe-all-bfd: TARGET-bfd=all maybe-all-bfd: all-bfd all-bfd: configure-bfd @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/bfd && \ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bfd))
还有一些 我就不贴上来了
readme.arc里是这样提示的 I) Building /Installing =======================
Building is best done is a separate directory to the source tree, this enables quick and clean re-configurations/rebuilds as your needs change.
Un-tar/zip the distribution. Create a build directory, and change into that directory:
$ mkdir build $ cd build
这一块我就问题:我没有mkdir 这个 BUILD 因为BINTUILS这个文件夹里有这个BUILD 如果我 cd build,那不是没办法./configure 我的源代码的路径是这里 /home/diro/arcbuild/ARC/binutils'
binutils 下有 SRC 和BUILD两年文件夹
Binutils can be configured to support one of two target types - 'arc-elf32' and 'arc-linux-uclibc'. The former is for 'bare-metal' builds, the latter is for building user mode Linux applications, to be linked against the uClibc library.
Configure the build, and specify where you want it to be installed (e.g. /opt/arc):
$ ../src/configure --target=arc-elf32 --prefix=/opt/arc --disable-werror ..or.. $ ../src/configure --target=arc-linux-uclibc --prefix=/opt/arc --disable-werror
Make and install
$ make $ make install
|