This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help cross compiling for MingW32 standalone executables.


> I was wondering if you knew something I didn't.  :-) I didn't remember
> any solution to this problem but with my aging brain that is
> unsurprising.
>
> IIRC, the real problem here was in binutils.  There was no way to get ld
> to stop searching /usr/lib.

I do not believe this is the real problem.  If it was, then the configure
script would also find libjpeg.a from /usr/lib ....   The only library it
finds that it shouldn't is libm.a.

While I believe creating an empty libm.a would solve this particular
problem, doing that inside the an autoconf macro is definitely the wrong
place for that solution.  Especially, since this might break the build if
later the bug is fixed in mingw, or a libm.a is added as part of mingw.  If
that type of hack is neccissary it should be done in the gcc-mingw
postinstall script.

For a configure script it looks like I can change AC_CHECK_LIB(m,sqrt) to:

AC_CHECK_LIB(msvcrt,sqrt,AC_CHECK_LIB(msvcp60,mbrlen),AC_CHECK_LIB(m,sqrt))
I can both avoid the problem of bogus libm.a detection, and avoid using
msvcp60 under cygwin builds.

The only problem remaining, is I'm not certain if I should use msvcrt,
msvcrt20 or msvcrt40, since I do not know what the difference is between
these libraries.

                                                   Bill



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]