This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC for m68k-unknown-coff


On Fri, 25 Jul 1997, mmajka@cs5.dasd.honeywell.com wrote:

> GCC 2.7.2.2
> BINUTILS 2.8.1
> 
> Hello,
> 
> I am trying to build GCC for a bare Motorola 68360 with the target
> defined as m68k-unknown-coff.  The compiler itsel builds fine and
> libgcc1.c compiles fine.  The problem is in libgcc2.c, which wants
> stdio.h, which I don't have because I have no RTOS.  I was hoping
> someone could tell me how they handled this situation.  Did you simply
> write your own?
You can compile libgcc2 without libc, there is a flag called 'inhibit_libc'
which must be defined during compilation.
The proper spot to define this flag is in gcc/Makefile. Just add
-Dinhibit_libc to TARGET_LIBGCC2_CFLAGS, so the line shows

TARGET_LIBGCC2_CFLAGS=-Dinhibit_libc

It still might be a good idea to have a libc around even for embedded 
programming.
stdio.h has nothing to do with an RTOS, except the fact that some
RTOS come with a libc - you can use cygnus 
solutions newlib or the cdk (gnu win32) - both have libc code and header 
files.
You need to provide some very basic functions (init code, exit, write, 
read ...). If you implement read and write to access the RS232 of the
QUICC then you are able to add printf's for debugging to you
code.
> 
> Thanks,
hope this helps,

> 
> -- 
> __________________________________
> Matt Majka
> Honeywell Defense Avionics Systems
> Albuquerque, New Mexico, USA
> 
Rolf

+-----------+----------------------------------------------------------+
|  ||||||   |  Rolf Fiedler                                            |
|  6 6  \   |  Electronic Design Engineer                              |
|  /_  ) |  |  Ferrari electronic GmbH                                 |
|   >   /   |  phone: +49 3328 4559 0  E-Mail: Rolf.Fiedler@Ferrari.DE |
|   |  |    |  fax  : +49 3328 4559 60                                 |
+-----------+----------------------------------------------------------+