View | Details | Raw Unified | Return to bug 251385 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-2 / +2 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	binutils
4
PORTNAME=	binutils
5
PORTVERSION=	2.33.1
5
PORTVERSION=	2.35.1
6
PORTREVISION=	4
6
PORTREVISION=	0
7
PORTEPOCH?=	1
7
PORTEPOCH?=	1
8
CATEGORIES?=	devel
8
CATEGORIES?=	devel
9
MASTER_SITES=	SOURCEWARE/binutils/releases
9
MASTER_SITES=	SOURCEWARE/binutils/releases
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1575361927
1
TIMESTAMP = 1606265052
2
SHA256 (binutils-2.33.1.tar.xz) = ab66fc2d1c3ec0359b8e08843c9f33b63e8707efdff5e4cc5c200eae24722cbf
2
SHA256 (binutils-2.35.1.tar.xz) = 3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
3
SIZE (binutils-2.33.1.tar.xz) = 21490848
3
SIZE (binutils-2.35.1.tar.xz) = 22031720
(-)files/patch-0b398d6.diff (-65 lines)
Lines 1-65 Link Here
1
commit 0b398d69acde3377dfbbeb8a4cfe87ae8c8562fa
2
Author: Sergei Trofimovich <siarheit@google.com>
3
Date:   Sat Feb 1 23:16:11 2020 +0000
4
5
    binutils: drop redundant 'program_name' definition (-fno-common)
6
    
7
            * coffdump.c (program_name): Drop redundant definition.
8
            * srconv.c (program_name): Likewise
9
            * sysdump.c (program_name): Likewise
10
    
11
    Signed-off-by: Sergei Trofimovich <siarheit@google.com>
12
13
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
14
index a7fd43176b..2caa7e950f 100644
15
--- binutils/ChangeLog
16
+++ binutils/ChangeLog
17
@@ -1,3 +1,9 @@
18
+2020-02-03  Sergei Trofimovich  <siarheit@google.com>
19
+
20
+	* coffdump.c (program_name): Drop redundant definition.
21
+	* srconv.c (program_name): Likewise
22
+	* sysdump.c (program_name): Likewise
23
+
24
 2020-02-02  H.J. Lu  <hongjiu.lu@intel.com>
25
 
26
 	PR gas/25380
27
diff --git a/binutils/coffdump.c b/binutils/coffdump.c
28
index 531a4e46c3..336da57ca2 100644
29
--- binutils/coffdump.c
30
+++ binutils/coffdump.c
31
@@ -456,8 +456,6 @@ coff_dump (struct coff_ofile *ptr)
32
     dump_coff_section (ptr->sections + i);
33
 }
34
 
35
-char * program_name;
36
-
37
 static void
38
 show_usage (FILE *file, int status)
39
 {
40
diff --git a/binutils/srconv.c b/binutils/srconv.c
41
index 5742b16759..f071794f0a 100644
42
--- binutils/srconv.c
43
+++ binutils/srconv.c
44
@@ -1687,8 +1687,6 @@ prescan (struct coff_ofile *otree)
45
     }
46
 }
47
 
48
-char *program_name;
49
-
50
 ATTRIBUTE_NORETURN static void
51
 show_usage (FILE *ffile, int status)
52
 {
53
diff --git a/binutils/sysdump.c b/binutils/sysdump.c
54
index d433e71ed9..7eebbd61d3 100644
55
--- binutils/sysdump.c
56
+++ binutils/sysdump.c
57
@@ -633,8 +633,6 @@ module (void)
58
     }
59
 }
60
 
61
-char *program_name;
62
-
63
 ATTRIBUTE_NORETURN static void
64
 show_usage (FILE *ffile, int status)
