OSDN Git Service

* config/m68k/t-uclinux: New target Makefile fragment.
authorbernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 11 Oct 2003 04:23:20 +0000 (04:23 +0000)
committerbernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 11 Oct 2003 04:23:20 +0000 (04:23 +0000)
* config/m68k/uclinux.h: New target macro file.
* config.gcc (m68k-*-uclinux): New target definition.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72328 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
gcc/config/m68k/t-uclinux [new file with mode: 0644]
gcc/config/m68k/uclinux.h [new file with mode: 0644]

index 5daf7a0..e8a4ab6 100644 (file)
@@ -1,3 +1,9 @@
+2003-10-11  Bernardo Innocenti  <bernie@develer.com>
+
+       * config/m68k/t-uclinux: New target Makefile fragment.
+       * config/m68k/uclinux.h: New target macro file.
+       * config.gcc (m68k-*-uclinux): New target definition.
+
 2003-10-10  Roger Sayle  <roger@eyesopen.com>
 
        * builtins.c (builtin_mathfn_code): Generalize to check whether
index c3e54a4..3a51b08 100644 (file)
@@ -1323,6 +1323,12 @@ m68k-*-sysv4*)                   # Motorola m68k's running system V.4
        extra_parts="crtbegin.o crtend.o"
        use_fixproto=yes
        ;;
+m68k-*-uclinux*)               # Motorola m68k/ColdFire running uClinux with uClibc
+       tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/uclinux.h"
+       tm_defines="MOTOROLA USE_GAS"
+       tmake_file=m68k/t-uclinux
+       use_fixproto=no
+       ;;
 m68k-*-linux*)         # Motorola m68k's running GNU/Linux
                                # with ELF format using glibc 2
                                # aka the GNU/Linux C library 6.
diff --git a/gcc/config/m68k/t-uclinux b/gcc/config/m68k/t-uclinux
new file mode 100644 (file)
index 0000000..8d864bf
--- /dev/null
@@ -0,0 +1,24 @@
+LIB1ASMSRC = m68k/lb1sf68.asm
+LIB1ASMFUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
+   _double _float _floatex \
+   _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
+   _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
+
+LIB2FUNCS_EXTRA = fpgnulib.c xfgnulib.c
+
+fpgnulib.c: $(srcdir)/config/m68k/fpgnulib.c
+       cp $(srcdir)/config/m68k/fpgnulib.c fpgnulib.c
+xfgnulib.c: $(srcdir)/config/m68k/fpgnulib.c
+       echo '#define EXTFLOAT' > xfgnulib.c
+       cat $(srcdir)/config/m68k/fpgnulib.c >> xfgnulib.c
+
+MULTILIB_OPTIONS = m68000/m5200/m5206e/m528x/m5307/m5407/mcpu32 msep-data/mid-shared-library
+MULTILIB_DIRNAMES =
+MULTILIB_MATCHES = m68000=mc68000 m68000=m68302 mcpu32=m68332 m5206e=m5272
+MULTILIB_EXCEPTIONS = m68000/msep-data* m68000/mid-shared-library* msep-data* mid-shared-library*
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
+# We don't use crtbegin.o and crtend.o
+EXTRA_PARTS=
diff --git a/gcc/config/m68k/uclinux.h b/gcc/config/m68k/uclinux.h
new file mode 100644 (file)
index 0000000..0231539
--- /dev/null
@@ -0,0 +1,63 @@
+/* Definitions of target machine for GCC.  m68k/ColdFire based uClinux system
+   using ELF objects with special linker post-processing to produce FLAT
+   executables.
+
+   Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+
+/* Undo the definition of STARTFILE_SPEC from m68kelf.h so we'll
+   pick the default from gcc.c (just link crt0.o from multilib dir).  */
+#undef STARTFILE_SPEC
+
+/* Override the default LIB_SPEC from gcc.c.  We don't currently support
+   profiling, or libg.a.  */
+#undef LIB_SPEC
+#define LIB_SPEC "\
+%{mid-shared-library:-R libc.gdb%s} -lc \
+"
+
+/* we don't want a .eh_frame section.  */
+#define EH_FRAME_IN_DATA_SECTION
+
+/* ??? Quick hack to get constructors working.  Make this look more like a
+   COFF target, so the existing dejagnu/libgloss support works.  A better
+   solution would be to make the necessary dejagnu and libgloss changes so
+   that we can use normal the ELF constructor mechanism.  */
+#undef INIT_SECTION_ASM_OP
+#undef FINI_SECTION_ASM_OP
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC ""
+/* Bring in standard linux defines */
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define_std ("mc68000");         \
+       builtin_define ("__uClinux__");         \
+       builtin_define_std ("linux");           \
+       builtin_define_std ("unix");            \
+       builtin_define ("__gnu_linux__");       \
+       builtin_assert ("system=posix");        \
+       if (TARGET_ID_SHARED_LIBRARY)           \
+         builtin_define ("__ID_SHARED_LIBRARY__"); \
+    }                                          \
+  while (0)
+