public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Compiling U-boot using ELDK on Mandrake9.1
Date: 31 Jul 2003 20:17:36 +0200	[thread overview]
Message-ID: <87n0euftmn.fsf@deepthought.outer.space.org> (raw)
In-Reply-To: <Law10-F62HLBQhExkiy00003d8f@hotmail.com>

Hello Ciaran,

You can search the mailing list archve for "libbfd" problems.  The
problem was seen on Debian systems too some time ago....

>       I am a student trying to get u-boot0.4.0 up and running on an
> MPC8266ADS board using ELDK as a cross compiler. I managed to get the ELDK
> installed what seems to be problem free. I am trying to cross compile
> u-boot0.4.0 for the MPC8266ADS development board.  I have a Host PC running
> Mandrake 9.1 which I notice is about the only distribution that eldk has not
> been tested with. Has anyone managed to get u-boot0.4.0 compiled on Mandrake
> or can anyone tell me what the problem is in the astest.o symbol at the end
> of the Makefile output below? There seems to be some problem with the
> /opt/eldk/ppc_82xx/usr/lib/libbfd.so.  Previously I have used a hardhat
> cross-compiler and noticed that it was using /libbfd.a as opposed to
> /libbfd.so.  Do I need to export the symbols from libbfd.so?  Any help would
> be greatly appreciated...

> HOSTARCH := ppc
> 
> ifndef CROSS_COMPILE
> ifeq ($(HOSTARCH),ppc)
> CROSS_COMPILE = /opt/eldk/usr/bin/ppc_82xx-
> else
> ifeq ($(ARCH),ppc)
> CROSS_COMPILE = ppc_8xx-
> endif

Huh, this means that if your _host_ is a PowerPC system and your want
to compile code for PowerPC _target_ systems you use a cross-compiler?
I don't think that's what you wanted to do.....

> And in the ./tools/gdb/Makefile I have updated the path as follows:
> 
> astest:         astest.o error.o
>                 $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
> -L$(BFD_ROOT_DIR)/lib -L /opt/eldk/ppc_82xx/usr/lib -lbfd -liberty


[...]

> gcc -Wall -pedantic -O -I/opt/eldk/ppc_82xx/include -I
> /opt/eldk/ppc_82xx/lib  -o astest astest.o error.o -L/opt/eldk/ppc_82xx/lib
> -L /opt/eldk/ppc_82xx/usr/lib -lbfd -liberty
> /opt/eldk/ppc_82xx/usr/lib/libbfd.so: could not read symbols: Invalid
> operation
> collect2: ld returned 1 exit status

AS you see, you are using the native compiler to compile astest.c
while you want to use the library from the ELDK cross-compiler.  Use
the correct library or simply "touch tools/gdb/astest" as you're not
likely to use this tool anyway.

Cheers
  Detlev

-- 
LISP is the most powerful programming language, and if you want an inter-
preter, LISP is the best.  None of the other languages come anywhere near
LISP in their power.  The most exciting things about LISP are read, eval,
and print.  If you look at other languages,  they have no equivalent for
any of those.                             -- Richard Stallman

      reply	other threads:[~2003-07-31 18:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-30 12:04 [U-Boot-Users] Compiling U-boot using ELDK on Mandrake9.1 C Doyle
2003-07-31 18:17 ` Detlev Zundel [this message]

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=87n0euftmn.fsf@deepthought.outer.space.org \
    --to=dzu@denx.de \
    --cc=u-boot@lists.denx.de \
    /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