65
 {
(-)files/patch-bfd_elfnn-aarch64.c (-28 lines)
Lines 1-28 Link Here
1
--- bfd/elfnn-aarch64.c.orig	2016-11-20 12:04:44.613621000 +0000
2
+++ bfd/elfnn-aarch64.c	2016-11-20 12:05:01.143334000 +0000
3
@@ -4369,7 +4369,9 @@
4
       off = h->got.offset;
5
       BFD_ASSERT (off != (bfd_vma) - 1);
6
       if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
7
-	  || (bfd_link_pic (info)
8
+	  || ((bfd_link_pic (info)
9
+	      || (!bfd_link_relocatable (info)
10
+		  && (info->export_dynamic || info->dynamic)))
11
 	      && SYMBOL_REFERENCES_LOCAL (info, h))
12
 	  || (ELF_ST_VISIBILITY (h->other)
13
 	      && h->root.type == bfd_link_hash_undefweak))
14
@@ -8891,6 +8893,14 @@
15
 			   + h->root.u.def.section->output_section->vma
16
 			   + h->root.u.def.section->output_offset);
17
 	}
18
+      else if (!bfd_link_relocatable (info)
19
+	    && (info->export_dynamic || info->dynamic)
20
+	    && SYMBOL_REFERENCES_LOCAL (info, h))
21
+	{
22
+	  BFD_ASSERT ((h->got.offset & 1) != 0);
23
+	  rela.r_info = ELFNN_R_INFO (h->dynindx, AARCH64_R (GLOB_DAT));
24
+	  rela.r_addend = 0;
25
+	}
26
       else
27
 	{
28
 do_glob_dat:
(-)files/patch-bfd_elfxx-sparc.c (-4 / +4 lines)
Lines 1-6 Link Here
1
--- bfd/elfxx-sparc.c.orig	2013-11-08 11:13:48.000000000 +0100
1
--- bfd/elfxx-sparc.c.orig	2020-07-24 09:12:19 UTC
2
+++ bfd/elfxx-sparc.c	2014-10-10 16:30:23.316125000 +0200
2
+++ bfd/elfxx-sparc.c
3
@@ -2942,12 +2942,14 @@
3
@@ -2783,12 +2783,14 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd,
4
   Elf_Internal_Rela *relend;
4
   Elf_Internal_Rela *relend;
5
   int num_relocs;
5
   int num_relocs;
6
   bfd_boolean is_vxworks_tls;
6
   bfd_boolean is_vxworks_tls;
Lines 15-21 Link Here
15
 
15
 
16
   if (elf_hash_table (info)->hgot == NULL)
16
   if (elf_hash_table (info)->hgot == NULL)
17
     got_base = 0;
17
     got_base = 0;
18
@@ -3528,6 +3530,8 @@
18
@@ -3429,6 +3431,8 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd,
19
 			      bfd_set_error (bfd_error_bad_value);
19
 			      bfd_set_error (bfd_error_bad_value);
20
 			      return FALSE;
20
 			      return FALSE;
21
 			    }
21
 			    }
(-)files/patch-gas-configure.tgt (-12 lines)
Lines 1-12 Link Here
1
--- gas/configure.tgt.orig	2020-01-07 16:52:58.735417000 +0100
2
+++ gas/configure.tgt	2020-01-07 16:54:02.168703000 +0100
3
@@ -392,7 +392,8 @@
4
 
5
   sparc-*-linux-*)			fmt=elf em=linux ;;
6
   sparc-*-solaris*)			fmt=elf em=solaris ;;
7
-  sparc-*-*bsd*)			fmt=elf em=nbsd ;;
8
+  sparc-*-freebsd*)                     fmt=elf em=freebsd ;;
9
+  sparc-*-netbsd* | sparc-*-openbsd*)   fmt=elf em=nbsd ;;
10
 
11
   spu-*-elf)				fmt=elf ;;
12
 
