From: Roumen P. <bug...@ro...> - 2009-07-07 21:05:16
|
Hi All, Dennis Wassel wrote: > Hi list, > > I am experiencing (supposedly) the same issues with GMP 4.2.4 > (gmp-4.2.4-src.tar.bz2 packaged with the gcc release), using > * binutils-2.19.1-mingw32 > * gcc-full-4.4.0-mingw32-bin-2 > * make-3.81-MSYS-1.0.11-2 At least I finish my cross-environment for gcc 4.4.0. >> I think this is a libtool issue with the way I packaged c++. Let me >> look into it and get back to you. I think you can fix it by editing the >> libstdc++.la file. > > For the record: > - edited libstdc++.la (replaced library_names='libstdc++.dll.a' by > library_names='libstdc++_s.a'. This fixes the "No such file" error. > And from the release notes: > - exported linker flags LDFLAGS='-lstdc++_s' > - added CPPFLAGS='-D_GLIBCXX_DLL' I could cross-build gmp 4.3.1. with flags : CPPFLAGS='-D_GLIBCXX_DLL' CFLAGS="-O2 -fno-strict-aliasing -Wall -posix" CXXFLAGS="-O2 -fno-strict-aliasing -Wall -posix" LDFLAGS='-lstdc++' and options --enable-cxx --disable-static --enable-shared > However, the latter two cause gmp configure to fail the 'broken > iostream' test, while without them, it fails later when creating the > (I think) libgmpxx libary. This is the relevant snippet of config.log: > [I am slightly confused to not see "-lstdc++_s" anywhere] I don't think that mingw has to create library with _s siffix. > Test compile: std iostream > configure:8508: g++ -D_GLIBCXX_DLL -m32 -O2 -fomit-frame-pointer > -mtune=k8 -march=k8 -mno-cygwin conftest.cc >&5 [SNIP] > c:\Temp\mingw\ccciHxa3.o:conftest.cc:(.text+0x54): undefined reference > to `_imp___ZSt4cout' > collect2: ld returned 1 exit status > configure:8511: $? = 1 > failed program was: > /* This test rejects g++ 2.7.2 which doesn't have <iostream>, only a > pre-standard iostream.h. */ > #include <iostream> > > /* This test rejects OSF 5.1 Compaq C++ in its default pre-standard iostream > mode, since that mode puts cout in the global namespace, not "std". */ > void someoutput (void) { std::cout << 123; } > > int main (void) { return 0; } > configure:8537: result: no, std iostream [SNIP] > Am I missing something? > Otherwise I hope this helps extending the report. No > Cheers, > Dennis > There is list of files returned by: $ find . -name '*stdc++*' ./lib/gcc/i486-mingw32/4.4.0/include/c++/i486-mingw32/bits/stdc++.h ./lib/gcc/i486-mingw32/4.4.0/libstdc++.dll.a ./lib/gcc/i486-mingw32/4.4.0/libstdc++.la ./lib/gcc/i486-mingw32/4.4.0/libstdc++.a ./lib/gcc/i486-mingw32/4.4.0/debug/libstdc++.dll.a ./lib/gcc/i486-mingw32/4.4.0/debug/libstdc++.la ./lib/gcc/i486-mingw32/4.4.0/debug/libstdc++.a ./lib/gcc/i486-mingw32/4.4.0/bin/libstdc++-6.dll ./lib/gcc/i486-mingw32/bin/libstdc++-6.dll The partial content of .../4.4.0/libstdc++.la is: ------------------- # The name that we can dlopen(3). dlname='../bin/libstdc++-6.dll' # Names of this library. library_names='libstdc++.dll.a' # The name of the static archive. old_library='libstdc++.a' -------------------- All is correct according to libtool: if a libdir is XXXX/<LASTDIR> import and static libraries go in XXXX/<LASTDIR> and dll is installed in XXXX/bin. Roumen |