ranlib segfaults when building libffi on i386 Windows
Unfortunately the 32-bit Windows build still appears to be broken, this time due to an apparent binutils
bug:
$ make -j5
===--- building phase 0
make --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for 'phase_0_builds'.
===--- building phase 1
make --no-print-directory -f ghc.mk phase=1 phase_1_builds
make[1]: Nothing to be done for 'phase_1_builds'.
===--- building final phase
make --no-print-directory -f ghc.mk phase=final all
# Use 'sync' as a temporary solution for #11960 (parallelisation bug).
sync; make -C libffi/build MAKEFLAGS=
MAKE x86_64-pc-mingw32 : 0 * all-all
make[3]: Entering directory '/home/ben/ghc/libffi/build/i386-unknown-mingw32'
make all-recursive
make[4]: Entering directory '/home/ben/ghc/libffi/build/i386-unknown-mingw32'
Making all in include
make[5]: Entering directory '/home/ben/ghc/libffi/build/i386-unknown-mingw32/include'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/home/ben/ghc/libffi/build/i386-unknown-mingw32/include'
Making all in testsuite
make[5]: Entering directory '/home/ben/ghc/libffi/build/i386-unknown-mingw32/testsuite'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/home/ben/ghc/libffi/build/i386-unknown-mingw32/testsuite'
Making all in man
make[5]: Entering directory '/home/ben/ghc/libffi/build/i386-unknown-mingw32/man'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/home/ben/ghc/libffi/build/i386-unknown-mingw32/man'
make[5]: Entering directory '/home/ben/ghc/libffi/build/i386-unknown-mingw32'
/bin/sh ./libtool --tag=CC --mode=link C:/msys64/home/ben/ghc/inplace/mingw/bin/gcc.exe -Wall -U__i686 -march=i686 -w -fexceptions -w -o libffi_convenience.la src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo src/x86/ffi.lo src/x86/sysv.lo
libtool: link: rm -fr .libs/libffi_convenience.a
libtool: link: C:/msys64/home/ben/ghc/inplace/mingw/bin/ar.exe cru .libs/libffi_convenience.a src/prep_cif.o src/types.o src/raw_api.o src/java_raw_api.o src/closures.o src/x86/ffi.o src/x86/sysv.o
libtool: link: C:/msys64/home/ben/ghc/inplace/mingw/bin/ranlib.exe .libs/libffi_convenience.a
./libtool: line 1747: 51898 Segmentation fault C:/msys64/home/ben/ghc/inplace/mingw/bin/ranlib.exe .libs/libffi_convenience.a
Edited by Ben Gamari