(-)files/patch-include__safe-ctype.h (-4 / +4 lines)
Lines 1-6 Link Here
1
--- ./include/safe-ctype.h.orig	2013-08-31 13:25:21.000000000 +0100
1
--- include/safe-ctype.h.orig	2020-07-24 09:12:20 UTC
2
+++ ./include/safe-ctype.h	2013-08-31 13:25:57.000000000 +0100
2
+++ include/safe-ctype.h
3
@@ -119,6 +119,7 @@
3
@@ -119,6 +119,7 @@ extern const unsigned char  _sch_tolower[256];
4
    including another system header (for instance gnulib's stdint.h).
4
    including another system header (for instance gnulib's stdint.h).
5
    So we include ctype.h here and then immediately redefine its macros.  */
5
    So we include ctype.h here and then immediately redefine its macros.  */
6
 
6
 
Lines 8-14 Link Here
8
 #include <ctype.h>
8
 #include <ctype.h>
9
 #undef isalpha
9
 #undef isalpha
10
 #define isalpha(c) do_not_use_isalpha_with_safe_ctype
10
 #define isalpha(c) do_not_use_isalpha_with_safe_ctype
11
@@ -146,5 +147,6 @@
11
@@ -146,5 +147,6 @@ extern const unsigned char  _sch_tolower[256];
12
 #define toupper(c) do_not_use_toupper_with_safe_ctype
12
 #define toupper(c) do_not_use_toupper_with_safe_ctype
13
 #undef tolower
13
 #undef tolower
14
 #define tolower(c) do_not_use_tolower_with_safe_ctype
14
 #define tolower(c) do_not_use_tolower_with_safe_ctype
(-)files/patch-libctf_swap.h (-34 lines)
Lines 1-34 Link Here
1
--- libctf/swap.h.orig	2019-09-09 13:19:45 UTC
2
+++ libctf/swap.h
3
@@ -28,13 +28,13 @@
4
 #else
5
 
6
 /* Provide our own versions of the byteswap functions.  */
7
-inline uint16_t
8
+static inline uint16_t
9
 bswap_16 (uint16_t v)
10
 {
11
   return ((v >> 8) & 0xff) | ((v & 0xff) << 8);
12
 }
13
 
14
-inline uint32_t
15
+static inline uint32_t
16
 bswap_32 (uint32_t v)
17
 {
18
   return (  ((v & 0xff000000) >> 24)
19
@@ -43,13 +43,13 @@ bswap_32 (uint32_t v)
20
 	  | ((v & 0x000000ff) << 24));
21
 }
22
 
23
-inline uint64_t
24
+static inline uint64_t
25
 bswap_identity_64 (uint64_t v)
26
 {
27
   return v;
28
 }
29
 
30
-inline uint64_t
31
+static inline uint64_t
32
 bswap_64 (uint64_t v)
33
 {
34
   return (  ((v & 0xff00000000000000ULL) >> 56)
(-)files/patch-mips64.diff (-40 / +26 lines)
Lines 1-41 Link Here
1
--- bfd/config.bfd.orig	2015-07-17 20:05:04.921108109 +0000
1
--- bfd/config.bfd.orig	2020-11-25 16:03:32 UTC
2
+++ bfd/config.bfd	2015-07-17 20:42:54.567978553 +0000
2
+++ bfd/config.bfd
3
@@ -1084,15 +1084,15 @@
3
@@ -1188,6 +1188,11 @@ case "${targ}" in
4
     want64=true
4
     ;;
5
     ;;
5
   mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu)
6
 #ifdef BFD64
6
     # FreeBSD vectors
7
+  s390x-*-freebsd*)
7
-    targ_defvec=mips_elf32_ntradfbsd_le_vec
8
+    targ_defvec=s390_elf64_vec
8
-    targ_selvecs="mips_elf32_ntradfbsd_be_vec mips_elf32_tradfbsd_le_vec mips_elf32_tradfbsd_be_vec mips_elf64_tradfbsd_le_vec mips_elf64_tradfbsd_be_vec"
9
+    targ_selvecs=s390_elf32_vec
9
+    targ_defvec=mips_elf64_tradfbsd_le_vec
10
+    want64=true
10
+    targ_selvecs="mips_elf64_tradfbsd_le_vec mips_elf32_ntradfbsd_le_vec mips_elf32_ntradfbsd_be_vec mips_elf32_tradfbsd_le_vec mips_elf32_tradfbsd_be_vec mips_elf64_tradfbsd_be_vec"
11
+    ;;
11
     # Generic vectors
12
   s390x-*-linux*)
12
     targ_selvecs="${targ_selvecs} mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
13
     targ_defvec=s390_elf64_vec
13
     ;;
14
     targ_selvecs=s390_elf32_vec
14
   mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu)
