PERFORCE change 33723 for review
Peter Wemm
peter at FreeBSD.org
Thu Jun 26 17:53:07 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=33723
Change 33723 by peter at 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
More information about the p4-projects
mailing list