summaryrefslogtreecommitdiff
path: root/gcc/config/alpha
diff options
context:
space:
mode:
authorthorpej <thorpej@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-22 04:23:07 +0000
committerthorpej <thorpej@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-22 04:23:07 +0000
commit4ace673e3b9d75d56f280c3b1a2bd90e09a64da4 (patch)
treefb881f08fa95811a9605ea29489c77d5ff5aa601 /gcc/config/alpha
parent9f843b44bac3396565c52f67f877d1025483cc19 (diff)
downloadgcc-4ace673e3b9d75d56f280c3b1a2bd90e09a64da4.tar.gz
* config/netbsd.h (TARGET_HAS_F_SETLKW): define.
Split a.out-specific bits into... * config/netbsd-aout.h: ...this. * config/netbsd-elf.h: New file. * config/alpha/netbsd-elf.h: Remove. * config/alpha/netbsd.h: Rewrite for a NetBSD/alpha ELF target. * config/i386/netbsd-elf.h (LIB_SPEC): Remove. (STARTFILE_SPEC): Remove redundant definition. (ENDFILE_SPEC): Likewise. (LINK_SPEC): Likewise. (CPP_SPEC): Likewise. (ASM_SPEC): Likewise. (LIB_SPEC): Likewise. (SWITCH_TAKES_ARG): Likewise. (TARGET_MEM_FUNCTIONS): Likewise. (CPP_PREDEFINES): Redefine. (ASM_FINAL_SPEC): Remove redefinition. (ASM_COMMENT_START): Redefine. (FUNCTION_PROFILER): Define. (TARGET_VERSION): Redefine. Comment and formatting cleanup. * config/i386/netbsd.h: Include <netbsd-aout.h>. * config/m68k/netbsd.h: Include <netbsd-aout.h>. * config/mips/netbsd.h: Rewrite for NetBSD/mips ELF target, big- or little-endian. * config/ns32k/netbsd.h: Include <netbsd-aout.h>. * config.gcc (*-*-netbsd*): Add definitions common to all NetBSD configs. (alpha*-*-netbsd*): Remove redundant xm_defines, gas, and gnu_ld definitions. Add netbsd-elf.h to and remove alpha/netbsd-elf.h from tm_file. Remove alpha/t-crtfm from tmake_file, and don't lose previous tmake_file contents. (arm*-*-netbsd*): Add netbsd-aout.h to tm_file. (i[34567]86-*-netbsdelf*): Remove redundant xm_defines, gas, and gnu_ld definitions. Add netbsd-elf.h to tm_file. (mips-dec-netbsd*): Remove as alias for mipsel-*-netbsd*. (mipsel-*-netbsd*): Rename this to... (mips*-*-netbsd*): ...this. Add elfos.h to tm_file. Add mips/little.h to tm_file for mips*el-*. (powerpc-*-netbsd*): Remove redundant xm_defines definition. (sparc-*-netbsd*): Add netbsd-aout.h to tm_file. (vax-*-netbsd*): Add netbsd-aout.h to tm_file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49064 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/alpha')
-rw-r--r--gcc/config/alpha/netbsd-elf.h32
-rw-r--r--gcc/config/alpha/netbsd.h72
2 files changed, 68 insertions, 36 deletions
diff --git a/gcc/config/alpha/netbsd-elf.h b/gcc/config/alpha/netbsd-elf.h
deleted file mode 100644
index 6e4f4daf62b..00000000000
--- a/gcc/config/alpha/netbsd-elf.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Definitions of target machine for GNU compiler
- for Alpha NetBSD systems using ELF.
- Copyright (C) 1998 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC 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.
-
-GNU CC 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 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 TARGET_VERSION
-#define TARGET_VERSION fprintf (stderr, " (Alpha NetBSD/ELF)");
-
-#undef SUB_CPP_PREDEFINES
-#define SUB_CPP_PREDEFINES "-D__ELF__"
-
-#undef SUBTARGET_EXTRA_SPECS
-#define SUBTARGET_EXTRA_SPECS \
-{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
-
-#define ELF_DYNAMIC_LINKER "/usr/libexec/ld.elf_so"
diff --git a/gcc/config/alpha/netbsd.h b/gcc/config/alpha/netbsd.h
index 0a10f5ae0dc..7eacce23f8c 100644
--- a/gcc/config/alpha/netbsd.h
+++ b/gcc/config/alpha/netbsd.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler,
for Alpha NetBSD systems.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -23,11 +23,75 @@ Boston, MA 02111-1307, USA. */
#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS)
#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D_LONGLONG -Dnetbsd -Dunix " SUB_CPP_PREDEFINES
+#define CPP_PREDEFINES \
+ "-D__NetBSD__ -D__ELF__ -Asystem=unix -Asystem=NetBSD"
-#undef LIB_SPEC
-#define LIB_SPEC "%{pg:-lgmon} %{pg:-lc_p} %{!pg:-lc}"
/* Show that we need a GP when profiling. */
#undef TARGET_PROFILING_NEEDS_GP
#define TARGET_PROFILING_NEEDS_GP 1
+
+
+/* Provide a CPP_SPEC appropriate for NetBSD/alpha. In addition to
+ the standard NetBSD specs, we also handle Alpha FP mode indications. */
+
+#undef CPP_SPEC
+#define CPP_SPEC \
+ "%{mieee:-D_IEEE_FP} \
+ %{mieee-with-inexact:-D_IEEE_FP -D_IEEE_FP_INEXACT} \
+ %(cpp_cpu) %(cpp_subtarget)"
+
+#undef CPP_SUBTARGET_SPEC
+#define CPP_SUBTARGET_SPEC \
+ "%{posix:-D_POSIX_SOURCE}"
+
+
+/* Provide a LINK_SPEC appropriate for a NetBSD/alpha ELF target.
+ This is a copy of LINK_SPEC from <netbsd-elf.h> tweaked for
+ the alpha target. */
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "%{G*} %{relax:-relax} \
+ %{O*:-O3} %{!O*:-O1} \
+ %{assert*} %{R*} \
+ %{shared:-shared} \
+ %{!shared: \
+ -dc -dp \
+ %{!nostdlib: \
+ %{!r*: \
+ %{!e*:-e __start}}} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
+ %{static:-static}}"
+
+
+/* Provide an ENDFILE_SPEC appropriate for NetBSD/alpha ELF. Here we
+ add crtend.o, which provides part of the support for getting
+ C++ file-scope static objects deconstructed after exiting "main".
+
+ We also need to handle the GCC option `-ffast-math'. */
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+ "%{ffast-math|funsafe-math-optimizations:crtfm%O%s} \
+ %{!shared:crtend%O%s} %{shared:crtendS%O%s}"
+
+
+/* Make gcc agree with <machine/ansi.h> */
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_UNSIGNED
+#define WCHAR_UNSIGNED 0
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+#undef WINT_TYPE
+#define WINT_TYPE "int"
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (NetBSD/alpha ELF)");