public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Cross-compiler for gcc 2.95.2 revisited.
@ 1999-11-16 20:22 Opinionated
  1999-11-18  4:54 ` Kai Ruottu
  1999-11-30 23:28 ` Opinionated
  0 siblings, 2 replies; 8+ messages in thread
From: Opinionated @ 1999-11-16 20:22 UTC (permalink / raw)
  To: help-gcc

Hello All,

I was having one specific problem compiling a cross-compiler for gcc.  I
finally got a cross-compiler on gcc-2.8.1 after I finally found the
patch which clears up a 'can't find stdio.h' error.  I have noticed that
gcc-2.95.2 has the exact same problem.  Is there a patch for the
configure.in file on 2.95.2 as well, or can someone give me a pointer as
to how to disable the building of the objc3 runtime module?

I appreciate any help.

Thanks in advance.



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

* Re: Cross-compiler for gcc 2.95.2 revisited.
  1999-11-16 20:22 Cross-compiler for gcc 2.95.2 revisited Opinionated
@ 1999-11-18  4:54 ` Kai Ruottu
  1999-11-18 12:41   ` Mumit Khan
                     ` (2 more replies)
  1999-11-30 23:28 ` Opinionated
  1 sibling, 3 replies; 8+ messages in thread
From: Kai Ruottu @ 1999-11-18  4:54 UTC (permalink / raw)
  To: help-gcc

On Wed, 17 Nov 1999 04:09:05 +0000, Opinionated
<opinionated@whoever.com> wrote:

>Hello All,
>
>I was having one specific problem compiling a cross-compiler for gcc.  I
>finally got a cross-compiler on gcc-2.8.1 after I finally found the
>patch which clears up a 'can't find stdio.h' error.  I have noticed that
>gcc-2.95.2 has the exact same problem.

 When you most probably need a C-library for your compiler, with the
<stdio.h> etc. headers, I see your problem being not having the
C-library binaries or sources when starting to build GCC. For 'system'
targets the proprietary headers and libs for the system are mostly the
only alternative, but Linux has the glibc-2.x.x binaries and sources
and embedded systems have the Cygnus newlib sources...

 If you somehow think the C-headers being 'generic', 'fit-them-all'-
models, just forget this nonsense, shoot the guy who claimed that and
caused you a week of extra work ;-)

 Basically there is no problem. Just install at least the target
headers into their final place, and start building GCC... The problem
seems to be some missing basic know-how about compilers, headers and
libraries. A chart with boxes for the compiler, headers, libs,
generated assembly/object, linked executable etc. has not been seen
anywhere or something. If these basic things are known, there is no
problem. This is just the same problem when one tries to start a car
without any gas in the tank and cannot understand why it doesn't
start...

 If you haven't the library headers and binaries, a startup and any
kind of thought about what your final target will be (which system or
embedded board), there come the errors about missing headers, the
famous 'cannot make executables' when testing the compiler, the
startup-routine, the libraries, the linker script, the 'specs'-file
etc. before starting to build the 'libiberty.a -- it just wants to
check what is missing from your 'normal' libs, and for this it needs a
working toolset, not just a compiler without anything else.

 All kind of 'patching scripts' are just like supplying food for the
hungry, not teaching them how to grow their own food. What is the idea
behind these 'Cross-GCC-patches', I have never understood... "Learn
the basic things, go and learn them... Do it now, not tomorrow" just
as some song for children says...

>Is there a patch for the configure.in file on 2.95.2 as well, or can
>someone give me a pointer as to how to disable the building of the
>objc3 runtime module?

 The gcc-2.95.2 needs the target headers for producing the necessary
'libgcc.a's (several for some targets), not for the 'libobjc.a's.
If your target never needs any headers, perhaps it doesn't need the
'libgcc.a's either, who knows. But porting the Cygnus newlib for it,
cannot be a bad idea... So you could start with its headers in
'newlib-1.8.1/newlib/libc/include' or something, install them into the
'<prefix>/<target>/include' and build GCC, install it, try to build
newlib and continue with the extra C++ etc. libs in the gcc-2.95.2
sources.

 The newlib is basically only for embedded targets, for Linux-targets
is the glibc-2.x.x or the old libc5.x.x, for Solaris2, SCO, AIX etc.
their proprietary headers and libs and so on...

Cheers, Kai

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

