From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30184 invoked by alias); 21 Apr 2010 07:17:22 -0000 Received: (qmail 30163 invoked by uid 22791); 21 Apr 2010 07:17:20 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=BAYES_00,TW_CX,TW_DC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail3.powersoft.it (HELO mail.powersoft.it) (82.104.164.178) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Apr 2010 07:17:11 +0000 Subject: Re: Error compiling arm-elf-gcc-4.5.0 From: Massimiliano Cialdi To: Kai Ruottu Cc: gcc-help@gcc.gnu.org In-Reply-To: <4BCDD104.1020401@wippies.com> References: <1271753344.7037.15.camel@lab7.powersoft.it> <4BCDB8FD.4050206@wippies.com> <1271777011.7037.58.camel@lab7.powersoft.it> <4BCDD104.1020401@wippies.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Apr 2010 13:44:00 -0000 Message-ID: <1271834226.4541.22.camel@lab7.powersoft.it> Mime-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg00216.txt.bz2 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 : >=20 > -------------------- clip ----------------------------------- > pluginlibs=3D > if test x"$enable_plugin" =3D x"yes"; then >=20 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exported=20 > 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 >=20 > /dev/null 2>&1 > if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then > pluginlibs=3D"-rdynamic" > else > enable_plugin=3Dno > fi > fi > -------------------- clip ----------------------------------- >=20 > The native GCC compiles and links a program and then the executable > will be looked with 'objdump'... >=20 > 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... >=20 > 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=3D/usr/local/cross-gcc-arm-elf-4.5.0 mkdir build-binutils cd build-binutils=20 ../binutils-2.20.1/configure --target=3Darm-elf --prefix=3D${INSTALLDIR} make -j5 all sudo make install cd ../gcc-4.5.0=20 ln -s ../newlib-1.18.0/newlib .=20 ln -s ../newlib-1.18.0/libgloss .=20 cd ..=20 mkdir build-gcc && cd build-gcc=20 ../gcc-4.5.0/configure --enable-languages=3Dc,c++ --target=3Darm-elf --with-gnu-as --with-gnu-ld =E2=80=93prefix=3D${INSTALLDIR} --with-newlib --disable-shared --enable-newlib =E2=80=93enable-multilib --enable-interwork --disable-threads --disable-nls --enable-libstdcxx-allocator=3Dmalloc --with-mpc=3D/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