aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@wasabisystems.com>2002-11-24 23:36:26 +0000
committerJason Thorpe <thorpej@gcc.gnu.org>2002-11-24 23:36:26 +0000
commit1169f9e02d6b799cf612ced35975f17cbc9fe751 (patch)
tree2dc72dd6d8ab79d5b95dff996f26e55d3407c31c
parent8a874cb4375959c5653959372507fd980fad7957 (diff)
downloadgcc-1169f9e02d6b799cf612ced35975f17cbc9fe751.zip
gcc-1169f9e02d6b799cf612ced35975f17cbc9fe751.tar.gz
gcc-1169f9e02d6b799cf612ced35975f17cbc9fe751.tar.bz2
config.gcc (*-*-netbsd*1.[7-9]*, [...]): Set extra_parts to "crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o".
* config.gcc (*-*-netbsd*1.[7-9]*, *-*-netbsd*[2-9]*): Set extra_parts to "crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o". (arm*-*-netbsd*, i[34567]86-*-netbsd*, m68k*-*-netbsd*) (ns32k-*-netbsd*, sparc-*-netbsd*, vax-*-netbsd*): Set extra_parts to "" for a.out configurations. * config/t-netbsd (CRTSTUFF_T_CFLAGS): Set to "-fPIC". From-SVN: r59444
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config.gcc15
-rw-r--r--gcc/config/t-netbsd3
3 files changed, 28 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 71ae193..3e66870 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,15 @@
2002-11-24 Jason Thorpe <thorpej@wasabisystems.com>
+ * config.gcc (*-*-netbsd*1.[7-9]*, *-*-netbsd*[2-9]*): Set
+ extra_parts to "crtbegin.o crtend.o crtbeginS.o crtendS.o
+ crtbeginT.o".
+ (arm*-*-netbsd*, i[34567]86-*-netbsd*, m68k*-*-netbsd*)
+ (ns32k-*-netbsd*, sparc-*-netbsd*, vax-*-netbsd*): Set extra_parts
+ to "" for a.out configurations.
+ * config/t-netbsd (CRTSTUFF_T_CFLAGS): Set to "-fPIC".
+
+2002-11-24 Jason Thorpe <thorpej@wasabisystems.com>
+
* config/alpha/netbsd.h (CPP_SUBTARGET_SPEC): Just use
NETBSD_CPP_SPEC directly.
(SUBTARGET_EXTRA_SPECS): Remove netbsd_cpp_spec. Add
diff --git a/gcc/config.gcc b/gcc/config.gcc
index ef7bac4..902f0a2 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -370,6 +370,15 @@ case $machine in
tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
;;
esac
+
+ # NetBSD 1.7 and later are set up to use GCC's crtstuff for
+ # ELF configurations. We will clear extra_parts in the
+ # a.out configurations.
+ case $machine in
+ *-*-netbsd*1.[7-9]* | *-*-netbsd*[2-9]*)
+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
+ ;;
+ esac
;;
*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
# This is the place-holder for the generic a.out configuration
@@ -623,6 +632,7 @@ arm*-*-netbsdelf*)
arm*-*-netbsd*)
tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h"
tmake_file="t-netbsd arm/t-netbsd"
+ extra_parts=""
use_collect2=yes
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
@@ -1068,6 +1078,7 @@ i[34567]86-*-netbsdelf*)
i[34567]86-*-netbsd*)
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h"
tmake_file=t-netbsd
+ extra_parts=""
use_collect2=yes
;;
x86_64-*-netbsd*)
@@ -1631,6 +1642,7 @@ m68010-*-netbsdelf* | m68k*-*-netbsdelf*)
m68k*-*-netbsd*)
tm_file=m68k/netbsd.h
tmake_file=t-netbsd
+ extra_parts=""
use_collect2=yes
;;
m68k*-*-openbsd*)
@@ -1928,6 +1940,7 @@ ns32k-*-netbsd*)
tm_file="${tm_file} netbsd.h netbsd-aout.h ns32k/netbsd.h"
# On NetBSD, the headers are already okay, except for math.h.
tmake_file="t-netbsd ns32k/t-ns32k"
+ extra_parts=""
use_collect2=yes
;;
pdp11-*-bsd)
@@ -2320,6 +2333,7 @@ sparc-*-netbsdelf*)
sparc-*-netbsd*)
tm_file="${tm_file} sparc/aout.h netbsd.h netbsd-aout.h sparc/netbsd.h"
tmake_file=t-netbsd
+ extra_parts=""
use_collect2=yes
;;
sparc-*-openbsd*)
@@ -2638,6 +2652,7 @@ vax-*-netbsdelf*)
vax-*-netbsd*)
tm_file="${tm_file} netbsd.h netbsd-aout.h vax/netbsd.h"
tmake_file=t-netbsd
+ extra_parts=""
use_collect2=yes
;;
vax-*-openbsd*)
diff --git a/gcc/config/t-netbsd b/gcc/config/t-netbsd
index d284b3e..fa2a488 100644
--- a/gcc/config/t-netbsd
+++ b/gcc/config/t-netbsd
@@ -1,2 +1,5 @@
# Don't run fixproto
STMP_FIXPROTO =
+
+# Always build crtstuff with PIC.
+CRTSTUFF_T_CFLAGS = -fPIC