head	1.1;
access;
symbols
	gcc-2_8_1-990325:1.1
	gcc-2_8_1-990319:1.1
	gcc-2_8_1-990302:1.1
	gcc_2_8_1-990302:1.1
	gcc_2_8_1-990222:1.1
	gcc-2_8_1-990109:1.1
	gcc-2_8_1-981210:1.1
	gcc-2_8_1-981208:1.1
	gcc-2_8_1-980929:1.1
	gcc_2_8_1-980929:1.1
	gcc-2_8_1-980928:1.1
	gcc-2_8_1-980813:1.1
	gcc-2_8_1-980811:1.1
	gcc-2_8_1-980718:1.1
	gcc-2_8_1-980705:1.1
	gcc-2_8_1-980627:1.1
	gcc-2_8_1-980609:1.1
	gcc-2_8_1-980608:1.1
	gcc-2_8_1-980529:1.1
	gcc-2_8_1-980525:1.1
	gcc-2_8_1-980513:1.1
	gcc-2_8_1-980502:1.1
	gcc-2_8_1-980402:1.1
	gcc-2_8_1-980426:1.1
	gcc-2_8_1-980419:1.1
	gcc-2_8_1-980413:1.1
	gcc-2_8_1-980412:1.1
	gcc-2_8_1-980407:1.1
	gcc-2_8_1-980401:1.1
	gcc_2_8_1-980315:1.1
	gcc-2_8_1-RELEASE:1.1;
locks; strict;
comment	@# @;


1.1
date	93.10.01.23.34.31;	author wilson;	state Exp;
branches;
next	;


desc
@README.apollo
@


1.1
log
@entered into RCS
@
text
@README.apollo

Building GCC 2.0 for 680x0 based Apollo systems requires the GNU
assembler (GAS) version 1.38.1, with John Vasta's patches applied.

If you haven't done so yet, get `gas-1.38.1.tar.Z' from your favourite
GNU distribution site.  Furthermore, get `apollo-gas-1.38.1.diffs'
from `labrea.stanford.edu:/pub/gnu', apply the patches, compile and
install gas (under the name as).  This should go through without any
problems.

After switching into the BSD environment, you can configure GCC 2.0
with the command 

% ./configure m68k-apollo-bsd

The Apollo's `/usr/include/setjmp.h' uses a nonstandard `#options()'
construct.  You should create a local copy of this file and remove
these constructs from the declarations of SIGSETJMP and SIGLONGJMP.

The Apollo's `/usr/include/sys/types.h' (BSD Version) doesn't allow
to test for the definition of `size_t'.  This should be fixed by

  #ifndef _SIZE_T
  #define _SIZE_T
  typedef	long	size_t;
  #endif

The script `patch-apollo-includes' fixes these two problems, but does
_not_ pretend to be a full fledged `fixincludes' for this system.

If you now follow the standard GCC installation instructions, building
GCC 2.0 (including G++ 2.0) should proceed without any problems.

NB: Debugging is not yet supported for the Apollo.  If someone wants
    to do a _big_ favour to the Apollo users, he/she should consider
    porting the Binary File Description library (BFD) to the Apollo.
    This library can be found in the gdb-4.x distributions or in the
    binutils-1.9x distributions.




#!/bin/sh
# patch-apollo-includes -- fix some (but not all!) Apollo brain damage.

FILES_TO_PATCH='sys/types.h setjmp.h'

mkdir sys

for i in $FILES_TO_PATCH;
do
  cp /bsd4.3/usr/include/$i ./$i
done

patch -b -apollo <<'EOP'
*** /bsd4.3/usr/include/sys/types.h	Fri Apr  8 20:29:06 1988
--- sys/types.h	Wed Feb 26 21:17:57 1992
***************
*** 38,44 ****
--- 38,47 ----
  typedef	char *	caddr_t;
  typedef	u_long	ino_t;
  typedef	long	swblk_t;
+ #ifndef _SIZE_T
+ #define _SIZE_T
  typedef	long	size_t;
+ #endif
  typedef	long	time_t;
  typedef	long	dev_t;
  typedef	long	off_t;
*** /bsd4.3/usr/include/setjmp.h	Fri Feb  3 21:40:21 1989
--- setjmp.h	Sun Feb 23 19:06:55 1992
***************
*** 24,30 ****
--- 24,39 ----
  #endif
  
  
+ #ifdef __GNUC__
  #ifdef _PROTOTYPES
+ extern int sigsetjmp (sigjmp_buf env, int savemask);
+ extern void siglongjmp (sigjmp_buf env, int val);
+ #else
+ extern int sigsetjmp();
+ extern void siglongjmp();
+ #endif /* _PROTOTYPES */
+ #else /* not __GNUC__ */
+ #ifdef _PROTOTYPES
  extern int sigsetjmp(
          sigjmp_buf env,
          int savemask
***************
*** 37,43 ****
  extern int sigsetjmp() #options(abnormal);
  extern void siglongjmp() #options(noreturn);
  #endif /* _PROTOTYPES */
! 
  #undef _PROTOTYPES
  
  #ifdef __cplusplus
--- 46,52 ----
  extern int sigsetjmp() #options(abnormal);
  extern void siglongjmp() #options(noreturn);
  #endif /* _PROTOTYPES */
! #endif /* not __GNUC__ */
  #undef _PROTOTYPES
  
  #ifdef __cplusplus
EOP

exit 0
@
