Compiling gcc-1.37 and X11R4 with gcc under A/UX 2.0
    William Roberts 
    liam at cs.qmw.ac.uk
       
    Mon Sep  3 20:12:08 AEST 1990
    
    
  
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 at cs.qmw.ac.uk
Queen Mary & Westfield College  UUCP: liam at qmw-cs.UUCP
Mile End Road                   AppleLink: UK0087
LONDON, E1 4NS, UK              Tel:  071-975 5250 (Fax: 081-980 6533)
    
    
More information about the Comp.unix.aux
mailing list