Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/luna68k/luna68k Appease gcc -fno-common:



details:   https://anonhg.NetBSD.org/src/rev/949b46f4d56c
branches:  trunk
changeset: 780881:949b46f4d56c
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Fri Aug 10 12:48:14 2012 +0000

description:
Appease gcc -fno-common:
 - initialize cn_tab at runtime in pre-main luna68k_init()
Tested on LUNA.

diffstat:

 sys/arch/luna68k/luna68k/machdep.c |  19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diffs (54 lines):

diff -r 1a12c4aa4f46 -r 949b46f4d56c sys/arch/luna68k/luna68k/machdep.c
--- a/sys/arch/luna68k/luna68k/machdep.c        Fri Aug 10 12:37:39 2012 +0000
+++ b/sys/arch/luna68k/luna68k/machdep.c        Fri Aug 10 12:48:14 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.92 2012/07/28 19:08:24 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.93 2012/08/10 12:48:14 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.92 2012/07/28 19:08:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.93 2012/08/10 12:48:14 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -154,6 +154,13 @@
 
        extern paddr_t avail_start, avail_end;
 
+       /* initialize cn_tab for early console */
+#if 1
+       cn_tab = &syscons;
+#else
+       cn_tab = &romcons;
+#endif
+
        /*
         * Tell the VM system about available physical memory.  The
         * luna68k only has one segment.
@@ -772,12 +779,7 @@
 }
 #endif
 
-#if 1
-
-struct consdev *cn_tab = &syscons;
-
-#else
-
+#ifdef notyet
 /*
  * romcons is useful until m68k TC register is initialized.
  */
@@ -793,7 +795,6 @@
        makedev(7, 0), /* XXX */
        CN_DEAD,
 };
-struct consdev *cn_tab = &romcons;
 
 #define __             ((int **)0x41000000)
 #define GETC()         (*(int (*)())__[6])()



Home | Main Index | Thread Index | Old Index