Subject: Re: pkg/30234: IRIX: PKGSRC_COMPILER=gcc uses mk/wrapper/gcc.mk,
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Jared D. McNeill <jmcneill@invisible.ca>
List: pkgsrc-bugs
Date: 05/15/2005 19:10:02
The following reply was made to PR pkg/30234; it has been noted by GNATS.

From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: Georg Schwarz <georg.schwarz@freenet.de>
Cc: gnats-bugs@NetBSD.org, pkg-manager@NetBSD.org,
	gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/30234: IRIX: PKGSRC_COMPILER=gcc uses mk/wrapper/gcc.mk,  
 butcalls/usr/bin/cc (which is MIPSpro)
Date: Sun, 15 May 2005 15:09:42 -0400

 Georg Schwarz wrote:
 
 > > >  could you use the new tools framework to create a symlink cc pointing to your
 > > >  gcc?
 > >
 > > I guess I don't quite follow you.
 > >
 > > Btw, setting _USE_NEW_TOOLS=no has no effect either.
 >
 > yes. The problem is that many packages expect the CC compiler to be
 > called as cc. So it is not a bug of pkgsrc but rather a feature that has
 > not yet been addressed. :-)
 
 When the package calls 'cc', our wrapper gets called. Shouldn't our wrapper be smart
 enough to look at PKGSRC_COMPILER, and realize that when 'cc -version' is called that
 it outputs 'MIPSpro Compilers: Version 7.30', then start searching other names (gcc
 seems like it would be an obvious one to check if PKGSRC_COMPILER=gcc). Surely that's
 not a package bug, but a wrapper bug.
 
 > Now what you could do is trying to make use of the new tools framework by
 > having it create a symlink called cc in the .tools/bin directory pointing
 > to your gcc compiler. This should take priority over your system cc.
 > I am not sure however whether the later wrapper stage will already recognize
 > this when it searches for a usable cc. As a workaround you could also
 > manually create a respective symlink in your ${LOCALBASE}/bin directory
 > (which, unfortunately I should say for other reasons, the cc wrapper
 > does detect and prefer).
 
 That's the plan for now. Thanks.
 
 [grr, all of this just because IRIX's Motif-2.1 has a bug that Eclipse triggers --
 there must be an easier way]
 
 Cheers,
 Jared