Building binutils from git master on m68k with gcc-8 results in utilities like strip or objcop failing with "memory exhausted": For example, building wireshark on Debian m68k fails with: dh_strip --ddeb-migration="wireshark-dbg (<< 2.0.1+g59ea380-12.0.1+g59ea380-2~)" || dh_strip /usr/bin/objcopy:debian/libwireshark11/usr/lib/m68k-linux-gnu/libwireshark.so.11.1.2: memory exhausted dh_strip: objcopy --only-keep-debug --compress-debug-sections debian/libwireshark11/usr/lib/m68k-linux-gnu/libwireshark.so.11.1.2 debian/.debhelper/libwireshark11/dbgsym-root/usr/lib/debug/.build-id/8d/574eed1bdf861517258e43eb7c77408493c40e.debug returned exit code 1 dh_strip: Aborting due to earlier error /usr/bin/objcopy:debian/libwireshark11/usr/lib/m68k-linux-gnu/libwireshark.so.11.1.2: memory exhausted dh_strip: objcopy --only-keep-debug --compress-debug-sections debian/libwireshark11/usr/lib/m68k-linux-gnu/libwireshark.so.11.1.2 debian/.debhelper/libwireshark11/dbgsym-root/usr/lib/debug/.build-id/8d/574eed1bdf861517258e43eb7c77408493c40e.debug returned exit code 1 dh_strip: Aborting due to earlier error Full log: https://buildd.debian.org/status/fetch.php?pkg=wireshark&arch=m68k&ver=2.6.2-2&stamp=1533058050&raw=0 Building haskell-yaml on Debian m68k fails with: debian/hlibrary.setup copy --builddir=dist-ghc --destdir=debian/tmp-inst-ghc Installing library in debian/tmp-inst-ghc/usr/lib/haskell-packages/ghc/lib/m68k-linux-ghc-8.2.2/yaml-0.8.31.1-EX4SEGT1sRZ4D4BySsFjv1 Installing executable yaml2json in debian/tmp-inst-ghc/usr/bin Warning: The directory debian/tmp-inst-ghc/usr/bin is not in the system search path. /usr/bin/strip:debian/tmp-inst-ghc/usr/bin/yaml2json: memory exhausted make: *** [/usr/share/cdbs/1/class/hlibrary.mk:188: debian/tmp-inst-ghc] Error 1 Full log: https://buildd.debian.org/status/fetch.php?pkg=haskell-yaml&arch=m68k&ver=0.8.31.1-1&stamp=1533003205&raw=0 Building the same version of binutils with gcc-7 results in working strip and objcopy binaries which don't bail out with the above memory exhausted error.
Related (invalid) binutils bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=23471
Does this help <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=262835>?
(In reply to Andreas Schwab from comment #2) > Does this help > <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=262835>? Thanks. Rebuilding gcc-8 with the patch applied now, will report back ASAP.
Yes, I can confirm that the patch from comment #2 fixes the problem for me. (sid-m68k-sbuild)root@epyc:/binutils/binutils-gdb# ls -l /tmp/json2yaml -rwxr-xr-x 1 root root 43823968 Aug 2 01:53 /tmp/json2yaml (sid-m68k-sbuild)root@epyc:/binutils/binutils-gdb# ./binutils/strip-new /tmp/json2yaml (sid-m68k-sbuild)root@epyc:/binutils/binutils-gdb# ls -l /tmp/json2yaml -rwxr-xr-x 1 root root 31372868 Aug 2 01:54 /tmp/json2yaml (sid-m68k-sbuild)root@epyc:/binutils/binutils-gdb# Andreas, can you backport the patch to the gcc-8 branch unless that has already happened?
Author: schwab Date: Thu Aug 2 17:23:13 2018 New Revision: 263269 URL: https://gcc.gnu.org/viewcvs?rev=263269&root=gcc&view=rev Log: Fix invalid cc_status after [const_][us]mulsi3_highpart Backport from mainline PR target/86820 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart) (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT. testsuite/: PR target/86820 * gcc.target/m68k/mulsi_highpart.c: New test. Added: branches/gcc-8-branch/gcc/testsuite/gcc.target/m68k/mulsi_highpart.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/config/m68k/m68k.md branches/gcc-8-branch/gcc/testsuite/ChangeLog
Fixed.