Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!decvax!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.emacs Subject: Re: GNU exists on IBM RT running AIX Message-ID: <776@haddock.ISC.COM> Date: Tue, 21-Jul-87 20:55:50 EDT Article-I.D.: haddock.776 Posted: Tue Jul 21 20:55:50 1987 Date-Received: Thu, 23-Jul-87 07:01:35 EDT References: <640@haddock.UUCP> <711@haddock.ISC.COM> <721@haddock.ISC.COM> <775@haddock.ISC.COM> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Distribution: world Organization: Interactive Systems, Boston Lines: 195 Summary: Part 4: src/config.h src/m-ibmrt.h This is the fourth and last installment of the AIX patches. It contains the diffs for two files, config.h and m-ibmrt.h. The only change I needed to make to config.h (other than the obvious selection of s- and m- files) was to increase the value of PURESIZE. (For some reason, the distributed value was too small for the system as I received it.) As I mentioned in part 3, if you have an old version of AIX you should add the line "#undef HAVE_SELECT" to config.h. I tried to make m-ibmrt.h correct for AIX without breaking it for BSD. Since rumor has it that emacs has already run on the latter but not the former, I usually assumed that the existing parameters were correct for BSD. Someone correct me if I got these wrong: NO_ARG_ARRAY Works on AIX; now set for BSD only. WORD_MACHINE No, it isn't. This must have been a mistake. START_FILES AIX only; needed for loader weirdness. HAVE_ALLOCA (Really? Does this use a builtin, or what?) BSD only. C_ALLOCA AIX only. I couldn't write a "real" alloca. DATA_SEG_BITS \ AIX uses segments 1 and 2, not 0 and 1. (Segment DATA_START | 0 is kernel.) TEXT_START / C_SWITCH_MACHINE BSD only; the AIX compiler doesn't know what this is. LD_SWITCH_MACHINE \ AIX only. Determined by looking at the output LIB_STANDARD / of "cc -#". Egad. RTPC_REGISTER_BUG \ BSD only. As far as I know, the AIX compiler SHORT_CAST_BUG / doesn't have these bugs. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint ---- cut here ---- *** config.h-dist Tue Jul 21 18:37:14 1987 --- config.h Tue Jul 21 18:52:42 1987 *************** *** 24,30 **** See the file ../etc/MACHINES for a list of systems and the names of the s- files to use for them. See s-template.h for documentation on writing s- files. */ ! #include "s-bsd4-2.h" /* Include here a m- file that describes the machine and system you use. See the file ../etc/MACHINES for a list of machines and --- 24,30 ---- See the file ../etc/MACHINES for a list of systems and the names of the s- files to use for them. See s-template.h for documentation on writing s- files. */ ! #include "s-aix.h" /* Include here a m- file that describes the machine and system you use. See the file ../etc/MACHINES for a list of machines and *************** *** 31,37 **** the names of the m- files to use for them. See m-template.h for info on what m- files should define. */ ! #include "m-vax.h" /* Load in the conversion definitions if this system needs them and the source file being compiled has not --- 31,37 ---- the names of the m- files to use for them. See m-template.h for info on what m- files should define. */ ! #include "m-ibmrt.h" /* Load in the conversion definitions if this system needs them and the source file being compiled has not *************** *** 91,97 **** #ifdef HAVE_X_WINDOWS #define PURESIZE 120000 #else ! #define PURESIZE 115500 #endif #endif --- 91,97 ---- #ifdef HAVE_X_WINDOWS #define PURESIZE 120000 #else ! #define PURESIZE 116000 #endif #endif *** m-ibmrt.h-dist Tue Jul 21 18:57:43 1987 --- m-ibmrt.h Tue Jul 21 18:53:03 1987 *************** *** 36,47 **** /* Define NO_ARG_ARRAY if you cannot take the address of the first of a * group of arguments and treat it as an array of the arguments. */ #define NO_ARG_ARRAY /* Define WORD_MACHINE if addresses and such have * to be corrected before they can be used as byte counts. */ ! #define WORD_MACHINE /* Define how to take a char and sign-extend into an int. On machines where char is signed, this is a no-op. */ --- 36,49 ---- /* Define NO_ARG_ARRAY if you cannot take the address of the first of a * group of arguments and treat it as an array of the arguments. */ + #ifdef BSD #define NO_ARG_ARRAY + #endif /* Define WORD_MACHINE if addresses and such have * to be corrected before they can be used as byte counts. */ ! #undef WORD_MACHINE /* Define how to take a char and sign-extend into an int. On machines where char is signed, this is a no-op. */ *************** *** 80,85 **** --- 82,91 ---- and temacs will do (load "loadup") automatically unless told otherwise. */ #undef CANNOT_DUMP + #ifdef AIX + /* AIX loader doesn't like pre-crt0 */ + #define START_FILES /lib/crt0.o + #endif /* Define VIRT_ADDR_VARIES if the virtual addresses of pure and impure space as loaded can vary, and even their *************** *** 97,104 **** --- 103,117 ---- Define neither one if an assembler-language alloca in the file alloca.s should be used. */ + #ifdef BSD #define HAVE_ALLOCA + #else + #define C_ALLOCA + #define STACK_DIRECTION (-1) + #define ALIGN_SIZE 4 + #endif + #ifdef BSD /* The data segment in this machine always starts at address 0x10000000. An address of data cannot be stored correctly in a Lisp object; we always lose the high bits. We must tell XPNTR to add them back. */ *************** *** 109,114 **** --- 122,133 ---- /* The text segment always starts at 0. This way we don't need to have a label _start defined. */ #define TEXT_START 0 + #else + /* Under AIX, text is in segment 1 and data is in segment 2. */ + #define DATA_SEG_BITS 0x20000000 + #define DATA_START 0x20000000 + #define TEXT_START 0x10000000 + #endif /* Taking a pointer to a char casting it as int pointer */ /* and then taking the int which the int pointer points to */ *************** *** 125,132 **** --- 144,158 ---- /* Special switches to give the C compiler. */ + #ifdef BSD #define C_SWITCH_MACHINE -ma + #endif + #ifdef AIX + #define LD_SWITCH_MACHINE -n -T0x10000000 -K -e start + #define LIB_STANDARD -lrts -lc + #endif + /* Don't attempt to relabel some of the data as text when dumping. It does not work because their virtual addresses are not consecutive. This enables us to use the standard crt0.o. */ *************** *** 133,138 **** --- 159,165 ---- #define NO_REMAP + #ifdef BSD /* Turn off some `register' declarations. */ #define RTPC_REGISTER_BUG *************** *** 139,141 **** --- 166,169 ---- /* (short) negative-int doesn't sign-extend correctly */ #define SHORT_CAST_BUG + #endif