This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Trouble with building multilib GCC (MinGW)
2012/3/20 Ian Lance Taylor <iant@google.com>:
> I see a lot of warnings about skipping incompatible libraries, but I
> don't see any errors. ÂDoes this link command succeed? ÂIf it fails,
> what are the error messages?
link command with '-v': http://pastebin.com/2dwVB1xh
output with errors: http://pastebin.com/JKfNESqL
>
> The first two -L options passed to collect2 are
>
> -LE:/msys/mingw-x32/i686-w64-mingw32/lib
> -LE:/msys/mingw-x32/mingw/lib
>
> This is odd because these options are not in LIBRARY_PATH, and the
> options are not adjusted for the 64-bit multilib. ÂThe first of these
> options appears to be the source of the "skipping incompatible"
> warnings. ÂThe subsequent -L options do seem to be multilib aware, in
> that the /../lib64 variant appears first.
>
> So where are those first two -L options coming from?
I don`t know.
>
> I see now that they are coming from the command itself, so I was looking
> at the wrong thing.
>
> It looks like those -L options are coming from the top level configure
> script. ÂIn the top level configure.ac, I see this:
>
> case "$target" in
> Âx86_64-*mingw* | *-w64-mingw*)
> Â# MinGW-w64 does not use newlib, nor does it use winsup. It may,
> Â# however, use a symlink named 'mingw' in ${prefix} .
> Â ÂFLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L${prefix}/${target}/lib -L${prefix}/mingw/lib -isystem ${prefix}/${target}/include -isystem ${prefix}/mingw/include'
> Â Â;;
> Â*-mingw*)
> Â# MinGW can't be handled as Cygwin above since it does not use newlib.
> Â ÂFLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/mingw -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/mingw/include -isystem $$s/winsup/w32api/include'
> Â Â;;
> esac
>
> Those lines appear to be clearly incorrect when using multilib.
>
> That lets me find http://gcc.gnu.org/PR51206 which appears to be the bug
> that you are running into. ÂI added a note to that bug report.
>
> Sorry to take so long to track this down.
Thank you!
--
Regards,
 niXman