MakeDoExtensionsDocDoc.tioga
Copyright Ó 1993 by Xerox Corporation. All rights reserved.
Willie-sue Orr, March 4, 1993 4:26 pm PST
MAKEDOEXTENSIONSDOC
CEDAR 10.1
MakeDoExtensionsDoc.tioga
Willie-Sue Orr
Ó Copyright 1993 Xerox Corporation. All rights reserved.
Abstract: How to extend MakeDo to compile for new classes of machines.
Created by: Mike Spreitzer
Maintained by: Mike Spreitzer <Spreitzer:Parc:Xerox>
Keywords: MakeDo, cross compiling
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

1. Extending MakeDo
To make it possible to c-compile for a new class of machines (not one of the built-in types, i.e., cross compiling), profile entries and commander commands have been added. The new profile entries are:
MakeDo.UserClasses: name*
For each xxx in the name list, the program looks for a profile entry of the form:
MakeDo.UserClass.xxx: { dir switches }*
One can then use the command:
SetMakeDoClass name
to force MakeDo to compile for a particular class of machine.
NOTE: -fsingle is not longer forced for compiles, so if you want this behavior, you must include -fsingle in your switches.
If the dirs used in the MakeDo.UserClass.name entry are distinct, it is not necessary (nor is it desirable) to set the MakeDo class explicitly; compiles will be done on the basis of the dir for the goals.
The other new commands are:
MakeDo.UserClass class { dir switches }*
MakeDo.PrintUserClasses
There is another profile entry needed when compiling for a new class of machine, if that machine has a different object file format:
MobStuff.Checkers: { offset numBytes value }* -- brackets are optional, for readability
The commands are:
MobStuff.Checkers { offset numBytes value }* -- brackets are optional, for readability
MobStuff.PrintCheckers
In both defining cases, 0 < numBytes < 5. Any error in converting from ropes to numbers causes that entry to be ignored.
See CcCommandsDoc.tioga for other profile entries and commands.
2. Example
To compile for solaris, one might have profile entries like:
MakeDo.UserClasses: sun4←solaris
MakeDo.UserClass.sun4←solaris: sun4←solaris "-c -g -fsingle" sun4←solaris-O3 "-c -O3 -fsingle"
MobStuff.Checkers: { 0 4 magicNumber } -- whatever it is for ELF files
ComplexCc.sun4←solaris.cc: "rsh intrepid -l yourNameHere /opt2/SUNWspro/bin/cc"
ComplexCc.sun4←solaris.ld: "rsh intrepid -l yourNameHere /usr/ccs/bin/ld"