Subject: pkg/36498: IRIX: PKGSRC_COMPILER=gcc incorrectly calls /usr/bin/cc
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <ginsbach@NetBSD.org>
List: pkgsrc-bugs
Date: 06/15/2007 21:55:00
>Number:         36498
>Category:       pkg
>Synopsis:       IRIX: PKGSRC_COMPILER=gcc incorrectly calls /usr/bin/cc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 15 21:55:00 +0000 2007
>Originator:     Brian Ginsbach
>Release:        pkgsrc-2007Q1
>Organization:
NetBSD
>Environment:
System: IRIX indy 6.5 10070055 IP22
Architecture: mips
Machine: IP22
>Description:
The buildlink wrapper for the compiler ends up calling /usr/bin/cc.

This fails since this will either call the MIPSPro C front-end with
GCC flags (and fail) or fail if the MIPSPro C compiler is not
installed.

>How-To-Repeat:
Build something simple like pkgtools/digest on an IRIX system.

>Fix:
A workaround seems to be to set CC=gcc in etc/mk.conf.

If using the SGI IRIX Freeware GCC this work around requires that
_LINKER_RPATH_FLAG, in mk/compiler/gcc.mk, be changed to -rpath
for the IRIX Development Foundation linker (/usr/bin/ld).

I'm not sure what should change with all the pkgsrc magic to make
the correct compiler choice.  It also seems like bad form to assume
that GCC will also only use GNU Binutils (as, ld).