diff -pruN 1.0.3/debian/autoreconf 1.0.6/debian/autoreconf
--- 1.0.3/debian/autoreconf	2022-02-13 18:00:54.000000000 +0000
+++ 1.0.6/debian/autoreconf	2022-08-03 21:06:03.000000000 +0000
@@ -15,6 +15,9 @@ set -C -e -u
 # Exclude etc, which contains etc/configure but not its source
 # (since 2.38-1).
 
+# gprofng/libcollector: #1013590 with 2.38.50.20220622-1
+# libtoolize: error: AC_CONFIG_MACRO_DIRS([../../config]) conflicts with ACLOCAL_AMFLAGS=-I ..
+
 echo src
 
-dirname src/*/configure | grep -v -e zlib -e libiberty -e etc
+dirname src/*/configure | grep -v -e zlib -e libiberty -e etc -e gprofng
diff -pruN 1.0.3/debian/changelog 1.0.6/debian/changelog
--- 1.0.3/debian/changelog	2022-03-06 14:08:57.000000000 +0000
+++ 1.0.6/debian/changelog	2022-08-04 07:46:42.000000000 +0000
@@ -1,3 +1,21 @@
+binutils-or1k-elf (1.0.6) unstable; urgency=medium
+
+  * In gas, call mbstowcs with len=0 when dest=NULL.  Closes: #1016223.
+
+ -- Nicolas Boulenguez <nicolas@debian.org>  Thu, 04 Aug 2022 07:46:42 +0000
+
+binutils-or1k-elf (1.0.5) unstable; urgency=medium
+
+  * Disable build-time tests.
+
+ -- Nicolas Boulenguez <nicolas@debian.org>  Mon, 27 Jun 2022 06:37:13 +0000
+
+binutils-or1k-elf (1.0.4) unstable; urgency=medium
+
+  * Do not autoreconf gprofng. Closes: #1013590.
+
+ -- Nicolas Boulenguez <nicolas@debian.org>  Sat, 25 Jun 2022 15:42:50 +0000
+
 binutils-or1k-elf (1.0.3) unstable; urgency=medium
 
   * Do not autoreconf in etc/. Closes: #1005669.
diff -pruN 1.0.3/debian/control 1.0.6/debian/control
--- 1.0.3/debian/control	2021-10-23 08:06:57.000000000 +0000
+++ 1.0.6/debian/control	2022-08-03 21:06:03.000000000 +0000
@@ -17,7 +17,7 @@ Build-Depends:
  xz-utils,
  zlib1g-dev,
 Rules-Requires-Root: no
-Standards-Version: 4.6.0
+Standards-Version: 4.6.1
 Vcs-Git: https://salsa.debian.org/debian/binutils-or1k-elf.git
 Vcs-Browser: https://salsa.debian.org/debian/binutils-or1k-elf
 Homepage: https://sourceware.org/binutils/
diff -pruN 1.0.3/debian/rules 1.0.6/debian/rules
--- 1.0.3/debian/rules	2021-10-23 09:22:58.000000000 +0000
+++ 1.0.6/debian/rules	2022-08-04 07:45:53.000000000 +0000
@@ -28,6 +28,7 @@ execute_before_dh_update_autotools_confi
 src:
 	tar -xf $(tar_dir)/binutils-*.tar.xz
 	mv binutils* src
+	patch -p0 < mbstowcs-null-size.diff
 
 # _GCC_AUTOCONF_VERSION_CHECK in config/override.m4 requires 2.69.
 override_dh_autoreconf:
@@ -58,6 +59,10 @@ override_dh_auto_configure:
 	cd bld && ../src/configure --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir=/usr/lib/$(DEB_HOST_GNU_TYPE) --disable-maintainer-mode --disable-dependency-tracking \
 	$(confargs)
 
+# Disable tests, until someone fixes
+# https://buildd.debian.org/status/fetch.php?pkg=binutils-or1k-elf&arch=mips64el&ver=1.0.4&stamp=1656249446&raw=0
+override_dh_auto_test:
+
 # Shared data are provided by the binutils-common dependency.
 not_installed = \
   usr/share/info \
diff -pruN 1.0.3/mbstowcs-null-size.diff 1.0.6/mbstowcs-null-size.diff
--- 1.0.3/mbstowcs-null-size.diff	1970-01-01 00:00:00.000000000 +0000
+++ 1.0.6/mbstowcs-null-size.diff	2022-08-04 07:46:42.000000000 +0000
@@ -0,0 +1,13 @@
+https://sourceware.org/bugzilla/show_bug.cgi?id=29447
+
+--- src/gas/read.c
++++ src/gas/read.c
+@@ -1667,7 +1667,7 @@
+       /* Since quoted symbol names can contain non-ASCII characters,
+ 	 check the string and warn if it cannot be recognised by the
+ 	 current character set.  */
+-      if (mbstowcs (NULL, name, len) == (size_t) -1)
++      if (mbstowcs (NULL, name, 0) == (size_t) -1)
+ 	as_warn (_("symbol name not recognised in the current locale"));
+     }
+   else if (is_name_beginner (c) || (input_from_string && c == FAKE_LABEL_CHAR))
