This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
(correction) gcc 4.6.1 for arm-eabi wants to use the system's as instead of arm-eabi-as
- From: Rob Emanuele <rje at crystalfontz dot com>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 29 Sep 2011 15:18:33 -0700
- Subject: (correction) gcc 4.6.1 for arm-eabi wants to use the system's as instead of arm-eabi-as
Greetings, (and apologies for the half completed email that went out prior)
I'm in process of upgrading our toolchain to binutils 2.21.1, gcc
4.6.1, and our customized newlib based on 1.19.0.
I'm building a naked gcc c compiler to build newlib. The compiler,
arm-eabi-gcc, when compiling anything tries to use "as" instead of
"arm-eabi-as".
This is a new behavior as I didn't experience this using gcc 4.3.3.
Steps to reproduce:
A tree like this:
/home/me/tools_test/
toolchain
gcc-4.6.1
binutils-2.21.1
build/
naked-gcc
naked-gcc-chain
binutils
Commands:
$ export PATH=/home/me/tools_test/toolchain/bin:/home/me/tools_test/build/naked-gcc-chain/bin:$PATH
$ cd /home/me/tools_test/build/binutils
$ ../../binutils/configure --prefix=/home/me/tools_test/toolchain/
--target=arm-eabi --disable-werror
$ make -j16
$ make install
There should be a working binutils in /home/me/tools_test/toolchain/ now.
$ cd /home/me/tools_test/build/naked-gcc
$ ../../gcc/configure
--prefix=/home/me/tools_test/build/naked-gcc-chain --target=arm-eabi
--without-headers --enable-languages="c" --with-gnu-ld --with-gnu-as
--with-newlib
$ make -j18 all-gcc
$ make install-gcc
There should be working gcc in /home/me/tools_test/build/naked-gcc-chain now.
Create a file like like test.c with something simple like this inside:
void foo(void) { }
$ arm-eabi-gcc test.c
as: unrecognized option '-meabi=5'
That's the problem there. arm-eabi-gcc -dumpspecs gives a line like
this which seems to confirm the error for me.
*invoke_as:
%{!fwpa: %{fcompare-debug=*|fdump-final-insns=*:%:compare-debug-dump-opt()}
%{!S:-o %|.s |
as %(asm_options) %m.s %A } }
So, how do I ensure it uses the correct "as" which for me should be
"arm-eabi-as".
Thank you for your help,
Rob