diff options
Diffstat (limited to 'contrib/gcc/config/sparc/netbsd-elf.h')
-rw-r--r-- | contrib/gcc/config/sparc/netbsd-elf.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/contrib/gcc/config/sparc/netbsd-elf.h b/contrib/gcc/config/sparc/netbsd-elf.h index b4bbf71246714..f141f8971f47f 100644 --- a/contrib/gcc/config/sparc/netbsd-elf.h +++ b/contrib/gcc/config/sparc/netbsd-elf.h @@ -31,12 +31,28 @@ Boston, MA 02111-1307, USA. */ /* CPP defines used for 64 bit code. */ #undef CPP_SUBTARGET_SPEC64 #define CPP_SUBTARGET_SPEC64 \ - "-D__sparc64__ -D__arch64__ -D__sparc_v9__ %{posix:-D_POSIX_SOURCE}" + "-D__sparc64__ -D__sparc_v9__ -D_LP64 %{posix:-D_POSIX_SOURCE}" /* CPP defines used for 32 bit code. */ #undef CPP_SUBTARGET_SPEC32 #define CPP_SUBTARGET_SPEC32 "-D__sparc %{posix:-D_POSIX_SOURCE}" +/* CPP_ARCH32_SPEC and CPP_ARCH64_SPEC are wrong from sparc/sparc.h; we + always want the non-SPARC_BI_ARCH versions, since the SPARC_BI_ARCH + versions define __SIZE_TYPE__ and __PTRDIFF_TYPE__ incorrectly for + NetBSD. */ +#undef CPP_ARCH32_SPEC +#define CPP_ARCH32_SPEC "-D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc" + +#undef CPP_ARCH64_SPEC +#define CPP_ARCH64_SPEC "-D__arch64__ -Acpu=sparc64 -Amachine=sparc64" + +/* sparc/sparc.h defines NO_BUILTIN_SIZE_TYPE and NO_BUILTIN_PTRDIFF_TYPE + if SPARC_BI_ARCH is defined. This is wrong for NetBSD; size_t and + ptrdiff_t do not change for 32-bit vs. 64-bit. */ +#undef NO_BUILTIN_PTRDIFF_TYPE +#undef NO_BUILTIN_SIZE_TYPE + /* SIZE_TYPE and PTRDIFF_TYPE are wrong from sparc/sparc.h. */ #undef SIZE_TYPE #define SIZE_TYPE "long unsigned int" @@ -99,9 +115,6 @@ Boston, MA 02111-1307, USA. */ * Clean up afterwards generic SPARC ELF configuration. */ -#undef TRANSFER_FROM_TRAMPOLINE -#define TRANSFER_FROM_TRAMPOLINE - /* FIXME: Aren't these supposed to be available for SPARC ELF? */ #undef MULDI3_LIBCALL #undef DIVDI3_LIBCALL |