From 7a0d577e383fd76fda2dc32db0469f620ba93772 Mon Sep 17 00:00:00 2001 From: chs Date: Mon, 19 Jul 2004 03:12:31 +0000 Subject: [PATCH] put RAS_DECL() back to declaring a function by default (since SH5 requires that). instead, allow to override the default definition and do so on hppa. --- sys/arch/hppa/include/types.h | 10 +++++++++- sys/sys/ras.h | 8 ++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/sys/arch/hppa/include/types.h b/sys/arch/hppa/include/types.h index 2a8b53e7a3f3..f7f28bd38aca 100644 --- a/sys/arch/hppa/include/types.h +++ b/sys/arch/hppa/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.9 2004/07/18 23:21:35 chs Exp $ */ +/* $NetBSD: types.h,v 1.10 2004/07/19 03:12:31 chs Exp $ */ /* $OpenBSD: types.h,v 1.6 2001/08/11 01:58:34 art Exp $ */ @@ -75,4 +75,12 @@ typedef int register_t; #define __HAVE_MD_RUNQUEUE #define __HAVE_RAS +/* + * On hppa, declaring RAS labels as functions doesn't work, since the toolchain + * will construct PLABELs for them. Make them "const char []" instead. + */ + +#define RAS_DECL(name) \ +extern const char __CONCAT(name,_ras_start[]), __CONCAT(name,_ras_end[]) + #endif /* _HPPA_TYPES_H_ */ diff --git a/sys/sys/ras.h b/sys/sys/ras.h index cdb23b7b7462..14ed0c59fe86 100644 --- a/sys/sys/ras.h +++ b/sys/sys/ras.h @@ -1,4 +1,4 @@ -/* $NetBSD: ras.h,v 1.4 2004/07/18 22:34:21 chs Exp $ */ +/* $NetBSD: ras.h,v 1.5 2004/07/19 03:12:31 chs Exp $ */ /*- * Copyright (c) 2002, 2004 The NetBSD Foundation, Inc. @@ -67,8 +67,12 @@ extern struct pool ras_pool; #else +#ifndef RAS_DECL + #define RAS_DECL(name) \ -extern const char __CONCAT(name,_ras_start[]), __CONCAT(name,_ras_end[]) +extern void __CONCAT(name,_ras_start(void)), __CONCAT(name,_ras_end(void)) + +#endif /* RAS_DECL */ /* * RAS_START and RAS_END contain implicit instruction reordering