This is probably unsupported, but I was used crossdev to create a mingw32 cross-compiler. I then tried to emerge libsdl into its SYSROOT (/usr/mingw32). The compile failed because a line that looks like this in one of media-libs/audiofile-0.2.6-r3's headers: typedef int64_t AFframecount; caused an error. This error was caused because int64_t was not defined. I found that the source of this line of code was a Gentoo patch to audiofile named audiofile-largefile.patch. I also found that MinGW's w32api/mingw-runtime/gcc does not cause int64_t to be defined when #include <sys/types.h> is included. I think audiofile-largefile.patch should be modified to #include <stdint.h> which does define int64_t. Reproducible: Always Steps to Reproduce: 1. Somehow get a mingw32 crosscompiler set up using crossdev --target mingw32 2. Try to compile libsdl into the sysroot after setting up /usr/mingw32/{make.profile,make.conf,make.globals} with this command: OOT=/usr/mingw32/ PORTAGE_CONFIGROOT=/usr/mingw32 CBUILD=x86_64-pc-linux-gnu CHOST=mingw32 emerge -v libsdl 3. find out there is an error :-) Actual Results: Errors from gcc: config.status: executing default commands make all-recursive make[1]: Entering directory `/var/tmp/portage/media-libs/audiofile-0.2.6-r3/work/audiofile-0.2.6' Making all in libaudiofile make[2]: Entering directory `/var/tmp/portage/media-libs/audiofile-0.2.6-r3/work/audiofile-0.2.6/libaudiofile' Making all in modules make[3]: Entering directory `/var/tmp/portage/media-libs/audiofile-0.2.6-r3/work/audiofile-0.2.6/libaudiofile/modules' source='g711.c' object='g711.lo' libtool=yes \ depfile='.deps/g711.Plo' tmpdepfile='.deps/g711.TPlo' \ depmode=gcc3 /bin/sh ../../depcomp \ /bin/sh ../../libtool --mode=compile mingw32-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I./.. -DNDEBUG -Os -pipe -c -o g711.lo `test -f g711.c || echo './'`g711.c mkdir .libs mingw32-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I./.. -DNDEBUG -Os -pipe -c g711.c -MT g711.lo -MD -MP -MF .deps/g711.TPlo -DDLL_EXPORT -DPIC -o .libs/g711.lo In file included from g711.c:33: ./../audiofile.h:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'AFframecount' ./../audiofile.h:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'AFfileoffset' ==snipped out unimportant errors (that are caused by these two errors)== Expected Results: I expected audiofile to compile correctly. In fact, it does with the (hopefully) attached replacement for audiofile-large.patch (which makes audiofile.h #include <stdint.h>). I'm pretty sure this makes no difference: the arch I'm compiling from is amd64.
Created attachment 165367 [details, diff] Allows crosscompiling audiofile using mingw32, replaces audiofile-largefile.patch This replaces the patch given in bug #118600 . AFAIK, it preserves the fix to the previous bug. I only tested it on media-libs/audiofile-0.2.6-r3.
Comment on attachment 165367 [details, diff] Allows crosscompiling audiofile using mingw32, replaces audiofile-largefile.patch Ooops. I thought I had saved the file. Please ignore these lines in the patch I threw up: >+//#define AFframecount int64_t >+//#define AFfileoffset int64_t
looks good, thanks ... note, this isnt really mingw32 specific ... http://sources.gentoo.org/media-libs/audiofile/files/audiofile-largefile.patch?r1=1.1&r2=1.2