15
--- ld/configure.tgt.orig	2020-11-25 16:03:32 UTC
15
     # FreeBSD vectors
16
+++ ld/configure.tgt
16
-    targ_defvec=mips_elf32_ntradfbsd_be_vec
17
@@ -776,6 +776,10 @@ rx-*-*)			targ_emul=elf32rx
17
-    targ_selvecs="mips_elf32_ntradfbsd_le_vec mips_elf32_tradfbsd_be_vec mips_elf32_tradfbsd_le_vec mips_elf64_tradfbsd_be_vec mips_elf64_tradfbsd_le_vec"
18
 s12z-*-*)		targ_emul=m9s12zelf
18
+    targ_defvec=mips_elf64_tradfbsd_be_vec
19
 			targ_extra_ofiles=ldelfgen.o
19
+    targ_selvecs="mips_elf64_tradfbsd_be_vec mips_elf32_ntradfbsd_be_vec mips_elf32_ntradfbsd_le_vec mips_elf32_tradfbsd_be_vec mips_elf32_tradfbsd_le_vec mips_elf64_tradfbsd_le_vec"
20
 			;;
20
     # Generic vectors
21
+s390x-*-freebsd*)	targ_emul=elf64_s390
21
     targ_selvecs="${targ_selvecs} mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
22
+			targ_extra_emuls=elf_s390
22
     ;;
23
+			targ_extra_libpath=$targ_extra_emuls
23
--- ld/configure.tgt.orig	2015-07-17 20:52:58.728911150 +0000
24
+			tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
24
+++ ld/configure.tgt	2015-07-17 21:03:29.559869219 +0000
25
 s390x-*-linux*)		targ_emul=elf64_s390
25
@@ -491,12 +491,12 @@
26
 			targ_extra_emuls=elf_s390
26
 			targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
27
 			targ_extra_libpath=$targ_extra_emuls
27
 			targ_extra_libpath=$targ_extra_emuls ;;
28
 mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu)
29
-			targ_emul=elf32ltsmipn32_fbsd
30
-			targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
31
+			targ_emul=elf64ltsmip_fbsd
32
+			targ_extra_emuls="elf32ltsmip_fbsd elf32btsmip_fbsd elf32ltsmipn32_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip"
33
 			targ_extra_libpath=$targ_extra_emuls ;;
34
 mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu)
35
-			targ_emul=elf32btsmipn32_fbsd
36
-			targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
37
+			targ_emul=elf64btsmip_fbsd
38
+			targ_extra_emuls="elf32btsmip_fbsd elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip"
39
 			targ_extra_libpath=$targ_extra_emuls ;;
40
 mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu)
41
 			targ_emul=elf32ltsmip_fbsd
(-)files/patch-powerpc64le.patch (-45 / +32 lines)
Lines 1-6 Link Here
1
--- bfd/configure.orig	2019-10-12 13:58:20 UTC
1
--- bfd/configure.orig	2020-09-19 10:17:17 UTC
2
+++ bfd/configure
2
+++ bfd/configure
3
@@ -14860,6 +14860,7 @@ do
3
@@ -14883,6 +14883,7 @@ do
4
     powerpc_elf64_vec)		 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
4
     powerpc_elf64_vec)		 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
5
     powerpc_elf64_le_vec)	 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
5
     powerpc_elf64_le_vec)	 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
6
     powerpc_elf64_fbsd_vec)	 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
6
     powerpc_elf64_fbsd_vec)	 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
Lines 8-16 Link Here
8
     powerpc_pe_vec)		 tb="$tb pe-ppc.lo peigen.lo $coff" ;;
8
     powerpc_pe_vec)		 tb="$tb pe-ppc.lo peigen.lo $coff" ;;
9
     powerpc_pe_le_vec)		 tb="$tb pe-ppc.lo peigen.lo $coff" ;;
9
     powerpc_pe_le_vec)		 tb="$tb pe-ppc.lo peigen.lo $coff" ;;
10
     powerpc_pei_vec)		 tb="$tb pei-ppc.lo peigen.lo $coff" ;;
