Subject: pkg/35729: Recent wrapper/transform updates break MIPSpro compilers
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <srcshelton@gmail.com>
List: pkgsrc-bugs
Date: 02/20/2007 11:35:00
>Number:         35729
>Category:       pkg
>Synopsis:       Recent wrapper/transform updates break MIPSpro compilers
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 20 11:35:00 +0000 2007
>Originator:     Stuart Shelton
>Release:        n/a
>Organization:
>Environment:
IRIX64 octane 6.5 07202013 IP30
(MIPSpro 7.4.4m on IRIX 6.5.30)
>Description:

According to the mk/defaults/mk.conf file, the correct values for 'ABI' are "64 (64 bit ABI), 32 (SGI's N32 ABI), undefined (SGI's old o32 ABI)"

However, the update transform-mipspro-cc has:

"
-32             |\
-n32            |\
-64             ) if [ $arg = "-$wrapper_abi" ]; then
                        transform_pass
                else
                        transform_fail "Wrong ABI argument $arg for ABI $wrapper_abi."
                fi ;;
"

... which will fail for the most common configuration - n32 (since '-n32' != '-32').

There is a mismatch here between what mk.conf expects (ABI='32' for n32) and what transform-mipspro-cc expects (ABI='n32' for n32).

Additionally, also in transform-mipspro-cc, when filtering -O options, '-OPT:*' should also be allowed.
>How-To-Repeat:

Attempt to build any software with ABI=32 (to enable n32 ABI) on IRIX.
>Fix:

With the mk.conf documentation needs to be updated to state ABI="n32" for n32 (which would be more obvious, but could lead to regressions), or alter the logic in transform-mipspro-cc to treat '-n32' differently from '-32' and '-64'.

(Background: -n32 enables the canonical default ABI for IRIX 6.x; -32 is the "old" 32bit ABI which is only used to IRIX 5.x compatibility)