NetBSD Problem Report #39361
From www@NetBSD.org Fri Aug 15 21:04:29 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id EC7BE63B853
for <gnats-bugs@gnats.netbsd.org>; Fri, 15 Aug 2008 21:04:28 +0000 (UTC)
Message-Id: <20080815210428.B929863B11D@narn.NetBSD.org>
Date: Fri, 15 Aug 2008 21:04:28 +0000 (UTC)
From: cagney@gnu.org
Reply-To: cagney@gnu.org
To: gnats-bugs@NetBSD.org
Subject: build.sh misses gnu-make error when probing for nbmake
X-Send-Pr-Version: www-1.0
>Number: 39361
>Category: toolchain
>Synopsis: build.sh misses gnu-make error when probing for nbmake
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lukem
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 15 21:05:01 +0000 2008
>Closed-Date: Sat Aug 16 00:11:22 +0000 2008
>Last-Modified: Sat Aug 16 07:15:03 +0000 2008
>Originator: Andrew Cagney
>Release: current
>Organization:
>Environment:
f9
>Description:
Build.sh runs a test to determine if the installed make is a berkley variant, gnu-make (at least version 3.81) is producing output sufficient to confuse the check (there's unexpected output it seems, I suspect its an sh=bash interaction as well).
The attached tweaks the test, checking that both the command succeeds and that there is output.
Index: build.sh
===================================================================
RCS file: /cvsroot/src/build.sh,v
retrieving revision 1.189
diff -p -r1.189 build.sh
*** build.sh 27 Jun 2008 21:38:36 -0000 1.189
--- build.sh 14 Aug 2008 22:10:33 -0000
*************** try_set_TOOLDIR()
*** 910,916 ****
# Use ${guess_make} with nobomb_getmakevar
if [ -x "${guess_make}" ]; then
TOOLDIR=$(make="${guess_make}" nobomb_getmakevar TOOLDIR)
! [ -n "${TOOLDIR}" ] || unset TOOLDIR
fi
}
--- 911,919 ----
# Use ${guess_make} with nobomb_getmakevar
if [ -x "${guess_make}" ]; then
TOOLDIR=$(make="${guess_make}" nobomb_getmakevar TOOLDIR)
! # Check both the status and the value.
! [ $? -eq 0 -a -n "${TOOLDIR}" ] || unset TOOLDIR
! echo TOOLDIR=${TOOLDIR}
fi
}
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: toolchain-manager->lukem
Responsible-Changed-By: lukem@NetBSD.org
Responsible-Changed-When: Fri, 15 Aug 2008 22:47:04 +0000
Responsible-Changed-Why:
I'll take a look
State-Changed-From-To: open->closed
State-Changed-By: lukem@NetBSD.org
State-Changed-When: Sat, 16 Aug 2008 00:11:22 +0000
State-Changed-Why:
This should be fixed now.
Thanks for the PR & suggested fix.
I've also improved how build.sh determines the default objdirs.
From: Luke Mewburn <lukem@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39361 CVS commit: src
Date: Sat, 16 Aug 2008 00:10:04 +0000 (UTC)
Module Name: src
Committed By: lukem
Date: Sat Aug 16 00:10:04 UTC 2008
Modified Files:
src: build.sh
Log Message:
Determine top-level objdir from the environment $MAKEOBJDIRPREFIX early on,
and store in the (non-exported) $TOP_objdir.
(We can't do the same for the environment $MAKEOBJDIR since it may contain
make(1) expressions that aren't easily parseable by sh(1))
Remember appropriate variations of '-M modp' and '-O mod' in $TOP_objdir
(replacing $makeobjdir misuse).
Use $TOP_objdir when trying to guess the TOOLDIR,
and when detecting if the top-level objdir needs to be created.
Fixes problems observed when testing fixes for PR 39360 and 39361.
Fix the TOOLDIR path used when guessing the TOOLDIR.
PR 39360 from Andrew Cagney <cagney@gnu.org>
Use stricter result checking from make(1) when guessing the TOOLDIR.
PR 39361 from Andrew Cagney <cagney@gnu.org>
To generate a diff of this commit:
cvs rdiff -r1.193 -r1.194 src/build.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc: netbsd-bugs@NetBSD.org
Subject: Re: toolchain/39361: build.sh misses gnu-make error when probing
for nbmake
Date: Sat, 16 Aug 2008 09:12:04 +0200
On Fri, 15 Aug 2008, cagney@gnu.org wrote:
> Build.sh runs a test to determine if the installed make is a berkley
> variant,
No it doesn't do that. However, it does attempt to use the already
installed make to guess the intended value of TOOLDIR. It doesn't
care if the already installed make does something unexpected, because
things are supposed to work even if the guessed TOOLDIR is wrong (and
I recommend that the user should use the "-T" flag to set the TOOLDIR
instead of relying on this guess).
Nevertheless, your patch looks helpful, and I see that Luke has applied it.
--apb (Alan Barrett)
>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.