diff options
author | Doug Ambrisko <ambrisko@FreeBSD.org> | 2008-03-25 14:03:38 +0000 |
---|---|---|
committer | Doug Ambrisko <ambrisko@FreeBSD.org> | 2008-03-25 14:03:38 +0000 |
commit | f23b659145e01971fdc11a596ee544552db1c9f3 (patch) | |
tree | 8e4c402abcbbff7f2e6d59996b4e0728d33ded14 /net/etherboot | |
parent | Fix plist in epiphany-webkit (diff) |
Make gcc 4 happy. Thanks for the patch from Jeremie.
PR: 120876
Submitted by: Jeremie Le Hen
Diffstat (limited to 'net/etherboot')
-rw-r--r-- | net/etherboot/files/patch-gcc40 | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/net/etherboot/files/patch-gcc40 b/net/etherboot/files/patch-gcc40 new file mode 100644 index 000000000000..3d816abbb7a7 --- /dev/null +++ b/net/etherboot/files/patch-gcc40 @@ -0,0 +1,90 @@ +>Submitter-Id: current-users +>Originator: Jeremie Le Hen +>Organization: +>Confidential: no +>Synopsis: [patch] net/etherboot doesn't compile with gcc4 +>Severity: non-critical +>Priority: low +>Category: ports +>Class: sw-bug +>Release: FreeBSD 7.0 i386 +>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 --- + |