This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 3.0.1 PATCH: Support #pragma weak on IRIX 5/6
On Tue, Jul 17, 2001 at 02:59:11PM +0200, Rainer Orth wrote:
>
> Index: defaults.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/defaults.h,v
> retrieving revision 1.31.2.6
> diff -u -p -r1.31.2.6 defaults.h
> --- defaults.h 2001/06/09 19:22:26 1.31.2.6
> +++ defaults.h 2001/07/17 12:49:38
> @@ -130,6 +130,18 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNA
> ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM)
> #endif
>
> +/* This is how we tell the assembler that a symbol is weak. */
> +#if !defined (ASM_OUTPUT_WEAK_ALIAS) && defined (ASM_OUTPUT_DEF)
> +#define ASM_OUTPUT_WEAK_ALIAS(STREAM, NAME, VALUE) \
> + do \
> + { \
> + ASM_WEAKEN_LABEL (STREAM, NAME); \
> + if (VALUE) \
> + ASM_OUTPUT_DEF (STREAM, NAME, VALUE); \
> + } \
> + while (0)
> +#endif
> +
Why not check if ASM_WEAKEN_LABEL is defined first? Like
if !defined (ASM_OUTPUT_WEAK_ALIAS) && defined (ASM_OUTPUT_DEF) && defined (ASM_WEAKEN_LABEL)
H.J.