public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: Building gcc as a cross compiler
@ 2001-03-21  9:46 David Korn
  2001-03-21  9:53 ` Christophe Rippert
  0 siblings, 1 reply; 6+ messages in thread
From: David Korn @ 2001-03-21  9:46 UTC (permalink / raw)
  To: 'Christophe Rippert', gcc-help

>../gcc-2.95.2/configure --prefix=/usr/local/arm --target=arm-coff
> --with-headers=/usr/include

>(I had to copy the /usr/src/linux/include/linux and
>/usr/src/linux/include/asm directories in /usr/include to avoid errors
>from stdlib.h and linux/limits.h files not found)

  That's all very well, but are you actually building for an ARM linux
system?  If you aren't, you can't use those headers, but should be 
using newlib, probably; if you are, then surely 'linux' should be in the
--target somewhere?

>I looked at the arm-coff/libio/_G_config.h file (which appears to be
>generated sometime during the compilation) and the faulty line is:
>typedef __sigset_t _G_sigset_t;
>
>I believe it is a configuration problem since this file is generated ?

  Well, it's got confused: it expects to have a definition of __sigset_t,
from newlib or glibc; I guess the linux headers don't have it.

  Are you building for a Linux system or a non-Linux system?  If you're
building for a non-linux system, what are you planning to use for a 
standard C library?

        DaveK
-- 
 All your base are belong to us!


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

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

* Re: Building gcc as a cross compiler
  2001-03-21  9:46 Building gcc as a cross compiler David Korn
@ 2001-03-21  9:53 ` Christophe Rippert
  2001-03-21 10:11   ` Lewin A.R.W. Edwards
  0 siblings, 1 reply; 6+ messages in thread
From: Christophe Rippert @ 2001-03-21  9:53 UTC (permalink / raw)
  To: David Korn, gcc-help

In fact I'm trying to build a compiler that I will use to build a new
operating system, so it should not generate Linux code (that's why I choose
the coff format I believe it is a generic format). As a standard library,
I'd like to build glibc (or newlib if it is better suited ?), also for a ARM
platform.

----- Original Message -----
From: "David Korn" <dkorn@pixelpower.com>
To: "'Christophe Rippert'" <Christophe.Rippert@imag.fr>;
<gcc-help@gcc.gnu.org>
Sent: Wednesday, March 21, 2001 6:47 PM
Subject: RE: Building gcc as a cross compiler


>
>
> >../gcc-2.95.2/configure --prefix=/usr/local/arm --target=arm-coff
> > --with-headers=/usr/include
>
> >(I had to copy the /usr/src/linux/include/linux and
> >/usr/src/linux/include/asm directories in /usr/include to avoid errors
> >from stdlib.h and linux/limits.h files not found)
>
>   That's all very well, but are you actually building for an ARM linux
> system?  If you aren't, you can't use those headers, but should be
> using newlib, probably; if you are, then surely 'linux' should be in the
> --target somewhere?
>
> >I looked at the arm-coff/libio/_G_config.h file (which appears to be
> >generated sometime during the compilation) and the faulty line is:
> >typedef __sigset_t _G_sigset_t;
> >
> >I believe it is a configuration problem since this file is generated ?
>
>   Well, it's got confused: it expects to have a definition of __sigset_t,
> from newlib or glibc; I guess the linux headers don't have it.
>
>   Are you building for a Linux system or a non-Linux system?  If you're
> building for a non-linux system, what are you planning to use for a
> standard C library?
>
>         DaveK
> --
>  All your base are belong to us!
>
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
>
> www.mimesweeper.com
> **********************************************************************
>

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

* Re: Building gcc as a cross compiler
  2001-03-21  9:53 ` Christophe Rippert
@ 2001-03-21 10:11   ` Lewin A.R.W. Edwards
       [not found]     ` <054501c0b233$f5f14580$4f14c7c2@tasmania>
  0 siblings, 1 reply; 6+ messages in thread
From: Lewin A.R.W. Edwards @ 2001-03-21 10:11 UTC (permalink / raw)
  To: gcc-help

Hi Christophe,

>In fact I'm trying to build a compiler that I will use to build a new
>operating system, so it should not generate Linux code (that's why I choose
>the coff format I believe it is a generic format). As a standard library,
>I'd like to build glibc (or newlib if it is better suited ?), also for a ARM
>platform.

newlib is intended for embedded platforms. It's smaller and purpose-built 
for embedded applications (which is to say, it's best for a constrained 
system).

You might want to try configuring for arm-elf. I have no problems building 
gcc for arm-elf, and unless you specifically need to use coff for some 
reason, elf is just as good a choice.

(I am not developing for Linux either. See my earlier help message 
"building current cvs for arm..." for my configuration commandline. This 
commandline works fine under Linux, I am just having problems inside cygwin...)

=== Lewin A.R.W. Edwards (Embedded Engineer)
Work: http://www.digi-frame.com/
Personal: http://www.zws.com/ and http://www.larwe.com/

"Und setzet ihr nicht das Leben ein,
Nie wird euch das Leben gewonnen sein."

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

* Re: Building gcc as a cross compiler
       [not found]     ` <054501c0b233$f5f14580$4f14c7c2@tasmania>
@ 2001-03-21 10:32       ` Lewin A.R.W. Edwards
  0 siblings, 0 replies; 6+ messages in thread
From: Lewin A.R.W. Edwards @ 2001-03-21 10:32 UTC (permalink / raw)
  To: Christophe Rippert; +Cc: gcc-help

