Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode unbreak build on netbsd
details: https://anonhg.NetBSD.org/src/rev/b896f1fd3e0e
branches: trunk
changeset: 769219:b896f1fd3e0e
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Sep 03 19:06:48 2011 +0000
description:
unbreak build on netbsd
diffstat:
sys/arch/usermode/conf/Makefile.usermode | 5 +++--
sys/arch/usermode/dev/cpu.c | 12 +++++++++---
2 files changed, 12 insertions(+), 5 deletions(-)
diffs (62 lines):
diff -r ea88436c14ca -r b896f1fd3e0e sys/arch/usermode/conf/Makefile.usermode
--- a/sys/arch/usermode/conf/Makefile.usermode Sat Sep 03 18:42:13 2011 +0000
+++ b/sys/arch/usermode/conf/Makefile.usermode Sat Sep 03 19:06:48 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.usermode,v 1.18 2011/09/03 18:42:13 jmcneill Exp $
+# $NetBSD: Makefile.usermode,v 1.19 2011/09/03 19:06:48 jmcneill Exp $
OPT_CPU_HOST= %CPU_HOST%
.if !empty(OPT_CPU_HOST)
@@ -30,10 +30,11 @@
CPPFLAGS+=-Dstrtoul=netbsd_strtoul
CPPFLAGS+=-Dstrtoll=netbsd_strtoll
CPPFLAGS+=-Dstrtoull=netbsd_strtoull
+CPPFLAGS+=-D__NetBSD__ -Wno-unused-but-set-variable
.endif
DEFCOPTS= -fno-omit-frame-pointer
-CPPFLAGS+= -Dusermode -D__NetBSD__ -Wno-unused-but-set-variable
+CPPFLAGS+= -Dusermode
CPPFLAGS.init_main.c+= -Dmain=kernmain
OPT_SDL= %SDL%
diff -r ea88436c14ca -r b896f1fd3e0e sys/arch/usermode/dev/cpu.c
--- a/sys/arch/usermode/dev/cpu.c Sat Sep 03 18:42:13 2011 +0000
+++ b/sys/arch/usermode/dev/cpu.c Sat Sep 03 19:06:48 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.26 2011/09/03 15:00:28 jmcneill Exp $ */
+/* $NetBSD: cpu.c,v 1.27 2011/09/03 19:06:49 jmcneill Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "opt_cpu.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.26 2011/09/03 15:00:28 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.27 2011/09/03 19:06:49 jmcneill Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -52,6 +52,12 @@
#include <uvm/uvm_extern.h>
#include <uvm/uvm_page.h>
+#if __GNUC_PREREQ__(4,4)
+#define cpu_unreachable() __builtin_unreachable()
+#else
+#define cpu_unreachable() do { thunk_abort(); } while (0)
+#endif
+
static int cpu_match(device_t, cfdata_t, void *);
static void cpu_attach(device_t, device_t, void *);
@@ -133,7 +139,7 @@
usermode_reboot();
/* NOTREACHED */
- __builtin_unreachable();
+ cpu_unreachable();
}
void
Home |
Main Index |
Thread Index |
Old Index