PERFORCE change 54490 for review

Juli Mallett jmallett at FreeBSD.org
Wed Jun 9 13:54:26 GMT 2004


http://perforce.freebsd.org/chv.cgi?CH=54490

Change 54490 by jmallett at jmallett_oingo on 2004/06/09 13:53:29

	Take out some aggression on binutils for wasting 4 hours of my night
	and still refusing to DWIM.  It seems that we need both the trad and
	non-trad elf32 stuff for life to be good.  This is stupid and makes
	little sense to me.  Probably something is just slightly off and it
	would rather give stupid error messages than just come out and tell
	me that it can't do BLAH without BLAH.  I'm willing to listen, really.
	Instead though, it does that.  I really just want the *trad* targets,
	but that seems to make BFD very, very unhappy.  I made the config.bfd
	match what Linux has, which seems to imply you can do *trad* only.
	And I made the libbfd/Makefile.mips match this.  But did it work?  No.
	So I tried without the *trad*, but of course, that's the original
	problem.  I can get over ambiguity with lots of --format and --oformat
	and --HURRRRRRRRRR, but the problem is for elf64-bigmips, BFD wants
	(and I mean really wants) to act like it's targetting IRIX6 userland.
	This makes my head hurt.  And elf64-tradbigmips is no picnic either.
	Refcount explodey in the Kernel build w.r.t. strtab.  I hate BU, I hate
	BFD.  Hate Hate Hate.  Flaming death upon it.
	
	That is all.

Affected files ...

.. //depot/projects/mips/contrib/binutils/bfd/config.bfd#5 edit
.. //depot/projects/mips/gnu/usr.bin/binutils/libbfd/Makefile.mips#8 edit

Differences ...

==== //depot/projects/mips/contrib/binutils/bfd/config.bfd#5 (text+ko) ====

@@ -675,7 +675,7 @@
     ;;
   mips*-*-freebsd*)
     targ_defvec=bfd_elf32_tradbigmips_vec
-    targ_selvecs="bfd_elf32_bigmips_vec bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
+    targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
     ;;
   mips*el-*-netbsd*)
     targ_defvec=bfd_elf32_littlemips_vec

==== //depot/projects/mips/gnu/usr.bin/binutils/libbfd/Makefile.mips#8 (text+ko) ====

@@ -16,7 +16,14 @@
 	elflink.c	\
 	elfxx-mips.c	\
 	elfxx-target.h
-VECS+=	bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_bigmips_vec bfd_elf32_littlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec
+VECS+=	bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_bigmips_vec bfd_elf32_littlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec
+# XXX troublemakers due to ambiguity, and BFD behaves badly if we only have
+#     *trad*.  I'm sick of fighting it.
+#     The real problem here is that we have to use the *trad* at all.  If we
+#     use elf64 (at least) in non-trad mode, BU seems to assume the binary will
+#     run on an IRIX system, and enforces such things as the rld_map section
+#     existing, but does not create it.  gross gross gross.
+#bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec
 
 # XXXMIPS Conditionalie on the MACHINE/MACHINE_ARCH targetry to decide
 # whether elf{32,64}_{big,little}mips vectors, but default to the likely
@@ -24,14 +31,7 @@
 .if ${TARGET_ARCH} == "mips"
 CFLAGS+= -DDEFAULT_VECTOR=bfd_elf32_tradbigmips_vec
 .endif
-CFLAGS+= -DHAVE_bfd_elf32_tradbigmips_vec \
-	 -DHAVE_bfd_elf32_tradlittlemips_vec \
-	 -DHAVE_bfd_elf32_bigmips_vec \
-	 -DHAVE_bfd_elf32_littlemips_vec \
-	 -DHAVE_bfd_elf64_tradbigmips_vec \
-	 -DHAVE_bfd_elf64_tradlittlemips_vec \
-	 -DHAVE_bfd_elf64_bigmips_vec \
-	 -DHAVE_bfd_elf64_littlemips_vec
+
 CLEANFILES+=	elf32-target.h elf64-target.h
 
 elf32-target.h:	elfxx-target.h


More information about the p4-projects mailing list