Subject: pkg/9547: cross/binutils for vax target
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rhialto@polder.ubc.kun.nl>
List: netbsd-bugs
Date: 03/05/2000 11:00:48
>Number: 9547
>Category: pkg
>Synopsis: Some changes for a VAX target
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager (NetBSD software packages system bug manager)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Mar 5 11:00:00 2000
>Last-Modified:
>Originator: Olaf 'Rhialto' Seibert
>Organization:
>Release: feb 2000 <NetBSD-current source date>
>Environment:
System: NetBSD azenomei.falu.nl 1.4.1 NetBSD 1.4.1 (AZENOMEI) #22: Tue Feb 22 22:39:20 CET 2000 rhialto@azenomei.falu.nl:/usr/src/sys/arch/alpha/compile/AZENOMEI alpha
>Description:
Add recognition of a VAX target to cross/binutils.
>How-To-Repeat:
Want a cross-assembler to VAX.
>Fix:
Here are some changes for the cross/binutils package, to make it recognise
a VAX target.
There are some complications with these patches, I think, and I haven't
figured out the cross building system well enough to provide
satisfactory answers.
- There is already another copy of libbfd and libopcodes in the system
sources: in src/gnu/dist. There seems to be no synchronisation between
the cross-binutils and those sources. In fact, I basically took most
changes here from the src/gnu/dist directory.
- These patches also need to be applied to the binutils that are
unpacked in the egcs source tree when building the crosscompiler
(later on, from the cross/vax-netbsd package). This is the third copy
of binutils stuff. This seems rather inelegant.
- The third copy of binutils stuff seems to be configured, but not
compiled?
- After changing .am or .in files, one needs to run automake or
autoconfig. The versions I have of these tools differ from those
orginally used. The amount of diffs for this is very great, and I left
them out here.
- I took a file from the first copy of binutils to use here.
binutils-2.9.1/opcodes/vax-dis.c <- src/gnu/dist/opcodes/vax-dis.c
- Somehow the shared libraries are not build, only the static libraries.
This causes problems later when building the cross-gcc.
But this may be a host-specific issue, not target-specific.
A patch to the package:
*** cross/binutils/Makefile.dist Fri Mar 3 16:45:22 2000
--- cross/binutils/Makefile Fri Mar 3 16:45:35 2000
***************
*** 31,37 ****
m68k-elf m68k-netbsd m68k-sunos4 \
mipseb-netbsd mipsel-netbsd \
powerpc-eabi powerpcle-eabi \
! sparc-netbsd sparc-solaris2 sparc-sunos4
# this breaks the `sparc-solaris2' target (which adds sparc_elf32
# which we use for the `sparc-netbsdelf' target
--- 31,38 ----
m68k-elf m68k-netbsd m68k-sunos4 \
mipseb-netbsd mipsel-netbsd \
powerpc-eabi powerpcle-eabi \
! sparc-netbsd sparc-solaris2 sparc-sunos4 \
! vax-netbsd
# this breaks the `sparc-solaris2' target (which adds sparc_elf32
# which we use for the `sparc-netbsdelf' target
These are patches to be added to cross/binutils/patches:
diff -c --recur binutils-old/work.alpha/binutils-2.9.1/bfd/config.bfd binutils-new/work.alpha/binutils-2.9.1/bfd/config.bfd
*** binutils-old/work.alpha/binutils-2.9.1/bfd/config.bfd Sun Mar 5 19:10:24 2000
--- binutils-new/work.alpha/binutils-2.9.1/bfd/config.bfd Sun Mar 5 16:45:00 2000
***************
*** 580,585 ****
--- 580,590 ----
;;
#endif
+ vax-*-netbsd*)
+ targ_defvec=vaxnetbsd_vec
+ targ_underscore=yes
+ ;;
+
we32k-*-*)
targ_defvec=we32kcoff_vec
;;
diff -c --recur binutils-old/work.alpha/binutils-2.9.1/bfd/configure.in binutils-new/work.alpha/binutils-2.9.1/bfd/configure.in
*** binutils-old/work.alpha/binutils-2.9.1/bfd/configure.in Sun Mar 5 19:10:22 2000
--- binutils-new/work.alpha/binutils-2.9.1/bfd/configure.in Sun Mar 5 18:23:56 2000
***************
*** 511,516 ****
--- 511,517 ----
tekhex_vec) tb="$tb tekhex.lo" ;;
tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
+ vaxnetbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo " ;;
we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
diff -c --recur binutils-old/work.alpha/binutils-2.9.1/ld/configure.tgt binutils-new/work.alpha/binutils-2.9.1/ld/configure.tgt
*** binutils-old/work.alpha/binutils-2.9.1/ld/configure.tgt Sun Mar 5 19:10:24 2000
--- binutils-new/work.alpha/binutils-2.9.1/ld/configure.tgt Sun Mar 5 14:48:55 2000
***************
*** 141,146 ****
--- 141,147 ----
hppa*-*-lites*) targ_emul=hppaelf ;;
hppa*-*-rtems*) targ_emul=hppaelf ;;
vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
+ vax-dec-netbsd* ) targ_emul=vax ;;
mips*-dec-ultrix*) targ_emul=mipslit ;;
mips*-dec-osf*) targ_emul=mipslit ;;
mips*-sgi-irix[56]*) targ_emul=elf32bsmip ;;
diff -c --recur binutils-old/work.alpha/binutils-2.9.1/opcodes/Makefile.am binutils-new/work.alpha/binutils-2.9.1/opcodes/Makefile.am
*** binutils-old/work.alpha/binutils-2.9.1/opcodes/Makefile.am Fri May 1 17:48:18 1998
--- binutils-new/work.alpha/binutils-2.9.1/opcodes/Makefile.am Sun Mar 5 17:27:01 2000
***************
*** 58,63 ****
--- 58,64 ----
sparc-dis.c \
sparc-opc.c \
tic30-dis.c \
+ vax-dis.c \
w65-dis.c \
z8k-dis.c \
z8kgen.c
***************
*** 101,106 ****
--- 102,108 ----
tic30-dis.lo \
v850-dis.lo \
v850-opc.lo \
+ vax-dis.lo \
w65-dis.lo \
z8k-dis.lo
diff -c --recur binutils-old/work.alpha/binutils-2.9.1/opcodes/configure.in binutils-new/work.alpha/binutils-2.9.1/opcodes/configure.in
*** binutils-old/work.alpha/binutils-2.9.1/opcodes/configure.in Fri May 1 17:48:19 1998
--- binutils-new/work.alpha/binutils-2.9.1/opcodes/configure.in Sun Mar 5 17:16:16 2000
***************
*** 138,144 ****
bfd_tahoe_arch) ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
! bfd_vax_arch) ;;
bfd_w65_arch) ta="$ta w65-dis.lo" ;;
bfd_we32k_arch) ;;
bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
--- 138,144 ----
bfd_tahoe_arch) ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
! bfd_vax_arch) ta="$ta vax-dis.lo" ;;
bfd_w65_arch) ta="$ta w65-dis.lo" ;;
bfd_we32k_arch) ;;
bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
-Olaf.
--
___ Olaf 'Rhialto' Seibert - rhialto@polder.ubc. -- If one tells the truth,
\X/ .kun.nl -- one is sure, sooner or later, to be found out. (Oscar Wilde)
>Audit-Trail:
>Unformatted: