/* Definitions for Motorola 68k running Linux-based GNU systems with
ELF format.
- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2006
Free Software Foundation, Inc.
This file is part of GCC.
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. */
+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (68k GNU/Linux with ELF)");
-/* Default target comes from config.gcc. */
-
-#undef TARGET_DEFAULT
-#ifdef TARGET_CPU_DEFAULT
-#define TARGET_DEFAULT TARGET_CPU_DEFAULT
-#else
-#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
-#endif
+/* Add %(asm_cpu_spec) to the svr4.h definition of ASM_SPEC. */
+#undef ASM_SPEC
+#define ASM_SPEC \
+ "%(asm_cpu_spec) %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}"
/* for 68k machines this only needs to be TRUE for the 68000 */
#undef STRICT_ALIGNMENT
#define STRICT_ALIGNMENT 0
-#undef SUBTARGET_SWITCHES
-#define SUBTARGET_SWITCHES {"ieee-fp", 0, \
- N_("Use IEEE math for fp comparisons")},
-
/* Here are four prefixes that are used by asm_fprintf to
facilitate customization for alternate assembler syntaxes.
Machines with no likelihood of an alternate syntax need not
while (0)
#undef CPP_SPEC
-#if TARGET_DEFAULT & MASK_68881
-#define CPP_SPEC \
- "%{fPIC|fpic|fPIE|fpie:-D__PIC__ -D__pic__} %{!msoft-float:-D__HAVE_68881__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
-#else
-#define CPP_SPEC \
- "%{fPIC|fpic|fPIE|fpie:-D__PIC__ -D__pic__} %{m68881:-D__HAVE_68881__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
-#endif
-
-/* We override the ASM_SPEC from svr4.h because we must pass -m68040 down
- to the assembler. */
-#undef ASM_SPEC
-#define ASM_SPEC \
- "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
-%{m68040} %{m68060:-m68040}"
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
/* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support
for the special GCC options -static and -shared, which allow us to
/* If ELF is the default format, we should not use /lib/elf. */
+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+
#undef LINK_SPEC
#define LINK_SPEC "-m m68kelf %{shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker*:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
%{static}}"
/* For compatibility with linux/a.out */
#undef FUNCTION_VALUE
#define FUNCTION_VALUE(VALTYPE, FUNC) \
- (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881 \
- ? gen_rtx_REG (TYPE_MODE (VALTYPE), 16) \
- : (POINTER_TYPE_P (VALTYPE) \
- ? gen_rtx_REG (TYPE_MODE (VALTYPE), 8) \
- : gen_rtx_REG (TYPE_MODE (VALTYPE), 0)))
+ m68k_function_value (VALTYPE, FUNC)
/* For compatibility with the large body of existing code which does
not always properly declare external functions returning pointer
#undef LIBCALL_VALUE
#define LIBCALL_VALUE(MODE) \
- ((((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode) \
- && TARGET_68881) \
- ? gen_rtx_REG ((MODE), 16) \
- : gen_rtx_REG ((MODE), 0))
+ m68k_libcall_value (MODE)
/* For m68k SVR4, structures are returned using the reentrant
technique. */