t-uclinux: New target Makefile fragment.

* config/m68k/t-uclinux: New target Makefile fragment.
	* config/m68k/uclinux.h: New target macro file.
	* config.gcc (m68k-*-uclinux): New target definition.

From-SVN: r72328
This commit is contained in:
Bernardo Innocenti 2003-10-11 06:23:20 +02:00 committed by Bernardo Innocenti
parent feda184548
commit ba591f5a88
4 changed files with 99 additions and 0 deletions

View 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

View 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.

24
gcc/config/m68k/t-uclinux Normal file
View File

@ -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=

63
gcc/config/m68k/uclinux.h Normal file
View File

@ -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)