Module Name: src Committed By: jmcneill Date: Sat Sep 3 19:06:49 UTC 2011
Modified Files: src/sys/arch/usermode/conf: Makefile.usermode src/sys/arch/usermode/dev: cpu.c Log Message: unbreak build on netbsd To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/usermode/conf/Makefile.usermode cvs rdiff -u -r1.26 -r1.27 src/sys/arch/usermode/dev/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/usermode/conf/Makefile.usermode diff -u src/sys/arch/usermode/conf/Makefile.usermode:1.18 src/sys/arch/usermode/conf/Makefile.usermode:1.19 --- src/sys/arch/usermode/conf/Makefile.usermode:1.18 Sat Sep 3 18:42:13 2011 +++ src/sys/arch/usermode/conf/Makefile.usermode Sat Sep 3 19:06:48 2011 @@ -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% Index: src/sys/arch/usermode/dev/cpu.c diff -u src/sys/arch/usermode/dev/cpu.c:1.26 src/sys/arch/usermode/dev/cpu.c:1.27 --- src/sys/arch/usermode/dev/cpu.c:1.26 Sat Sep 3 15:00:28 2011 +++ src/sys/arch/usermode/dev/cpu.c Sat Sep 3 19:06:49 2011 @@ -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 <jmcne...@invisible.ca> @@ -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