public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Getting closer (was Re: cross-compiler build: can't find stdio.h)
@ 1998-09-24 11:27 John Breen
  1998-09-24 19:32 ` Bill Currie
  0 siblings, 1 reply; 4+ messages in thread
From: John Breen @ 1998-09-24 11:27 UTC (permalink / raw)
  To: egcs

From: Bill Currie <bcurrie@tssc.co.nz>
>Yeah, it means (most likely) that you don't have a libc.a (or .so)
>for your target.  Check config.log in the directory to be sure.  I
>had this problem too.  If you *do* have libc available, your will
>want to use --with-libs=... to say where it is.

Thanks for the tip (I didn't know there was a config.log).  Here's the 
tail of it:
----------------
configure:622: /data/ecad_libs/egcs/build-m68k/gcc/xgcc \
    -B/data/ecad_libs/egcs/build-m68k/gcc/ -o conftest -g \
    conftest.c  1>&5
/data/ecad_libs/contrib/m68k-elf/bin/ld: cannot open crt0.o: No such
    file or directory
collect2: ld returned 1 exit status
configure: failed program was:
#line 618 "configure"
#include "confdefs.h"
main(){return(0);}
----------------

So you were close: it's crt0.o that's missing.  Obviously I don't have a 
crt0.o, since I don't have a compiler yet (to answer your previous 
question, this is for an in-house developed embedded system; all I have 
for headers and libs is what comes in egcs or newlib).

I could copy over the m68k crt0.S from newlib and see if I can assemble 
it myself with what's there, but should I really have to do things like 
that?
--
John A. Breen
jab3@hotmail.com


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

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

* Re: Getting closer (was Re: cross-compiler build: can't find stdio.h)
  1998-09-24 11:27 Getting closer (was Re: cross-compiler build: can't find stdio.h) John Breen
@ 1998-09-24 19:32 ` Bill Currie
  0 siblings, 0 replies; 4+ messages in thread
From: Bill Currie @ 1998-09-24 19:32 UTC (permalink / raw)
  To: John Breen; +Cc: egcs

John Breen wrote:
> So you were close: it's crt0.o that's missing.  Obviously I don't have a
> crt0.o, since I don't have a compiler yet (to answer your previous
> question, this is for an in-house developed embedded system; all I have
> for headers and libs is what comes in egcs or newlib).

Doh! forgot about crt0.o.  That was my first problem (libc.a came next,
I think), but I provided my own as the mtos crt0.o was very suboptimal.

> I could copy over the m68k crt0.S from newlib and see if I can assemble
> it myself with what's there, but should I really have to do things like
> that?

No, get the cross-FAQ (look in the egcs faq under cross compiling for
it's location).  It will tell you how to do a full tool-chain (including
libs) build.  Here's the relevant section (don't worry about the version
numbers and I recomment grabbing the dirs common between binutils and
egcs from egcs):

---

3.2 One Pass Installation

Is there an easier way?  Yes!
If you study the top-level Makefile that comes with binutils-2.7,
newlib-1.7.1, or gdb-4.16, you'll see that they're all quite similar
(not surprising since they're essentially the same file).

You'll also discover that it is capable of building and installing the
entire toolchain in one pass.  The catch is that is assumes a directory
layout different than what would normally appear when you unpack the
sources.

You will need to apply the Cygnus crossgcc-gcc-2.7.2.1.patch.

What we now need to do is turn this directory layout

./binutils-2.7/
               bfd/
               binutils/
               config/
               gas/
               include/
               ld/
               libiberty/
               opcodes/
               texinfo/
./gcc-2.7.2.1/
./newlib-1.7.1/
               config/
               libgloss/
               newlib/
               texinfo/

into

./src/
      bfd/
      binutils/
      config/
      gas/
      gcc/
      include/
      ld/
      libgloss/
      libiberty/
      newlib/
      opcodes/
      texinfo/

-- 
Leave others their otherness

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

* Re: Getting closer (was Re: cross-compiler build: can't find stdio.h)
  1998-09-23 14:48 John Breen
@ 1998-09-23 20:53 ` Bill Currie
  0 siblings, 0 replies; 4+ messages in thread
From: Bill Currie @ 1998-09-23 20:53 UTC (permalink / raw)
  To: John Breen; +Cc: egcs

John Breen wrote:
> 
> Ignore the problem I just posted about the build dying in libio.  It
> appears I was bit by the HPUX sed bug (although I haven't verified it;
> but I installed GNU's sed, reconfigured and rebuilt, and it got past
> that part).

I'm glad that got sorted.

> configure: error: installation or configuration problem: C compiler \
>     cannot create executables.
... 
> Anyone know what this means?  This happened pretty far along in the
> build (further than I'd ever gotten).

Yeah, it means (most likely) that you don't have a libc.a (or .so) for
your target.  Check config.log in the directory to be sure.  I had this
problem too.  If you *do* have libc available, your will want to use
--with-libs=... to say where it is.

> Hasn't it been using xgcc all
> along to build the other parts?

Only for *compiling*, not linking.  This is one of the reasons I suspect
it's the lack of a libc (the other is experience:)

Bill
-- 
Leave others their otherness

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

* Getting closer (was Re: cross-compiler build: can't find stdio.h)
@ 1998-09-23 14:48 John Breen
  1998-09-23 20:53 ` Bill Currie
  0 siblings, 1 reply; 4+ messages in thread
From: John Breen @ 1998-09-23 14:48 UTC (permalink / raw)
  To: egcs

Ignore the problem I just posted about the build dying in libio.  It 
appears I was bit by the HPUX sed bug (although I haven't verified it; 
but I installed GNU's sed, reconfigured and rebuilt, and it got past 
that part).

Now, just when I thought that I was in the clear, it died with the 
following:
---------------
Configuring in m68k-elf/libf2c
creating cache ./config.cache
checking for gcc... /data/ecad_libs/egcs/build-m68k/gcc/xgcc \
    -B/data/ecad_libs/egcs/build-m68k/gcc/
checking whether the C compiler 
(/data/ecad_libs/egcs/build-m68k/gcc/xgcc \
    -B/data/ecad_libs/egcs/build-m68k/gcc/ -g ) works... no
configure: error: installation or configuration problem: C compiler \
    cannot create executables.
gmake[1]: *** [configure-target-libf2c] Error 1
gmake[1]: Leaving directory `/[...]/build-m68k'
gmake: *** [cross] Error 1
---------------

Anyone know what this means?  This happened pretty far along in the 
build (further than I'd ever gotten).  Hasn't it been using xgcc all 
along to build the other parts?
--
John A. Breen
jab3@hotmail.com


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

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

end of thread, other threads:[~1998-09-24 19:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-24 11:27 Getting closer (was Re: cross-compiler build: can't find stdio.h) John Breen
1998-09-24 19:32 ` Bill Currie
  -- strict thread matches above, loose matches on Subject: below --
1998-09-23 14:48 John Breen
1998-09-23 20:53 ` 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).