I have tracked down the cause of Debian bug <http://bugs.debian.org/306210>:
When you compile C++ programs using Debian's mingw32 cross-compiler package
(currently based on mingw32-3.4.2.20040916.1), then the compiled C++ programs do
not have large file support enabled.
The simple fix is to enable LFS in libstdc++-v3/crossconfig.m4.
This bug probably also applies to GCC versions 3.4.3 .. 4.0
Patch:
--- gcc-3.4.2-20040916-1/libstdc++-v3/crossconfig.m4.orig 2004-08-15
10:41:14.000000000 +0200
+++ gcc-3.4.2-20040916-1/libstdc++-v3/crossconfig.m4 2005-07-09
19:53:15.000000000 +0200
@@ -234,6 +234,7 @@
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ AC_DEFINE(_GLIBCXX_USE_LFS)
;;
*-netbsd*)
AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
--
Summary: When cross-compiling libstdc++ for mingw, enable large
file support (LFS)
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ra at atterer dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i586-mingw32msvc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22388