1README.apollo 2 3Building GCC 2.0 for 680x0 based Apollo systems requires the GNU 4assembler (GAS) version 1.38.1, with John Vasta's patches applied. 5 6If you haven't done so yet, get `gas-1.38.1.tar.Z' from your favourite 7GNU distribution site. Furthermore, get `apollo-gas-1.38.1.diffs' 8from `labrea.stanford.edu:/pub/gnu', apply the patches, compile and 9install gas (under the name as). This should go through without any 10problems. 11 12After switching into the BSD environment, you can configure GCC 2.0 13with the command 14 15% ./configure m68k-apollo-bsd 16 17The Apollo's `/usr/include/setjmp.h' uses a nonstandard `#options()' 18construct. You should create a local copy of this file and remove 19these constructs from the declarations of SIGSETJMP and SIGLONGJMP. 20 21The Apollo's `/usr/include/sys/types.h' (BSD Version) doesn't allow 22to test for the definition of `size_t'. This should be fixed by 23 24 #ifndef _SIZE_T 25 #define _SIZE_T 26 typedef long size_t; 27 #endif 28 29The script `patch-apollo-includes' fixes these two problems, but does 30_not_ pretend to be a full fledged `fixincludes' for this system. 31 32If you now follow the standard GCC installation instructions, building 33GCC 2.0 (including G++ 2.0) should proceed without any problems. 34 35NB: Debugging is not yet supported for the Apollo. If someone wants 36 to do a _big_ favour to the Apollo users, he/she should consider 37 porting the Binary File Description library (BFD) to the Apollo. 38 This library can be found in the gdb-4.x distributions or in the 39 binutils-1.9x distributions. 40 41 42 43 44#!/bin/sh 45# patch-apollo-includes -- fix some (but not all!) Apollo brain damage. 46 47FILES_TO_PATCH='sys/types.h setjmp.h' 48 49mkdir sys 50 51for i in $FILES_TO_PATCH; 52do 53 cp /bsd4.3/usr/include/$i ./$i 54done 55 56patch -b -apollo <<'EOP' 57*** /bsd4.3/usr/include/sys/types.h Fri Apr 8 20:29:06 1988 58--- sys/types.h Wed Feb 26 21:17:57 1992 59*************** 60*** 38,44 **** 61--- 38,47 ---- 62 typedef char * caddr_t; 63 typedef u_long ino_t; 64 typedef long swblk_t; 65+ #ifndef _SIZE_T 66+ #define _SIZE_T 67 typedef long size_t; 68+ #endif 69 typedef long time_t; 70 typedef long dev_t; 71 typedef long off_t; 72*** /bsd4.3/usr/include/setjmp.h Fri Feb 3 21:40:21 1989 73--- setjmp.h Sun Feb 23 19:06:55 1992 74*************** 75*** 24,30 **** 76--- 24,39 ---- 77 #endif 78 79 80+ #ifdef __GNUC__ 81 #ifdef _PROTOTYPES 82+ extern int sigsetjmp (sigjmp_buf env, int savemask); 83+ extern void siglongjmp (sigjmp_buf env, int val); 84+ #else 85+ extern int sigsetjmp(); 86+ extern void siglongjmp(); 87+ #endif /* _PROTOTYPES */ 88+ #else /* not __GNUC__ */ 89+ #ifdef _PROTOTYPES 90 extern int sigsetjmp( 91 sigjmp_buf env, 92 int savemask 93*************** 94*** 37,43 **** 95 extern int sigsetjmp() #options(abnormal); 96 extern void siglongjmp() #options(noreturn); 97 #endif /* _PROTOTYPES */ 98! 99 #undef _PROTOTYPES 100 101 #ifdef __cplusplus 102--- 46,52 ---- 103 extern int sigsetjmp() #options(abnormal); 104 extern void siglongjmp() #options(noreturn); 105 #endif /* _PROTOTYPES */ 106! #endif /* not __GNUC__ */ 107 #undef _PROTOTYPES 108 109 #ifdef __cplusplus 110EOP 111 112exit 0 113