I have tried to create mingw32 cross-compiler using crossdev-0.9.17 and gcc-3.4.6-r2 with this command: crossdev mingw32 --gcc 3.4.6-r2 -v Unfortunately, it fails to emerge cross-gcc-stage2 when doing 'make install': /bin/install -c .libs/libstdc++.lai /mnt/gentoo/2006.0/var/tmp/cross/mingw32/portage/gcc-3.4.6-r2/image//usr/mingw32/lib/libstdc++.la /bin/install -c .libs/libstdc++.a /mnt/gentoo/2006.0/var/tmp/cross/mingw32/portage/gcc-3.4.6-r2/image//usr/mingw32/lib/libstdc++.a mingw32-ranlib /mnt/gentoo/2006.0/var/tmp/cross/mingw32/portage/gcc-3.4.6-r2/image//usr/mingw32/lib/libstdc++.a chmod 644 /mnt/gentoo/2006.0/var/tmp/cross/mingw32/portage/gcc-3.4.6-r2/image//usr/mingw32/lib/libstdc++.a libtool: install: warning: remember to run `libtool --finish /usr/mingw32/lib' mingw32-ar cru libstdc++_pic.a .libs/*.o ../libsupc++/*.o mingw32-ar: .libs/*.o: No such file or directory make[3]: *** [install-exec-local] Error 1 make[3]: Leaving directory `/mnt/gentoo/2006.0/var/tmp/cross/mingw32/portage/gcc-3.4.6-r2/work/build/mingw32/libstdc++-v3/src' Proposed patch: ------------------------------------------------------------------------------------- --- gcc-3.4.6.orig/libstdc++-v3/src/Makefile.in +++ gcc-3.4.6/libstdc++-v3/src/Makefile.in @@ -713,7 +713,7 @@ install-exec-local: ifeq ($(enable_shared),yes) - $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o + $(AR) cru libstdc++_pic.a $(wildcard .libs/*.o) $(top_builddir)/libsupc++/*.o $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) endif ------------------------------------------------------------------------------------- Both sys-devel/gcc-3.4.6-r2 and cross-mingw32/gcc-3.4.6-r2 works with this patch.
Created attachment 98315 [details] cross-mingw32-info.log If needed
no, that patch will create an incorrect libstdc++_pic.a
Reading dev-util/xmingw-gcc ebuild I found out that it always use '--disable-shared' when configuring gcc. Should this option fix the problem?
Since cross-mingw32/gcc-4.1.1-r1 emerge creating libstdc++_pic.a, I have checked his log files and finally I have found a bug I have just reported (see Bug 149538) Fixing this bug will probally break cross-mingw32/gcc-4.1.1-r1 in the same manner I have reported for 3.4.6 version. I think we don't need to create shared library for mingw32 as his target should be to create program that use only native windows library. Using '--disable-shared' when configuring gcc will avoid to create libstdc++_pic.a library fixing this problem. If this could be the solution, this is my proposed patch for toolchain.eclass: --- /usr/portage/eclass/toolchain.eclass 2006-09-28 14:06:06.000000000 +0200 +++ toolchain.eclass 2006-09-29 16:13:48.000000000 +0200 @@ -1267,6 +1267,7 @@ *-klibc) needed_libc=klibc;; *-uclibc*) needed_libc=uclibc;; avr) confgcc="${confgcc} --enable-shared --disable-threads";; + mingw*) confgcc="${confgcc} --disable-shared";; esac if [[ -n ${needed_libc} ]] ; then if ! has_version ${CATEGORY}/${needed_libc} ; then
fixed in cvs
*** Bug 154895 has been marked as a duplicate of this bug. ***