merge netbsd/powerpc gcc changes from toolchain/gcc

This commit is contained in:
mrg 1998-03-30 04:33:11 +00:00
parent 8e92b678e2
commit 290de3be42
1 changed files with 102 additions and 0 deletions

102
gnu/dist/gcc/config/rs6000/netbsd.h vendored Normal file
View File

@ -0,0 +1,102 @@
/* Start with SVR4 defaults. */
#include <rs6000/sysv4.h>
/* Get generic NetBSD definitions. */
#include <netbsd.h>
/* Use bcopy etc. instead of memcpy etc. */
#undef TARGET_MEM_FUNCTIONS
#undef SDB_DEBUGGING_INFO
#define SDB_DEBUGGING_INFO
#undef DBX_DEBUGGING_INFO
#define DBX_DEBUGGING_INFO
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE \
((len > 1 && !strncmp (str, "gsdb", len)) ? SDB_DEBUG : DBX_DEBUG)
/* Names to predefine in the preprocessor for this target machine. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-DPPC -D__powerpc__ -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(powerpc) -Amachine(powerpc)"
/* Make gcc agree with <machine/ansi.h> */
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
/* Don't default to pcc-struct-return, because gcc is the only compiler, and
we want to retain compatibility with older gcc versions. */
#define DEFAULT_PCC_STRUCT_RETURN 0
/* XXX Duplicated from sysv4.h --thorpej@netbsd.org
Pass -mppc to the assembler, since that is what powerpc.h currently
implies */
#undef ASM_SPEC
#define ASM_SPEC \
"-u \
%{mcpu=601: -m601} %{!mcpu=601: -mppc} \
%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
%{mrelocatable} \
%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
/* The `multiple' instructions may not be universally implemented.
We avoid their use here. */
#undef CC1_SPEC
#define CC1_SPEC "-mno-multiple"
/* Provide a LINK_SPEC approriate for NetBSD. */
#undef LINK_SPEC
#define LINK_SPEC " \
%{O*:-O3} %{!O*:-O1} \
%{assert*} \
%{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 a STARTFILE_SPEC appropriate for NetBSD. Here we add
the crtbegin.o file (see crtstuff.c) which provides part of the
support for getting C++ file-scope static object constructed
before entering `main'. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC " \
%{!shared: \
%{pg:gcrt0.o%s} \
%{!pg: \
%{p:gcrt0.o%s} \
%{!p:crt0.o%s}}} \
crtbegin.o%s"
/* Provide a ENDFILE_SPEC appropriate for NetBSD. Here we tack on
the file which provides part of the support for getting C++
file-scope static object deconstructed after exiting `main' */
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
"crtend.o%s"
/* XXX Sort of a mix of ../netbsd.h and sysv4.h --thorpej@netbsd.org
Provide a CPP_SPEC appropriate for NetBSD. Currently we just deal with
the GCC option `-posix' and the calling convention definition. */
#undef CPP_SPEC
#define CPP_SPEC "\
%{posix:-D_POSIX_SOURCE} \
%{mcall-sysv: -D_CALL_SYSV} %{mcall-aix: -D_CALL_AIX} %{!mcall-sysv: %{!mcall-aix: -D_CALL_SYSV}}"