[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: compiling 32-bit binaries: chroot ia32-libs libc6-dev-i386 cross-compiling /usr/bin/ld libc.so



Dear Goswin,

Thanks for answering my questions.  I have a few comments and I have
a few more questions for you.  Hopefully simple...

> 3)  The:  gcc -m32  and chroot libs  solution
>
> ...  Omitted
>
I would install libc6-dev-i386 to get around that problem. I think
libc6 is the only common library having a linker script as .so file.

I haven't checked other common libraries, but if this is indeed the
case then that solves most of my problems.  I have only compiled
simple hello.c like stuff using this method, and ld will run the link
scripts from libc6-dev-i386, however, during execution, the
dynamic linker is still able to pull libraries from my chroot.  So this
is relatively clean, i.e. I can manage all my 32-bit libraries from the chroot
environment, and still build 32-bit execs from the 64-bit environment.

> 4)  The:  cross-compile toolchain
>
> ... omitted

That is rather complicated and would require you to setup
cross-compile versions of all libraries you need.

At that point it is way easier to create a new ia32-libs-something[-dev]
package that converts the libs you need to use
/emul/ia32-linux/usr/lib. You can use ia32-libs as template and
probably just have to adjust the package list and depend on ia32-libs.

Is there a howto page or link you might be aware of that goes through
the process of creating such packages?  In particular, how to take an
existing package as template and build up from that.

Thanks again.



Reply to: