public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* trouble building gcc-3.2 --target=m68k-linux from scratch
@ 2002-08-19 10:24 Peter Barada
  2002-08-19 21:12 ` Dan Kegel
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Peter Barada @ 2002-08-19 10:24 UTC (permalink / raw)
  To: crossgcc; +Cc: gcc, Peter.Barada


I'm attempting to build a m68k-linux compiler from scratch using stock
versions of:

linux-2.5.1
binutils-2.13
gcc-3.2
glibc-2.2.5
gdb-5.2.1

building with bill Gatliff's script to config the kernel, copy over
the hears, config/binud binutils, config/build gcc-bootstrap...

The kernel headers copy over fine, binutils-builds, and gcc-bootstrap
is configured as: 

#!/bin/sh
# This file was generated automatically by configure.  Do not edit.
# This directory was configured as follows:
/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/configure --with-gcc-version-trigger=/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/gcc/version.c --host=i686-pc-linux-gnu --target=m68k-linux --prefix=/tmp/junk --enable-languages=c --with-local-prefix=/tmp/junk/m68k-linux --without-headers --with-newlib --disable-shared --verbose --norecursion 
#  using "mt-frag"

And it fails building gcc/unwind-dw2.c:

/home/pbarada/work/cvs-wavemark/cross-linux-tools/obj/junk/m68k-linux/gcc-bootstrap/gcc/xgcc -B/home/pbarada/work/cvs-wavemark/cross-linux-tools/obj/junk/m68k-linux/gcc-bootstrap/gcc/ -B/tmp/junk/m68k-linux/bin/ -B/tmp/junk/m68k-linux/lib/ -isystem /tmp/junk/m68k-linux/include -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/gcc -I/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/gcc/. -I/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/gcc/config -I/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/gcc/../include -fexceptions -c /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
In file included from /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/gcc/unwind-dw2.c:26:
/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/gcc/unwind-pe.h: In function `size_of_encoded_value':
/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/gcc/unwind-pe.h:76: warning: implicit declaration of function `abort'
In file included from gthr-default.h:1,
                 from /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/gcc/gthr.h:98,
                 from /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/gcc/unwind-dw2.c:28:
/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2/gcc/gthr-posix.h:37:21: pthread.h: No such file or directory

Configure created ghtr-default.h with '#include <pthread.h>' since it
found a pthread.h that can be used, but that was by using the *host*
compiler to find a phtreads.h, not the *target* compiler.

Since a stock linux source doesn't have pthread.h in its headers, and
glibc hasn't been built yet, there's no pthread.h that can be used at
this time.

If I add --disable-threads to the configure for the bootstrap, it
completes.

1) Why does configure think that it has a valid pthreads.h(or that is
   should use the host compiler to find one)?
2) Is --disable-threads necessary for the bootstrap step?

All suggestions are appreciated...

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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

* Re: trouble building gcc-3.2 --target=m68k-linux from scratch
  2002-08-19 10:24 trouble building gcc-3.2 --target=m68k-linux from scratch Peter Barada
@ 2002-08-19 21:12 ` Dan Kegel
  2002-08-20  6:53   ` Peter Barada
  2002-08-20  0:13 ` Kai Henningsen
  2002-08-20  1:05 ` Richard Zidlicky
  2 siblings, 1 reply; 7+ messages in thread
From: Dan Kegel @ 2002-08-19 21:12 UTC (permalink / raw)
  To: Peter Barada; +Cc: crossgcc, gcc, Peter.Barada

Peter Barada wrote:
> I'm attempting to build a m68k-linux compiler from scratch using stock
> versions of:
> 
> linux-2.5.1
> binutils-2.13
> gcc-3.2
> glibc-2.2.5
> gdb-5.2.1
> 
> building with bill Gatliff's script to config the kernel, copy over
> the hears, config/binud binutils, config/build gcc-bootstrap...
> ...
> And it fails building gcc/unwind-dw2.c:
> ...
> Since a stock linux source doesn't have pthread.h in its headers, and
> glibc hasn't been built yet, there's no pthread.h that can be used at
> this time.

I ran into something like this on ppc on gcc-3.0.4; the fix was
to do a glibc "make install-headers" before building gcc, I think.  See
http://www.kegel.com/xgcc3/
- Dan

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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

* Re: trouble building gcc-3.2 --target=m68k-linux from scratch
  2002-08-19 10:24 trouble building gcc-3.2 --target=m68k-linux from scratch Peter Barada
  2002-08-19 21:12 ` Dan Kegel
@ 2002-08-20  0:13 ` Kai Henningsen
  2002-08-20  1:05 ` Richard Zidlicky
  2 siblings, 0 replies; 7+ messages in thread
From: Kai Henningsen @ 2002-08-20  0:13 UTC (permalink / raw)
  To: crossgcc

pbarada@mail.wm.sps.mot.com (Peter Barada)  wrote on 19.08.02 in <200208191724.g7JHOoS19048@hyper.wm.sps.mot.com>:

> Since a stock linux source doesn't have pthread.h in its headers, and

That should be completely irrelevant. User programs (such as gcc) aren't  
supposed to include the raw kernel headers, they're supposed to - if  
anything - use copies provided by libc. (And no, /usr/include/linux is  
*NOT* supposed to be a symlink. That was a design error in ancient history  
that has been fixed *years* ago.)

