NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/47241: bsd.sys.mk uses undefined ACTIVE_CC
The following reply was made to PR toolchain/47241; it has been noted by GNATS.
From: David Laight <david%l8s.co.uk@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: toolchain/47241: bsd.sys.mk uses undefined ACTIVE_CC
Date: Sat, 24 Nov 2012 09:36:44 +0000
On Fri, Nov 23, 2012 at 10:50:02PM +0000, martin%NetBSD.org@localhost wrote:
> >Number: 47241
> >Category: toolchain
> >Synopsis: bsd.sys.mk uses undefined ACTIVE_CC
...
> bsd.sys.mk sometimes references ACTIVE_CC without checking wether the
> variable
> is defined. This leads to make errors
...
> see make complain:
>
> nbmake: Bad conditional expression `defined(NOGCCERROR) || ( == "clang" &&
> defined(NOCLANGERROR))' in defined(NOGCCERROR) || ( == "clang" &&
> defined(NOCLANGERROR))?yes:no
> nbmake: Bad conditional expression ` == "no" ' in == "no" ?-Werror:
The failing line is (apparantly) expansions of:
_NOWERROR= ${defined(NOGCCERROR) || (${ACTIVE_CC} == "clang" &&
defined(NOCLANGERROR)):?yes:no}
This will be subject to substitution before the expression is evaluated.
Two possible fixes:
1) Replace ${ACTIVE_CC} by "${ACTIVE_CC}"
2) Replace ${ACTIVE_CC} by ${ACTIVE_CC:Uunknown}
The "" around "clang" are probably pointless, IIRC enclosing an argument
of == in "" forces a string comparison (not a numeric one) but I think
there is also an empirical check as well.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index