* Re: Cross-compiler for gcc 2.95.2 revisited.
  1999-11-18  4:54 ` Kai Ruottu
@ 1999-11-18 12:41   ` Mumit Khan
  1999-11-30 23:28     ` Mumit Khan
  1999-11-18 23:55   ` Eric Doenges
  1999-11-30 23:28   ` Kai Ruottu
  2 siblings, 1 reply; 8+ messages in thread
From: Mumit Khan @ 1999-11-18 12:41 UTC (permalink / raw)
  To: help-gcc

In article < 3833f1e3.17898737@news.nettilinja.fi >,
Kai Ruottu <karuottu@freenet.hut.fi> wrote:
> All kind of 'patching scripts' are just like supplying food for the
>hungry, not teaching them how to grow their own food. What is the idea
>behind these 'Cross-GCC-patches', I have never understood... "Learn
>the basic things, go and learn them... Do it now, not tomorrow" just
>as some song for children says...

Kai's very correct that you simply need to understand how GCC looks up
target includes and libraries during the build process, and you can then
kiss all these sometimes bizarre, and sometimes quite incorrect, patching 
scripts goodbye.

I have instructions on how to build Unix hosted x86-win32 targets
cross-compilers (there's even instructions to build x86-win32 hosted 
Linux compiler, done just for the fun of it) available at
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/

The instructions may seem tedious the first time, but it's just a matter
of writing a small shell script that copies the target includes and
libraries to the appropriate places (depends on what prefix you supply
when configuring gcc-2.95.x). 

Regards,
Mumit

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

* Re: Cross-compiler for gcc 2.95.2 revisited.
  1999-11-18  4:54 ` Kai Ruottu
  1999-11-18 12:41   ` Mumit Khan
@ 1999-11-18 23:55   ` Eric Doenges
  1999-11-30 23:28     ` Eric Doenges
  1999-11-30 23:28   ` Kai Ruottu
  2 siblings, 1 reply; 8+ messages in thread
From: Eric Doenges @ 1999-11-18 23:55 UTC (permalink / raw)
  To: help-gcc

karuottu@freenet.hut.fi (Kai Ruottu) writes:

> The gcc-2.95.2 needs the target headers for producing the necessary
>'libgcc.a's (several for some targets), not for the 'libobjc.a's.
>If your target never needs any headers, perhaps it doesn't need the
>'libgcc.a's either, who knows. But porting the Cygnus newlib for it,
>cannot be a bad idea... So you could start with its headers in
>'newlib-1.8.1/newlib/libc/include' or something, install them into the
>'<prefix>/<target>/include' and build GCC, install it, try to build
>newlib and continue with the extra C++ etc. libs in the gcc-2.95.2
>sources.

Or you can use the '--with-headers=<path to headers in newlib source
tree>' option while configuring, in which case you don't have to copy
anything manually. After you've made the compiler, you can then make and
install newlib using the supplied makefile.
-- 
________________________________________________________________________
Dipl.-Ing. Eric Doenges                         http://www.rcs.ei.tum.de
Institute for Real-Time Computer Systems (RCS)      fon +49-89-289-23590
Technische Universitaet Muenchen, D-80290 Muenchen  fax +49-89-289-23555

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

* Cross-compiler for gcc 2.95.2 revisited.
  1999-11-16 20:22 Cross-compiler for gcc 2.95.2 revisited Opinionated
  1999-11-18  4:54 ` Kai Ruottu
@ 1999-11-30 23:28 ` Opinionated
  1 sibling, 0 replies; 8+ messages in thread
From: Opinionated @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

Hello All,

I was having one specific problem compiling a cross-compiler for gcc.  I
finally got a cross-compiler on gcc-2.8.1 after I finally found the
patch which clears up a 'can't find stdio.h' error.  I have noticed that
gcc-2.95.2 has the exact same problem.  Is there a patch for the
configure.in file on 2.95.2 as well, or can someone give me a pointer as
to how to disable the building of the objc3 runtime module?

I appreciate any help.

Thanks in advance.



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

* Re: Cross-compiler for gcc 2.95.2 revisited.
  1999-11-18  4:54 ` Kai Ruottu
  1999-11-18 12:41   ` Mumit Khan
  1999-11-18 23:55   ` Eric Doenges
@ 1999-11-30 23:28   ` Kai Ruottu
  2 siblings, 0 replies; 8+ messages in thread
From: Kai Ruottu @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

On Wed, 17 Nov 1999 04:09:05 +0000, Opinionated
<opinionated@whoever.com> wrote:

>Hello All,
>
>I was having one specific problem compiling a cross-compiler for gcc.  I
>finally got a cross-compiler on gcc-2.8.1 after I finally found the
>patch which clears up a 'can't find stdio.h' error.  I have noticed that
>gcc-2.95.2 has the exact same problem.

 When you most probably need a C-library for your compiler, with the
<stdio.h> etc. headers, I see your problem being not having the
C-library binaries or sources when starting to build GCC. For 'system'
targets the proprietary headers and libs for the system are mostly the
only alternative, but Linux has the glibc-2.x.x binaries and sources
and embedded systems have the Cygnus newlib sources...

 If you somehow think the C-headers being 'generic', 'fit-them-all'-
models, just forget this nonsense, shoot the guy who claimed that and
caused you a week of extra work ;-)

 Basically there is no problem. Just install at least the target
headers into their final place, and start building GCC... The problem
seems to be some missing basic know-how about compilers, headers and
libraries. A chart with boxes for the compiler, headers, libs,
generated assembly/object, linked executable etc. has not been seen
anywhere or something. If these basic things are known, there is no
problem. This is just the same problem when one tries to start a car
without any gas in the tank and cannot understand why it doesn't
start...

 If you haven't the library headers and binaries, a startup and any
