This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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 about build toolchain with crosstool-ng-1.8.0


Loody, All,

On Wednesday 15 September 2010 21:12:43 loody wrote:
> > Loody, please clarify what you are trying to do.
> The "new dynamic linker" I mean is is exactly what Arnaud said
> "lib/ld-uClibc.so.0".

OK.

> And I did find it doesn't work when i try to run the generated
> binaries on my build machine.

It's not gonna work at all. Crosstool-NG generates toolchains for
cross-compilation. That your build machine is the same kind as your
target is just hapenstance...

Of course, if you consider your build machine to _be_ the target,
you will need a bit of setup before it works.

> it comes to my mind that I can solve this problem with several ways.
> 1. chroot -- time-consuming

That pretty easy, in fact. You can do a quick-n-dirty test with a few
commands:
  CHROOT="/some/where/chroot"
  cp -a ....../sysroot "${CHROOT}"
  mkdir -p "${CHROOT}/bin"
  cp your-program "${CHROOT}/bin"
  sudo chroot "${CHROOT}/bin/your-progam"

Of course, that's not the proper way to do that in the long run...

> 2. create a link from my /lib/ to sys-root/lib/ld-uClibc.so.0 -- but
> it seems I will need to do so for every new toolchain.

Nah. That will do nothing but polute your build machine. And you can't
use multiple toolchains at the same time.

Besides, when you later try to build a new toolchain, gcc et al. might get
confused if/when they find the dynamic linker in this place. 

3. Use a tool like, say, buildroot to build a basic/complete kernel+userland,
and use a virtual machine, such as QEMU to boot that userland. That takes a
bit of time, but offers a wide range of possibilities!

4. Variation on the above: use a real machine.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



--
For unsubscribe information see http://sourceware.org/lists.html#faq


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