commit: 020a33da8d9de01aadec35f5f4b3e2d317eac71b
parent a141473246997fce369599e1a8731e0f4bd32147
Author: Michael Forney <mforney@mforney.org>
Date: Thu, 10 Feb 2022 14:11:23 -0800
binutils: Update to 2.38
Diffstat:
17 files changed, 143 insertions(+), 131 deletions(-)
diff --git a/pkg/binutils/.gitignore b/pkg/binutils/.gitignore
@@ -1,5 +1,5 @@
/bfd.ninja
-/binutils-2.37.tar.xz
+/binutils-2.38.tar.xz
/binutils.ninja
/gas.ninja
/ld.ninja
diff --git a/pkg/binutils/arch.lua b/pkg/binutils/arch.lua
@@ -87,4 +87,5 @@ return {
z80={'z80-dis.c'},
z8k={'z8k-dis.c'},
bpf={'bpf-asm.c', 'bpf-desc.c', 'bpf-dis.c', 'bpf-ibld.c', 'bpf-opc.c'},
+ loongarch={'loongarch-dis.c', 'loongarch-opc.c', 'loongarch-coder.c'},
}
diff --git a/pkg/binutils/bfd/config.h b/pkg/binutils/bfd/config.h
@@ -77,10 +77,10 @@
#define PACKAGE "bfd"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME "bfd"
-#define PACKAGE_STRING "bfd 2.37"
+#define PACKAGE_STRING "bfd 2.38"
#define PACKAGE_TARNAME "bfd"
#define PACKAGE_URL ""
-#define PACKAGE_VERSION "2.37"
+#define PACKAGE_VERSION "2.38"
#define SIZEOF_INT 4
#define SIZEOF_LONG 8
#define SIZEOF_LONG_LONG 8
@@ -108,7 +108,7 @@
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
-#define VERSION "2.37"
+#define VERSION "2.38"
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
diff --git a/pkg/binutils/binutils/config.h b/pkg/binutils/binutils/config.h
@@ -56,10 +56,10 @@
#define PACKAGE "binutils"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME "binutils"
-#define PACKAGE_STRING "binutils 2.37"
+#define PACKAGE_STRING "binutils 2.38"
#define PACKAGE_TARNAME "binutils"
#define PACKAGE_URL ""
-#define PACKAGE_VERSION "2.37"
+#define PACKAGE_VERSION "2.38"
#define SIZEOF_LONG 8
#define SIZEOF_LONG_LONG 8
#define STDC_HEADERS 1
@@ -82,7 +82,7 @@
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
-#define VERSION "2.37"
+#define VERSION "2.38"
/* #undef YYTEXT_POINTER */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
diff --git a/pkg/binutils/gas/config.h b/pkg/binutils/gas/config.h
@@ -15,7 +15,7 @@
#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1
#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0
/* #undef DEFAULT_RISCV_ARCH_WITH_EXT */
-#define DEFAULT_RISCV_ATTR 0
+#define DEFAULT_RISCV_ATTR 1
/* #undef DEFAULT_RISCV_ISA_SPEC */
/* #undef DEFAULT_RISCV_PRIV_SPEC */
#define DEFAULT_X86_USED_NOTE 1
@@ -67,10 +67,10 @@
#define PACKAGE "gas"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME "gas"
-#define PACKAGE_STRING "gas 2.37"
+#define PACKAGE_STRING "gas 2.38"
#define PACKAGE_TARNAME "gas"
#define PACKAGE_URL ""
-#define PACKAGE_VERSION "2.37"
+#define PACKAGE_VERSION "2.38"
#define STDC_HEADERS 1
/* #undef STRICTCOFF */
#define TARGET_ALIAS "x86_64-linux-musl"
@@ -100,7 +100,7 @@
# define __EXTENSIONS__ 1
#endif
/* #undef USING_CGEN */
-#define VERSION "2.37"
+#define VERSION "2.38"
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
diff --git a/pkg/binutils/gen.lua b/pkg/binutils/gen.lua
@@ -1,4 +1,4 @@
-local version = setmetatable({2, 36, 1}, {__index=function() return 0 end})
+local version = setmetatable({2, 38}, {__index=function() return 0 end})
local defvec = 'x86_64_elf64_vec'
local selvecs = {[defvec]=true, i386_elf32_vec=true}
local selarchs = {i386=true}
@@ -194,7 +194,7 @@ sub('binutils.ninja', function()
bucomm.c version.c filemode.c rename.c
elfcomm.c
rddbg.c debug.c stabs.c rdcoff.c wrstabs.c
- dwarf.c
+ dwarf.c demanguse.c
)
libbfd.a.d
libiberty.a
diff --git a/pkg/binutils/ld/config.h b/pkg/binutils/ld/config.h
@@ -53,10 +53,10 @@
#define PACKAGE "ld"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME "ld"
-#define PACKAGE_STRING "ld 2.37"
+#define PACKAGE_STRING "ld 2.38"
#define PACKAGE_TARNAME "ld"
#define PACKAGE_URL ""
-#define PACKAGE_VERSION "2.37"
+#define PACKAGE_VERSION "2.38"
#define SIZEOF_VOID_P 8
#define STDC_HEADERS 1
#define SUPPORT_ERROR_HANDLING_SCRIPT 1
@@ -76,7 +76,7 @@
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
-#define VERSION "2.37"
+#define VERSION "2.38"
/* #undef YYTEXT_POINTER */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
diff --git a/pkg/binutils/opcodes/config.h b/pkg/binutils/opcodes/config.h
@@ -21,10 +21,11 @@
#define PACKAGE "opcodes"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME "opcodes"
-#define PACKAGE_STRING "opcodes 2.37"
+#define PACKAGE_STRING "opcodes 2.38"
#define PACKAGE_TARNAME "opcodes"
#define PACKAGE_URL ""
-#define PACKAGE_VERSION "2.37"
+#define PACKAGE_VERSION "2.38"
+#define SIZEOF_VOID_P 8
#define STDC_HEADERS 1
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
@@ -41,7 +42,7 @@
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
-#define VERSION "2.37"
+#define VERSION "2.38"
/* #undef _MINIX */
/* #undef _POSIX_1_SOURCE */
/* #undef _POSIX_SOURCE */
diff --git a/pkg/binutils/patch/0001-libiberty-Implement-pex_unix_exec_child-using-posix_.patch b/pkg/binutils/patch/0001-libiberty-Implement-pex_unix_exec_child-using-posix_.patch
@@ -1,4 +1,4 @@
-From 662b185803a405b9c945e7e2de9766723f6a7ad7 Mon Sep 17 00:00:00 2001
+From 33fd36d26892e893d4c58ccbe826445a76262c68 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Wed, 17 Apr 2019 16:44:05 -0700
Subject: [PATCH] libiberty: Implement pex_unix_exec_child using posix_spawn
@@ -11,7 +11,7 @@ Subject: [PATCH] libiberty: Implement pex_unix_exec_child using posix_spawn
4 files changed, 110 insertions(+), 11 deletions(-)
diff --git a/libiberty/config.in b/libiberty/config.in
-index f7052b5d95..ce79a9e77f 100644
+index f7052b5d958..ce79a9e77f2 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -198,6 +198,9 @@
@@ -35,10 +35,10 @@ index f7052b5d95..ce79a9e77f 100644
#undef HAVE_STDINT_H
diff --git a/libiberty/configure b/libiberty/configure
-index b6af9baf21..139955e68a 100755
+index e09ddd91e58..a5591fac95d 100755
--- a/libiberty/configure
+++ b/libiberty/configure
-@@ -5481,7 +5481,7 @@ host_makefile_frag=${frag}
+@@ -5651,7 +5651,7 @@ host_makefile_frag=${frag}
# It's OK to check for header files. Although the compiler may not be
# able to link anything, it had better be able to at least compile
# something.
@@ -47,20 +47,20 @@ index b6af9baf21..139955e68a 100755
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
-@@ -5990,9 +5990,9 @@ funcs="$funcs setproctitle"
+@@ -6160,9 +6160,9 @@ funcs="$funcs setproctitle"
vars="sys_errlist sys_nerr sys_siglist"
checkfuncs="__fsetlocking canonicalize_file_name dup3 getrlimit getrusage \
- getsysinfo gettimeofday on_exit pipe2 psignal pstat_getdynamic pstat_getstatic \
-- realpath setrlimit sbrk spawnve spawnvpe strerror strsignal sysconf sysctl \
+- realpath setrlimit spawnve spawnvpe strerror strsignal sysconf sysctl \
- sysmp table times wait3 wait4"
+ getsysinfo gettimeofday on_exit pipe2 posix_spawn psignal pstat_getdynamic \
-+ pstat_getstatic realpath setrlimit sbrk spawnve spawnvpe strerror strsignal \
++ pstat_getstatic realpath setrlimit spawnve spawnvpe strerror strsignal \
+ sysconf sysctl sysmp table times wait3 wait4"
- # These are neither executed nor required, but they help keep
- # autoheader happy without adding a bunch of text to acconfig.h.
-@@ -6006,7 +6006,7 @@ if test "x" = "y"; then
+ # Darwin has sbrk, but it is deprecated and that produces build-time warnings
+ # so do not check for it.
+@@ -6183,7 +6183,7 @@ if test "x" = "y"; then
index insque \
memchr memcmp memcpy memmem memmove memset mkstemps \
on_exit \
@@ -70,10 +70,10 @@ index b6af9baf21..139955e68a 100755
sbrk setenv setproctitle setrlimit sigsetmask snprintf spawnve spawnvpe \
stpcpy stpncpy strcasecmp strchr strdup \
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
-index ad95296397..442c714319 100644
+index f59f35e1f20..134576ea3af 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
-@@ -271,7 +271,7 @@ AC_SUBST_FILE(host_makefile_frag)
+@@ -288,7 +288,7 @@ AC_SUBST_FILE(host_makefile_frag)
# It's OK to check for header files. Although the compiler may not be
# able to link anything, it had better be able to at least compile
# something.
@@ -82,20 +82,20 @@ index ad95296397..442c714319 100644
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
-@@ -394,9 +394,9 @@ funcs="$funcs setproctitle"
+@@ -411,9 +411,9 @@ funcs="$funcs setproctitle"
vars="sys_errlist sys_nerr sys_siglist"
checkfuncs="__fsetlocking canonicalize_file_name dup3 getrlimit getrusage \
- getsysinfo gettimeofday on_exit pipe2 psignal pstat_getdynamic pstat_getstatic \
-- realpath setrlimit sbrk spawnve spawnvpe strerror strsignal sysconf sysctl \
+- realpath setrlimit spawnve spawnvpe strerror strsignal sysconf sysctl \
- sysmp table times wait3 wait4"
+ getsysinfo gettimeofday on_exit pipe2 posix_spawn psignal pstat_getdynamic \
-+ pstat_getstatic realpath setrlimit sbrk spawnve spawnvpe strerror strsignal \
++ pstat_getstatic realpath setrlimit spawnve spawnvpe strerror strsignal \
+ sysconf sysctl sysmp table times wait3 wait4"
- # These are neither executed nor required, but they help keep
- # autoheader happy without adding a bunch of text to acconfig.h.
-@@ -410,7 +410,7 @@ if test "x" = "y"; then
+ # Darwin has sbrk, but it is deprecated and that produces build-time warnings
+ # so do not check for it.
+@@ -434,7 +434,7 @@ if test "x" = "y"; then
index insque \
memchr memcmp memcpy memmem memmove memset mkstemps \
on_exit \
@@ -105,7 +105,7 @@ index ad95296397..442c714319 100644
sbrk setenv setproctitle setrlimit sigsetmask snprintf spawnve spawnvpe \
stpcpy stpncpy strcasecmp strchr strdup \
diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c
-index 8da2fdcf84..c1c93be12b 100644
+index 850d344ba58..ba3a6d5d38f 100644
--- a/libiberty/pex-unix.c
+++ b/libiberty/pex-unix.c
@@ -58,6 +58,9 @@ extern int errno;
@@ -218,5 +218,5 @@ index 8da2fdcf84..c1c93be12b 100644
/* Subroutine of pex_unix_exec_child. Move OLD_FD to a new file descriptor
--
-2.30.0
+2.34.1
diff --git a/pkg/binutils/patch/0003-Avoid-void-pointer-arithmetic.patch b/pkg/binutils/patch/0003-Avoid-void-pointer-arithmetic.patch
@@ -1,27 +0,0 @@
-From 412191da499f4f96dd9138a2868b16947b8d8f70 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Mon, 19 Jul 2021 10:31:05 -0700
-Subject: [PATCH] Avoid void pointer arithmetic
-
-This is not strictly allowed in ISO C, which requires the pointed-to
-type to be a complete object type.
----
- bfd/peicode.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/peicode.h b/bfd/peicode.h
-index c84b135e1eb..41955975cdc 100644
---- a/bfd/peicode.h
-+++ b/bfd/peicode.h
-@@ -1474,7 +1474,7 @@ pe_bfd_object_p (bfd * abfd)
- if (opt_hdr_size != 0)
- {
- bfd_size_type amt = opt_hdr_size;
-- void * opthdr;
-+ bfd_byte * opthdr;
-
- /* PR 17521 file: 230-131433-0.004. */
- if (amt < sizeof (PEAOUTHDR))
---
-2.32.0
-
diff --git a/pkg/binutils/patch/0003-Remove-support-for-long-double-in-error-formatter.patch b/pkg/binutils/patch/0003-Remove-support-for-long-double-in-error-formatter.patch
@@ -0,0 +1,62 @@
+From dab3e5da03770ba254c95d0c1d8c9f029dd57257 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Mon, 6 Sep 2021 18:51:05 -0700
+Subject: [PATCH] Remove support for long double in error formatter
+
+No bfd errors try to format long double, so there is no point in
+supporting it in the formatter.
+---
+ bfd/bfd.c | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/bfd/bfd.c b/bfd/bfd.c
+index a2f294da983..3e59057d07a 100644
+--- a/bfd/bfd.c
++++ b/bfd/bfd.c
+@@ -871,7 +871,6 @@ union _bfd_doprnt_args
+ long l;
+ long long ll;
+ double d;
+- long double ld;
+ void *p;
+ enum
+ {
+@@ -880,7 +879,6 @@ union _bfd_doprnt_args
+ Long,
+ LongLong,
+ Double,
+- LongDouble,
+ Ptr
+ } type;
+ };
+@@ -1066,7 +1064,7 @@ _bfd_doprnt (FILE *stream, const char *format, union _bfd_doprnt_args *args)
+ if (wide_width == 0)
+ PRINT_TYPE (double, d);
+ else
+- PRINT_TYPE (long double, ld);
++ abort();
+ }
+ break;
+ case 's':
+@@ -1283,7 +1281,7 @@ _bfd_doprnt_scan (const char *format, union _bfd_doprnt_args *args)
+ if (wide_width == 0)
+ arg_type = Double;
+ else
+- arg_type = LongDouble;
++ abort();
+ }
+ break;
+ case 's':
+@@ -1334,9 +1332,6 @@ error_handler_internal (const char *fmt, va_list ap)
+ case Double:
+ args[i].d = va_arg (ap, double);
+ break;
+- case LongDouble:
+- args[i].ld = va_arg (ap, long double);
+- break;
+ case Ptr:
+ args[i].p = va_arg (ap, void *);
+ break;
+--
+2.34.1
+
diff --git a/pkg/binutils/patch/0004-Remove-support-for-long-double-in-error-formatter.patch b/pkg/binutils/patch/0004-Remove-support-for-long-double-in-error-formatter.patch
@@ -1,62 +0,0 @@
-From 0051e56e6ba95eb552f70720f4b09b485a937115 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Mon, 6 Sep 2021 18:51:05 -0700
-Subject: [PATCH] Remove support for long double in error formatter
-
-No bfd errors try to format long double, so there is no point in
-supporting it in the formatter.
----
- bfd/bfd.c | 9 ++-------
- 1 file changed, 2 insertions(+), 7 deletions(-)
-
-diff --git a/bfd/bfd.c b/bfd/bfd.c
-index 0952aaea19c..9c29a77edc0 100644
---- a/bfd/bfd.c
-+++ b/bfd/bfd.c
-@@ -868,7 +868,6 @@ union _bfd_doprnt_args
- long l;
- long long ll;
- double d;
-- long double ld;
- void *p;
- enum
- {
-@@ -877,7 +876,6 @@ union _bfd_doprnt_args
- Long,
- LongLong,
- Double,
-- LongDouble,
- Ptr
- } type;
- };
-@@ -1063,7 +1061,7 @@ _bfd_doprnt (FILE *stream, const char *format, union _bfd_doprnt_args *args)
- if (wide_width == 0)
- PRINT_TYPE (double, d);
- else
-- PRINT_TYPE (long double, ld);
-+ abort();
- }
- break;
- case 's':
-@@ -1280,7 +1278,7 @@ _bfd_doprnt_scan (const char *format, union _bfd_doprnt_args *args)
- if (wide_width == 0)
- arg_type = Double;
- else
-- arg_type = LongDouble;
-+ abort();
- }
- break;
- case 's':
-@@ -1331,9 +1329,6 @@ error_handler_internal (const char *fmt, va_list ap)
- case Double:
- args[i].d = va_arg (ap, double);
- break;
-- case LongDouble:
-- args[i].ld = va_arg (ap, long double);
-- break;
- case Ptr:
- args[i].p = va_arg (ap, void *);
- break;
---
-2.32.0
-
diff --git a/pkg/binutils/patch/0004-bfd-Remove-return-with-expression-in-void-function.patch b/pkg/binutils/patch/0004-bfd-Remove-return-with-expression-in-void-function.patch
@@ -0,0 +1,34 @@
+From b0508ec3e6134825199ba6ff3d8effd369428117 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Thu, 10 Feb 2022 14:51:52 -0800
+Subject: [PATCH] bfd: Remove return with expression in void function
+
+This is not allowed in ISO C (C11 6.8.6.4p1):
+
+> A return statement with an expression shall not appear in a
+> function whose return type is void.
+
+2022-02-10 Michael Forney <mforney@mforney.org>
+
+ * bfd.c (bfd_set_gp_value): Remove return with expression
+ in void function.
+---
+ bfd/bfd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bfd/bfd.c b/bfd/bfd.c
+index 3e59057d07a..80c9e425754 100644
+--- a/bfd/bfd.c
++++ b/bfd/bfd.c
+@@ -1871,7 +1871,7 @@ DESCRIPTION
+ void
+ bfd_set_gp_value (bfd *abfd, bfd_vma v)
+ {
+- return _bfd_set_gp_value (abfd, v);
++ _bfd_set_gp_value (abfd, v);
+ }
+
+ /*
+--
+2.34.1
+
diff --git a/pkg/binutils/sha256 b/pkg/binutils/sha256
@@ -1 +1 @@
-820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c binutils-2.37.tar.xz
+e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024 binutils-2.38.tar.xz
diff --git a/pkg/binutils/url b/pkg/binutils/url
@@ -1 +1 @@
-url = "https://ftp.gnu.org/gnu/binutils/binutils-2.37.tar.xz"
+url = "https://ftp.gnu.org/gnu/binutils/binutils-2.38.tar.xz"
diff --git a/pkg/binutils/vec.lua b/pkg/binutils/vec.lua
@@ -17,6 +17,7 @@ return {
aarch64_elf64_le_vec={'elf64-aarch64.c', 'elfxx-aarch64.c', 'elf-ifunc.c', 'elf64.c', elf},
aarch64_elf64_le_cloudabi_vec={'elf64-aarch64.c', 'elfxx-aarch64.c', 'elf-ifunc.c', 'elf64.c', elf},
aarch64_mach_o_vec={'mach-o-aarch64.c'},
+ aarch64_pei_vec={'pei-aarch64.c', 'pe-aarch64igen.c', coff},
alpha_ecoff_le_vec={'coff-alpha.c', 'ecoff.c', ecoff},
alpha_elf64_vec={'elf64-alpha.c', 'elf64.c', elf},
alpha_elf64_fbsd_vec={'elf64-alpha.c', 'elf64.c', elf},
@@ -108,6 +109,8 @@ return {
l1om_elf64_fbsd_vec={'elf64-x86-64.c', 'elfxx-x86.c', 'elf-ifunc.c', 'elf64.c', elf},
lm32_elf32_vec={'elf32-lm32.c', 'elf32.c', elf},
lm32_elf32_fdpic_vec={'elf32-lm32.c', 'elf32.c', elf},
+ loongarch_elf32_vec={'elf32-loongarch.c', 'elfxx-loongarch.c', 'elf32.c', 'elf-ifunc.c', elf},
+ loongarch_elf64_vec={'elf64-loongarch.c', 'elf64.c', 'elfxx-loongarch.c', 'elf32.c', 'elf-ifunc.c', elf},
m32c_elf32_vec={'elf32-m32c.c', 'elf32.c', elf},
m32r_elf32_vec={'elf32-m32r.c', 'elf32.c', elf},
m32r_elf32_le_vec={'elf32-m32r.c', 'elf32.c', elf},
diff --git a/pkg/binutils/ver b/pkg/binutils/ver
@@ -1 +1 @@
-2.37 r1
+2.38 r1