[lsb-discuss] Thoughts on using lsb-sdk for cross compiler toolchain?

Gregory Fong gregory.0xf0 at gmail.com
Mon Aug 26 23:23:54 UTC 2013


Hi all,

I'm trying to build a cross compiler toolchain to have binaries that
are widely compatible across ia32 and x86_64 distributions (assuming
the distro-provided 32-bit compat libraries are installed).  The
method that has been used up until this point to build the toolchain
is building inside a chroot containing an old version of Red Hat.
However, this makes it troublesome to build, because you have to
either have that chroot to build a widely compatible toolchain or
build a toolchain that will only work on newer distributions.

I have been working on using the LSB SDK to build the toolchain
instead, targeting the LSB 3.0 spec for maximum backward
compatibility, and have had some amount of success: everything besides
gdb can be built without issue, and the LSB app checker claims that it
ought to run on everything but RHEL 3 Update 4 (which is old enough to
not really be of concern).

As far as I can tell from the gdb-less toolchain right now, the advantages are:
- the toolchain can now be built more easily, making it easier for
other people to contribute to development

Some negatives:
- gdb/readline expects a few symbols to be exported from ncurses that
aren't provided in the LSB stub library (PC, UP, SP), which will make
for an ugly workaround
- a few packages needed patching to add #define statements not present
in LSB 3.0 headers
- the resulting binaries are not _quite_ as widely compatible as with
the established process of building from an old Red Hat chroot


Has anyone else gone down this before path and reached a conclusion?
Any input on the matter would be greatly appreciated.

Thanks and regards,

Gregory


More information about the lsb-discuss mailing list