10
     powerpc_pei_vec)		 tb="$tb pei-ppc.lo peigen.lo $coff" ;;
11
--- bfd/configure.ac.orig	2019-09-09 13:19:43 UTC
11
--- bfd/configure.ac.orig	2020-07-24 09:12:19 UTC
12
+++ bfd/configure.ac
12
+++ bfd/configure.ac
13
@@ -596,6 +596,7 @@ do
13
@@ -619,6 +619,7 @@ do
14
     powerpc_elf64_vec)		 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
14
     powerpc_elf64_vec)		 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
15
     powerpc_elf64_le_vec)	 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
15
     powerpc_elf64_le_vec)	 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
16
     powerpc_elf64_fbsd_vec)	 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
16
     powerpc_elf64_fbsd_vec)	 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
Lines 18-26 Link Here
18
     powerpc_pe_vec)		 tb="$tb pe-ppc.lo peigen.lo $coff" ;;
18
     powerpc_pe_vec)		 tb="$tb pe-ppc.lo peigen.lo $coff" ;;
19
     powerpc_pe_le_vec)		 tb="$tb pe-ppc.lo peigen.lo $coff" ;;
19
     powerpc_pe_le_vec)		 tb="$tb pe-ppc.lo peigen.lo $coff" ;;
20
     powerpc_pei_vec)		 tb="$tb pei-ppc.lo peigen.lo $coff" ;;
20
     powerpc_pei_vec)		 tb="$tb pei-ppc.lo peigen.lo $coff" ;;
21
--- bfd/elf64-ppc.c.orig	2019-10-09 07:16:05 UTC
21
--- bfd/elf64-ppc.c.orig	2020-09-11 08:19:09 UTC
22
+++ bfd/elf64-ppc.c
22
+++ bfd/elf64-ppc.c
23
@@ -16979,7 +16979,9 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
23
@@ -17594,7 +17594,9 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
24
 /* FreeBSD support */
24
 /* FreeBSD support */
25
 
25
 
26
 #undef  TARGET_LITTLE_SYM
26
 #undef  TARGET_LITTLE_SYM
Lines 30-38 Link Here
30
 
30
 
31
 #undef  TARGET_BIG_SYM
31
 #undef  TARGET_BIG_SYM
32
 #define TARGET_BIG_SYM	powerpc_elf64_fbsd_vec
32
 #define TARGET_BIG_SYM	powerpc_elf64_fbsd_vec
33
--- bfd/targets.c.orig	2019-09-09 13:19:43 UTC
33
--- bfd/targets.c.orig	2020-07-24 09:12:19 UTC
34
+++ bfd/targets.c
34
+++ bfd/targets.c
35
@@ -764,6 +764,7 @@ extern const bfd_target powerpc_elf32_vxworks_vec;
35
@@ -838,6 +838,7 @@ extern const bfd_target powerpc_elf32_vxworks_vec;
36
 extern const bfd_target powerpc_elf64_vec;
36
 extern const bfd_target powerpc_elf64_vec;
37
 extern const bfd_target powerpc_elf64_le_vec;
37
 extern const bfd_target powerpc_elf64_le_vec;
38
 extern const bfd_target powerpc_elf64_fbsd_vec;
38
 extern const bfd_target powerpc_elf64_fbsd_vec;
Lines 40-46 Link Here
40
 extern const bfd_target powerpc_pe_vec;
40
 extern const bfd_target powerpc_pe_vec;
41
 extern const bfd_target powerpc_pe_le_vec;
41
 extern const bfd_target powerpc_pe_le_vec;
42
 extern const bfd_target powerpc_pei_vec;
42
 extern const bfd_target powerpc_pei_vec;
43
@@ -1158,6 +1159,7 @@ static const bfd_target * const _bfd_target_vector[] =
43
@@ -1228,6 +1229,7 @@ static const bfd_target * const _bfd_target_vector[] =
44
 	&powerpc_elf64_vec,
44
 	&powerpc_elf64_vec,
45
 	&powerpc_elf64_le_vec,
45
 	&powerpc_elf64_le_vec,
46
 	&powerpc_elf64_fbsd_vec,
46
 	&powerpc_elf64_fbsd_vec,
Lines 48-56 Link Here
48
 #endif
48
 #endif
49
 	&powerpc_pe_vec,
49
 	&powerpc_pe_vec,
50
 	&powerpc_pe_le_vec,
50
 	&powerpc_pe_le_vec,
51
--- ld/Makefile.am.orig	2019-09-09 13:19:44 UTC
51
--- gas/config/tc-ppc.c.orig	2020-07-24 09:12:19 UTC
52
+++ gas/config/tc-ppc.c
53
@@ -1566,7 +1566,9 @@ ppc_target_format (void)
54
 #endif
55
 #ifdef OBJ_ELF
56
 # ifdef TE_FreeBSD
57
-  return (ppc_obj64 ? "elf64-powerpc-freebsd" : "elf32-powerpc-freebsd");
58
+  return (target_big_endian
59
+	  ? (ppc_obj64 ? "elf64-powerpc-freebsd" : "elf32-powerpc-freebsd")
60
+	  : (ppc_obj64 ? "elf64-powerpcle-freebsd" : "elf32-powerpcle-freebsd"));
61
 # elif defined (TE_VXWORKS)
62
   return "elf32-powerpc-vxworks";
63
 # else
64
--- ld/Makefile.am.orig	2020-07-24 09:12:20 UTC
52
+++ ld/Makefile.am
65
+++ ld/Makefile.am
53
@@ -439,6 +439,7 @@ ALL_64_EMULATION_SOURCES = \
66
@@ -433,6 +433,7 @@ ALL_64_EMULATION_SOURCES = \
54
 	eelf64btsmip_fbsd.c \
67
 	eelf64btsmip_fbsd.c \
55
 	eelf64hppa.c \
68
 	eelf64hppa.c \
56
 	eelf64lppc.c \
69
 	eelf64lppc.c \
Lines 58-64 Link Here
58
 	eelf64lriscv.c \
71
 	eelf64lriscv.c \
59
 	eelf64lriscv_lp64f.c \
72
 	eelf64lriscv_lp64f.c \
60
 	eelf64lriscv_lp64.c \
73
 	eelf64lriscv_lp64.c \
61
@@ -924,6 +925,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): 
74
@@ -915,6 +916,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): 
62
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip_fbsd.Pc@am__quote@
75
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip_fbsd.Pc@am__quote@
63
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64hppa.Pc@am__quote@
76
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64hppa.Pc@am__quote@
64
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc.Pc@am__quote@
77
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc.Pc@am__quote@
Lines 66-74 Link Here
66
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv.Pc@am__quote@
79
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv.Pc@am__quote@
67
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64f.Pc@am__quote@
80
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64f.Pc@am__quote@
68
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64.Pc@am__quote@
81
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64.Pc@am__quote@
69
--- ld/Makefile.in.orig	2019-10-12 13:59:42 UTC
82
--- ld/Makefile.in.orig	2020-09-19 10:21:33 UTC
70
+++ ld/Makefile.in
83
+++ ld/Makefile.in
71
@@ -925,6 +925,7 @@ ALL_64_EMULATION_SOURCES = \
84
@@ -915,6 +915,7 @@ ALL_64_EMULATION_SOURCES = \
72
 	eelf64btsmip_fbsd.c \
85
 	eelf64btsmip_fbsd.c \
73
 	eelf64hppa.c \
86
 	eelf64hppa.c \
74
 	eelf64lppc.c \
87
 	eelf64lppc.c \
Lines 76-82 Link Here
76
 	eelf64lriscv.c \
89
 	eelf64lriscv.c \
77
 	eelf64lriscv_lp64f.c \
90
 	eelf64lriscv_lp64f.c \
78
 	eelf64lriscv_lp64.c \
91
 	eelf64lriscv_lp64.c \
