I expected sed to cross-compile easily with mingw (it is part of the core of mingw binaries distributed for windows). However compilation failed using both the mingw32 and mingw64 versions of gcc-4.8.2 on an amd64 system, and in two different ways. See build logs. Reproducible: Always Steps to Reproduce: 0. Make sure you don't have the toolchain overlay as it confuses crossdev (correct me if I'm wrong). 1. crossdev --ov-output /usr/local/portage mingw32 2. edit /usr/mingw32/etc/portage/make.profile/make.defaults -> add ARCH="x86" edit /usr/mingw32/etc/portage/make.conf -> replace all references to x86_64-pc-linux-gnu by mingw32 (this must be a crossdev bug) 3. emerge-mingw32 sed --> mingw32-gcc -std=gnu99 -O2 -pipe -fomit-frame-pointer -o sed.exe sed.o compile.o execute.o regexp.o fmt.o mbcs.o utils.o ../lib/libsed.a compile.o:compile.c:(.text+0x660): multiple definition of « rpl_towlower » 1. crossdev --ov-output /usr/local/portage mingw64 2. edit /usr/x86_64-w64-mingw32/etc/portage/make.profile/make.defaults -> add ARCH="amd64" (It's actually the same file as above, since make.profile is a symlink. It must be changed manually everytime, maybe there is a better way to do; I tried changing /usr/x86_64-w64-mingw32/etc/portage/make.conf but it does not work. Also, the make.defaults is reset at every emerge --sync so this is clearly not the optimal solution). 3. emerge-x86_64-w64-mingw32 sed x86_64-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I../lib -I.. -I../lib -O2 -pipe -fomit-frame-pointer -MT msvc-inval.o -MD -MP -MF .deps/msvc-inval.Tpo -c -o msvc-inval.o msvc-inval.c msvc-inval.c:34:1: erreur: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gl_msvc_invalid_parameter_handler’ gl_msvc_invalid_parameter_handler (const wchar_t *expression, ^
Created attachment 374728 [details] build-mingw32.log
Created attachment 374730 [details] build log with mingw64