Bruno Haible
2017-07-13 19:17:55 UTC
Hi,
I'm adding cross-compilation guesses for native Windows, so that cross-
compilation to e.g. mingw using the Debian cross packages should now work
properly.
For reference, the way I produced this change is as follows:
1) Determine list of files:
rm -f `find . -name '*~'`
grep -rl AC_RUN_IFELSE m4 | LC_ALL=C sort > files
2) Determine list of modules:
{ for f in `cat files`; do ./gnulib-tool --find $f ; done; (cd modules && ls -1 *-ieee); } | grep -v '^fchownat$' | LC_ALL=C sort -u > cross-modules
3) Create a testdir:
./gnulib-tool --create-testdir --dir=../testdir-cross --single-configure `cat cross-modules`
4) Build it with mingw and msvc
5) Collect the configure output log files.
mingw32.out
mingw64.out
msvc32.out
msvc64.out
6) Extract the relevant messages.
for f in `cat files` ; do sed -n -e 's/^.*AC_CACHE_CHECK(\[\([^]]*\).*$/checking \1/p' < $f ; done > msgs
while read msg ; do echo ; echo "grep '$msg...'" ; grep "$msg"'\.\.\.' *.out ; done < msgs | grep -v '(cached)' > results
7) Add each respective case to the 'case "$host_os" in ...' statement.
I added the case for native Windows also for those tests where it is the same
as the fallback. This is for maintainaibility: It gives us the freedom to change
the fallback from, say, "guessing no" to "guessing yes", without regressing on
native Windows.
Bruno
I'm adding cross-compilation guesses for native Windows, so that cross-
compilation to e.g. mingw using the Debian cross packages should now work
properly.
For reference, the way I produced this change is as follows:
1) Determine list of files:
rm -f `find . -name '*~'`
grep -rl AC_RUN_IFELSE m4 | LC_ALL=C sort > files
2) Determine list of modules:
{ for f in `cat files`; do ./gnulib-tool --find $f ; done; (cd modules && ls -1 *-ieee); } | grep -v '^fchownat$' | LC_ALL=C sort -u > cross-modules
3) Create a testdir:
./gnulib-tool --create-testdir --dir=../testdir-cross --single-configure `cat cross-modules`
4) Build it with mingw and msvc
5) Collect the configure output log files.
mingw32.out
mingw64.out
msvc32.out
msvc64.out
6) Extract the relevant messages.
for f in `cat files` ; do sed -n -e 's/^.*AC_CACHE_CHECK(\[\([^]]*\).*$/checking \1/p' < $f ; done > msgs
while read msg ; do echo ; echo "grep '$msg...'" ; grep "$msg"'\.\.\.' *.out ; done < msgs | grep -v '(cached)' > results
7) Add each respective case to the 'case "$host_os" in ...' statement.
I added the case for native Windows also for those tests where it is the same
as the fallback. This is for maintainaibility: It gives us the freedom to change
the fallback from, say, "guessing no" to "guessing yes", without regressing on
native Windows.
Bruno