This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Bring arm-netbsd back to bootstrap
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard dot Earnshaw at arm dot com
- Date: Mon, 28 Jan 2002 16:17:58 +0000
- Subject: Bring arm-netbsd back to bootstrap
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
The following patches are required to bring arm-netbsd (still an a.out
config) back to the point where it will bootstrap.
2002-01-28 Richard Earnshaw <rearnsha@arm.com>
* config.gcc (*-*-netbsdelf*): Set up generic parameters.
(*-*-netbsd*): Always use collect2. Remove collect2 settings from
other non-elf netbsd config frags.
* config/netbsd-aout.h (STARTFILE_SPEC): Don't pull in c++rt0 since
collect2 will does that.
* config/netbsd.h (LIBGCC_SPEC): Add white space before -lgcc, so that
shared-lib frobbing will work.
? config/arm/vfp.patches.all
Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.154
diff -p -r1.154 config.gcc
*** config.gcc 2002/01/27 04:17:59 1.154
--- config.gcc 2002/01/28 15:31:06
*************** case $machine in
*** 319,329 ****
--- 319,337 ----
tmake_file="${tmake_file} t-openbsd-thread"
fi
;;
+ *-*-netbsdelf*)
+ tmake_file="t-libc-ok t-netbsd"
+ xm_defines=POSIX
+ gas=yes
+ gnu_ld=yes
+ ;;
*-*-netbsd*)
+ # Traditional a.out systems need to use collect2
tmake_file="t-libc-ok t-netbsd"
xm_defines=POSIX
gas=yes
gnu_ld=yes
+ use_collect2=yes
;;
*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
# This is the place-holder for the generic a.out configuration
*************** arm*-*-freebsd*|strongarm*-*-freebsd*)
*** 632,638 ****
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"
- use_collect2=yes
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
--- 640,645 ----
*************** i[34567]86-*-netbsdelf*)
*** 1150,1156 ****
i[34567]86-*-netbsd*)
tm_file=i386/netbsd.h
tmake_file=t-netbsd
- use_collect2=yes
;;
x86_64-*-netbsd*)
tm_file="${tm_file} i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
--- 1157,1162 ----
*************** m68k*-*-netbsd*)
*** 1936,1942 ****
tm_file=m68k/netbsd.h
tmake_file=t-netbsd
float_format=m68k
- use_collect2=yes
;;
m68k*-*-openbsd*)
# needed to unconfuse gdb
--- 1942,1947 ----
*************** ns32k-*-netbsd*)
*** 2606,2612 ****
tm_file=ns32k/netbsd.h
# On NetBSD, the headers are already okay, except for math.h.
tmake_file=t-netbsd
- use_collect2=yes
;;
pdp11-*-bsd)
tm_file="${tm_file} pdp11/2bsd.h"
--- 2611,2616 ----
*************** sparc-*-aout*)
*** 2917,2923 ****
sparc-*-netbsd*)
tm_file="${tm_file} sparc/aout.h netbsd.h netbsd-aout.h sparc/netbsd.h"
tmake_file=t-netbsd
- use_collect2=yes
;;
sparc-*-openbsd*)
tm_file="sparc/sparc.h ${tm_file}"
--- 2921,2926 ----
*************** vax-*-netbsd*)
*** 3232,3238 ****
tm_file="${tm_file} netbsd.h netbsd-aout.h vax/netbsd.h"
tmake_file=t-netbsd
float_format=vax
- use_collect2=yes
;;
vax-*-openbsd*)
tm_file="vax/vax.h vax/openbsd1.h openbsd.h ${tm_file}"
--- 3235,3240 ----
Index: config/netbsd-aout.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/netbsd-aout.h,v
retrieving revision 1.2
diff -p -r1.2 netbsd-aout.h
*** netbsd-aout.h 2002/01/23 01:17:51 1.2
--- netbsd-aout.h 2002/01/28 15:31:14
*************** Boston, MA 02111-1307, USA. */
*** 45,52 ****
%{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. */
--- 45,51 ----
%{p:mcrt0%O%s} \
%{!p: \
%{!static:crt0%O%s} \
! %{static:scrt0%O%s}}}}"
/* Provide a LINK_SPEC appropriate for NetBSD a.out. Here we provide
support for the special GCC options -static, -assert, and -nostdlib. */
Index: config/netbsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/netbsd.h,v
retrieving revision 1.12
diff -p -r1.12 netbsd.h
*** netbsd.h 2002/01/22 04:23:02 1.12
--- netbsd.h 2002/01/28 15:31:14
***************
*** 70,81 ****
"%{!symbolic: \
%{!shared: \
%{!p: \
! %{!pg:-lgcc}}} \
! %{shared:-lgcc_pic} \
! %{p:-lgcc_p} \
! %{pg:-lgcc_p}}"
#else
! #define LIBGCC_SPEC "%{!shared:%{!symbolic:-lgcc}}"
#endif
/* When building shared libraries, the initialization and finalization
--- 70,81 ----
"%{!symbolic: \
%{!shared: \
%{!p: \
! %{!pg: -lgcc}}} \
! %{shared: -lgcc_pic} \
! %{p: -lgcc_p} \
! %{pg: -lgcc_p}}"
#else
! #define LIBGCC_SPEC "%{!shared:%{!symbolic: -lgcc}}"
#endif
/* When building shared libraries, the initialization and finalization