79
@@ -1365,6 +1366,7 @@ distclean-compile:
92
@@ -1355,6 +1356,7 @@ distclean-compile:
80
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip_fbsd.Po@am__quote@
93
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip_fbsd.Po@am__quote@
81
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64hppa.Po@am__quote@
94
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64hppa.Po@am__quote@
82
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc.Po@am__quote@
95
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc.Po@am__quote@
Lines 84-90 Link Here
84
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv.Po@am__quote@
97
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv.Po@am__quote@
85
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64.Po@am__quote@
98
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64.Po@am__quote@
86
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64f.Po@am__quote@
99
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64f.Po@am__quote@
87
@@ -2525,6 +2527,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): 
100
@@ -2510,6 +2512,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): 
88
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip_fbsd.Pc@am__quote@
101
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip_fbsd.Pc@am__quote@
89
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64hppa.Pc@am__quote@
102
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64hppa.Pc@am__quote@
90
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc.Pc@am__quote@
103
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc.Pc@am__quote@
Lines 92-98 Link Here
92
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv.Pc@am__quote@
105
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv.Pc@am__quote@
93
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64f.Pc@am__quote@
106
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64f.Pc@am__quote@
94
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64.Pc@am__quote@
107
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64.Pc@am__quote@
95
--- ld/emulparams/elf64lppc_fbsd.sh.orig	2020-11-02 22:40:06 UTC
108
--- ld/emulparams/elf64lppc_fbsd.sh.orig	2020-11-25 16:03:32 UTC
96
+++ ld/emulparams/elf64lppc_fbsd.sh
109
+++ ld/emulparams/elf64lppc_fbsd.sh
97
@@ -0,0 +1,6 @@
110
@@ -0,0 +1,6 @@
98
+source_sh ${srcdir}/emulparams/elf64lppc.sh
111
+source_sh ${srcdir}/emulparams/elf64lppc.sh
Lines 101-109 Link Here
101
+OUTPUT_FORMAT="elf64-powerpcle-freebsd"
114
+OUTPUT_FORMAT="elf64-powerpcle-freebsd"
102
+DEFAULT_PLT_STATIC_CHAIN=1
115
+DEFAULT_PLT_STATIC_CHAIN=1
103
+
116
+
104
--- ld/po/BLD-POTFILES.in.orig	2019-10-12 14:01:44 UTC
117
--- ld/po/BLD-POTFILES.in.orig	2020-09-19 10:21:37 UTC
105
+++ ld/po/BLD-POTFILES.in
118
+++ ld/po/BLD-POTFILES.in
106
@@ -179,6 +179,7 @@ eelf64btsmip.c
119
@@ -177,6 +177,7 @@ eelf64btsmip.c
107
 eelf64btsmip_fbsd.c
120
 eelf64btsmip_fbsd.c
108
 eelf64hppa.c
121
 eelf64hppa.c
109
 eelf64lppc.c
122
 eelf64lppc.c
Lines 111-139 Link Here
111
 eelf64lriscv.c
124
 eelf64lriscv.c
112
 eelf64lriscv_lp64.c
125
 eelf64lriscv_lp64.c
113
 eelf64lriscv_lp64f.c
126
 eelf64lriscv_lp64f.c
114
--- ld/configure.tgt.orig	2020-11-02 23:58:35.109766000 +0100
115
+++ ld/configure.tgt	2020-11-02 23:59:34.659606000 +0100
116
@@ -544,6 +544,10 @@
117
 			tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
118
 			tdir_elf32ppc_fbsd=$tdir_elf32ppc
119
 			;;
120
+powerpc64le-*-freebsd*)
121
+			targ_emul=elf64lppc_fbsd
122
+			targ_extra_emuls="elf64ppc"
123
+			;;
124
 powerpc-*-vxworks*)
125
 			targ_emul=elf32ppcvxworks
126
 			targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" ;;
127
--- gas/config/tc-ppc.c.orig	2020-11-03 12:21:04.587127000 +0100
128
+++ gas/config/tc-ppc.c	2020-11-03 12:21:33.039193000 +0100
129
@@ -1554,7 +1554,9 @@
130
 #endif
131
 #ifdef OBJ_ELF
132
 # ifdef TE_FreeBSD
