RTEMS i386 target changes

Joel Sherrill joel.sherrill@OARcorp.com
Fri Dec 1 09:57:00 GMT 2000


This includes one change to the non-RTEMS t-i386bare to
stay in sync.  It was augmented to also build soft floating
point support.  It was not enhanced to build CPU model
variants like the RTEMS t- file.

2000-12-01      Joel Sherrill <joel@OARcorp.com>

        * config/i386/rtems.h, config/i386/rtemself.h (CPP_SPEC,
CC1_SPEC):
        Define -D_SOFT_FLOAT when using soft floating point.
        * config/i386/t-i386bare: Built soft floating point libraries.
        * config/i386/t-rtems-i386: Build soft floating point libraries
and
        add multilib options for various CPU models (m486, mpentium,
        mpentiumpro, k6, and soft-float).


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985
Index: gcc/config/i386/rtems.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/rtems.h,v
retrieving revision 1.11
diff -u -r1.11 rtems.h
--- rtems.h	2000/11/02 23:29:10	1.11
+++ rtems.h	2000/12/01 17:33:40
@@ -26,6 +26,12 @@
 #undef CPP_PREDEFINES
 #define CPP_PREDEFINES "-Drtems -D__rtems__ -Asystem=rtems"
 
+undef CPP_SPEC
+define CPP_SPEC "%(cpp_cpu) %{msoft-float:-D_SOFT_FLOAT}"
+
+undef CC1_SPEC
+define CC1_SPEC "%(cc1_cpu)"
+
 /* Generate calls to memcpy, memcmp and memset.  */
 #ifndef TARGET_MEM_FUNCTIONS
 #define TARGET_MEM_FUNCTIONS
Index: gcc/config/i386/rtemself.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/rtemself.h,v
retrieving revision 1.9
diff -u -r1.9 rtemself.h
--- rtemself.h	2000/11/02 23:29:10	1.9
+++ rtemself.h	2000/12/01 17:33:40
@@ -97,6 +97,12 @@
 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
   asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
 
+#undef CPP_SPEC
+#define CPP_SPEC "%(cpp_cpu) %{msoft-float:-D_SOFT_FLOAT}"
+
+#undef CC1_SPEC
+#define CC1_SPEC "%(cc1_cpu)"
+
 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
 
Index: gcc/config/i386/t-i386bare
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/t-i386bare,v
retrieving revision 1.2
diff -u -r1.2 t-i386bare
--- t-i386bare	1998/12/16 21:04:30	1.2
+++ t-i386bare	2000/12/01 17:33:40
@@ -1,3 +1,35 @@
 # The i386 md has all of these taken care of, according to sef.
 LIBGCC1 =
 CROSS_LIBGCC1 =
+
+# 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
+
+LIB2FUNCS_EXTRA = xp-bit.c
+
+dp-bit.c: $(srcdir)/config/fp-bit.c
+	echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
+	echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
+	echo '#endif'           >> dp-bit.c
+	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
+
+fp-bit.c: $(srcdir)/config/fp-bit.c
+	echo '#define FLOAT' > fp-bit.c
+	echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
+	echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
+	echo '#endif'           >> fp-bit.c
+	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+xp-bit.c: $(srcdir)/config/fp-bit.c
+	echo '#define EXTENDED_FLOAT_STUBS' > xp-bit.c
+	cat $(srcdir)/config/fp-bit.c >> xp-bit.c
+
+MULTILIB_OPTIONS = msoft-float
+MULTILIB_DIRNAMES = soft-float
+
+EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
Index: gcc/config/i386/t-rtems-i386
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/t-rtems-i386,v
retrieving revision 1.1
diff -u -r1.1 t-rtems-i386
--- t-rtems-i386	1999/09/14 09:52:06	1.1
+++ t-rtems-i386	2000/12/01 17:33:40
@@ -15,3 +15,37 @@
 	sed -e '/^!/d' <$(srcdir)/config/i386/sol2-cn.asm >crtn.s
 	$(GCC_FOR_TARGET) -c -o crtn.o crtn.s
 
+# 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
+
+LIB2FUNCS_EXTRA = xp-bit.c
+
+dp-bit.c: $(srcdir)/config/fp-bit.c
+	echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
+	echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
+	echo '#endif'           >> dp-bit.c
+	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
+
+fp-bit.c: $(srcdir)/config/fp-bit.c
+	echo '#define FLOAT' > fp-bit.c
+	echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
+	echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
+	echo '#endif'           >> fp-bit.c
+	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+xp-bit.c: $(srcdir)/config/fp-bit.c
+	echo '#define EXTENDED_FLOAT_STUBS' > xp-bit.c
+	cat $(srcdir)/config/fp-bit.c >> xp-bit.c
+
+MULTILIB_OPTIONS = m486/mpentium/mpentiumpro/mcpu=k6 msoft-float
+MULTILIB_DIRNAMES= m486 mpentium mpentiumpro k6 soft-float
+MULTILIB_MATCHES =
+
+MULTILIB_EXCEPTIONS = mpentium/msoft-float mpentiumpro/msoft-float mcpu=k6/msoft-float
+
+EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib


More information about the Gcc mailing list