This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Error compiling arm-elf-gcc-4.5.0


20.4.2010 18:23, Massimiliano Cialdi kirjoitti:

Il giorno mar, 20/04/2010 alle 17.23 +0300, Kai Ruottu ha scritto:
I have configured as follows:
configure --enable-languages=c,c++ --target=arm-elf --with-gnu-as
--with-gnu-ld --prefix=path-to/arm-elf-gcc-4.5.0

The given $prefix should be some 'absolute' pathname, the default is '/usr/local' when no '--prefix=$prefix' is given. Yours is 'relative' to some directory.
path-to/arm-elf-gcc-4.5.0
is only a placeholder, not the true prefix path.
The actual prefix is /usr/local/cross-gcc-arm-elf-4.5.0
>
> Yes, I have previously built binutils 2.20.1 for arm target


Ok...


> when I make all I get the following error:
>
> Links are now set up to build a cross-compiler
> from x86_64-unknown-linux-gnu to arm-unknown-elf.
> checking for exported symbols...
> path-to/arm-elf-gcc-4.5.0/arm-elf/bin/objdump: conftest: File format not
> recognized
> checking for -rdynamic... path-to/arm-elf-gcc-4.5.0/arm-elf/bin/objdump:
> conftest: File format not recognized

Probably the native 'objdump' should be used here, not the 'arm-elf'
one... The code in 'gcc/configure' for this seems to be the :

-------------------- clip -----------------------------------
pluginlibs=
if test x"$enable_plugin" = x"yes"; then

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exported symbols" >&5
$as_echo_n "checking for exported symbols... " >&6; }
echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
: # No need to use a flag
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic" >&5
$as_echo_n "checking for -rdynamic... " >&6; }
${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1
if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
pluginlibs="-rdynamic"
else
enable_plugin=no
fi
fi
-------------------- clip -----------------------------------


The native GCC compiles and links a program and then the executable
will be looked with 'objdump'...

So my guess is that you have somehow messed your environment :(
For instance putting the '$prefix/$target/bin' into your PATH
before the '/usr/bin' where the native 'objdump' usually is...

Why you would do a weird thing like this, I cannot guess... If
some instruction somewhere told to do this, please tell us!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]