Running ./pre-inst-env guix build --target=x86_64-w64-mingw32 hello on core-updates fails with --8<---------------cut here---------------start------------->8--- ../../../../gcc-7.4.0/libstdc++-v3/libsupc++/new_opa.cc: In function ‘void* __gnu_cxx::aligned_alloc(std::size_t, std::size_t)’: ../../../../gcc-7.4.0/libstdc++-v3/libsupc++/new_opa.cc:78:10: error: ‘memalign’ was not declared in this scope return memalign (al, sz); ^~~~~~~~ ../../../../gcc-7.4.0/libstdc++-v3/libsupc++/new_opa.cc:78:10: note: suggested alternative: ‘max_align_t’ return memalign (al, sz); ^~~~~~~~ max_align_t --8<---------------cut here---------------end--------------->8--- The attached patch fixes this and produces a working cross-built hello. The weird thing is that I looked at Debian's mingw cross compilers and its mingw-w64 package and cannot seem to find anything that resembles this build problem or a fix. Greetings, janneke