[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] almost there..... Newbie trying to compile Mint v1.17...
On Fri, 2011-02-11 at 07:25 -0800, WongCK wrote:
> Man, you are fast :-)
> The several c source compiled with the more.patch. But this one failed:
>
> make buildkernel kernel=060
> make[1]: Entering directory `/e/dev/freemint-1_17_0/sys'
> Making all in arch
> make[2]: Entering directory `/e/dev/freemint-1_17_0/sys/arch'
> Making all in magic
> make[3]: Entering directory `/e/dev/freemint-1_17_0/sys/arch/magic'
> make[3]: Leaving directory `/e/dev/freemint-1_17_0/sys/arch/magic'
> cd .compile_060; make all
> make[3]: Entering directory `/e/dev/freemint-1_17_0/sys/arch/.compile_060'
> make[3]: Leaving directory `/e/dev/freemint-1_17_0/sys/arch/.compile_060'
> make[2]: Leaving directory `/e/dev/freemint-1_17_0/sys/arch'
> Making all in buildinfo
> make[2]: Entering directory `/e/dev/freemint-1_17_0/sys/buildinfo'
> make[2]: Leaving directory `/e/dev/freemint-1_17_0/sys/buildinfo'
> cd .compile_060; make all
> make[2]: Entering directory `/e/dev/freemint-1_17_0/sys/.compile_060'
> gcc -I.. -D__KERNEL__ -DLANG_ENGLISH -DVERBOSE_BOOT -DWITH_SINGLE_TASK_SUPPORT
> -DCRYPTO_CODE -DSOFT_UNITABLE -DBUILTIN_SHELL -DM68060 -m68060 -Werror -mshort
> -g -O2 -fomit-frame-pointer -Wall -Wmissing-prototypes -Winline -Wshadow
> -Wpointer-arith -Wcast-qual -Werror -c ../init.c -o init.o
> cc1: warnings being treated as errors
> In file included from ../init.c:57:
> ../k_exit.h:38: warning: declaration of `curproc' shadows global declaration
> make[2]: *** [init.o] Error 1
> make[2]: Leaving directory `/e/dev/freemint-1_17_0/sys/.compile_060'
> make[1]: *** [_stmp_060] Error 2
> make[1]: Leaving directory `/e/dev/freemint-1_17_0/sys'
> make: *** [060] Error 2
O.k. seeing as you are still going.
Checkout a fresh CVS again, and apply this large patch.
Alan.
Index: sys/biosfs.c
===================================================================
RCS file: /mint/freemint/sys/biosfs.c,v
retrieving revision 1.28
diff -u -r1.28 biosfs.c
--- sys/biosfs.c 13 Jan 2010 17:13:49 -0000 1.28
+++ sys/biosfs.c 11 Feb 2011 15:38:14 -0000
@@ -1287,11 +1287,13 @@
static long _cdecl
bios_twrite (FILEPTR *f, const char *buf, long bytes)
{
- union { const char *b; long *l;} ptr; ptr.b = buf;
long *r;
long ret = 0;
int bdev = f->fc.aux;
struct bios_file *b = (struct bios_file *) f->fc.index;
+ union { const char *b; long *l;} ptr;
+
+ ptr.b = buf;
r = ptr.l;// (long *) buf;
Index: sys/block_IO.c
===================================================================
RCS file: /mint/freemint/sys/block_IO.c,v
retrieving revision 1.22.2.2
diff -u -r1.22.2.2 block_IO.c
--- sys/block_IO.c 10 Jan 2011 22:01:22 -0000 1.22.2.2
+++ sys/block_IO.c 11 Feb 2011 15:38:14 -0000
@@ -803,8 +803,10 @@
INLINE long
bio_writeout (DI *di, const void *buffer, ulong size, ulong sector)
{
- union { const void *cvb; void *b;} ptr; ptr.cvb = buffer;
register long r;
+ union { const void *cvb; void *b;} ptr;
+
+ ptr.cvb = buffer;
/* NASTY HACK, FIXME */
#ifdef FLOPPY_ROUTINES
Index: sys/cnf_mint.c
===================================================================
RCS file: /mint/freemint/sys/cnf_mint.c,v
retrieving revision 1.19
diff -u -r1.19 cnf_mint.c
--- sys/cnf_mint.c 13 Jan 2010 17:13:49 -0000 1.19
+++ sys/cnf_mint.c 11 Feb 2011 15:38:14 -0000
@@ -407,9 +407,11 @@
static void
pCB_exec(const char *path, const char *line, struct parsinf *inf)
{
- union { const char *cc; char *c;} pathptr; pathptr.cc = path;
char cmdline[128];
int i;
+ union { const char *cc; char *c;} pathptr;
+
+ pathptr.cc = path;
i = strlen(line);
if (i > 126) i = 126;
Index: sys/fatfs.c
===================================================================
RCS file: /mint/freemint/sys/fatfs.c,v
retrieving revision 1.50.2.1
diff -u -r1.50.2.1 fatfs.c
--- sys/fatfs.c 14 Jan 2011 17:03:32 -0000 1.50.2.1
+++ sys/fatfs.c 11 Feb 2011 15:38:15 -0000
@@ -7074,11 +7074,14 @@
if (r == E_OK)
{
- register union { const char *cc; const unsigned char *c; } nameptr; nameptr.cc = name;
+ register union { const char *cc; const unsigned char *c; } nameptr;
register const char *table = DEFAULT_T (dir->dev);
- register const uchar *src = nameptr.c;
+ register const uchar *src;
register char *dst = odir.info->name;
register long i;
+
+ nameptr.cc = name;
+ src = nameptr.c;
for (i = 0; i < 11 && *src; i++)
{
Index: sys/ipc_socketdev.c
===================================================================
RCS file: /mint/freemint/sys/ipc_socketdev.c,v
retrieving revision 1.18
diff -u -r1.18 ipc_socketdev.c
--- sys/ipc_socketdev.c 13 Jan 2010 17:13:49 -0000 1.18
+++ sys/ipc_socketdev.c 11 Feb 2011 15:38:15 -0000
@@ -117,9 +117,13 @@
static long
sock_write (FILEPTR *f, const char *buf, long buflen)
{
- union { const char *cc; char *c; } bufptr; bufptr.cc = buf;
+ union { const char *cc; char *c; } bufptr;
struct socket *so = (struct socket *) f->devinfo;
- struct iovec iov[1] = {{ bufptr.c, buflen }};
+ struct iovec iov[1];
+
+ bufptr.cc = buf;
+ iov[0].iov_base = bufptr.c;
+ iov[0].iov_len = buflen;
SOCKDEV_ASSERT ((so));
Index: sys/k_exec.c
===================================================================
RCS file: /mint/freemint/sys/k_exec.c,v
retrieving revision 1.45
diff -u -r1.45 k_exec.c
--- sys/k_exec.c 2 Jun 2010 20:24:58 -0000 1.45
+++ sys/k_exec.c 11 Feb 2011 15:38:15 -0000
@@ -323,9 +323,9 @@
else if (mkload)
{
char cbuf[128];
- union { const char *cc; char *c; } tail; tail.cc = ptr_2.cc;
//const char *tail = ptr_2.cc;
long ret;
+ union { const char *cc; char *c; } tail; tail.cc = ptr_2.cc;
if (overlay)
{
Index: sys/k_exit.h
===================================================================
RCS file: /mint/freemint/sys/k_exit.h,v
retrieving revision 1.5
diff -u -r1.5 k_exit.h
--- sys/k_exit.h 28 Oct 2005 17:58:06 -0000 1.5
+++ sys/k_exit.h 11 Feb 2011 15:38:15 -0000
@@ -35,7 +35,7 @@
# include "mint/proc.h"
-long terminate (struct proc *curproc, short code, short que);
+long terminate (struct proc *p, short code, short que);
long _cdecl sys_pterm (short code);
long kernel_pterm (struct proc *p, short code);
long _cdecl sys_pterm0 (void);
Index: sys/ramfs.c
===================================================================
RCS file: /mint/freemint/sys/ramfs.c,v
retrieving revision 1.19
diff -u -r1.19 ramfs.c
--- sys/ramfs.c 11 Aug 2010 12:46:18 -0000 1.19
+++ sys/ramfs.c 11 Feb 2011 15:38:15 -0000
@@ -1448,10 +1448,12 @@
static long _cdecl
ram_opendir (DIR *dirh, int flags)
{
- union { char *c; DIRLST **d; } ptr; ptr.c = dirh->fsstuff;
+ union { char *c; DIRLST **d; } ptr;
COOKIE *c = (COOKIE *) dirh->fc.index;
DIRLST *l;
+ ptr.c = dirh->fsstuff;
+
if (!IS_DIR (c))
{
RAM_DEBUG (("ramfs: ram_opendir: dir not a DIR!"));
@@ -1472,10 +1474,12 @@
static long _cdecl
ram_readdir (DIR *dirh, char *nm, int nmlen, fcookie *fc)
{
- union { char *c; DIRLST **d;} ptr; ptr.c = dirh->fsstuff;
+ union { char *c; DIRLST **d;} ptr;
DIRLST *l;
long r = ENMFILES;
+ ptr.c = dirh->fsstuff;
+
l = *ptr.d; // *(DIRLST **) (&dirh->fsstuff);
if (l)
{
Index: sys/umemory.c
===================================================================
RCS file: /mint/freemint/sys/umemory.c,v
retrieving revision 1.8
diff -u -r1.8 umemory.c
--- sys/umemory.c 13 Jan 2010 17:13:49 -0000 1.8
+++ sys/umemory.c 11 Feb 2011 15:38:15 -0000
@@ -148,9 +148,11 @@
static struct umem_descriptor *
umem_split(struct umem_descriptor *descr, unsigned long n, unsigned long size)
{
- union { char *c; struct umem_descriptor *d; } ptr; ptr.d = descr;
+ union { char *c; struct umem_descriptor *d; } ptr;
struct umem_descriptor *descr1;
+ ptr.d = descr;
+
descr1 = (void *)(ptr.c + (n - size));
descr1->head_magic = UMEM_HEAD_MAGIC;
@@ -171,7 +173,10 @@
umem_lookup(struct proc *p, MEMREGION *m, unsigned long size, void **result)
{
struct umem_descriptor *descr;
- union { char **c; void **v; } resultptr; resultptr.v = result;
+ union { char **c; void **v; } resultptr;
+
+ resultptr.v = result;
+
/* default is nothing found */
*resultptr.v = NULL;
@@ -306,10 +311,12 @@
void _cdecl
_ufree(void *plac, const char *func)
{
- union { char *c; void *v; long l; struct umem_descriptor *descr; } placeptr; placeptr.v = plac;
+ union { char *c; void *v; long l; struct umem_descriptor *descr; } placeptr;
struct proc *p = get_curproc();
MEMREGION *m;
+ placeptr.v = plac;
+
DEBUG(("ufree(0x%lx, %s)", plac, func));
m = proc_addr2region(p, placeptr.l);
Index: sys/unifs.c
===================================================================
RCS file: /mint/freemint/sys/unifs.c,v
retrieving revision 1.26
diff -u -r1.26 unifs.c
--- sys/unifs.c 7 Apr 2010 21:38:38 -0000 1.26
+++ sys/unifs.c 11 Feb 2011 15:38:16 -0000
@@ -238,12 +238,14 @@
static long
do_ulookup (fcookie *dir, const char *nam, fcookie *fc, UNIFILE **up)
{
- union { const char *cc; char *c; } nameptr; nameptr.cc = nam;
+ union { const char *cc; char *c; } nameptr;
UNIFILE *u;
long drvs;
FILESYS *fs;
fcookie *tmp;
long changed;
+
+ nameptr.cc = nam;
TRACE (("uni_lookup(%s)", nam));
Index: sys/xhdi.h
===================================================================
RCS file: /mint/freemint/sys/xhdi.h,v
retrieving revision 1.3
diff -u -r1.3 xhdi.h
--- sys/xhdi.h 13 Jun 2001 20:21:35 -0000 1.3
+++ sys/xhdi.h 11 Feb 2011 15:38:16 -0000
@@ -132,7 +132,7 @@
long XHEject (ushort major, ushort minor, ushort do_eject, ushort key);
long XHDrvMap (void);
long XHInqDev (ushort bios_device, ushort *major, ushort *minor, ulong *start_sector, __BPB *bpb);
-long XHInqDriver (ushort bios_device, char *name, char *version, char *company, ushort *ahdi_version, ushort *maxIPL);
+long XHInqDriver (ushort bios_device, char *name, char *ver, char *company, ushort *ahdi_version, ushort *maxIPL);
long XHNewCookie (void *newcookie);
long XHReadWrite (ushort major, ushort minor, ushort rwflag, ulong recno, ushort count, void *buf);
long XHInqTarget2 (ushort major, ushort minor, ulong *block_size, ulong *device_flags, char *product_name, ushort stringlen);
Index: sys/mint/kcompiler.h
===================================================================
RCS file: /mint/freemint/sys/mint/kcompiler.h,v
retrieving revision 1.7
diff -u -r1.7 kcompiler.h
--- sys/mint/kcompiler.h 13 Jan 2010 17:13:50 -0000 1.7
+++ sys/mint/kcompiler.h 11 Feb 2011 15:38:16 -0000
@@ -68,15 +68,12 @@
# endif
-/* define to mark a function as inline: */
-# ifdef __GNUC__
-# define INLINE static inline __attribute__((always_inline))
-# endif
-
-/* default: */
-# ifndef INLINE
-# define INLINE static
-# endif
+/* Forces a function to be always inlined. */
+#if __GNUC_PREREQ (3,2)
+# define INLINE static __inline __attribute__ ((__always_inline__))
+#else
+# define INLINE static __inline
+#endif
/* define to indicate unused variables: */
# ifdef __TURBOC__
Index: sys/sockets/global.h
===================================================================
RCS file: /mint/freemint/sys/sockets/global.h,v
retrieving revision 1.9
diff -u -r1.9 global.h
--- sys/sockets/global.h 13 Jan 2010 17:13:50 -0000 1.9
+++ sys/sockets/global.h 11 Feb 2011 15:38:16 -0000
@@ -101,7 +101,7 @@
return 0;
}
-static inline __attribute__((always_inline)) void
+INLINE void
so_wakersel (struct socket *so)
{
if (so->rsel)