Subject: toolchain/15523: toolchain doesn't build with alpha host and mips targets
To: None <gnats-bugs@gnats.netbsd.org>
From: None <simonb@wasabisystems.com>
List: netbsd-bugs
Date: 02/07/2002 23:52:28
>Number:         15523
>Category:       toolchain
>Synopsis:       toolchain doesn't build with alpha host and mips targets
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 07 04:53:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Simon Burge
>Release:        NetBSD 1.5.3_ALPHA
>Organization:
Wasabi Systems
>Environment:
System: NetBSD thoreau.thistledown.com.au 1.5.3_ALPHA NetBSD 1.5.3_ALPHA
(THOREAU) #42: Thu Dec 6 14:46:10 EST 2001
simonb@thoreau.thistledown.com.au:/usr/obj/sys/arch/alpha/compile/THOREAU alpha


>Description:
	Building a mips targetted toolchain on an alpha (and possibly
	other 64 bit hosts like sparc64) results in a bfd configuration
	that only half-believes it is 64 bit aware.  The first program
	(gas) to link against libbfd gets lots of errors along the lines
	of:

	../bfd/.libs/libbfd.a(elf32-mips.o): In function `mips_elf_sym_is_global':
	elf32-mips.c(.text+0x3aac): undefined reference to `bfd_elf64_tradbigmips_vec'
	elf32-mips.c(.text+0x3ab8): undefined reference to `bfd_elf64_tradlittlemips_vec'
	[ many more "bfd_elf64_*" references ]

>How-To-Repeat:
	On an alpha:
		cd /usr/src
		./build-sh -t -m <pmax-or-some-other-mips-architecture>

>Fix:
	Gross workaround (using pmax as a target) is:

		% cd /usr/src
		% ./build-sh -t -m pmax
		 [ wait for it to blow up ]
		% cd tools
		% ed `nbmake-pmax -V .OBJDIR`/toolchain/build/bfd/bfd.h
		/BFD_ARCH_SIZE 64
		s/64/32
		wq
		% nbmake-pmax dependall install

	Better fixes considered!

>Release-Note:
>Audit-Trail:
>Unformatted: