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 Major overhaul of target/host file ha...
details: https://anonhg.NetBSD.org/src/rev/18b09cb5de39
branches: trunk
changeset: 510474:18b09cb5de39
user: tv <tv%NetBSD.org@localhost>
date: Wed May 30 09:02:42 2001 +0000
description:
Major overhaul of target/host file handling for NetBSD. Make this uniform,
with a basic NetBSD template and some specific platform overrides. This
also results in dropping most of the "xm-netbsd.h" and "t-netbsd" files.
diffstat:
gnu/dist/toolchain/gcc/config/netbsd.h | 60 +++++++++++++++++++++++++-
gnu/dist/toolchain/gcc/config/t-netbsd | 6 --
gnu/dist/toolchain/gcc/configure | 76 +++++++++++----------------------
gnu/dist/toolchain/gcc/configure.in | 76 +++++++++++----------------------
4 files changed, 108 insertions(+), 110 deletions(-)
diffs (truncated from 449 to 300 lines):
diff -r 36c43066b12a -r 18b09cb5de39 gnu/dist/toolchain/gcc/config/netbsd.h
--- a/gnu/dist/toolchain/gcc/config/netbsd.h Wed May 30 08:59:11 2001 +0000
+++ b/gnu/dist/toolchain/gcc/config/netbsd.h Wed May 30 09:02:42 2001 +0000
@@ -23,14 +23,18 @@
/* 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
+#ifdef NBSD_EXEC_PREFIX
+#define MD_EXEC_PREFIX NBSD_EXEC_PREFIX
+#else
+#define MD_EXEC_PREFIX "/usr/libexec/"
+#endif
/* 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
@@ -151,6 +155,9 @@
/* XXX. This is WRONG for alpha. Needs to be verified on other ELF ports. */
#ifndef NETBSD_ELF
+/* 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. */
@@ -232,6 +239,51 @@
} \
} 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 */
+
#endif /* ! NETBSD_ELF */
/* NetBSD ELF support begins here. */
diff -r 36c43066b12a -r 18b09cb5de39 gnu/dist/toolchain/gcc/config/t-netbsd
--- a/gnu/dist/toolchain/gcc/config/t-netbsd Wed May 30 08:59:11 2001 +0000
+++ b/gnu/dist/toolchain/gcc/config/t-netbsd Wed May 30 09:02:42 2001 +0000
@@ -1,9 +1,3 @@
-# gcc is the NetBSD native compiler; we don't need to bootstrap
-# basic math operations.
-LIBGCC1=libgcc1.null
-CROSS_LIBGCC1=libgcc1.null
-LIBGCC1_TEST=
-
# Don't run fixproto.
STMP_FIXPROTO =
diff -r 36c43066b12a -r 18b09cb5de39 gnu/dist/toolchain/gcc/configure
--- a/gnu/dist/toolchain/gcc/configure Wed May 30 08:59:11 2001 +0000
+++ b/gnu/dist/toolchain/gcc/configure Wed May 30 09:02:42 2001 +0000
@@ -2952,11 +2952,20 @@
tm_file=${cpu_type}/${cpu_type}.h
xm_file=${cpu_type}/xm-${cpu_type}.h
- # Common parts for linux-gnu and openbsd systems
+ # Common parts for some multiplatform systems
case $machine in
*-*-linux-gnu*)
xm_defines="HAVE_ATEXIT POSIX BSTRING"
;;
+ *-*-netbsd*)
+ case $machine in
+ *-*-netbsdelf*) tm_file=${cpu_type}/netbsd-elf.h;;
+ *) tm_file=${cpu_type}/netbsd.h;;
+ esac
+ tmake_file="t-libc-ok t-netbsd"
+ xm_file="${xm_file} xm-netbsd.h"
+ xmake_file=none
+ ;;
*-*-openbsd*)
tm_file=${cpu_type}/openbsd.h
tmake_file="t-libc-ok t-openbsd"
@@ -3060,20 +3069,15 @@
fi
;;
alpha*-*-netbsd*)
- tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
target_cpu_default="MASK_GAS"
- tmake_file="alpha/t-crtbe alpha/t-ieee"
- extra_parts="crtbegin.o crtend.o"
- xmake_file=none
+ tmake_file="${tmake_file} alpha/t-ieee"
gas=yes gnu_ld=yes
;;
-
alpha*-*-openbsd*)
# default x-alpha is only appropriate for dec-osf.
target_cpu_default="MASK_GAS"
tmake_file="alpha/t-ieee"
;;
-
alpha*-dec-osf*)
if test x$stabs = xyes
then
@@ -3171,16 +3175,10 @@
tmake_file=arm/t-semiaof
;;
arm*-*-netbsdelf*)
- tm_file=arm/netbsd-elf.h
- xm_file="arm/xm-netbsd.h ${xm_file}"
- tmake_file="t-netbsd arm/t-netbsd"
- use_collect2=yes
+ gas=yes gnu_ld=yes
;;
arm*-*-netbsd*)
- tm_file=arm/netbsd.h
- xm_file="arm/xm-netbsd.h ${xm_file}"
- tmake_file="t-netbsd arm/t-netbsd"
- use_collect2=yes
+ gas=yes
;;
arm*-*-linux-gnuaout*) # ARM GNU/Linux with a.out
cpu_type=arm
@@ -3575,15 +3573,9 @@
tmake_file=t-freebsd
;;
i[34567]86-*-netbsdelf*)
- tm_file=i386/netbsd-elf.h
- xm_file=i386/xm-netbsd.h
- tmake_file=t-netbsd
+ gas=yes gnu_ld=yes
;;
i[34567]86-*-netbsd*)
- tm_file=i386/netbsd.h
- xm_file=i386/xm-netbsd.h
- tmake_file=t-netbsd
- use_collect2=yes
;;
i[34567]86-*-openbsd*)
# we need collect2 until our bug is fixed...
@@ -4384,11 +4376,12 @@
extra_headers=math-68881.h
float_format=m68k
;;
- m68k*-*-netbsd*)
- tm_file=m68k/netbsd.h
- tmake_file=t-netbsd
+ m68*-*-netbsdelf*)
float_format=m68k
- use_collect2=yes
+ gas=yes gnu_ld=yes
+ ;;
+ m68*-*-netbsd*)
+ float_format=m68k
;;
m68k*-*-openbsd*)
float_format=m68k
@@ -4703,10 +4696,8 @@
use_collect2=yes
fi
;;
- mipsel-*-netbsd* | mips-dec-netbsd*) # Decstation running NetBSD
- tm_file=mips/netbsd.h
- # On NetBSD, the headers are already okay, except for math.h.
- tmake_file=t-netbsd
+ mips*-*-netbsd*)
+ gas=yes gnu_ld=yes
;;
mips*-*-linux*) # Linux MIPS, either endian.
xmake_file=x-linux
@@ -5052,11 +5043,7 @@
use_collect2=yes
;;
ns32k-*-netbsd*)
- tm_file=ns32k/netbsd.h
- xm_file="ns32k/xm-netbsd.h ${xm_file}"
- # On NetBSD, the headers are already okay, except for math.h.
- tmake_file=t-netbsd
- use_collect2=yes
+ xm_file="${xm_file} ns32k/xm-netbsd.h"
;;
pdp11-*-bsd)
tm_file="${tm_file} pdp11/2bsd.h"
@@ -5352,15 +5339,9 @@
tm_file="sparc/aout.h libgloss.h"
;;
sparc-*-netbsdelf*)
- tm_file=sparc/netbsd-elf.h
- xm_file=sparc/xm-netbsd.h
- tmake_file=t-netbsd
- use_collect2=yes
+ gas=yes gnu_ld=yes
;;
sparc-*-netbsd*)
- tm_file=sparc/netbsd.h
- tmake_file=t-netbsd
- use_collect2=yes
;;
sparc-*-openbsd*)
# we need collect2 until our bug is fixed...
@@ -5552,9 +5533,8 @@
;;
sparc64-*-netbsd*)
tm_file=sparc/netbsd64.h
- xm_file=sparc/xm-netbsd64.h
- tmake_file=t-netbsd
- use_collect2=yes
+ xm_file="sparc/xm-sp64.h xm-netbsd.h"
+ gas=yes gnu_ld=yes
;;
# This hasn't been upgraded to GCC 2.
# tahoe-harris-*) # Harris tahoe, using COFF.
@@ -5603,16 +5583,12 @@
float_format=vax
;;
vax-*-netbsdelf*)
- tm_file="${tm_file} vax/netbsd-elf.h"
- tmake_file=t-netbsd
float_format=vax
- use_collect2=yes
+ gas=yes gnu_ld=yes
;;
vax-*-netbsd*)
tm_file="${tm_file} netbsd.h vax/netbsd.h"
- tmake_file=t-netbsd
float_format=vax
- use_collect2=yes
;;
vax-*-openbsd*)
tmake_file="${tmake_file} vax/t-openbsd"
diff -r 36c43066b12a -r 18b09cb5de39 gnu/dist/toolchain/gcc/configure.in
--- a/gnu/dist/toolchain/gcc/configure.in Wed May 30 08:59:11 2001 +0000
+++ b/gnu/dist/toolchain/gcc/configure.in Wed May 30 09:02:42 2001 +0000
@@ -518,11 +518,20 @@
tm_file=${cpu_type}/${cpu_type}.h
xm_file=${cpu_type}/xm-${cpu_type}.h
- # Common parts for linux-gnu and openbsd systems
+ # Common parts for some multiplatform systems
case $machine in
*-*-linux-gnu*)
xm_defines="HAVE_ATEXIT POSIX BSTRING"
;;
+ *-*-netbsd*)
+ case $machine in
+ *-*-netbsdelf*) tm_file=${cpu_type}/netbsd-elf.h;;
+ *) tm_file=${cpu_type}/netbsd.h;;
+ esac
+ tmake_file="t-libc-ok t-netbsd"
+ xm_file="${xm_file} xm-netbsd.h"
+ xmake_file=none
+ ;;
*-*-openbsd*)
tm_file=${cpu_type}/openbsd.h
tmake_file="t-libc-ok t-openbsd"
@@ -626,20 +635,15 @@
Home |
Main Index |
Thread Index |
Old Index