NetBSD Problem Report #47241
From martin@aprisoft.de Fri Nov 23 22:49:22 2012
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 739FC63E720
for <gnats-bugs@gnats.NetBSD.org>; Fri, 23 Nov 2012 22:49:22 +0000 (UTC)
Message-Id: <20121123224915.8BCABED0E4A@emmas.aprisoft.de>
Date: Fri, 23 Nov 2012 23:49:15 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: bsd.sys.mk uses undefined ACTIVE_CC
X-Send-Pr-Version: 3.95
>Number: 47241
>Category: toolchain
>Synopsis: bsd.sys.mk uses undefined ACTIVE_CC
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: toolchain-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Nov 23 22:50:01 +0000 2012
>Closed-Date: Sat Feb 01 19:05:12 +0000 2014
>Last-Modified: Sat Feb 01 19:05:12 +0000 2014
>Originator: Martin Husemann
>Release: NetBSD 6.0
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD emmas.aprisoft.de 6.0 NetBSD 6.0 (EMMAS) #11: Mon Oct 15 22:52:05 CEST 2012 martin@emmas.aprisoft.de:/usr/src-6/sys/arch/i386/compile/EMMAS i386
Architecture: i386
Machine: i386
>Description:
bsd.sys.mk sometimes references ACTIVE_CC without checking wether the variable
is defined. This leads to make errors
>How-To-Repeat:
Do something like:
./build.sh -u -m sparc64 -O /nelly/usr/obj -D /nelly -T /usr/tools -x -j 3 tools
cd /usr/src/sys/sys
/usr/tools/bin/nbmake-sparc64 -VWARNS
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:
>Fix:
n/a
>Release-Note:
>Audit-Trail:
From: David Laight <david@l8s.co.uk>
To: gnats-bugs@NetBSD.org
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 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
State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sat, 01 Feb 2014 19:05:12 +0000
State-Changed-Why:
christos fixed this recently
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.