From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Feb 20 11:30:03 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4786616A401 for ; Wed, 20 Feb 2008 11:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1EEBC13C45E for ; Wed, 20 Feb 2008 11:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1KBU1Sp006489 for ; Wed, 20 Feb 2008 11:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1KBU1WS006488; Wed, 20 Feb 2008 11:30:01 GMT (envelope-from gnats) Resent-Date: Wed, 20 Feb 2008 11:30:01 GMT Resent-Message-Id: <200802201130.m1KBU1WS006488@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jeremie Le Hen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C4CC16A40E; Wed, 20 Feb 2008 11:20:40 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from postfix2-g20.free.fr (postfix2-g20.free.fr [212.27.60.43]) by mx1.freebsd.org (Postfix) with ESMTP id 8CA1913C458; Wed, 20 Feb 2008 11:20:39 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by postfix2-g20.free.fr (Postfix) with ESMTP id 8C4B123853B8; Wed, 20 Feb 2008 09:48:09 +0100 (CET) Received: from smtp5-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp5-g19.free.fr (Postfix) with ESMTP id B59CF3F617D; Wed, 20 Feb 2008 11:48:42 +0100 (CET) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp5-g19.free.fr (Postfix) with ESMTP id A502C3F619D; Wed, 20 Feb 2008 11:48:42 +0100 (CET) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 8DA399BF12; Wed, 20 Feb 2008 10:43:37 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 83C83405B; Wed, 20 Feb 2008 11:43:37 +0100 (CET) Message-Id: <20080220104337.83C83405B@obiwan.tataz.chchile.org> Date: Wed, 20 Feb 2008 11:43:37 +0100 (CET) From: Jeremie Le Hen To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: ambrisko@FreeBSD.org, jeremie@le-hen.org, freebsd-ports@FreeBSD.org Subject: ports/120876: [patch] net/etherboot doesn't compile with gcc4 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jeremie Le Hen List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 11:30:03 -0000 >Number: 120876 >Category: ports >Synopsis: [patch] net/etherboot doesn't compile with gcc4 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 20 11:30:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Jeremie Le Hen >Release: FreeBSD 7.0 i386 >Organization: >Environment: System: FreeBSD 7.0 >Description: GCC 4 is far more nit-picking than its ancestor. >How-To-Repeat: Simply try to compile net/etherboot on RELENG_7 or CURRENT. >Fix: Drop the following three patchs into the files/ directory. --- patch-gcc40-1 begins here --- --- arch/i386/firmware/pcbios/basemem.c.old 2008-02-20 11:24:39.000000000 +0100 +++ arch/i386/firmware/pcbios/basemem.c 2008-02-20 11:24:49.000000000 +0100 @@ -93,6 +93,7 @@ uint16_t size_kb = ( size + remainder + 1023 ) >> 10; free_base_memory_block_t *free_block = ( free_base_memory_block_t * ) ( ptr - remainder ); + unsigned char *fbaddr; if ( ( ptr == NULL ) || ( size == 0 ) ) { return; } @@ -125,7 +126,9 @@ free_block->magic = FREE_BLOCK_MAGIC; free_block->size_kb = size_kb; /* Move up by 1 kB */ - (void *)free_block += ( 1 << 10 ); + fbaddr = (void *)free_block; + fbaddr += ( 1 << 10 ); + free_block = (void *)fbaddr; size_kb--; } --- patch-gcc40-1 ends here --- --- patch-gcc40-2 begins here --- --- drivers/net/natsemi.c.old 2008-02-20 11:29:11.000000000 +0100 +++ drivers/net/natsemi.c 2008-02-20 11:32:13.000000000 +0100 @@ -602,7 +602,7 @@ const char *p) /* Packet */ { u32 to, nstype; - u32 tx_status; + volatile u32 tx_status; /* Stop the transmitter */ outl(TxOff, ioaddr + ChipCmd); @@ -641,7 +641,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) { --- patch-gcc40-2 ends here --- --- patch-gcc40-3 begins here --- --- drivers/net/sis900.c.old 2008-02-20 11:33:10.000000000 +0100 +++ drivers/net/sis900.c 2008-02-20 11:33:54.000000000 +0100 @@ -1083,7 +1083,7 @@ const char *p) /* Packet */ { u32 to, nstype; - u32 tx_status; + volatile u32 tx_status; /* Stop the transmitter */ outl(TxDIS | inl(ioaddr + cr), ioaddr + cr); @@ -1122,7 +1122,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) { --- patch-gcc40-3 ends here --- >Release-Note: >Audit-Trail: >Unformatted: