* alpha/osf.h (HAVE_STAMP_H): Define.
* alpha.c: Use it.
* alpha/netbsd.h, alpha/netbsd-elf.h: New files.
* configure.in (alpha*-*-netbsd*): New.
Based on patches from Paul H. Anderson <pha@pdq.com>.
* configure.in (alpha*-*-linux-*): Kill xm_defines.
(alpha*-*-linux-gnulibc1*) [fixincludes]: Define.
* alpha/xm-linux.h: Remove file.
From-SVN: r19809
/* Write a version stamp. Don't write anything if we are running as a
cross-compiler. Otherwise, use the versions in /usr/include/stamp.h. */
-#if !defined(CROSS_COMPILE) && !defined(_WIN32) && !defined(__linux__) && !defined(VMS)
+#ifdef HAVE_STAMP_H
#include <stamp.h>
#endif
--- /dev/null
+/* 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (Alpha NetBSD/ELF)");
+
+#undef SUB_CPP_PREDEFINES
+#define SUB_CPP_PREDEFINES "-D__ELF__"
+
+#define ELF_DYNAMIC_LINKER "/usr/libexec/ld.elf_so"
--- /dev/null
+/* Definitions of target machine for GNU compiler,
+ for Alpha NetBSD systems.
+ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS)
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "\
+-D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -Dnetbsd -Dunix \
+-Asystem(linux) -Acpu(alpha) -Amachine(alpha) " SUB_CPP_PREDEFINES
+
+#undef LIB_SPEC
+#define LIB_SPEC "%{pg:-lgmon} %{pg:-lc_p} %{!pg:-lc}"
+
+/* Generate calls to memcpy, etc., not bcopy, etc. */
+#define TARGET_MEM_FUNCTIONS
+
+#undef FUNCTION_PROFILER
+#define FUNCTION_PROFILER(FILE, LABELNO) \
+ fputs ("\tlda $28,_mcount\n\tjsr $28,($28),_mcount\n", (FILE))
+
+/* Show that we need a GP when profiling. */
+#define TARGET_PROFILING_NEEDS_GP
%{.s:%i} %{!.s:%g.s}}}"
#endif
+
+/* Indicate that we have a stamp.h to use. */
+#ifndef CROSS_COMPILE
+#define HAVE_STAMP_H 1
+#endif
+++ /dev/null
-#undef USE_BFD
-#define USE_BFD
;;
alpha*-*-linux-gnuecoff*)
tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
- xm_defines=USE_BFD
target_cpu_default="MASK_GAS"
gas=no
xmake_file=none
gas=yes gnu_ld=yes
;;
alpha*-*-linux-gnulibc1*)
- tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
- xm_defines=USE_BFD
+ tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
target_cpu_default="MASK_GAS"
tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
extra_parts="crtbegin.o crtend.o"
+ fixincludes=fixinc.wrap
xmake_file=none
gas=yes gnu_ld=yes
if [ x$enable_threads = xyes ]; then
fi
;;
alpha*-*-linux-gnu*)
- tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
- xm_defines=USE_BFD
+ tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
target_cpu_default="MASK_GAS"
tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
extra_parts="crtbegin.o crtend.o"
thread_file='posix'
fi
;;
+ alpha*-*-netbsd*)
+ tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsdl-elf.h"
+ target_cpu_default="MASK_GAS"
+ tmake_file="alpha/t-crtbe"
+ extra_parts="crtbegin.o crtend.o"
+ xmake_file=none
+ fixincludes=fixinc.wrap
+ gas=yes gnu_ld=yes
+ ;;
+
alpha*-dec-osf*)
if [ x$stabs = xyes ]
then
;;
alpha*-*-linux-gnuecoff*)
tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
- xm_defines=USE_BFD
target_cpu_default="MASK_GAS"
gas=no
xmake_file=none
gas=yes gnu_ld=yes
;;
alpha*-*-linux-gnulibc1*)
- tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
- xm_defines=USE_BFD
+ tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
target_cpu_default="MASK_GAS"
tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
extra_parts="crtbegin.o crtend.o"
+ fixincludes=fixinc.wrap
xmake_file=none
gas=yes gnu_ld=yes
if [[ x$enable_threads = xyes ]]; then
fi
;;
alpha*-*-linux-gnu*)
- tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
- xm_defines=USE_BFD
+ tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
target_cpu_default="MASK_GAS"
tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
extra_parts="crtbegin.o crtend.o"
thread_file='posix'
fi
;;
+ alpha*-*-netbsd*)
+ tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsdl-elf.h"
+ target_cpu_default="MASK_GAS"
+ tmake_file="alpha/t-crtbe"
+ extra_parts="crtbegin.o crtend.o"
+ xmake_file=none
+ fixincludes=fixinc.wrap
+ gas=yes gnu_ld=yes
+ ;;
+
alpha*-dec-osf*)
if [[ x$stabs = xyes ]]
then