NetBSD Problem Report #40540

From www@NetBSD.org  Mon Feb  2 18:10:52 2009
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 2F32E63C07F
	for <gnats-bugs@gnats.netbsd.org>; Mon,  2 Feb 2009 18:10:52 +0000 (UTC)
Message-Id: <20090202181052.08FB263C07D@narn.NetBSD.org>
Date: Mon,  2 Feb 2009 18:10:52 +0000 (UTC)
From: brad@heeltoe.com
Reply-To: brad@heeltoe.com
To: gnats-bugs@NetBSD.org
Subject: netbsd-3 fails to build clean on cross build for vax; bsd.sys.mk tried to -std=c99
X-Send-Pr-Version: www-1.0

>Number:         40540
>Category:       bin
>Synopsis:       netbsd-3 fails to build clean on cross build for vax; bsd.sys.mk tried to -std=c99
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 02 18:15:00 +0000 2009
>Closed-Date:    Sun May 10 14:14:16 +0000 2009
>Last-Modified:  Sun May 10 14:14:16 +0000 2009
>Originator:     Brad Parker
>Release:        netbsd-3
>Organization:
>Environment:
cross build for vax on linux EWS3
>Description:
While trying to build netbsd-3 (from cvs) the build failed because
bsd.sys.mk tried to put "-std=c99" as an argument to gcc and
the gcc used in the build doesn't understand that argument.


>How-To-Repeat:
Build netbsd-3 from cvs.

I use this script:

cd src && \ 
./build.sh -m vax \
        -D $REL/destdir/vax \
        -O $REL/objdir/vax \
        -T $REL/tooldir \
        -R $REL/releasedir \
        -U release

>Fix:
As per Alan Barrett (thanks!) I changed (in bsd.sys.mk)

.if ${WARNS} > 3

to

.if ${WARNS} > 3 && defined(HAVE_GCC) && ${HAVE_GCC} >= 3

which matches -current and now it compiles fine.


>Release-Note:

>Audit-Trail:
From: SAITOH Masanobu <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40540 CVS commit: [netbsd-4] src/share/mk
Date: Thu, 26 Mar 2009 05:04:36 +0000

 Module Name:	src
 Committed By:	msaitoh
 Date:		Thu Mar 26 05:04:36 UTC 2009

 Modified Files:
 	src/share/mk [netbsd-4]: bsd.sys.mk

 Log Message:
 Apply patch (requested by apb in ticket #1285)

 	Avoid passing "-std=c99" in CFLAGS on host platforms
 	that use a compiler other than GCC.  Requested in PR 40540.


 To generate a diff of this commit:
 cvs rdiff -u -r1.140.2.2 -r1.140.2.3 src/share/mk/bsd.sys.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: SAITOH Masanobu <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40540 CVS commit: [netbsd-3] src/share/mk
Date: Thu, 26 Mar 2009 05:07:52 +0000

 Module Name:	src
 Committed By:	msaitoh
 Date:		Thu Mar 26 05:07:52 UTC 2009

 Modified Files:
 	src/share/mk [netbsd-3]: bsd.sys.mk

 Log Message:
 Apply patch (requested by apb in ticket #1997)

 	Avoid passing "-std=c99" in CFLAGS on host platforms
 	that use a compiler other than GCC.  Requested in PR 40540.


 To generate a diff of this commit:
 cvs rdiff -u -r1.115.2.2 -r1.115.2.3 src/share/mk/bsd.sys.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 26 Mar 2009 18:28:44 +0000
State-Changed-Why:
Should be fixed. All ok?


State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 10 May 2009 14:14:16 +0000
State-Changed-Why:
netbsd-3 is EOL with the release of netbsd-5.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.