NetBSD Problem Report #36549
From dieter.NetBSD@pandora.be Sun Jun 24 18:42:15 2007
Return-Path: <dieter.NetBSD@pandora.be>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 4AA7463B882
for <gnats-bugs@gnats.NetBSD.org>; Sun, 24 Jun 2007 18:42:15 +0000 (UTC)
Message-Id: <20070624170213.58FF218B05@simult.amelgem.be>
Date: Sun, 24 Jun 2007 19:02:13 +0200 (CEST)
From: dieter.NetBSD@pandora.be
Reply-To: dieter.NetBSD@pandora.be
To: gnats-bugs@NetBSD.org
Subject: sysutils/grub netboot code doesn't compile with gcc 4
X-Send-Pr-Version: 3.95
>Number: 36549
>Category: pkg
>Synopsis: sysutils/grub netboot code doesn't compile with gcc 4
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: tron
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 24 18:45:00 +0000 2007
>Closed-Date: Mon Jun 25 13:41:36 +0000 2007
>Last-Modified: Mon Jun 25 13:41:36 +0000 2007
>Originator: dieter roelants
>Release: NetBSD 4.99.20
>Organization:
>Environment:
System: NetBSD simult.amelgem.be 4.99.20 NetBSD 4.99.20 (SIMULT) #21: Sun Jun 10 12:34:40 CEST 2007 dieter@simult.amelgem.be:/build/obj.i386.current/sys/arch/i386/compile/SIMULT i386
Architecture: i386
Machine: i386
>Description:
GRUB has netboot code which is enabled in pkgsrc when
GRUB_NETWORK_CARDS is defined. However, this does not
compile with gcc 4.1.2 from -current or -4.
>How-To-Repeat:
cd pkgsrc/sysutils/grub && make GRUB_NETWORK_CARDS=sis900
>Fix:
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/grub/distinfo,v
retrieving revision 1.21
diff -u -r1.21 distinfo
--- distinfo 17 Dec 2006 19:21:43 -0000 1.21
+++ distinfo 24 Jun 2007 16:34:15 -0000
@@ -13,3 +13,6 @@
SHA1 (patch-ah) = ff62b64177a0e68400c32e013cb585526db94217
SHA1 (patch-ai) = 60088cf6786a364da37e19fbb5df4c6fd7641016
SHA1 (patch-aj) = bfbac23a7c250ed615dcfb4a988708c970b617d8
+SHA1 (patch-ak) = 8e67eb603e639ca47536cb191e7e29ec48b95642
+SHA1 (patch-al) = 58761e867ff182ad46c42b15575395ba8c38fbd6
+SHA1 (patch-am) = d848f67f7f21fa076751d14bd3235ae7351be1b7
Index: patches/patch-ak
===================================================================
RCS file: patches/patch-ak
diff -N patches/patch-ak
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-ak 24 Jun 2007 16:34:15 -0000
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- /build/pkg_comp/default/pkg_comp/obj/pkgsrc/sysutils/grub/default/grub-0.97/netboot/etherboot.h 2003-07-09 13:45:37.000000000 +0200
++++ netboot/etherboot.h 2007-06-24 15:28:38.000000000 +0200
+@@ -531,9 +531,7 @@
+ extern int network_ready;
+ extern struct rom_info rom;
+ extern struct arptable_t arptable[MAX_ARP];
+-extern struct bootpd_t bootp_data;
+ #define BOOTP_DATA_ADDR (&bootp_data)
+-extern unsigned char *end_of_rfc1533;
+
+ /* config.c */
+ extern struct nic nic;
Index: patches/patch-al
===================================================================
RCS file: patches/patch-al
diff -N patches/patch-al
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-al 24 Jun 2007 16:34:15 -0000
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- /build/pkg_comp/default/pkg_comp/obj/pkgsrc/sysutils/grub/default/grub-0.97/netboot/sis900.c 2003-07-09 13:45:38.000000000 +0200
++++ netboot/sis900.c 2007-06-24 18:15:38.000000000 +0200
+@@ -901,7 +901,7 @@
+ const char *p) /* Packet */
+ {
+ u32 status, to, nstype;
+- u32 tx_status;
++ volatile u32 tx_status;
+
+ /* Stop the transmitter */
+ outl(TxDIS, ioaddr + cr);
+@@ -940,7 +940,7 @@
+
+ to = currticks() + TX_TIMEOUT;
+
+- while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to))
++ while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to))
+ /* wait */ ;
+
+ if (currticks() >= to) {
Index: patches/patch-am
===================================================================
RCS file: patches/patch-am
diff -N patches/patch-am
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-am 24 Jun 2007 16:34:15 -0000
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- /build/pkg_comp/default/pkg_comp/obj/pkgsrc/sysutils/grub/default/grub-0.97/netboot/natsemi.c 2003-07-09 13:45:38.000000000 +0200
++++ netboot/natsemi.c 2007-06-24 18:25:21.000000000 +0200
+@@ -608,7 +608,7 @@
+ const char *p) /* Packet */
+ {
+ u32 status, to, nstype;
+- u32 tx_status;
++ volatile u32 tx_status;
+
+ /* Stop the transmitter */
+ outl(TxOff, ioaddr + ChipCmd);
+@@ -647,7 +647,7 @@
+
+ to = currticks() + TX_TIMEOUT;
+
+- while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to))
++ while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to))
+ /* wait */ ;
+
+ if (currticks() >= to) {
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->tron
Responsible-Changed-By: tron@netbsd.org
Responsible-Changed-When: Mon, 25 Jun 2007 13:03:16 +0000
Responsible-Changed-Why:
I'll handle this PR.
From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/36549 CVS commit: pkgsrc/sysutils/grub
Date: Mon, 25 Jun 2007 13:05:57 +0000 (UTC)
Module Name: pkgsrc
Committed By: tron
Date: Mon Jun 25 13:05:57 UTC 2007
Modified Files:
pkgsrc/sysutils/grub: Makefile distinfo
Added Files:
pkgsrc/sysutils/grub/patches: patch-ak patch-al patch-am
Log Message:
Fix build problems with GCC 4.x if netboot support is enabled.
Patches provided by Dieter Roelants in PR pkg/36549.
To generate a diff of this commit:
cvs rdiff -r1.46 -r1.47 pkgsrc/sysutils/grub/Makefile
cvs rdiff -r1.21 -r1.22 pkgsrc/sysutils/grub/distinfo
cvs rdiff -r0 -r1.3 pkgsrc/sysutils/grub/patches/patch-ak \
pkgsrc/sysutils/grub/patches/patch-al \
pkgsrc/sysutils/grub/patches/patch-am
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: tron@netbsd.org
State-Changed-When: Mon, 25 Jun 2007 13:41:36 +0000
State-Changed-Why:
I've committed your patches. Thanks a lot for the contribution.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.