From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Dec 3 20:40:11 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70DFC106564A for ; Sat, 3 Dec 2011 20:40:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4E1008FC13 for ; Sat, 3 Dec 2011 20:40:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pB3KeB7e067983 for ; Sat, 3 Dec 2011 20:40:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pB3KeBlj067982; Sat, 3 Dec 2011 20:40:11 GMT (envelope-from gnats) Resent-Date: Sat, 3 Dec 2011 20:40:11 GMT Resent-Message-Id: <201112032040.pB3KeBlj067982@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andreas Tobler Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF2E61065675 for ; Sat, 3 Dec 2011 20:34:43 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id CEDD98FC0C for ; Sat, 3 Dec 2011 20:34:43 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3KYhcI081677 for ; Sat, 3 Dec 2011 20:34:43 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id pB3KYha4081676; Sat, 3 Dec 2011 20:34:43 GMT (envelope-from nobody) Message-Id: <201112032034.pB3KYha4081676@red.freebsd.org> Date: Sat, 3 Dec 2011 20:34:43 GMT From: Andreas Tobler To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/163041: [patch] add support for powerpc* in binutils-2.22 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 20:40:11 -0000 >Number: 163041 >Category: ports >Synopsis: [patch] add support for powerpc* in binutils-2.22 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Dec 03 20:40:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Andreas Tobler >Release: -CURRENT >Organization: none >Environment: FreeBSD bohrium.andreas.nets 9.0-CURRENT FreeBSD 10.0-CURRENT #11 r227669M: Fri Nov 18 19:05:27 CET 2011 andreast@bohrium.andreas.nets:/usr/obj/export/devel/fbsd/src/sys/GENERIC64_G5 powerpc >Description: The attached patch is a backport of the changes from binutils-cvs needed to support 32- and 64-bit powerpc in binutils-2.22. >How-To-Repeat: >Fix: Attached patch. Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # files/patch-bfd-powerpc.patch # files/patch-gas-config-tc-ppc.c # files/patch-ld-powerpc.patch # echo x - files/patch-bfd-powerpc.patch sed 's/^X//' >files/patch-bfd-powerpc.patch << 'END-of-files/patch-bfd-powerpc.patch' X--- bfd/configure.orig 2011-12-03 20:02:52.000000000 +0100 X+++ bfd/configure 2011-12-03 20:04:12.000000000 +0100 X@@ -15262,6 +15262,7 @@ X bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; X bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; X bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; X+ bfd_elf32_powerpc_freebsd_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; X bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; X bfd_elf32_rx_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; X bfd_elf32_rx_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; X@@ -15327,6 +15328,7 @@ X bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; X bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; X bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; X+ bfd_elf64_powerpc_freebsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; X bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; X bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; X bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; X--- bfd/config.bfd.orig 2011-12-03 19:56:39.000000000 +0100 X+++ bfd/config.bfd 2011-12-03 19:59:15.000000000 +0100 X@@ -1128,6 +1128,11 @@ X targ_selvecs=rs6000coff_vec X want64=true X ;; X+ powerpc64-*-freebsd*) X+ targ_defvec=bfd_elf64_powerpc_freebsd_vec X+ targ_selvecs="bfd_elf64_powerpc_vec bfd_elf32_powerpc_vec bfd_elf32_powerpc_freebsd_vec bfd_elf32_powerpcle_vec rs6000coff_vec rs6000coff64_vec aix5coff64_vec" X+ want64=true X+ ;; X powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux* | \ X powerpc64-*-*bsd*) X targ_defvec=bfd_elf64_powerpc_vec X@@ -1140,6 +1145,11 @@ X want64=true X ;; X #endif X+ powerpc-*-*freebsd*) X+ targ_defvec=bfd_elf32_powerpc_freebsd_vec X+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec ppcboot_vec" X+ targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec bfd_elf64_powerpc_freebsd_vec" X+ ;; X powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ X powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \ X powerpc-*-chorus*) X--- bfd/elf32-ppc.c.orig 2011-12-03 19:51:40.000000000 +0100 X+++ bfd/elf32-ppc.c 2011-12-03 19:55:17.000000000 +0100 X@@ -9127,6 +9127,24 @@ X X #include "elf32-target.h" X X+/* FreeBSD Target */ X+ X+#undef TARGET_LITTLE_SYM X+#undef TARGET_LITTLE_NAME X+ X+#undef TARGET_BIG_SYM X+#define TARGET_BIG_SYM bfd_elf32_powerpc_freebsd_vec X+#undef TARGET_BIG_NAME X+#define TARGET_BIG_NAME "elf32-powerpc-freebsd" X+ X+#undef ELF_OSABI X+#define ELF_OSABI ELFOSABI_FREEBSD X+ X+#undef elf32_bed X+#define elf32_bed elf32_powerpc_fbsd_bed X+ X+#include "elf32-target.h" X+ X /* VxWorks Target */ X X #undef TARGET_LITTLE_SYM X@@ -9137,6 +9155,8 @@ X #undef TARGET_BIG_NAME X #define TARGET_BIG_NAME "elf32-powerpc-vxworks" X X+#undef ELF_OSABI X+ X /* VxWorks uses the elf default section flags for .plt. */ X static const struct bfd_elf_special_section * X ppc_elf_vxworks_get_sec_type_attr (bfd *abfd ATTRIBUTE_UNUSED, asection *sec) X--- bfd/elf64-ppc.c.orig 2011-12-03 19:51:08.000000000 +0100 X+++ bfd/elf64-ppc.c 2011-12-03 19:51:32.000000000 +0100 X@@ -13897,3 +13897,22 @@ X } X X #include "elf64-target.h" X+ X+/* FreeBSD support */ X+ X+#undef TARGET_LITTLE_SYM X+#undef TARGET_LITTLE_NAME X+ X+#undef TARGET_BIG_SYM X+#define TARGET_BIG_SYM bfd_elf64_powerpc_freebsd_vec X+#undef TARGET_BIG_NAME X+#define TARGET_BIG_NAME "elf64-powerpc-freebsd" X+ X+#undef ELF_OSABI X+#define ELF_OSABI ELFOSABI_FREEBSD X+ X+#undef elf64_bed X+#define elf64_bed elf64_powerpc_fbsd_bed X+ X+#include "elf64-target.h" X+ X--- bfd/targets.c.orig 2011-12-03 19:59:40.000000000 +0100 X+++ bfd/targets.c 2011-12-03 20:01:55.000000000 +0100 X@@ -667,6 +667,7 @@ X extern const bfd_target bfd_elf32_pjl_vec; X extern const bfd_target bfd_elf32_powerpc_vec; X extern const bfd_target bfd_elf32_powerpcle_vec; X+extern const bfd_target bfd_elf32_powerpc_freebsd_vec; X extern const bfd_target bfd_elf32_powerpc_vxworks_vec; X extern const bfd_target bfd_elf32_rx_le_vec; X extern const bfd_target bfd_elf32_rx_be_vec; X@@ -729,6 +730,7 @@ X extern const bfd_target bfd_elf64_mmix_vec; X extern const bfd_target bfd_elf64_powerpc_vec; X extern const bfd_target bfd_elf64_powerpcle_vec; X+extern const bfd_target bfd_elf64_powerpc_freebsd_vec; X extern const bfd_target bfd_elf64_s390_vec; X extern const bfd_target bfd_elf64_sh64_vec; X extern const bfd_target bfd_elf64_sh64l_vec; X@@ -1033,6 +1035,7 @@ X &bfd_elf32_powerpc_vec, X &bfd_elf32_powerpc_vxworks_vec, X &bfd_elf32_powerpcle_vec, X+ &bfd_elf32_powerpc_freebsd_vec, X &bfd_elf32_rx_be_vec, X &bfd_elf32_rx_be_ns_vec, X &bfd_elf32_rx_le_vec, X@@ -1095,6 +1098,7 @@ X &bfd_elf64_mmix_vec, X &bfd_elf64_powerpc_vec, X &bfd_elf64_powerpcle_vec, X+ &bfd_elf64_powerpc_freebsd_vec, X &bfd_elf64_s390_vec, X &bfd_elf64_sh64_vec, X &bfd_elf64_sh64l_vec, END-of-files/patch-bfd-powerpc.patch echo x - files/patch-gas-config-tc-ppc.c sed 's/^X//' >files/patch-gas-config-tc-ppc.c << 'END-of-files/patch-gas-config-tc-ppc.c' X--- gas/config/tc-ppc.c.orig 2011-12-03 20:06:12.000000000 +0100 X+++ gas/config/tc-ppc.c 2011-12-03 20:07:13.000000000 +0100 X@@ -1370,7 +1370,9 @@ X #endif X #endif X #ifdef OBJ_ELF X-# ifdef TE_VXWORKS X+# ifdef TE_FreeBSD X+ return (ppc_obj64 ? "elf64-powerpc-freebsd" : "elf32-powerpc-freebsd"); X+# elif defined (TE_VXWORKS) X return "elf32-powerpc-vxworks"; X # else X return (target_big_endian END-of-files/patch-gas-config-tc-ppc.c echo x - files/patch-ld-powerpc.patch sed 's/^X//' >files/patch-ld-powerpc.patch << 'END-of-files/patch-ld-powerpc.patch' X--- ld/Makefile.in.orig 2011-12-03 20:13:09.000000000 +0100 X+++ ld/Makefile.in 2011-12-03 20:14:39.000000000 +0100 X@@ -783,6 +783,7 @@ X eelf64ltsmip_fbsd.c \ X eelf64mmix.c \ X eelf64ppc.c \ X+ eelf64ppc_fbsd.c \ X eelf64tilegx.c \ X eelf_l1om.c \ X eelf_l1om_fbsd.c \ X@@ -1180,6 +1181,7 @@ X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ltsmip_fbsd.Po@am__quote@ X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64mmix.Po@am__quote@ X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ppc.Po@am__quote@ X+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ppc_fbsd.Po@am__quote@ X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx.Po@am__quote@ X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Po@am__quote@ X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Po@am__quote@ X@@ -3425,6 +3427,10 @@ X ldemul-list.h \ X $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} X ${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)" X+eelf64ppc_fbsd.c: $(srcdir)/emulparams/elf64ppc_fbsd.sh \ X+ $(srcdir)/emultempl/ppc64elf.em ldemul-list.h \ X+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} X+ ${GENSCRIPTS} elf64ppc_fbsd "$(tdir_elf64ppc_fbsd)" X eelf64tilegx.c: $(srcdir)/emulparams/elf64tilegx.sh \ X $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \ X $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} X--- ld/configure.tgt.orig 2011-12-03 20:15:04.000000000 +0100 X+++ ld/configure.tgt 2011-12-03 20:17:13.000000000 +0100 X@@ -453,10 +453,17 @@ X pj*-*-*) targ_emul=pjelf X ;; X powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu) X- targ_emul=elf32ppc_fbsd; X- targ_extra_emuls="elf32ppc elf32ppcsim"; X+ targ_emul=elf32ppc_fbsd X+ targ_extra_emuls="elf32ppc elf32ppcsim" X targ_extra_libpath=elf32ppc; X tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` ;; X+powerpc64-*-freebsd*) X+ targ_emul=elf64ppc_fbsd X+ targ_extra_emuls="elf64ppc elf32ppc_fbsd elf32ppc" X+ targ_extra_libpath="elf32ppc_fbsd elf32ppc" X+ tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'` X+ tdir_elf32ppc_fbsd=$tdir_elf32ppc X+ ;; X powerpc*-*-linux*) case "${targ}" in X *64*) targ_emul=elf64ppc X targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim" X--- ld/emultempl/ppc64elf.em.orig 2011-12-03 20:17:35.000000000 +0100 X+++ ld/emultempl/ppc64elf.em 2011-12-03 20:18:23.000000000 +0100 X@@ -62,7 +62,7 @@ X static int no_toc_sort = 0; X X /* Set if PLT call stubs should load r11. */ X-static int plt_static_chain = 0; X+static int plt_static_chain = ${DEFAULT_PLT_STATIC_CHAIN-0}; X X /* Whether to emit symbols for stubs. */ X static int emit_stub_syms = -1; X--- ld/emulparams/elf32ppc_fbsd.sh.orig 2011-12-03 20:18:53.000000000 +0100 X+++ ld/emulparams/elf32ppc_fbsd.sh 2011-12-03 20:19:31.000000000 +0100 X@@ -1,2 +1,5 @@ X . ${srcdir}/emulparams/elf32ppc.sh X . ${srcdir}/emulparams/elf_fbsd.sh X+ X+OUTPUT_FORMAT="elf32-powerpc-freebsd" X+ X--- ld/emulparams/elf64ppc_fbsd.sh.orig 2011-12-03 20:19:46.000000000 +0100 X+++ ld/emulparams/elf64ppc_fbsd.sh 2011-12-03 20:20:08.000000000 +0100 X@@ -0,0 +1,6 @@ X+. ${srcdir}/emulparams/elf64ppc.sh X+. ${srcdir}/emulparams/elf_fbsd.sh X+ X+OUTPUT_FORMAT="elf64-powerpc-freebsd" X+DEFAULT_PLT_STATIC_CHAIN=1 X+ END-of-files/patch-ld-powerpc.patch exit >Release-Note: >Audit-Trail: >Unformatted: