public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Massimiliano Cialdi <massimiliano.cialdi@powersoft.it>
To: Kai Ruottu <kai.ruottu@wippies.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Error compiling arm-elf-gcc-4.5.0
Date: Wed, 21 Apr 2010 13:44:00 -0000	[thread overview]
Message-ID: <1271834226.4541.22.camel@lab7.powersoft.it> (raw)
In-Reply-To: <4BCDD104.1020401@wippies.com>

Il giorno mar, 20/04/2010 alle 19.06 +0300, Kai Ruottu ha scritto:
> 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!
No path variable is correctly set.

more precsely I have done the following steps:
export INSTALLDIR=/usr/local/cross-gcc-arm-elf-4.5.0

mkdir build-binutils
cd build-binutils 
../binutils-2.20.1/configure --target=arm-elf --prefix=${INSTALLDIR}
make -j5 all
sudo make install

cd ../gcc-4.5.0 
ln -s ../newlib-1.18.0/newlib . 
ln -s ../newlib-1.18.0/libgloss . 
cd .. 
mkdir build-gcc && cd build-gcc 
../gcc-4.5.0/configure --enable-languages=c,c++ --target=arm-elf
--with-gnu-as --with-gnu-ld –prefix=${INSTALLDIR} --with-newlib
--disable-shared --enable-newlib –enable-multilib --enable-interwork
--disable-threads --disable-nls --enable-libstdcxx-allocator=malloc
--with-mpc=/usr/local/mpc
make -j5 all


I have the error:
checking for exported
symbols... /usr/local/cross-gcc-arm-elf-4.5.0/arm-elf/bin/objdump:
conftest: File format not recognized
checking for
-rdynamic... /usr/local/cross-gcc-arm-elf-4.5.0/arm-elf/bin/objdump:
conftest: File format not recognized


$ echo $PATH
/opt/jdk1.6/bin:/opt/eclipse:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

So I first build and install binutils 2.20.1 for arm without problems,
then I try to build gcc (as said I have satic mpc 0.8.1 library) with
that error

bye

  reply	other threads:[~2010-04-21  7:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 15:23 Massimiliano Cialdi
2010-04-20 16:37 ` Kai Ruottu
2010-04-21  7:17   ` Massimiliano Cialdi
2010-04-21 13:21     ` Kai Ruottu
2010-04-21 13:44       ` Massimiliano Cialdi [this message]
2010-04-21 14:52         ` Kai Ruottu
2010-04-22 13:55           ` Kai Ruottu
     [not found]             ` <BLU124-W8C43C3FDBE76D44D97CBDC2080@phx.gbl>
2010-04-23 17:31               ` Kai Ruottu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1271834226.4541.22.camel@lab7.powersoft.it \
    --to=massimiliano.cialdi@powersoft.it \
    --cc=gcc-help@gcc.gnu.org \
    --cc=kai.ruottu@wippies.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).