133
-  return (ppc_obj64 ? "elf64-powerpc-freebsd" : "elf32-powerpc-freebsd");
134
+  return (target_big_endian
135
+	  ? (ppc_obj64 ? "elf64-powerpc-freebsd" : "elf32-powerpc-freebsd")
136
+	  : (ppc_obj64 ? "elf64-powerpcle-freebsd" : "elf32-powerpcle-freebsd"));
137
 # elif defined (TE_VXWORKS)
138
   return "elf32-powerpc-vxworks";
139
 # else
(-)files/patch-s390x.diff (-32 / +5 lines)
Lines 1-19 Link Here
1
--- ./ld/configure.tgt.orig	2019-01-19 16:01:33.000000000 +0000
1
--- gas/configure.orig	2020-09-19 10:19:52 UTC
2
+++ ./ld/configure.tgt	2019-08-07 20:41:31.800693000 +0000
2
+++ gas/configure
3
@@ -651,6 +651,10 @@ rs6000-*-aix*)		targ_emul=aixrs6
3
@@ -7098,6 +7098,7 @@ ia64-*-hpux*)
4
 			;;
5
 rl78-*-*)		targ_emul=elf32rl78 ;;
6
 rx-*-*)			targ_emul=elf32rx ;;
7
+s390x-*-freebsd*)	targ_emul=elf64_s390
8
+			targ_extra_emuls=elf_s390
9
+			targ_extra_libpath=$targ_extra_emuls
10
+			tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
11
 s390x-*-linux*)		targ_emul=elf64_s390
12
 			targ_extra_emuls=elf_s390
13
 			targ_extra_libpath=$targ_extra_emuls
14
--- ./gas/configure.orig	2019-02-02 15:50:20.000000000 +0000
15
+++ ./gas/configure	2019-08-07 20:44:45.468441000 +0000
16
@@ -7095,6 +7095,7 @@ ia64-*-hpux*)
17
   ;;
4
   ;;
18
 
5
 
19
 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
6
 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
Lines 21-27 Link Here
21
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
8
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
22
   # Find out which ABI we are using.
9
   # Find out which ABI we are using.
23
   echo 'int i;' > conftest.$ac_ext
10
   echo 'int i;' > conftest.$ac_ext
24
@@ -7125,6 +7126,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
11
@@ -7128,6 +7129,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
25
 	  powerpc64-*linux*)
12
 	  powerpc64-*linux*)
26
 	    LD="${LD-ld} -m elf32ppclinux"
13
 	    LD="${LD-ld} -m elf32ppclinux"
27
 	    ;;
14
 	    ;;
Lines 31-37 Link Here
31
 	  s390x-*linux*)
18
 	  s390x-*linux*)
32
 	    LD="${LD-ld} -m elf_s390"
19
 	    LD="${LD-ld} -m elf_s390"
33
 	    ;;
20
 	    ;;
34
@@ -7146,6 +7150,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
21
@@ -7149,6 +7153,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
35
 	    ;;
22
 	    ;;
36
 	  powerpc-*linux*)
23
 	  powerpc-*linux*)
37
 	    LD="${LD-ld} -m elf64ppc"
24
 	    LD="${LD-ld} -m elf64ppc"
Lines 41-57 Link Here
41
 	    ;;
28
 	    ;;
42
 	  s390*-*linux*|s390*-*tpf*)
29
 	  s390*-*linux*|s390*-*tpf*)
43
 	    LD="${LD-ld} -m elf64_s390"
30
 	    LD="${LD-ld} -m elf64_s390"
44
--- ./bfd/config.bfd.orig	2019-08-07 20:35:52.161591000 +0000
45
+++ ./bfd/config.bfd	2019-08-07 20:40:33.579807000 +0000
46
@@ -1213,6 +1213,11 @@ case "${targ}" in
47
     want64=true
48
     ;;
49
 #ifdef BFD64
50
+  s390x-*-freebsd*)
51
+    targ_defvec=s390_elf64_vec
52
+    targ_selvecs=s390_elf32_vec
53
+    want64=true
54
+    ;;
55
   s390x-*-linux*)
56
     targ_defvec=s390_elf64_vec
57
     targ_selvecs=s390_elf32_vec

Return to bug 251385