Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/dist/toolchain/gcc - pull across the new gcc/config/netb...
details: https://anonhg.NetBSD.org/src/rev/796da9ad54d2
branches: trunk
changeset: 495358:796da9ad54d2
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Jul 26 16:28:04 2000 +0000
description:
- pull across the new gcc/config/netbsd.h
- pull across the sparc-netbsdelf and sparc64-netbsd targets
diffstat:
gnu/dist/toolchain/gcc/config/netbsd.h | 80 +++++-
gnu/dist/toolchain/gcc/config/sparc/netbsd-elf-common.h | 66 +++++
gnu/dist/toolchain/gcc/config/sparc/netbsd-elf.h | 44 +++
gnu/dist/toolchain/gcc/config/sparc/netbsd64.h | 35 ++
gnu/dist/toolchain/gcc/config/sparc/xm-netbsd.h | 4 +
gnu/dist/toolchain/gcc/config/sparc/xm-netbsd64.h | 4 +
gnu/dist/toolchain/gcc/config/xm-netbsd.h | 27 ++
gnu/dist/toolchain/gcc/configure | 200 ++++++++-------
gnu/dist/toolchain/gcc/configure.in | 12 +
9 files changed, 369 insertions(+), 103 deletions(-)
diffs (truncated from 1151 to 300 lines):
diff -r f075e8948935 -r 796da9ad54d2 gnu/dist/toolchain/gcc/config/netbsd.h
--- a/gnu/dist/toolchain/gcc/config/netbsd.h Wed Jul 26 16:24:38 2000 +0000
+++ b/gnu/dist/toolchain/gcc/config/netbsd.h Wed Jul 26 16:28:04 2000 +0000
@@ -23,14 +23,14 @@
/* Under NetBSD, the normal location of the compiler back ends is the
/usr/libexec directory. */
-#undef STANDARD_EXEC_PREFIX
-#define STANDARD_EXEC_PREFIX "/usr/libexec/"
+#undef MD_EXEC_PREFIX
+#define MD_EXEC_PREFIX "/usr/libexec/"
/* Under NetBSD, the normal location of the various *crt*.o files is the
/usr/lib directory. */
-#undef STANDARD_STARTFILE_PREFIX
-#define STANDARD_STARTFILE_PREFIX "/usr/lib/"
+#undef MD_STARTFILE_PREFIX
+#define MD_STARTFILE_PREFIX "/usr/lib/"
#endif
@@ -48,17 +48,31 @@
#define ASM_SPEC " %| %{fpic:-k} %{fPIC:-k -K}"
/* Provide a LIB_SPEC appropriate for NetBSD. Just select the appropriate
- libc, depending on whether we're doing profiling. */
+ libc, depending on whether we're doing profiling; if `-posix' is specified,
+ link against the appropriate libposix first. */
#undef LIB_SPEC
-#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+#define LIB_SPEC \
+ "%{posix:%{!p:%{!pg:-lposix}}%{p:-lposix_p}%{pg:-lposix_p}} \
+ %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+
+/* #ifdef NETBSD_AOUT */
-/* Provide a LINK_SPEC appropriate for NetBSD. Here we provide support
- for the special GCC options -static, -assert, and -nostdlib. */
+/* Provide a STARTFILE_SPEC appropriate for NetBSD a.out. Here we
+ provide support for the special GCC option -static. */
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:%{!static:crt0%O%s}%{static:scrt0%O%s}}}} %{shared:c++rt0%O%s}"
+
+/* Provide a LINK_SPEC appropriate for NetBSD a.out. Here we provide
+ support for the special GCC options -static, -assert, and -nostdlib. */
#undef LINK_SPEC
#define LINK_SPEC \
- "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
+ "%{nostdlib:-nostdlib} %{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic}} %{shared:-Bshareable} %{R*} %{assert*}"
+
+/* #endif NETBSD_AOUT */
/* This defines which switch letters take arguments. */
#undef SWITCH_TAKES_ARG
@@ -127,6 +141,9 @@
entries in an ELF object file under SVR4. These macros also output
the starting labels for the relevant functions/objects. */
+/* XXX. This is WRONG for alpha. Needs to be verified on other ELF ports. */
+#ifndef NETBSD_ELF
+
/* Write the extra assembler code needed to declare a function properly.
Some svr4 assemblers need to also have something extra said about the
function's return value. We allow for that here. */
@@ -207,3 +224,48 @@
putc ('\n', FILE); \
} \
} while (0)
+
+#endif
+
+/* ELF ports */
+
+#ifdef NETBSD_ELF
+
+/* Provide a STARTFILE_SPEC appropriate for NetBSD ELF targets. Here we
+ provide support for the special GCC option -static. On ELF targets,
+ we also add the crtbegin.o file which provides part of the support
+ for getting C++ file-scope static objects constructed before entering
+ `main'. */
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ "%{!shared: \
+ %{pg:gcrt0%O%s} \
+ %{!pg: \
+ %{p:gcrt0%O%s} \
+ %{!p:crt0%O%s}}} \
+ %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}"
+
+/* Provide an ENDFILE_SPEC approrpiate for NetBSD ELF targets. Here we
+ add crtend.o, which provides part of the support for getting C++
+ file-scope static objects deconstructed after exiting `main'. */
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+ "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
+
+/* Provide a LINK_SPEC appropriate for a NetBSD ELF target. */
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "%{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}}"
+
+#endif /* NETBSD_ELF */
diff -r f075e8948935 -r 796da9ad54d2 gnu/dist/toolchain/gcc/config/sparc/netbsd-elf-common.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/toolchain/gcc/config/sparc/netbsd-elf-common.h Wed Jul 26 16:28:04 2000 +0000
@@ -0,0 +1,66 @@
+/* NetBSD/sparc ELF common 32/64 bit configuration */
+
+#define OBJECT_FORMAT_ELF
+#include <netbsd.h>
+
+#undef CPP_SUBTARGET_SPEC
+#define CPP_SUBTARGET_SPEC ""
+
+#undef SIZE_TYPE
+#define SIZE_TYPE "long unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "long int"
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+#undef WCHAR_UNSIGNED
+#define WCHAR_UNSIGNED 0
+
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+
+/* This is the char to use for continuation (in case we need to turn
+ continuation back on). */
+#undef DBX_CONTIN_CHAR
+#define DBX_CONTIN_CHAR '?'
+
+#undef DBX_REGISTER_NUMBER
+#define DBX_REGISTER_NUMBER(REGNO) \
+ (TARGET_FLAT && REGNO == FRAME_POINTER_REGNUM ? 31 : REGNO)
+
+/* This is how to output a definition of an internal numbered label where
+ PREFIX is the class of label and NUM is the number within the class. */
+
+#undef ASM_OUTPUT_INTERNAL_LABEL
+#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
+ fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
+
+/* This is how to store into the string LABEL
+ the symbol_ref name of an internal numbered label where
+ PREFIX is the class of label and NUM is the number within the class.
+ This is suitable for output with `assemble_name'. */
+
+#undef ASM_GENERATE_INTERNAL_LABEL
+#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
+ sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
+
+#undef ASM_SPEC
+#define ASM_SPEC "%{fpic:-K PIC} %{fPIC:-K PIC} \
+%{mlittle-endian:-EL} \
+%(asm_cpu) \
+"
+
+#undef STDC_0_IN_SYSTEM_HEADERS
+
+/** We don't have the C++ support for this (yet). */
+#undef DWARF2_UNWIND_INFO
+#define DWARF2_UNWIND_INFO 0
+
+/* XXX Redefine this; <sparc/sparc.h> mucks with it. */
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (%s)", TARGET_NAME);
diff -r f075e8948935 -r 796da9ad54d2 gnu/dist/toolchain/gcc/config/sparc/netbsd-elf.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/toolchain/gcc/config/sparc/netbsd-elf.h Wed Jul 26 16:28:04 2000 +0000
@@ -0,0 +1,44 @@
+/* NetBSD/sparc ELF configuration */
+
+/*
+ * Pull in generic SPARC ELF configuration, and then clean up
+ * afterwards
+ */
+#include <sparc/elf.h>
+
+/* Name the target CPU. */
+#ifndef TARGET_CPU_DEFAULT
+#define TARGET_CPU_DEFAULT TARGET_CPU_sparc
+#endif
+
+#undef MULDI3_LIBCALL
+#undef DIVDI3_LIBCALL
+#undef UDIVDI3_LIBCALL
+#undef MODDI3_LIBCALL
+#undef UMODDI3_LIBCALL
+#undef INIT_SUBTARGET_OPTABS
+#define INIT_SUBTARGET_OPTABS
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "\
+-D__sparc__ -D__sparc -D__NetBSD__ -D__ELF__ \
+-Asystem(unix) -Asystem(NetBSD) -Acpu(sparc) -Amachine(sparc)"
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "-m elf32_sparc \
+ %{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}}"
+
+/* Name the port. */
+#undef TARGET_NAME
+#define TARGET_NAME "sparc-netbsdelf"
+
+#include <sparc/netbsd-elf-common.h>
diff -r f075e8948935 -r 796da9ad54d2 gnu/dist/toolchain/gcc/config/sparc/netbsd64.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/toolchain/gcc/config/sparc/netbsd64.h Wed Jul 26 16:28:04 2000 +0000
@@ -0,0 +1,35 @@
+/* NetBSD/sparc64 ELF configuration */
+
+/*
+ * Pull in generic SPARC64 ELF configuration, and then clean up
+ * afterwards
+ */
+
+/* Name the target CPU. This must be before <sparc/sparc.h>. */
+#ifndef TARGET_CPU_DEFAULT
+#define TARGET_CPU_DEFAULT TARGET_CPU_ultrasparc
+#endif
+
+#include <sparc/sp64-elf.h>
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-D__sparc__ -D__sparc64__ -D__arch64__ -D__sparc_v9__ -D__NetBSD__ -D__ELF__"
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "-m elf64_sparc \
+ %{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}}"
+
+/* Name the port. */
+#undef TARGET_NAME
+#define TARGET_NAME "sparc64-netbsd"
+
+#include <sparc/netbsd-elf-common.h>
diff -r f075e8948935 -r 796da9ad54d2 gnu/dist/toolchain/gcc/config/sparc/xm-netbsd.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/toolchain/gcc/config/sparc/xm-netbsd.h Wed Jul 26 16:28:04 2000 +0000
@@ -0,0 +1,4 @@
+/* Configuration for GCC for Sun SPARC running NetBSD as host. */
+
+#include <sparc/xm-sparc.h>
+#include <xm-netbsd.h>
diff -r f075e8948935 -r 796da9ad54d2 gnu/dist/toolchain/gcc/config/sparc/xm-netbsd64.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/toolchain/gcc/config/sparc/xm-netbsd64.h Wed Jul 26 16:28:04 2000 +0000
@@ -0,0 +1,4 @@
+/* Configuration for GCC for Sun SPARC V9 running NetBSD as host. */
+
+#include <xm-netbsd.h>
+#include <sparc/xm-sp64.h>
diff -r f075e8948935 -r 796da9ad54d2 gnu/dist/toolchain/gcc/config/xm-netbsd.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/toolchain/gcc/config/xm-netbsd.h Wed Jul 26 16:28:04 2000 +0000
@@ -0,0 +1,27 @@
+/* Configuration for GNU C-compiler for hosts running NetBSD.
+ Copyright (C) 1995 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
Home |
Main Index |
Thread Index |
Old Index