diff options
Diffstat (limited to 'gcc/config/alpha/netbsd.h')
| -rw-r--r-- | gcc/config/alpha/netbsd.h | 72 |
1 files changed, 68 insertions, 4 deletions
diff --git a/gcc/config/alpha/netbsd.h b/gcc/config/alpha/netbsd.h index 0a10f5a..7eacce2 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)"); |
