On Tue, 12 Jul 2011, Rainer Orth wrote:

> Only a couple of special defines (like FLOAT_WORD_ORDER_MISMATCH,
> QUIET_NAN_NEGATED) are moved to special t-* files in libgcc/config with
> [FDT]PBIT_CFLAGS similar to e.g. LIBGCC_SYNC_CFLAGS.  If it were
> possible to have gcc define some __LIBGCC_* macro corresponding to them,
> that would allow for further simplification.  Only if this mechanism
> couldn't handle the requirements have I resorted to introducing
> libgcc_tm_file snippets to handle them.

I *think*, based on how it's used, that FLOAT_WORD_ORDER_MISMATCH is 
intended to describe cases where BYTES_BIG_ENDIAN and 
FLOAT_WORDS_BIG_ENDIAN disagree.  (I say BYTES_BIG_ENDIAN not 
WORDS_BIG_ENDIAN only on the basis that pdp11 doesn't use 
FLOAT_WORD_ORDER_MISMATCH.)  That is, certain legacy ARM targets using FPA 
floating-point format.  The information for QUIET_NAN_NEGATED is in the 
qnan_msb_set field of struct real_format, I suppose.

> diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
> --- a/gcc/config/mips/t-linux64
> +++ b/gcc/config/mips/t-linux64
> @@ -1,4 +1,4 @@
> -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
> +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, Inc.
>  #
>  # This file is part of GCC.
>  #
> @@ -21,15 +21,3 @@ MULTILIB_DIRNAMES = n32 32 64
>  MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
>  
>  EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
> -
> -TPBIT = tp-bit.c
> -
> -tp-bit.c: $(srcdir)/config/fp-bit.c
> -     echo '#ifdef __MIPSEL__' > tp-bit.c
> -     echo '# define FLOAT_BIT_ORDER_MISMATCH' >> tp-bit.c
> -     echo '#endif' >> tp-bit.c
> -     echo '#if __LDBL_MANT_DIG__ == 113' >> tp-bit.c
> -     echo '#define QUIET_NAN_NEGATED' >> tp-bit.c
> -     echo '# define TFLOAT' >> tp-bit.c
> -     cat $(srcdir)/config/fp-bit.c >> tp-bit.c
> -     echo '#endif' >> tp-bit.c

How does your code replace the "#if __LDBL_MANT_DIG__ == 113" condition 
that stops tp-bit.c being built for o32 multilibs that don't have TFmode?

(The best way would I think be configure tests in libgcc that cause 
tp-bit.c only to be built at all for the relevant multilibs for this 
target.)

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to