[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference smurf::buildhelp

Title:USG buildhelp questions/answers
Moderator:SMURF::FILTER
Created:Mon Apr 26 1993
Last Modified:Mon Jan 20 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2763
Total number of notes:5802

314.0. "Invoking a different compiler..." by SMURF::FILTER (Automatic Posting Software - mail to flume::puck) Fri Sep 10 1993 02:13

Date Of Receipt: 	10-SEP-1993 00:45:25.00
From: 	WASTED::"[email protected]" "09-Sep-1993 1500"
To: 	[email protected]
CC: 	
Subj: 	Invoking a different compiler...

Hi,
	Can I substitute a different compiler than the one used in a
makefile from the `build' command line? If so, how?

Thanks in advance,

Rich
----------------------------------------------------------------
Rich Larsen, M/S: UNX			TCP/IP: [email protected]
USSG/User Env. & Std. Group		DECnet: UNXA::LARSEN
Digital Equipment Corporation		FAX:	908-577-6003
200 Route 9 North			Voice:	908-577-6083	
Manalapan, New Jersey 07726		DTN:	462 

T.RTitleUserPersonal
Name
DateLines
314.1Re: Invoking a different compiler...SMURF::FILTERAutomatic Posting Software - mail to flume::puckFri Sep 10 1993 12:1622
Date Of Receipt: 	10-SEP-1993 10:15:34.81
From: 	FLUME::jmcg "Jim McGinness"
To: 	[email protected], [email protected]
CC: 	
Subj: 	Re:  Invoking a different compiler...

There's probably a dozen ways to do what you're asking...

Two possibilities are:
1) Place the compiler you want in the sandbox tools directory under the
name that would have been used normally.

2) Add a line to the Makefile that says CC=/name/of/your/compiler/here

Things get more complicated if your compiler won't take the same flags
as the standard compiler, if you just want to apply this compiler to
a few of the files, or if you're compiling for another architecture.
In those cases you'd probably have to invest in understanding the
CCTYPE logic supported by the Makefiles.

	-- jmcg

314.2Re: Invoking a different compiler...SMURF::FILTERAutomatic Posting Software - mail to flume::puckFri Sep 10 1993 12:1812
Date Of Receipt: 	10-SEP-1993 10:23:07.79
From: 	ALPHA::"[email protected]" "10-Sep-1993 1024"
To: 	[email protected] (Jim McGinness)
CC: 	[email protected], [email protected]
Subj: 	Re: Invoking a different compiler...

Is it possible to override the compiler which is defined in
the makefile by specifying a command line argument to the
build command?

-Rich

314.3Re: Invoking a different compiler...SMURF::FILTERAutomatic Posting Software - mail to flume::puckFri Sep 10 1993 12:1919
Date Of Receipt: 	10-SEP-1993 10:40:39.59
From: 	FLUME::jmcg "Jim McGinness"
To: 	[email protected], [email protected]
CC: 	[email protected]
Subj: 	Re: Invoking a different compiler...
Re: 	invoking a different compiler by giving an argument to build

I don't know of a way.  At the level of the "build" command, there is
not just one compiler.  There are a few variables with names like
COMP_HOST_ROOT that might do what you want; I suggest looking at
the rc_files/custom.build file in the submit tree for ideas.

I still think the easiest way to accomplish what you want is to put
what you want run in the tools directory.  This is how our general
build process tests new compiler fixes and ensures that the system
is built with an already-tested compiler.

	-- jmcg

314.4Re: Invoking a different compiler...SMURF::FILTERAutomatic Posting Software - mail to flume::puckFri Sep 10 1993 21:5631
Date Of Receipt: 	10-SEP-1993 20:28:40.72
From: 	FLUME::"[email protected]" "Grant Van Dyck"
To: 	[email protected] (Jim McGinness)
CC: 	[email protected], [email protected], [email protected]
Subj: 	Re: Invoking a different compiler...
> Re: 	invoking a different compiler by giving an argument to build

> 
> I don't know of a way.  At the level of the "build" command, there is
> not just one compiler.  There are a few variables with names like
> COMP_HOST_ROOT that might do what you want; I suggest looking at
> the rc_files/custom.build file in the submit tree for ideas.
> 
> I still think the easiest way to accomplish what you want is to put
> what you want run in the tools directory.  This is how our general
> build process tests new compiler fixes and ensures that the system
> is built with an already-tested compiler.
> 
> 	-- jmcg

Yes, but it does that by building in a backingtree, it gets trickier in a
sandbox - you need to add a custom file to your rc_files dir to override the
backingtree defined variables. The contents of this are as I descibed to rich
a week of two ago when he asked a similar question about using a different
ld.

-- 
 Grant Van Dyck 		enet:    [email protected]	
 Release Engineering