From 606b2123980afb59ace622bb8cd33a1cccbb87ba Mon Sep 17 00:00:00 2001 From: deraadt Date: Fri, 15 Dec 1995 15:41:45 +0000 Subject: [PATCH] from netbsd: Change mips __warn_references() macro to use the ELF warning features in binutils 2.6 and (patched) gcc 2.7.2. Only works with gcc in ANSI C mode, for now. --- sys/arch/pmax/include/cdefs.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/arch/pmax/include/cdefs.h b/sys/arch/pmax/include/cdefs.h index 1b4a6cc51ee..47499b695ea 100644 --- a/sys/arch/pmax/include/cdefs.h +++ b/sys/arch/pmax/include/cdefs.h @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.3 1995/05/03 06:04:54 mellon Exp $ */ +/* $NetBSD: cdefs.h,v 1.4 1995/12/15 01:17:04 jonathan Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. @@ -33,6 +33,13 @@ #define _C_LABEL(x) _STRING(x) #define __indr_references(sym,msg) /* nothing */ + +#if defined __GNUC__ && defined __STDC__ +#define __warn_references(sym, msg) \ + static const char __evoke_link_warning_##sym[] \ + __attribute__ ((section (".gnu.warning." #sym))) = msg; +#else #define __warn_references(sym,msg) /* nothing */ +#endif #endif /* !_MACHINE_CDEFS_H_ */ -- 2.20.1