From 480316c2164bd64b9b3eceafcf06a408c29c3ad0 Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 3 Dec 2003 18:41:35 +0000 Subject: [PATCH] Make sure this still compiles with gcc-2.95. Hello vaxen! --- lib/csu/common_elf/crtbegin.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/csu/common_elf/crtbegin.c b/lib/csu/common_elf/crtbegin.c index 0bc1f85eff4c..79bdc4d376ad 100644 --- a/lib/csu/common_elf/crtbegin.c +++ b/lib/csu/common_elf/crtbegin.c @@ -1,4 +1,4 @@ -/* $NetBSD: crtbegin.c,v 1.23 2003/12/02 03:01:19 lukem Exp $ */ +/* $NetBSD: crtbegin.c,v 1.24 2003/12/03 18:41:35 christos Exp $ */ /*- * Copyright (c) 1998, 2001, 2002 The NetBSD Foundation, Inc. @@ -52,6 +52,12 @@ #include #include +#if __GNUC_PREREQ__(3, 0) +#define USED_NOINLINE __attribute__((__used__,__noinline__)) +#else +#define USED_NOINLINE __attribute__((__unused__)) +#endif + #ifdef DWARF2_EH #include "dwarf2_eh.h" #endif @@ -133,7 +139,7 @@ __dtors(void) (**p++)(); } -static void __attribute__((__used__,__noinline__)) +static void USED_NOINLINE __do_global_ctors_aux(void) { static int initialized; @@ -166,7 +172,7 @@ __do_global_ctors_aux(void) } MD_CALL_STATIC_FUNCTION(.init, __do_global_ctors_aux) -static void __attribute__((__used__,__noinline__)) +static void USED_NOINLINE __do_global_dtors_aux(void) { static int finished;