This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with MIPS soft floating point support for gcc-3.2...


*sigh* and now the actual patch...

-S
diff -urN gcc-3.2/gcc/config/mips/t-linux gcc-3.2-patched/gcc/config/mips/t-linux
--- gcc-3.2/gcc/config/mips/t-linux	Wed Jan 16 17:22:02 2002
+++ gcc-3.2-patched/gcc/config/mips/t-linux	Thu Nov 14 10:36:34 2002
@@ -1,8 +1,36 @@
+# Compile libgcc2.a with pic.
+# No, we already have that, pretty much
+TARGET_LIBGCC2_CFLAGS = -G0 -Dinhibit_libc
+
 # We want fine grained libraries, so use the new code to build the
 # floating point emulation libraries.
 FPBIT = fp-bit.c
 DPBIT = dp-bit.c
 
+# Don't run fixproto
+STMP_FIXPROTO =
+
+# Don't install "assert.h" in gcc. We use the one in glibc.
+INSTALL_ASSERT_H =
+
+# nop@nop.com: -fdata-sections messes with crtstuff.c's strategy to get
+# ctors/dtors/eh in special sections.
+# Compile crtbeginS.o and crtendS.o with pic.
+# No, we already have that, pretty much
+CRTSTUFF_T_CFLAGS = -fno-data-sections -G0 -Dinhibit_libc
+CRTSTUFF_T_CFLAGS_S = -fno-data-sections -G0 -Dinhibit_libc
+# Hopefully that's enough.
+
+# Do not build libgcc1. Let gcc generate those functions. The GNU/Linux
+# C library can handle them.
+LIBGCC1 = 
+CROSS_LIBGCC1 =
+LIBGCC1_TEST =
+
+# Standard softfloat incantation:
+
+LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
+
 dp-bit.c: $(srcdir)/config/fp-bit.c
 	echo '#ifdef __MIPSEL__' > dp-bit.c
 	echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
@@ -18,3 +46,26 @@
 	echo '#undef US_SOFTWARE_GOFAST' >> fp-bit.c
 	echo '#define FLOAT' >> fp-bit.c
 	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+MULTILIB_OPTIONS = msoft-float
+MULTILIB_DIRNAMES = soft-float
+MULTILIB_MATCHES =
+MULTILIB_EXTRA_OPTS =
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
+EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o
+
+# Rules cloned from sparc/t-linux64 to get crtbeginS/crtendS working in multilib form.
+tcrtbeginS.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
+  defaults.h frame.h gbl-ctors.h
+	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
+	  -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS_S) \
+	  -c $(srcdir)/crtstuff.c -DCRT_BEGIN -o tcrtbeginS$(objext)
+
+tcrtendS.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
+  defaults.h frame.h gbl-ctors.h
+	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
+	  -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS_S) \
+	  -c $(srcdir)/crtstuff.c -DCRT_END -o tcrtendS$(objext)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]