kind of thought about what your final target will be (which system or
embedded board), there come the errors about missing headers, the
famous 'cannot make executables' when testing the compiler, the
startup-routine, the libraries, the linker script, the 'specs'-file
etc. before starting to build the 'libiberty.a -- it just wants to
check what is missing from your 'normal' libs, and for this it needs a
working toolset, not just a compiler without anything else.

 All kind of 'patching scripts' are just like supplying food for the
hungry, not teaching them how to grow their own food. What is the idea
behind these 'Cross-GCC-patches', I have never understood... "Learn
the basic things, go and learn them... Do it now, not tomorrow" just
as some song for children says...

>Is there a patch for the configure.in file on 2.95.2 as well, or can
>someone give me a pointer as to how to disable the building of the
>objc3 runtime module?

 The gcc-2.95.2 needs the target headers for producing the necessary
'libgcc.a's (several for some targets), not for the 'libobjc.a's.
If your target never needs any headers, perhaps it doesn't need the
'libgcc.a's either, who knows. But porting the Cygnus newlib for it,
cannot be a bad idea... So you could start with its headers in
'newlib-1.8.1/newlib/libc/include' or something, install them into the
'<prefix>/<target>/include' and build GCC, install it, try to build
newlib and continue with the extra C++ etc. libs in the gcc-2.95.2
sources.

 The newlib is basically only for embedded targets, for Linux-targets
is the glibc-2.x.x or the old libc5.x.x, for Solaris2, SCO, AIX etc.
their proprietary headers and libs and so on...

Cheers, Kai

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

* Re: Cross-compiler for gcc 2.95.2 revisited.
  1999-11-18 23:55   ` Eric Doenges
@ 1999-11-30 23:28     ` Eric Doenges
  0 siblings, 0 replies; 8+ messages in thread
From: Eric Doenges @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

karuottu@freenet.hut.fi (Kai Ruottu) writes:

> The gcc-2.95.2 needs the target headers for producing the necessary
>'libgcc.a's (several for some targets), not for the 'libobjc.a's.
>If your target never needs any headers, perhaps it doesn't need the
>'libgcc.a's either, who knows. But porting the Cygnus newlib for it,
>cannot be a bad idea... So you could start with its headers in
>'newlib-1.8.1/newlib/libc/include' or something, install them into the
>'<prefix>/<target>/include' and build GCC, install it, try to build
>newlib and continue with the extra C++ etc. libs in the gcc-2.95.2
>sources.

Or you can use the '--with-headers=<path to headers in newlib source
tree>' option while configuring, in which case you don't have to copy
anything manually. After you've made the compiler, you can then make and
install newlib using the supplied makefile.
-- 
________________________________________________________________________
Dipl.-Ing. Eric Doenges                         http://www.rcs.ei.tum.de
Institute for Real-Time Computer Systems (RCS)      fon +49-89-289-23590
Technische Universitaet Muenchen, D-80290 Muenchen  fax +49-89-289-23555

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

* Re: Cross-compiler for gcc 2.95.2 revisited.
  1999-11-18 12:41   ` Mumit Khan
@ 1999-11-30 23:28     ` Mumit Khan
  0 siblings, 0 replies; 8+ messages in thread
From: Mumit Khan @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

In article < 3833f1e3.17898737@news.nettilinja.fi >,
Kai Ruottu <karuottu@freenet.hut.fi> wrote:
> All kind of 'patching scripts' are just like supplying food for the
>hungry, not teaching them how to grow their own food. What is the idea
>behind these 'Cross-GCC-patches', I have never understood... "Learn
>the basic things, go and learn them... Do it now, not tomorrow" just
>as some song for children says...

Kai's very correct that you simply need to understand how GCC looks up
target includes and libraries during the build process, and you can then
kiss all these sometimes bizarre, and sometimes quite incorrect, patching 
scripts goodbye.

I have instructions on how to build Unix hosted x86-win32 targets
cross-compilers (there's even instructions to build x86-win32 hosted 
Linux compiler, done just for the fun of it) available at
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/

The instructions may seem tedious the first time, but it's just a matter
of writing a small shell script that copies the target includes and
libraries to the appropriate places (depends on what prefix you supply
when configuring gcc-2.95.x). 

Regards,
Mumit

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

end of thread, other threads:[~1999-11-30 23:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-16 20:22 Cross-compiler for gcc 2.95.2 revisited Opinionated
1999-11-18  4:54 ` Kai Ruottu
1999-11-18 12:41   ` Mumit Khan
1999-11-30 23:28     ` Mumit Khan
1999-11-18 23:55   ` Eric Doenges
1999-11-30 23:28     ` Eric Doenges
1999-11-30 23:28   ` Kai Ruottu
1999-11-30 23:28 ` Opinionated

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