> glibc hasn't been built yet, there's no pthread.h that can be used at
> this time.

That, OTOH, is of course completely relevant.

> If I add --disable-threads to the configure for the bootstrap, it
> completes.

I believe 3.2 does include the change that made pthreads default on  
practically every variant of Linux, so as to get everyone on a common ABI.


MfG Kai

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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

* Re: trouble building gcc-3.2 --target=m68k-linux from scratch
  2002-08-19 10:24 trouble building gcc-3.2 --target=m68k-linux from scratch Peter Barada
  2002-08-19 21:12 ` Dan Kegel
  2002-08-20  0:13 ` Kai Henningsen
@ 2002-08-20  1:05 ` Richard Zidlicky
  2002-08-20  7:27   ` Peter Barada
  2 siblings, 1 reply; 7+ messages in thread
From: Richard Zidlicky @ 2002-08-20  1:05 UTC (permalink / raw)
  To: Peter Barada; +Cc: crossgcc, gcc, Peter.Barada

On Mon, Aug 19, 2002 at 01:24:50PM -0400, Peter Barada wrote:
> 
> I'm attempting to build a m68k-linux compiler from scratch using stock
> versions of:
> 
> linux-2.5.1

why that?? Try current 2.4 or maybe late 2.5

> binutils-2.13

ok.

> gcc-3.2

patches required

> 
> And it fails building gcc/unwind-dw2.c:

I was unable to get a clean crosscompiler because of header problems
since a few weeks. Imho libgcc should be a bit less header-demanding
when just languages=c is requested, otherwise even trivial tasks like 
crosscompiling kernels will turn into rocket science.

Btw why is unwind-dw2 compiled at all for platforms that do sjlj
exceptions anyway?

I am sending you my random patch collection per PM.

Richard

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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

* Re: trouble building gcc-3.2 --target=m68k-linux from scratch
  2002-08-19 21:12 ` Dan Kegel
@ 2002-08-20  6:53   ` Peter Barada
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Barada @ 2002-08-20  6:53 UTC (permalink / raw)
  To: dank; +Cc: Peter.Barada, crossgcc, gcc, Peter.Barada


>> Since a stock linux source doesn't have pthread.h in its headers, and
>> glibc hasn't been built yet, there's no pthread.h that can be used at
>> this time.
>
>I ran into something like this on ppc on gcc-3.0.4; the fix was
>to do a glibc "make install-headers" before building gcc, I think.  See
>http://www.kegel.com/xgcc3/

Just adding --disable-threads to the configure line allowed the
bootstrap compiler to build.  Why create more interdependencies?

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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

* Re: trouble building gcc-3.2 --target=m68k-linux from scratch
  2002-08-20  1:05 ` Richard Zidlicky
@ 2002-08-20  7:27   ` Peter Barada
  2002-08-21  3:59     ` Richard Zidlicky
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Barada @ 2002-08-20  7:27 UTC (permalink / raw)
  To: rz; +Cc: Peter.Barada, crossgcc, gcc, Peter.Barada


>> linux-2.5.1
>
>why that?? Try current 2.4 or maybe late 2.5

Its what I have, and it seems to work for ColdFire v4e (so far).

>> gcc-3.2
>
>patches required

Why the patches?  How can these patches get back into the FSF tree so
I don't need a crystal ball to get a working build when gcc-3.2.1 or
gcc-3.3 comes out?

>Btw why is unwind-dw2 compiled at all for platforms that do sjlj
>exceptions anyway?

Since I'm just building a C compiler why is exception handling getting
built at all?

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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

* Re: trouble building gcc-3.2 --target=m68k-linux from scratch
  2002-08-20  7:27   ` Peter Barada
@ 2002-08-21  3:59     ` Richard Zidlicky
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Zidlicky @ 2002-08-21  3:59 UTC (permalink / raw)
  To: Peter Barada; +Cc: crossgcc, gcc

On Tue, Aug 20, 2002 at 10:27:46AM -0400, Peter Barada wrote:
> 
> >> linux-2.5.1
> >
> >why that?? Try current 2.4 or maybe late 2.5
> 
> Its what I have, and it seems to work for ColdFire v4e (so far).
> 
> >> gcc-3.2
> >
> >patches required
> 
> Why the patches?  How can these patches get back into the FSF tree so
> I don't need a crystal ball to get a working build when gcc-3.2.1 or
> gcc-3.3 comes out?

good question.

> >Btw why is unwind-dw2 compiled at all for platforms that do sjlj
> >exceptions anyway?
> 
> Since I'm just building a C compiler why is exception handling getting
> built at all?

another good question.

Richard

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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

end of thread, other threads:[~2002-08-21 10:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-19 10:24 trouble building gcc-3.2 --target=m68k-linux from scratch Peter Barada
2002-08-19 21:12 ` Dan Kegel
2002-08-20  6:53   ` Peter Barada
2002-08-20  0:13 ` Kai Henningsen
2002-08-20  1:05 ` Richard Zidlicky
2002-08-20  7:27   ` Peter Barada
2002-08-21  3:59     ` Richard Zidlicky

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).