Commit 9b8466f4 by Neil Booth Committed by Neil Booth

config.gcc (sparc-*-sysv4*): Add sparc/sysv4-only.h.

	* config.gcc (sparc-*-sysv4*): Add sparc/sysv4-only.h.
	* sparc/aout.h, sparc/elf.h, sparc/freebsd.h, sparc/linux.h,
	sparc/linux64.h, sparc/lite.h, sparc/litecoff.h, sparc/liteelf.h,
	sparc/netbsd-elf.h, sparc/openbsd.h, sparc/openbsd64.h,
	sparc/pbd.h, sparc/rtemself.h, sparc/sol2-64.h, sparc/sol2-bi.h,
	sparc/sol2.h, sparc/sp64-elf.h, sparc/sp86-elf.h, sparc/sparc.h,
	sparc/sysv4.h,
	* sparc/sysv4-only.h: New.

From-SVN: r66902
parent 5c07bd7a
2003-05-17 Neil Booth <neil@daikokuya.co.uk>
* config.gcc (sparc-*-sysv4*): Add sparc/sysv4-only.h.
* sparc/aout.h, sparc/elf.h, sparc/freebsd.h, sparc/linux.h,
sparc/linux64.h, sparc/lite.h, sparc/litecoff.h, sparc/liteelf.h,
sparc/netbsd-elf.h, sparc/openbsd.h, sparc/openbsd64.h,
sparc/pbd.h, sparc/rtemself.h, sparc/sol2-64.h, sparc/sol2-bi.h,
sparc/sol2.h, sparc/sp64-elf.h, sparc/sp86-elf.h, sparc/sparc.h,
sparc/sysv4.h,
* sparc/sysv4-only.h: New.
2003-05-17 Alan Modra <amodra@bigpond.net.au>
* function.c (assign_parms): Check for zero size args.
......
......@@ -1948,7 +1948,7 @@ sparc-*-solaris2*)
fi
;;
sparc-*-sysv4*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h"
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sysv4-only.h"
tmake_file=t-svr4
extra_parts="crtbegin.o crtend.o"
;;
......
......@@ -23,14 +23,6 @@ Boston, MA 02111-1307, USA. */
#define TARGET_VERSION fprintf (stderr, " (sparc)");
/* Names to predefine in the preprocessor for this target machine.
??? It would be nice to not include any subtarget specific values here,
however there's no way to portably provide subtarget values to
CPP_PREFINES. Also, -D values in CPP_SUBTARGET_SPEC don't get turned into
foo, __foo and __foo__. */
#define CPP_PREDEFINES "-Dsparc -Acpu=sparc -Amachine=sparc"
/* These compiler options take an argument. We ignore -target for now. */
#define WORD_SWITCH_TAKES_ARG(STR) \
......
......@@ -19,9 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dsparc -D__elf__"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
......
......@@ -24,10 +24,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef CPP_CPU64_DEFAULT_SPEC
#define CPP_CPU64_DEFAULT_SPEC "-D__sparc64__ -D__sparc_v9__ -D__arch64__"
/* Because we include sparc/sysv4.h. */
#undef CPP_PREDEFINES
/* Do not define it here, we now use TARGET_OS_CPP_BUILTINS. */
#define LINK_SPEC "%(link_arch) \
%{!mno-relax:%{!r:-relax}} \
%{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
......
......@@ -19,6 +19,18 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("unix"); \
builtin_define_std ("linux"); \
builtin_define ("__gnu_linux__"); \
builtin_define ("__ELF__"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=posix"); \
} \
while (0)
#define LINUX_DEFAULT_ELF
/* Don't assume anything about the header files. */
......@@ -98,9 +110,6 @@ Boston, MA 02111-1307, USA. */
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sparc__ -D__gnu_linux__ -Dlinux -Asystem=unix -Asystem=posix"
#undef CPP_SUBTARGET_SPEC
#ifdef USE_GNULIBC_1
#define CPP_SUBTARGET_SPEC \
......
......@@ -19,6 +19,19 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("unix"); \
builtin_define_std ("linux"); \
builtin_define ("_LONGLONG"); \
builtin_define ("__gnu_linux__"); \
builtin_define ("__ELF__"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=posix"); \
} \
while (0)
#define LINUX_DEFAULT_ELF
/* Don't assume anything about the header files. */
......@@ -43,8 +56,7 @@ Boston, MA 02111-1307, USA. */
#ifdef SPARC_BI_ARCH
#undef CPP_ARCH32_SPEC
#define CPP_ARCH32_SPEC "%{mlong-double-128:-D__LONG_DOUBLE_128__} \
-D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc"
#define CPP_ARCH32_SPEC "%{mlong-double-128:-D__LONG_DOUBLE_128__}"
#endif
......@@ -111,9 +123,6 @@ Boston, MA 02111-1307, USA. */
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
#endif
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__ELF__ -Dunix -D_LONGLONG -D__sparc__ -D__gnu_linux__ -Dlinux -Asystem=unix -Asystem=posix"
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC "\
%{fPIC:-D__PIC__ -D__pic__} \
......
......@@ -19,9 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dsparc -Dsparclite -Acpu=sparc -Amachine=sparc"
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (sparclite)");
......
......@@ -21,8 +21,13 @@ Boston, MA 02111-1307, USA. */
#define BSS_SECTION_ASM_OP "\t.section\t\".bss\""
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dsparc -Dsparclite -Acpu=sparc -Amachine=sparc"
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("sparc"); \
builtin_define_std ("sparclite"); \
} \
while (0)
/* Default to stabs in COFF. */
......
......@@ -19,8 +19,12 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__sparc__ -D__sparclite__ -Acpu=sparc -Amachine=sparc"
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__sparclite__"); \
} \
while (0)
/* Default to dwarf2 in ELF. */
......
......@@ -39,9 +39,6 @@ Boston, MA 02111-1307, USA. */
#undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
/* Make sure this is undefined. */
#undef CPP_PREDEFINES
/* CPP defines used by all NetBSD targets. */
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC "%(netbsd_cpp_spec)"
......
......@@ -22,8 +22,16 @@ Boston, MA 02111-1307, USA. */
#define OBSD_OLD_GAS
#include <openbsd.h>
/* Run-time target specifications. */
#define CPP_PREDEFINES "-D__unix__ -D__sparc__ -D__OpenBSD__ -Asystem=unix -Asystem=OpenBSD -Acpu=sparc -Amachine=sparc"
/* Target OS builtins. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__unix__"); \
builtin_define ("__OpenBSD__"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=OpenBSD"); \
} \
while (0)
/* Layout of source language data types */
......
......@@ -30,9 +30,22 @@ Boston, MA 02111-1307, USA. */
#undef SPARC_DEFAULT_CMODEL
#define SPARC_DEFAULT_CMODEL CM_MEDMID
/* Run-time target specifications. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__unix__ -D__sparc__ -D__sparc64__ -D__sparcv9__ -D__sparc_v9__ -D__arch64__ -D__ELF__ -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(sparc) -Amachine(sparc)"
/* Target OS builtins. */
#undef TARGET_OS_CPP_BUILTINS /* Defined in sp64-elf.h. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__unix__"); \
builtin_define ("__OpenBSD__"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=OpenBSD"); \
builtin_define ("__sparc64__"); \
builtin_define ("__sparcv9__"); \
builtin_define ("__sparc_v9__"); \
builtin_define ("__arch64__"); \
builtin_define ("__ELF__"); \
} \
while (0)
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC ""
......
......@@ -19,11 +19,15 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Names to predefine in the preprocessor for this target machine. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dsparc -DUnicomPBD -Dunix -D__GCC_NEW_VARARGS__ -Asystem=unix -Acpu=sparc -Amachine=sparc"
/* Target OS builtins. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("unix"); \
builtin_define_std ("UnicomPBD"); \
builtin_assert ("system=unix"); \
} \
while (0)
/* We want DBX format for use with gdb under COFF. */
......
......@@ -19,8 +19,13 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Specify predefined symbols in preprocessor. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dsparc -D__GCC_NEW_VARARGS__ -D__rtems__ \
-D__USE_INIT_FINI__ -Asystem=rtems"
/* Target OS builtins. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("sparc"); \
builtin_define ("__rtems__"); \
builtin_define ("__USE_INIT_FINI__"); \
builtin_assert ("system=rtems"); \
} \
while (0)
......@@ -5,3 +5,11 @@
#define TARGET_DEFAULT \
(MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ + \
MASK_STACK_BIAS + MASK_FPU + MASK_LONG_DOUBLE_128)
/* Target OS builtins. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("sparc"); \
} \
while (0)
......@@ -98,11 +98,9 @@
#define WINT_TYPE_SIZE 32
#undef CPP_ARCH32_SPEC
#define CPP_ARCH32_SPEC "\
-D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc"
#define CPP_ARCH32_SPEC ""
#undef CPP_ARCH64_SPEC
#define CPP_ARCH64_SPEC "\
-D__arch64__ -Acpu=sparc64 -Amachine=sparcv9 -D__sparcv9"
#define CPP_ARCH64_SPEC "-D__arch64__ -D__sparcv9"
#undef CPP_ARCH_SPEC
#define CPP_ARCH_SPEC "\
......
......@@ -23,9 +23,6 @@ Boston, MA 02111-1307, USA. */
/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dsparc"
/* This is here rather than in sparc.h because it's not known what
other assemblers will accept. */
......
......@@ -38,8 +38,14 @@ Boston, MA 02111-1307, USA. */
#undef SPARC_DEFAULT_CMODEL
#define SPARC_DEFAULT_CMODEL CM_EMBMEDANY
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dsparc -D__ELF__ -Acpu=sparc -Amachine=sparc"
/* Target OS builtins. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("sparc"); \
builtin_define ("__ELF__"); \
} \
while (0)
/* __svr4__ is used by the C library (FIXME) */
#undef CPP_SUBTARGET_SPEC
......
......@@ -19,8 +19,13 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__sparc__ -D__sparclite86x__ -Acpu=sparc -Amachine=sparc"
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__sparclite86x__"); \
builtin_define ("__ELF__"); \
} \
while (0)
/* Default to dwarf2 in ELF. */
......
......@@ -25,6 +25,24 @@ Boston, MA 02111-1307, USA. */
/* Note that some other tm.h files include this one and then override
whatever definitions are necessary. */
/* Target CPU builtins. */
#define TARGET_CPU_CPP_BUILTINS() \
do \
{ \
builtin_define ("__sparc__"); \
if (TARGET_64BIT) \
{ \
builtin_assert ("cpu=sparc"); \
builtin_assert ("machine=sparc"); \
} \
else \
{ \
builtin_assert ("cpu=sparc64"); \
builtin_assert ("machine=sparc64"); \
} \
} \
while (0)
/* Specify this in a cover file to provide bi-architecture (32/64) support. */
/* #define SPARC_BI_ARCH */
......@@ -239,15 +257,8 @@ extern enum cmodel sparc_cmodel;
%{mcpu=ultrasparc3:-D__sparc_v9__} \
%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
"
/* ??? The GCC_NEW_VARARGS macro is now obsolete, because gcc always uses
the right varags.h file when bootstrapping. */
/* ??? It's not clear what value we want to use for -Acpu/machine for
sparc64 in 32 bit environments, so for now we only use `sparc64' in
64 bit environments. */
#define CPP_ARCH32_SPEC "-D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc"
#define CPP_ARCH64_SPEC "-D__arch64__ -Acpu=sparc64 -Amachine=sparc64"
#define CPP_ARCH32_SPEC ""
#define CPP_ARCH64_SPEC "-D__arch64__"
#define CPP_ARCH_DEFAULT_SPEC \
(DEFAULT_ARCH32_P ? CPP_ARCH32_SPEC : CPP_ARCH64_SPEC)
......
/* Target macros for GNU compiler for SPARC running System V.4
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. */
/* Provide a set of pre-definitions and pre-assertions appropriate for
the SPARC running svr4. __svr4__ is our extension. */
/* Target OS builtins. */ \
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("sparc"); \
builtin_define_std ("unix"); \
builtin_define ("__svr4__"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=svr4"); \
} \
while (0)
......@@ -48,13 +48,6 @@ Boston, MA 02111-1307, USA. */
#undef SKIP_ASM_OP
#undef SET_ASM_OP /* Has no equivalent. See ASM_OUTPUT_DEF below. */
/* Provide a set of pre-definitions and pre-assertions appropriate for
the SPARC running svr4. __svr4__ is our extension. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-Dsparc -Dunix -D__svr4__ -Asystem=unix -Asystem=svr4"
/* The native assembler can't compute differences between symbols in different
sections when generating pic code, so we must put jump tables in the
text section. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment