benson@odi.UUCP (Benson Margulies) (04/11/89)
Those of us who install PURDUE speedups on suns and want to use GCC are in the position of wanting to use different values for CC in different places. I've been fighting with Imake for a while now, and failed to get the desired behavior from the combination of sun4 make and imake. In the directories that I wanted gcc-compiled, I added the line CC=gcc at the top of Imakefile. If I cd to such a directory (and after making the makefile) do a make, the right thing happens. When I cd to the server dir and do a make, somehow my setting of CC is undone. I can only imagine that since there is a CC= in the top level Makefile as in all of them, that even without -e sun's make is contriving to use it to override the explicit settings. Can anyone offer a recipe? Could the guru dept consider a convention for having a failsafe way to change the compile name? -- Benson I. Margulies
benson@odi.UUCP (Benson Margulies) (04/11/89)
ps: It seems to me that the culprit is the forcing of CC=$(CC) in the subdir iteration in the standard subdir macro. There isn't a way to win here, since if this is not present, then make CC=foo won't work. However, I claim that it is more important to support carefully setting specific CC's in submakefiles than to support this. -- Benson I. Margulies
bob@tinman.cis.ohio-state.edu (Bob Sutterfield) (04/11/89)
In article <295@odi.UUCP> benson@odi.UUCP (Benson Margulies) writes:
...a convention for having a failsafe way to change the compile
name?
In util/imake.includes/Sun.macros, I put
AS = gas
CC = gcc
CPP = /usr/local/lib/gcc-cpp
LD = gld
STD_CPP_DEFINES = -traditional -fstrength-reduce -finline-functions -fpcc-struct-return
STD_DEFINES = -O -traditional -fstrength-reduce -finline-functions -fpcc-struct-return
These values then propagate everywhere in a `make Makefiles'. This
works fine with gcc 1.34 under SunOS 3.5.1.