From owner-p4-projects@FreeBSD.ORG Mon Jun 30 09:22:45 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CA1B537B404; Mon, 30 Jun 2003 09:22:44 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7568A37B401; Mon, 30 Jun 2003 09:22:44 -0700 (PDT) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id B913B43FEC; Mon, 30 Jun 2003 09:22:43 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.9/8.12.9) with ESMTP id h5UGMgaQ012635; Mon, 30 Jun 2003 09:22:42 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.9/8.12.9/Submit) id h5UGMgls012634; Mon, 30 Jun 2003 09:22:42 -0700 (PDT) Date: Mon, 30 Jun 2003 09:22:42 -0700 From: "David O'Brien" To: Peter Wemm Message-ID: <20030630162242.GA12608@dragon.nuxi.com> References: <200306270053.h5R0r4Kt005391@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306270053.h5R0r4Kt005391@repoman.freebsd.org> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 5.1-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 cc: Perforce Change Reviews Subject: Re: PERFORCE change 33723 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 16:22:46 -0000 I'll do something about this today. On Thu, Jun 26, 2003 at 05:53:04PM -0700, Peter Wemm wrote: > http://perforce.freebsd.org/chv.cgi?CH=33723 > > Change 33723 by peter@peter_hammer on 2003/06/26 17:52:45 > > Back out the evil hack to binutils contrib sources. David may > find this less offensive. Instead of configuring libbfd with > two ambiguous elf32_i386 targets, just configure one of them. This > stops the autodetect code from complaining about the ambiguity. > I think this is a bug on the i386 platform too, FWIW. > > Affected files ... > > .. //depot/projects/hammer/contrib/binutils/bfd/elf32-i386-fbsd.c#3 edit > .. //depot/projects/hammer/contrib/binutils/bfd/elf32-i386.c#6 edit > .. //depot/projects/hammer/contrib/gcc/config/i386/biarch64.h#3 edit > .. //depot/projects/hammer/gnu/usr.bin/binutils/libbfd/Makefile.amd64#3 edit > > Differences ... > > ==== //depot/projects/hammer/contrib/binutils/bfd/elf32-i386-fbsd.c#3 (text+ko) ==== > > @@ -22,9 +22,6 @@ > #define ELF_ARCH bfd_arch_i386 > #define ELF_MACHINE_CODE EM_386 > #define ELF_MAXPAGESIZE 0x1000 > -#ifdef __amd64__ > -#define ELF_OSABI ELFOSABI_FREEBSD > -#endif > > #include "bfd.h" > #include "sysdep.h" > > ==== //depot/projects/hammer/contrib/binutils/bfd/elf32-i386.c#6 (text+ko) ==== > > @@ -629,20 +629,6 @@ > /* Allocate our special target data. */ > struct elf_i386_obj_tdata *new_tdata; > bfd_size_type amt = sizeof (struct elf_i386_obj_tdata); > -#ifdef __amd64__ > - Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */ > - > - i_ehdrp = elf_elfheader (abfd); > - > -#ifdef ELF_OSABI > - if (i_ehdrp->e_ident[EI_OSABI] != ELF_OSABI) > - return false; > -#endif > -#if defined(__FreeBSD__) && !defined(ELF_OSABI) > - if (i_ehdrp->e_ident[EI_OSABI] == ELFOSABI_FREEBSD) > - return false; > -#endif > -#endif > new_tdata = bfd_zalloc (abfd, amt); > if (new_tdata == NULL) > return false; > > ==== //depot/projects/hammer/contrib/gcc/config/i386/biarch64.h#3 (text+ko) ==== > > @@ -21,5 +21,5 @@ > the Free Software Foundation, 59 Temple Place - Suite 330, > Boston, MA 02111-1307, USA. */ > > -#define TARGET_64BIT_DEFAULT 1 > -#define TARGET_BI_ARCH 1 > +#define TARGET_64BIT_DEFAULT > +#define TARGET_BI_ARCH > > ==== //depot/projects/hammer/gnu/usr.bin/binutils/libbfd/Makefile.amd64#3 (text+ko) ==== > > @@ -1,21 +1,22 @@ > # $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile.amd64,v 1.1 2003/04/26 03:28:21 obrien Exp $ > > -.include "${.CURDIR}/Makefile.i386" > - > -# Get the i386 DEFAULT_VECTOR and VECS. > -I386_VECS:= ${VECS} > - > DEFAULT_VECTOR= bfd_elf64_x86_64_vec > > -VECS= bfd_elf64_x86_64_vec ${I386_VECS} > +VECS= bfd_elf64_x86_64_vec bfd_elf32_i386_freebsd_vec > > SRCS+= elf64-amd64-fbsd.c elf64-target.h elf64-gen.c elf64.c > +SRCS+= cpu-i386.c elf32-i386-fbsd.c elf32-target.h elf32.c elflink.c > > CLEANFILES+= elf64-target.h > > elf64-target.h: elfxx-target.h > sed -e s/NN/64/g ${.ALLSRC} > ${.TARGET} > > +CLEANFILES+= elf32-target.h > + > +elf32-target.h: elfxx-target.h > + sed -e s/NN/32/g ${.ALLSRC} > ${.TARGET} > + > CLEANFILES+= elf64-amd64-fbsd.c > > elf64-amd64-fbsd.c: ${.CURDIR}/elf-fbsd-brand.c ${SRCDIR}/bfd/elf64-x86-64.c