Subject: Cross-compiling

From: Alex Holden <[email-masked]>
Date: Sun, 6 Sep 1998 15:02:31 +0100 (BST)

Can somebody who has managed to build a working cross-compiler from
i586 Linux elf to ARM Linux a.out to compile the Linux-Brutus kernel 
please tell me what else I need besides gcc and binutils (Libc and Libc
headers?) and where I can get them from.
I've looked through ftp.arm.uk.linux.org and not found the Libc in there
anywhere. I've also got the cross compiler to compile and appear to work
(but it fails to link the kernel, with hundreds of missing symbol errors).

Thanks a lot, Alex.

--------------- Linux- the choice of a GNU generation. --------------
: Alex Holden (M1CJD)- Caver, Programmer, Land Rover nut, Radio Ham :
-------------------- http://www.linuxhacker.org/ --------------------

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Sun, 6 Sep 1998 17:08:50 +0100 (BST)

> (but it fails to link the kernel, with hundreds of missing symbol errors).

Did you manage to get a libgcc.a from the compiler?  If the symbols
were like __umulsi, then it's probably not installed properly.  Could
you check this please?
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.uk.linux.org/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
k
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Alex Holden <[email-masked]>
Date: Mon, 7 Sep 1998 18:10:48 +0100 (BST)

> were like __umulsi, then it's probably not installed properly.  Could

I've attached a gzipped copy of 'nm libgcc.a', though I think the targets
were set up wrong at the time when I made that one. Since I started
messing around with the headers (I set up the links to the arm links in
the linux-brutus kernel) I haven't been able to get it to compile again.
Do I need the headers from the arm libc? If so, where can I get them from?

Thanks a lot, Alex.

---

From: Philip Blundell <[email-masked]>
Date: Mon, 07 Sep 1998 19:39:03 +0100

>Do I need the headers from the arm libc? If so, where can I get them from?

Basically yes (I imagine you can get them from the libc4-devel package which 
is probably on the ftp site) but you may be able to fudge things so it works 
by adding "#define inhibit_libc" to tconfig.h in the gcc build directory.

p.

---

From: Alex Holden <[email-masked]>
Date: Tue, 8 Sep 1998 00:33:06 +0100 (BST)

> by adding "#define inhibit_libc" to tconfig.h in the gcc build directory.

I suspected that was what the problem was, but unfortunately there seems
to be nothing like libc-devel.rpm or libc4-devel.rpm anywhere on the
arm.uk.linux.org ftp site (I assume there isn't another one I don't know
about?).
I'll try the define trick you suggested and let you know if it works
tomorrow.

Thanks, Alex.

---

From: Stefan Hanske <[email-masked]>
Date: Tue, 8 Sep 1998 16:54:05 +0200 (METDST)

> arm.uk.linux.org ftp site (I assume there isn't another one I don't know

The package is named arm-aoutlibs-devel or something similar... Try that one.

----------------------------------------------------------
|mailto: Stefan Hanske ([email-masked] |
|WWW : http://www.rzuser.uni-heidelberg.de/~shanske      |
|phone: I'm not silly                                    |
|--------------------------------------------------------|
| And don't forget to remember what you remembered not   |
| to forget to remember...				 |
----------------------------------------------------------

---

From: Alex Holden <[email-masked]>
Date: Tue, 8 Sep 1998 18:02:23 +0100 (BST)

> I'll try the define trick you suggested and let you know if it works

It seemed to partly work, if I edited the makefiles to stop objective C
and some other things which needed the headers from being compiled, but
I'm still having problems (and I will need the C library and headers
anyway when I come around to compiling anything with it).
Russell, do you know why the libc4 RPMs aren't on the FTP site (or if
they are, could you point out where they are)?

Thanks a lot, Alex.

---

From: Alex Holden <[email-masked]>
Date: Tue, 8 Sep 1998 18:07:03 +0100 (BST)

> The package is named arm-aoutlibs-devel or something similar... Try that one.

Ah, I noticed that but thought it was a library for dealing with AOUT
executables or something. I wonder why it isn't named libc-devel
something?

Thanks a lot, Alex.

---

From: Philip Blundell <[email-masked]>
Date: Tue, 08 Sep 1998 19:09:27 +0100

>I'm still having problems (and I will need the C library and headers

Yeah, that's pretty much it.  The inhibit_libc trick is useful for an initial 
bootstrap so that you can get enough of a compiler to build the C library but 
you will need a real libc sooner or later.

p.

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Tue, 8 Sep 1998 23:19:06 +0100 (BST)

> they are, could you point out where they are)?

You want the arm-aout-libs package:

src@raistlin:[linux]:<544> rpm -qi arm-aout-libs
Name        : arm-aout-libs               Distribution: (none)
Version     : 1.0                               Vendor: (none)
Release     : 1                             Build Date: Sat Apr 05 16:22:26 1997
Install date: Sat Apr 26 21:51:53 1997   Build Host: raistlin
Group       : Libraries                     Source RPM: arm-aout-libs-1.0-1.src.rpm
Size        : 1059967
Summary     : Linux C Librarys (libc)
Description :
These are the shared C Library, math library and curses libraries for Linux.
src@raistlin:[linux]:<545> rpm -qi arm-aout-libs-devel
Name        : arm-aout-libs-devel         Distribution: (none)
Version     : 4.6.27                            Vendor: (none)
Release     : 1a4                           Build Date: Sat May 31 18:24:02 1997
Install date: Sat May 31 18:29:53 1997   Build Host: raistlin
Group       : Development/Libraries         Source RPM: arm-aout-libs-4.6.27-1a4.src.rpm
Size        : 6210074
Summary     : Linux C Librarys for development
Description :
These are the development library stubs for Linux.

   _____

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Tue, 8 Sep 1998 23:21:30 +0100 (BST)

> executables or something. I wonder why it isn't named libc-devel

It's not just libc, but libcurses and libtermcap.  It seemed right for it
not to clash with any other libc's that may be produced.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.uk.linux.org/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Matthew Wilcox <[email-masked]>
Date: Wed, 9 Sep 1998 02:14:09 +0200

> and some other things which needed the headers from being compiled, but

Tsk, in the section of the install notes about building a crosscompiler,
it tells you to type `make LANGUAGES=c' which won't build Objective C or
C++.

> anyway when I come around to compiling anything with it).

Only if you're compiling userland stuff.  Kernels _should_ build without
any ordinary headers.

> they are, could you point out where they are)?

You could just copy them from your armlinux box.  Remember to include
not just /usr/include but also /usr/arm-unknown-linuxaout/include too -
overwrite the ones from /usr/include with the others since they're looked
for first.

-- 
Matthew Wilcox <[email-masked]>
"I decry the current tendency to seek patents on algorithms.  There are
better ways to earn a living than to prevent other people from making use of
one's contributions to computer science."  -- Donald E. Knuth, TAoCP vol 3
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]