Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!ukc!icdoc!qmw-cs!liam From: liam@cs.qmw.ac.uk (William Roberts) Newsgroups: comp.unix.aux Subject: Re: Compiling gcc-1.37 and X11R4 with gcc under A/UX 2.0 Message-ID: <2752@sequent.cs.qmw.ac.uk> Date: 3 Sep 90 10:12:08 GMT References: <2663@s3.ireq.hydro.qc.ca> Organization: Computer Science Dept, QMW, University of London, UK. Lines: 52 Your changes should have the desired effect, but they represent considerable overkill! What you should have done was: 1) Use the appropriate flag to (A/UX) cc to get it to show you the A/UX 2.0 standard invocation of cpp e.g. whitesand.root 8 # cc -# pipetest.c |& fold callsys /lib/cpp: '/lib/cpp' '-Dmc68k32' 'pipetest.c' '/usr/tmp/ctmAAAa003954' . ... 2) Look in the CPP manual page to find the "reserved symbols", i.e. -Uname Remove any initial definition of name, where name is a reserved symbol that is predefined by the particular preprocessor. The list of reserved symbols is shown below: operating system: unix hardware: m68k UNIX(Reg.) System variant: _SYSV_SOURCE _BSD_SOURCE _AUX_SOURCE 3) Finally, arrange for CPP_PREDEFINES in your tm-aux.h file to include all of the things that you need, and rebuild gcc. config/tm-aux.h: #define CPP_PREDEFINES "-Dunix -Dm68k -D_SYSV_SOURCE \ -D_BSD_SOURCE -D_AUX_SOURCE \ -DmacII -DAUX" Your solution of patching up the X11 Makefiles is workable (you didn't need _AUX_SOURCE so that could bite you someday) but fixing the GNU cpp is more elegant. Does anyone know if the -Dmc68k32 which the A/UX 2.0 cc adds to its invocation of cpp is actually needed? If so, it also needs to go into the CPP_PREDEFINES for gcc... -- William Roberts ARPA: liam@cs.qmw.ac.uk Queen Mary & Westfield College UUCP: liam@qmw-cs.UUCP Mile End Road AppleLink: UK0087 LONDON, E1 4NS, UK Tel: 071-975 5250 (Fax: 081-980 6533)