[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] Building nightly builds with GCC 4.7.4
Hi all,
I'm upgrading the build machine to GCC 4.7.4, from 4.5.4, and the trunk
is throwing a few errors. I've checked this with 4.5.4 and it still
builds there too.
I've attached a patch that fixes them, but I'd like people to review
before I submit.
Also, there's a problem in XAAES that results in this.
../xa_fnts.c: In function 'fnts_extb_callout':
../xa_fnts.c:240:7: error: assuming signed overflow does not occur when
assuming that (X + c) < X is always false [-Werror=strict-overflow]
cc1: all warnings being treated as errors
Helmut - can you take a look ?
Thanks,
Alan.
Index: sys/tosfs.c
===================================================================
RCS file: /mint/freemint/sys/tosfs.c,v
retrieving revision 1.17
diff -u -r1.17 tosfs.c
--- sys/tosfs.c 29 Jan 2014 19:22:55 -0000 1.17
+++ sys/tosfs.c 3 Mar 2016 13:28:08 -0000
@@ -1046,6 +1046,7 @@
{
long r;
struct tindex *t = (struct tindex *)dirh->fc.index;
+ DTABUF *dta = (DTABUF *)(dirh->fsstuff + 2);
UNUSED(flags);
@@ -1056,7 +1057,7 @@
r = ROM_Fsfirst(tmpbuf, FILEORDIR);
/* TB: Filter VFAT-Entries
*/
- while ((r == E_OK) && (DIR_DTA(dirh)->dta_attrib == FA_VFAT))
+ while ((r == E_OK) && (dta->dta_attrib == FA_VFAT))
r = ROM_Fsnext();
if (r == E_OK) {
@@ -1152,13 +1153,14 @@
{
struct tindex *ti = (struct tindex *)dirh->fc.index;
long r;
+ DTABUF *dta = (DTABUF *)(dirh->fsstuff + 2);
(void)tfullpath(tmpbuf, ti, "*.*");
do_setdta(DIR_DTA(dirh));
r = ROM_Fsfirst(tmpbuf, FILEORDIR);
/* TB: Filter VFAT entries
*/
- while ((r == E_OK) && (DIR_DTA(dirh)->dta_attrib == FA_VFAT))
+ while ((r == E_OK) && (dta->dta_attrib == FA_VFAT))
r = ROM_Fsnext();
if (r == E_OK) {
DIR_FLAG(dirh) = STARTSEARCH;
Index: sys/arch/context.S
===================================================================
RCS file: /mint/freemint/sys/arch/context.S,v
retrieving revision 1.15
diff -u -r1.15 context.S
--- sys/arch/context.S 28 Feb 2013 00:15:33 -0000 1.15
+++ sys/arch/context.S 3 Mar 2016 13:28:08 -0000
@@ -50,6 +50,7 @@
#ifndef __mcoldfire__
.arch 68030
+ .cpu 68030
#endif
#include "magic/magic.i"
Index: sys/arch/detect.S
===================================================================
RCS file: /mint/freemint/sys/arch/detect.S,v
retrieving revision 1.16
diff -u -r1.16 detect.S
--- sys/arch/detect.S 31 May 2015 11:24:12 -0000 1.16
+++ sys/arch/detect.S 3 Mar 2016 13:28:08 -0000
@@ -21,6 +21,7 @@
*/
#ifndef __mcoldfire__
+ .cpu 68030
.arch 68030
#endif
Index: sys/arch/intr.S
===================================================================
RCS file: /mint/freemint/sys/arch/intr.S,v
retrieving revision 1.38
diff -u -r1.38 intr.S
--- sys/arch/intr.S 26 Sep 2012 20:14:26 -0000 1.38
+++ sys/arch/intr.S 3 Mar 2016 13:28:08 -0000
@@ -19,6 +19,7 @@
// All rights reserved.
#ifndef __mcoldfire__
+ .cpu 68030
.arch 68030
#endif
Index: sys/arch/mmu040.S
===================================================================
RCS file: /mint/freemint/sys/arch/mmu040.S,v
retrieving revision 1.8
diff -u -r1.8 mmu040.S
--- sys/arch/mmu040.S 12 Jan 2013 10:04:12 -0000 1.8
+++ sys/arch/mmu040.S 3 Mar 2016 13:28:08 -0000
@@ -51,7 +51,8 @@
// Input:
// 4(sp): New root pointer to write into URP and SRP
- .arch 68040
+ .cpu 68040
+ .arch 68040
.text
.globl _set_mmu
Index: sys/arch/syscall.S
===================================================================
RCS file: /mint/freemint/sys/arch/syscall.S,v
retrieving revision 1.38
diff -u -r1.38 syscall.S
--- sys/arch/syscall.S 18 Feb 2015 22:45:21 -0000 1.38
+++ sys/arch/syscall.S 3 Mar 2016 13:28:08 -0000
@@ -54,6 +54,7 @@
*/
#ifndef __mcoldfire__
+ .cpu 68030
.arch 68030
#endif
Index: sys/libkern/md5.c
===================================================================
RCS file: /mint/freemint/sys/libkern/md5.c,v
retrieving revision 1.3
diff -u -r1.3 md5.c
--- sys/libkern/md5.c 8 Jun 2007 22:38:18 -0000 1.3
+++ sys/libkern/md5.c 3 Mar 2016 13:28:08 -0000
@@ -160,8 +160,14 @@
byteReverse((unsigned long *) ctx->in, 14);
/* Append length in bits and transform */
- ((__u32 *) ctx->in)[14] = ctx->bits[0];
- ((__u32 *) ctx->in)[15] = ctx->bits[1];
+ {
+ __u32 *ptr;
+
+ ptr = (__u32 *)&ctx->in[56];
+ *ptr = ctx->bits[0];
+ ptr = (__u32 *)&ctx->in[60];
+ *ptr = ctx->bits[1];
+ }
MD5Transform(ctx->buf, (__u32 *) ctx->in);
byteReverse(ctx->buf, 4);
Index: sys/usb/src.km/ucd/ehci/ehci-hcd.c
===================================================================
RCS file: /mint/freemint/sys/usb/src.km/ucd/ehci/ehci-hcd.c,v
retrieving revision 1.14
diff -u -r1.14 ehci-hcd.c
--- sys/usb/src.km/ucd/ehci/ehci-hcd.c 20 Mar 2015 16:42:04 -0000 1.14
+++ sys/usb/src.km/ucd/ehci/ehci-hcd.c 3 Mar 2016 13:28:08 -0000
@@ -190,9 +190,13 @@
DEBUG(("[CAPBAS] %08lx", ehci_readl(&gehci->hccr->cr_capbase)));
DEBUG(("[HCSPAR] %08lx", ehci_readl(&gehci->hccr->cr_hcsparams)));
DEBUG(("[HCCPAR] %08lx", ehci_readl(&gehci->hccr->cr_hccparams)));
+
while (i) {
+ unsigned long *ptr = (unsigned long *)&gehci->hccr->cr_hcsp_portrt[i - 1];
+ (void)ptr;
+
DEBUG(("capability reg port[%d] 0x%08lx",
- i, ehci_readl(&gehci->hccr->cr_hcsp_portrt[i - 1])));
+ i, ehci_readl(ptr)));
i--;
};
Index: sys/xfs/minixfs/dir.c
===================================================================
RCS file: /mint/freemint/sys/xfs/minixfs/dir.c,v
retrieving revision 1.2
diff -u -r1.2 dir.c
--- sys/xfs/minixfs/dir.c 27 Sep 2000 11:33:27 -0000 1.2
+++ sys/xfs/minixfs/dir.c 3 Mar 2016 13:28:08 -0000
@@ -101,7 +101,11 @@
* store old inode num in last 2 bytes of name
* This allows recovery in case of accident
*/
- *((ushort *) &try->d_name[mfname - 2]) = inumtemp;
+ {
+ ushort *ptr;
+ ptr = (ushort *)&try->d_name[mfname - 2];
+ *ptr = inumtemp;
+ }
bio_MARK_MODIFIED (&(bio), u);
}