From owner-p4-projects@FreeBSD.ORG Thu Jun 26 17:53:07 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5A4DB37B404; Thu, 26 Jun 2003 17:53:06 -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 085E737B401 for ; Thu, 26 Jun 2003 17:53:06 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81F2743FDF for ; Thu, 26 Jun 2003 17:53:05 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h5R0r50U005401 for ; Thu, 26 Jun 2003 17:53:05 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h5R0r4Kt005391 for perforce@freebsd.org; Thu, 26 Jun 2003 17:53:04 -0700 (PDT) Date: Thu, 26 Jun 2003 17:53:04 -0700 (PDT) Message-Id: <200306270053.h5R0r4Kt005391@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 33723 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2003 00:53:07 -0000 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