diff options
author | markm <markm@FreeBSD.org> | 2002-04-21 11:11:02 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2002-04-21 11:11:02 +0000 |
commit | 7fdd1bc0e377173b120b6cbba8704681093ff38c (patch) | |
tree | bb68bc82746f9221b9a448fec00a88f55e7cf25c /sys/sys/linker_set.h | |
parent | 578e65f142f837c72b6bfe0c3f7d5137d90ebd35 (diff) | |
download | FreeBSD-src-7fdd1bc0e377173b120b6cbba8704681093ff38c.zip FreeBSD-src-7fdd1bc0e377173b120b6cbba8704681093ff38c.tar.gz |
Wrap GCC-specific stuff and provide alternative for lint.
Diffstat (limited to 'sys/sys/linker_set.h')
-rw-r--r-- | sys/sys/linker_set.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/sys/linker_set.h b/sys/sys/linker_set.h index 0fa115f..98f56ab 100644 --- a/sys/sys/linker_set.h +++ b/sys/sys/linker_set.h @@ -42,6 +42,7 @@ * Private macros, not to be used outside this header file. */ /* this bit of h0h0magic brought to you by cpp */ +#ifdef __GNUC__ #define __GLOBL(sym) __GLOBL2(sym) #define __GLOBL2(sym) __asm(".globl " #sym) @@ -50,6 +51,12 @@ __GLOBL(__CONCAT(__stop_set_,set)); \ static void const * const __set_##set##_sym_##sym \ __attribute__((__section__("set_" #set),__unused__)) = &sym +#else /* !__GNUC__ */ +#ifndef lint +#error "This file needs to be compiled by GCC or lint" +#endif /* lint */ +#define __MAKE_SET(set, sym) extern void const * const (__set_##set##_sym_##sym) +#endif /* __GNUC__ */ /* * Public macros. |