Hi Christophe,

>Thanks for your advices, in fact I chose coff because I thought ELF was
>Linux-specific but I'll reconsider that

No. We are building ROMmed code that originates as ELF, it's just a file 
format... binutils will do all the conversion for you; it's great :)

Of course, it is possible to use arm-coff, if you need to.

>As a matter of fact, I tried to build GCC under Cygwin, also as a cross
>compiler, but I got an error message in the winnt.h file so I thought it was

There are numerous gotchas with cygwin, but by far (by FAR FAR) the biggest 
is the issue of text-mode versus binary mode mount points. Also note that 
you cannot build gcc under cygwin inside Windows 95/98. You must be running 
NT (including Win2000). It is possible, once you have built the toolchain, 
to move across and do the rest of your development work in Win9x but I do 
not recommend it (I was doing it for 3 months or so... very annoying).

>not compatible. I'll try your command line to see if I can progress under
>Cygwin too since I'd rather work on my Windows workstation than on our old
>Linux server...

I can tell you for a certain fact that it doesn't work with the current 
sources in cygwin, which is why I was posting here for support :) As long 
as you don't need the C compiler to generate Thumb code, you can use gcc 
2.95.2. Just EXACTLY FOLLOW the installation instructions at 
< http://sources.redhat.com/ecos/tools/win-arm-elf.html >.

If you continue to have problems, I can email you a (20Mb!!) precompiled 
set of binutils 2.10/gcc 2.95.2/insight 5.0 (gdb with graphical front-end) 
for cygwin.

=== Lewin A.R.W. Edwards (Embedded Engineer)
Work: http://www.digi-frame.com/
Personal: http://www.zws.com/ and http://www.larwe.com/

"Und setzet ihr nicht das Leben ein,
Nie wird euch das Leben gewonnen sein."

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

* RE: Building gcc as a cross compiler
@ 2001-03-21 10:15 David Korn
  0 siblings, 0 replies; 6+ messages in thread
From: David Korn @ 2001-03-21 10:15 UTC (permalink / raw)
  To: 'Christophe Rippert', gcc-help

>-----Original Message-----
>From: Christophe Rippert [ mailto:Christophe.Rippert@imag.fr ]
>Sent: 21 March 2001 17:54


>In fact I'm trying to build a compiler that I will use to build a new
>operating system, so it should not generate Linux code (that's 
>why I choose
>the coff format I believe it is a generic format). As a 
>standard library,
>I'd like to build glibc (or newlib if it is better suited ?), 
>also for a ARM
>platform.

  All the formats are fairly generic, thanks to the portability of 
binutils; I'm not expert in making that sort of choice, but IIUIC arm-elf
might be better as it's a more modern format and has the best support
for things like debugging info (particularly in C++), weak symbols and
dynamic linking.  However I am not an object-file-format expert, so you
should probably look for better advice than mine on the subject.

  As to which library you want, glibc is more suited to a desktop PC;
newlib is good for embedded systems in which resources are constrained.
For the same reason, porting glibc to a new system is probably a bit
more work than newlib, but it's really the way to go.

  And you should rebuild your compiler using the glibc headers!

    good luck,
      DaveK
-- 
 All your base are belong to us!


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

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

* Building gcc as a cross compiler
@ 2001-03-21  9:36 Christophe Rippert
  0 siblings, 0 replies; 6+ messages in thread
From: Christophe Rippert @ 2001-03-21  9:36 UTC (permalink / raw)
  To: gcc-help

I'm trying to build gcc on PC running Linux RedHat 6.2 and I want it to
generate ARM code. I looked at the CrossGCC FAQ page and from a build
directory not in any of the source trees, I did the following:

 * ../binutils-2.9.1/configure --prefix=/usr/local/arm --target=arm-coff
 * make all install
 * LD_LIBRARY_PATH=/usr/local/arm/lib:$LD_LIBRARY_PATH
 * PATH=/usr/local/arm/bin:$PATH
 *
../gcc-2.95.2/configure --prefix=/usr/local/arm --target=arm-coff --with-hea
ders=/usr/include
(I had to copy the /usr/src/linux/include/linux and
/usr/src/linux/include/asm directories in /usr/include to avoid errors from
stdlib.h and linux/limits.h files not found)

This produce the following error:

In file included from ../../../gcc-2.95.2/libio/libio.h:30,
                 from ../../../gcc-2.95.2/libio/iolibio.h:1,
                 from ../../../gcc-2.95.2/libio/libioP.h:47,
                 from ../../../gcc-2.95.2/libio/filedoalloc.c:45:
_G_config.h:43: parse error before `_G_sigset_t'
_G_config.h:43: warning: data definition has no type or storage class

I looked at the arm-coff/libio/_G_config.h file (which appears to be
generated sometime during the compilation) and the faulty line is:
typedef __sigset_t _G_sigset_t;

I believe it is a configuration problem since this file is generated ?

Thanks in advance for your help.

Christophe Rippert


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

end of thread, other threads:[~2001-03-21 10:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-21  9:46 Building gcc as a cross compiler David Korn
2001-03-21  9:53 ` Christophe Rippert
2001-03-21 10:11   ` Lewin A.R.W. Edwards
     [not found]     ` <054501c0b233$f5f14580$4f14c7c2@tasmania>
2001-03-21 10:32       ` Lewin A.R.W. Edwards
  -- strict thread matches above, loose matches on Subject: below --
2001-03-21 10:15 David Korn
2001-03-21  9:36 Christophe Rippert

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