OSDN Git Service

/home/richard/patches/freescale/head-submission/uclinux-oldabi.clog
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Jan 2007 18:33:28 +0000 (18:33 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Jan 2007 18:33:28 +0000 (18:33 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120909 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
gcc/config/m68k/uclinux-oldabi.h [new file with mode: 0644]
gcc/doc/install.texi

index c54f4a6..286f5f2 100644 (file)
@@ -1,3 +1,10 @@
+2007-01-18  Richard Sandiford  <richard@codesourcery.com>
+
+       * doc/install.texi: Document m68k-uclinuxoldabi.
+       * config.gcc (m68k-*-uclinuxoldabi): New configuration.
+       * config/m68k/uclinux-oldabi.h: New file, copied from
+       config/m68k/uclinux.h.
+
 2007-01-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
 
        * config/m32r/m32r-protos.h (m32r_expand_epilogue): Declare it.
index 2f47721..d611a8c 100644 (file)
@@ -1510,7 +1510,18 @@ m68k*-*-openbsd*)
        # we need collect2 until our bug is fixed...
        use_collect2=yes
        ;;
-m68k-*-uclinux*)               # Motorola m68k/ColdFire running uClinux with uClibc
+m68k-*-uclinuxoldabi*)         # Motorola m68k/ColdFire running uClinux
+                               # with uClibc, using the original
+                               # m68k-elf-based ABI
+       default_m68k_cpu=68020
+       tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/uclinux-oldabi.h"
+       tm_defines="${tm_defines} MOTOROLA USE_GAS"
+       tmake_file=m68k/t-uclinux
+       use_fixproto=no
+       ;;
+m68k-*-uclinux*)               # Motorola m68k/ColdFire running uClinux
+                               # with uClibc, using the new GNU/Linux-style
+                               # ABI.
        default_m68k_cpu=68020
        tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/uclinux.h"
        tm_defines="${tm_defines} MOTOROLA USE_GAS"
diff --git a/gcc/config/m68k/uclinux-oldabi.h b/gcc/config/m68k/uclinux-oldabi.h
new file mode 100644 (file)
index 0000000..82124f9
--- /dev/null
@@ -0,0 +1,65 @@
+/* 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, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, 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 -elf2flt -shared-lib-id 0} -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=linux");        \
+       builtin_assert ("system=unix");         \
+       builtin_assert ("system=posix");        \
+       if (TARGET_ID_SHARED_LIBRARY)           \
+         builtin_define ("__ID_SHARED_LIBRARY__"); \
+    }                                          \
+  while (0)
+
index 9400a7c..447c53d 100644 (file)
@@ -2429,6 +2429,8 @@ information are.
 @item
 @uref{#m68k-hp-hpux,,m68k-hp-hpux}
 @item
+@uref{#m68k-uclinux,,m68k-uclinux}
+@item
 @uref{#mips-x-x,,mips-*-*}
 @item
 @uref{#mips-sgi-irix5,,mips-sgi-irix5}
@@ -3429,6 +3431,9 @@ This @var{target} can either be a @option{-mcpu} argument or one of the
 following values: @samp{m68000}, @samp{m68010}, @samp{m68020}, @samp{m68030},
 @samp{m68040}, @samp{m68060}, @samp{m68020-40} and @samp{m68020-60}.
 
+@html
+<hr />
+@end html
 @heading @anchor{m68k-hp-hpux}m68k-hp-hpux
 HP 9000 series 300 or 400 running HP-UX@.  HP-UX version 8.0 has a bug in
 the assembler that prevents compilation of GCC@.  This
@@ -3482,6 +3487,17 @@ to look like:
 @html
 <hr />
 @end html
+@heading @anchor{m68k-x-uclinux}m68k-*-uclinux
+GCC 4.3 changed the uClinux configuration so that it uses the
+@samp{m68k-linux-gnu} ABI rather than the @samp{m68k-elf} ABI.
+It also added improved support for C++ and flat shared libraries,
+both of which were ABI changes.  However, you can still use the
+original ABI by configuring for @samp{m68k-uclinuxoldabi} or
+@samp{m68k-@var{vendor}-uclinuxoldabi}.
+
+@html
+<hr />
+@end html
 @heading @anchor{mips-x-x}mips-*-*
 If on a MIPS system you get an error message saying ``does not have gp
 sections for all it's [sic] sectons [sic]'', don't worry about it.  This