From:	CRDGW2::CRDGW2::MRGATE::"SMTP::PREP.AI.MIT.EDU::INFO-GCC-REQUEST" 13-APR-1989 23:45
To:	MRGATE::"ARISIA::EVERHART"
Subj:	Re: Easier way to Link GCC

Received: by life.ai.mit.edu; Thu, 13 Apr 89 22:07:45 EDT
Return-Path: <info-gcc-request@prep.ai.mit.edu>
Received: from tut.cis.ohio-state.edu by life.ai.mit.edu; Thu, 13 Apr 89 21:57:14 EDT
Received: by tut.cis.ohio-state.edu (5.59/3.890413)
	id AA15328; Thu, 13 Apr 89 21:53:43 EDT
Received: from USENET by tut.cis.ohio-state.edu with netnews
	for info-gcc@prep.ai.mit.edu (info-gcc@prep.ai.mit.edu)
	(contact usenet@tut.cis.ohio-state.edu if you have questions)
Date: 11 Apr 89 20:30:55 GMT
From: huxtable@kuhub.cc.ukans.edu  (Kathryn Huxtable)
Organization: University of Kansas Academic Computing Services
Subject: Re: Easier way to Link GCC
Message-Id: <4923@kuhub.cc.ukans.edu>
References: <8904101437.AA11953@life.ai.mit.edu>
Sender: info-gcc-request@prep.ai.mit.edu
To: info-gcc@prep.ai.mit.edu

In article <8904101437.AA11953@life.ai.mit.edu>, SUE@geneseo.bitnet
(Sue Chichester) writes:
> I thought it would be nice for my users not to have to think about 
> linking with the GCCLIB and the VAXC libraries when they linked their 
> GCC programs.  So what I wanted to have them do is say GLINK fn when
> linking.  The first GLINK was just suppose to be a quick and dirty way of
> doing this.  I made up a little command procedure GLINK.COM.
> 
> 
> $ !          GLINK.COM - LINK for GCC
> $!
> $ IF P1 .NES. "" THEN GOTO LINK
> $ INQUIRE P1 "File"
> $LINK:
> $LINK 'P1',GNU_CC:[000000]GCCLIB/LIB,VAXC/OPTIONS
> $EXIT

You can't do what you want with the CLD file because you are not allowed to
specify a list for a default value.  CLD won't parse it, and the LINK command
doesn't think it has to.

Try the following:  declare a symbol, as follows:

$ glink == "@ gnu_cc:[000000]glink """""

This will supply a null 'P1' to the command procedure.  This will allow
qualifiers to be used immediately after the symbol name.  Replace the first    
two occurrences of P1 with P2.  Then replace the LINK command in your
command procedure with:

$ LINK 'P2' 'P3' 'P4' 'P5' 'P6' 'P7' 'P8', -
        GNU_CC:[000000]GCCLIB/LIB,VAXC/OPTIONS

Any qualifiers will be passed through, commas won't be stripped, so DCL should
be happy.  I use something similar to this, myself.

Good luck,

Kathryn Huxtable
huxtable@kuhub.cc.ukans.edu
