diff options
author | christos <christos@pkgsrc.org> | 2011-10-07 01:12:51 +0000 |
---|---|---|
committer | christos <christos@pkgsrc.org> | 2011-10-07 01:12:51 +0000 |
commit | a82d59fd2f1b6bc1874ca4e6153f921437a765ab (patch) | |
tree | ba9e2a66ae6b503d33a7c95a8c0e60cd18ed9f35 /emulators/tme/patches | |
parent | c663caeed0efb9454d94828474bb68b22334188d (diff) | |
download | pkgsrc-a82d59fd2f1b6bc1874ca4e6153f921437a765ab.tar.gz |
Avoid a compiler bug (phantom integer oveflow) in gcc 4.5.3
It appears that the conditional expression with the 0x0100 constant triggers
it no matter what casts we put around the expression.
Diffstat (limited to 'emulators/tme/patches')
-rw-r--r-- | emulators/tme/patches/patch-af | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/emulators/tme/patches/patch-af b/emulators/tme/patches/patch-af new file mode 100644 index 00000000000..92cacd87196 --- /dev/null +++ b/emulators/tme/patches/patch-af @@ -0,0 +1,29 @@ +$NetBSD: patch-af,v 1.3 2011/10/07 01:12:51 christos Exp $ + +--- machine/sun/sun-bwtwo.c.orig 2009-11-08 12:03:58.000000000 -0500 ++++ machine/sun/sun-bwtwo.c 2011-10-06 20:52:30.000000000 -0400 +@@ -339,6 +339,7 @@ + { + struct tme_sunbw2 *sunbw2; + int rc; ++ tme_uint16_t v; + + /* start the sunbw2 structure: */ + sunbw2 = tme_new0(struct tme_sunbw2, 1); +@@ -365,12 +366,10 @@ + case TME_SUNBW2_TYPE_OLD_ONBOARD: + + /* set our initial CSR: */ +- sunbw2->tme_sunbw2_csr +- = tme_htobe_u16(TME_SUNBW2_CSR_ENABLE_VIDEO +- | (sunbw2->tme_sunbw2_sunfb.tme_sunfb_size == TME_SUNFB_SIZE_1024_1024 +- ? TME_SUNBW2_CSR_JUMPER_HIRES +- : 0)); +- ++ v = TME_SUNBW2_CSR_ENABLE_VIDEO | (sunbw2->tme_sunbw2_sunfb.tme_sunfb_size ++ == TME_SUNFB_SIZE_1024_1024 ++ ? TME_SUNBW2_CSR_JUMPER_HIRES : 0); ++ sunbw2->tme_sunbw2_csr = tme_htobe_u16(v); + break; + } + |