public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: cross-compiler build: can't find stdio.h
@ 1998-09-23 12:43 John Breen
  1998-09-23 22:20 ` Bill Currie
  0 siblings, 1 reply; 5+ messages in thread
From: John Breen @ 1998-09-23 12:43 UTC (permalink / raw)
  To: egcs



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cross-compiler build: can't find stdio.h
  1998-09-23 12:43 cross-compiler build: can't find stdio.h John Breen
@ 1998-09-23 22:20 ` Bill Currie
  0 siblings, 0 replies; 5+ messages in thread
From: Bill Currie @ 1998-09-23 22:20 UTC (permalink / raw)
  To: John Breen; +Cc: egcs

Unfortunatly, Netscape butchered your mail (broke it in two parts)

For my setup, I copied the system files (headers and libs) from the
target machine to my build machine (the target machine produces poor
code and isn't ansi compliant, no prototypes, also the target is NOT
nice to work on) and stashed them is a `safe place'
($HOME/mtos/{include,lib}).  I then gave configure the location of these
dirs using the appropriate switchs (--with-{headers,libs}).  Either
configure or make (not sure which one does it) will copy the headers to
the installation directory prior to building any of the libs (I had
reported a problem with this, but it seems to have been me rather than
egcs).

By virgin build, do you mean you have no libs at all?  In that case you
will be better off using newlib which IS documented in the cross faq
(findable from the egcs faq).  You may have to provide a set of system
calls, I think, depends on the actual os you're targetting.

As to the missing `all' rule, I have no idea.  I would suggest
reconfiguring from a clean slate, but I suspect it's something wrong
with configure as I didn't have this problem.  My problem was none of
the libs would build due to missing headers/definitions (no sys/*), so I
disabled the lot (shouldn't be needing them right now anyway, but it
would have been nice having them).  I had to hack up some headers as it
was (there was no stdlib.h!).

I hope that helps
Bill
-- 
Leave others their otherness

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cross-compiler build: can't find stdio.h
  1998-09-22  9:45 John Breen
@ 1998-09-22 19:31 ` Bill Currie
  0 siblings, 0 replies; 5+ messages in thread
From: Bill Currie @ 1998-09-22 19:31 UTC (permalink / raw)
  To: John Breen; +Cc: egcs

John Breen wrote:
> 
> I thought I'd seen this asked before, but I searched the FAQ and the
> archive titles three months back, and didn't see it.

That was me, and no, there's nothing in the FAQ on this (Jeff said it's
WAAY out of date as well).

> I'm trying to build egcs-1.1a for m68k-elf (NOTE: since egcs doesn't
> currently support m68k-elf, I'm using my own hacked .h files, based on a
> patch from gcc-2.7.2.2; but I don't think that's the problem).  I
> finally started getting close, but now it's dying while building
> libiberty because it can't find stdio.h.

Almost exact simptom I had, except it was stdlib.h and unistd.h I think.

> When I built gcc-2.7.2.2 m68k-elf, the "cygnus patch" had something
> about removing the need for stdio.h.  Doesn't egcs have something
> similar?  I do have the headers from the gcc-2.7.2.2 build (although on
> another system); should I copy them over and use --with-headers?  Or did
> I possibly do something wrong?

Yes, you should use --with-headers=... to specifiy the location of your
target include tree and --with-libs=... to specifiy the location of your
target lib tree.  These get copied into to target specific installation
directory.

Here's an example (using one tree for the tool chain, separate directory
for build):
../src/configure --prefix=$HOME --target=m68k-tekelec-mtos
--with-headers=$HOME/mtos/include --with-libs=$HOME/mtos/lib

Note: I haven't submitted the patches for m68k-tekelec-mtos yet (hasn't
been properly tested yet), but it's just a copy of m68k-*-aout with some
tweaks in gcc to use slightly different defaults.  However, I imagine
you don't really care as you're going for m68k-*-elf.

HTH
Bill
-- 
Leave others their otherness

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cross-compiler build: can't find stdio.h
@ 1998-09-22 14:12 Mike Stump
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Stump @ 1998-09-22 14:12 UTC (permalink / raw)
  To: egcs, jab3

> From: "John Breen" <jab3@hotmail.com>
> To: egcs@cygnus.com
> Date: Tue, 22 Sep 1998 08:51:45 PDT

> should I copy them over and use --with-headers?

You must always compile cross compilers with --with-headers, unless
you arrange for them some other way.  These header must have all the
headers that gcc needs, you can discover which ones it needs by trying
to build.

Yes, this is a FAQ, and yes, someone should document it, if it isn't.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* cross-compiler build: can't find stdio.h
@ 1998-09-22  9:45 John Breen
  1998-09-22 19:31 ` Bill Currie
  0 siblings, 1 reply; 5+ messages in thread
From: John Breen @ 1998-09-22  9:45 UTC (permalink / raw)
  To: egcs

I thought I'd seen this asked before, but I searched the FAQ and the 
archive titles three months back, and didn't see it.

I'm trying to build egcs-1.1a for m68k-elf (NOTE: since egcs doesn't 
currently support m68k-elf, I'm using my own hacked .h files, based on a 
patch from gcc-2.7.2.2; but I don't think that's the problem).  I 
finally started getting close, but now it's dying while building 
libiberty because it can't find stdio.h.

When I built gcc-2.7.2.2 m68k-elf, the "cygnus patch" had something 
about removing the need for stdio.h.  Doesn't egcs have something 
similar?  I do have the headers from the gcc-2.7.2.2 build (although on 
another system); should I copy them over and use --with-headers?  Or did 
I possibly do something wrong?

Thanks.
--
John A. Breen
jab3@hotmail.com


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-09-23 22:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-23 12:43 cross-compiler build: can't find stdio.h John Breen
1998-09-23 22:20 ` Bill Currie
  -- strict thread matches above, loose matches on Subject: below --
1998-09-22 14:12 Mike Stump
1998-09-22  9:45 John Breen
1998-09-22 19:31 ` Bill Currie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).