Architecture Problems on Sun Ultra-5 Installing LFS-5.1.1

Ken Moffat ken at kenmoffat.uklinux.net
Wed Feb 23 08:54:11 PST 2005


On Wed, 23 Feb 2005, Mike Liford wrote:

>
> In Chapter 6, I installed the Sparc64 Linux-2.4 headers in /usr/include.
> I tried to compile Glibc and got architecture errors. I tried passing
> CFLAGS="-mcpu=v9" to the compiler. However, the linking command does not
> appear to pick up the flag settings.
>

Hi Mike,

 As I said before, I know nothing about sparc, but are these the right
headers ?  If you're going to build a 64-bit kernel then that would need
different definitions of things from the 32-bit userspace, so _maybe_
you need two sets of headers (one for when you build a 64-bit toolchain,
another for the regular 32-bit userspace).  I'm sort of thinking you've
got to do some bi-arch stuff.  Take a look at Ryan's Cross-Lfs scripts
(http://www.linuxfromscratch.org/~ryan/scripts/cross-lfs) - use the
latest version of hte scripts.

> Here is the end result of attempting to compile with CFLAGS and CXXFLAGS
> unset, using the Sparc64 kernel headers, and running configure as shown
> in Chapter 6 for Glibc. The configure script is choosing the host and
> build system as "sparc64-unknown-linux-gnu".
>

Looking at gentoo stuff (e.g. glibc-2.3.2-r12.ebuild - google for it,
use wherever is nearest to you if it returns more than one) I get the
impression that the 32-bit build needs --host=sparcv9-unknown-linux-gnu
which ought to pass -mcpu=ultrasparc -Wa -Av9a to gcc.

Hopefully, finding this ebuild script will drop you into a gentoo
portage tree. glibc is in sys-libs/, binutils and gcc are in sys-devel/,
and I can see that 64-bit compilers for the kernel (egcs64-sparc,
gcc-sparc64) are separated.  It looks as if they have some experience
with sparc, so I suggest seeing what you can learn from the flags they
are using.

HTH.

Ken

-- 
 das eine Mal als Tragödie, das andere Mal als Farce




More information about the lfs-support mailing list