Initial revision
[openwrt.git] / toolchain / gcc / i386-gcc-soft-float.patch
1 diff -urN gcc-3.3.2-orig/gcc/config/i386/i386.h gcc-3.3.2/gcc/config/i386/i386.h
2 --- gcc-3.3.2-orig/gcc/config/i386/i386.h       2003-06-25 16:18:31.000000000 -0500
3 +++ gcc-3.3.2/gcc/config/i386/i386.h    2003-10-22 01:46:57.000000000 -0500
4 @@ -653,6 +653,7 @@
5  /* Define for XFmode or TFmode extended real floating point support.
6     The XFmode is specified by i386 ABI, while TFmode may be faster
7     due to alignment and simplifications in the address calculations.  */
8 +#if 0
9  #define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : 96)
10  #define MAX_LONG_DOUBLE_TYPE_SIZE 128
11  #ifdef __x86_64__
12 @@ -660,6 +661,17 @@
13  #else
14  #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 96
15  #endif
16 +#else
17 +         /* Set up for x86 soft float with 64-bit long doubles, since that's
18 +          * all the soft float emulation supports. */
19 +#define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : (TARGET_80387 ? 96 : 64))
20 +#define MAX_LONG_DOUBLE_TYPE_SIZE 128
21 +#ifdef __x86_64__
22 +#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128
23 +#else
24 +#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE (TARGET_80387 ? 96 : 64)
25 +#endif
26 +#endif
27  
28  /* Set the value of FLT_EVAL_METHOD in float.h.  When using only the
29     FPU, assume that the fpcw is set to extended precision; when using
30 diff -urN gcc-3.3.2-orig/gcc/config/t-linux gcc-3.3.2/gcc/config/t-linux
31 --- gcc-3.3.2-orig/gcc/config/t-linux-uclibc    2003-06-04 11:56:11.000000000 -0500
32 +++ gcc-3.3.2/gcc/config/t-linux-uclibc 2003-10-22 01:46:39.000000000 -0500
33 @@ -21,3 +21,28 @@
34  LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
35    $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
36  LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
37 +
38 +##############################################
39 +# We want fine grained libraries, so use the new code to build the
40 +# floating point emulation libraries.
41 +FPBIT = fp-bit.c
42 +DPBIT = dp-bit.c
43 +
44 +#LIB2FUNCS_EXTRA = xp-bit.c
45 +
46 +dp-bit.c: $(srcdir)/config/fp-bit.c
47 +       echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
48 +       echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
49 +       echo '#endif'           >> dp-bit.c
50 +       cat $(srcdir)/config/fp-bit.c >> dp-bit.c
51 +
52 +fp-bit.c: $(srcdir)/config/fp-bit.c
53 +       echo '#define FLOAT' > fp-bit.c
54 +       echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
55 +       echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
56 +       echo '#endif'           >> fp-bit.c
57 +       cat $(srcdir)/config/fp-bit.c >> fp-bit.c
58 +
59 +#MULTILIB_OPTIONS = msoft-float
60 +#MULTILIB_DIRNAMES = soft-float
61 +