libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why does libtool strip my -lm away on mingw32 builds?


From: Peter O'Gorman
Subject: Re: why does libtool strip my -lm away on mingw32 builds?
Date: Wed, 27 Apr 2011 08:32:54 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9

On 04/27/2011 07:25 AM, Ed Hartnett wrote:
Howdy all!

Hi Ed,


Recently I managed to get my C library building and testing cleanly on
Linux for windows, using mingw32 and wine. This is the greatest idea
since sliced bread. (In fact, I would rather live without sliced bread!)

I am building it like this:
./configure -C --disable-dap --disable-netcdf-4 --disable-fortran --disable-cxx 
--build=x86_64-unknown-linux-gnu --host=i686-mingw32&&  make -j check

When it builds in the nc_test directory, there is a program (nc_test)
which needs to link to the math library. I have AC_CHECK_LIB(m) in the
configure.ac, so the math library has been found and added to LIBS. But
libtool strips it away!

As I read the above, when make calles libtool, it has the -lm, but when
libtool calls gcc, the -lm is missing.

Any idea what I might be doing wrong here?

It's explicitly removed -

       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
          case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such)
            continue
            ;;

I don't know what library you need for floor() on mingw, maybe mingwex?

Perhaps try
AC_SEARCH_LIBS([floor],[m minbgwex])

But you'd probably be better waiting for someone who actually has a clue about mingw to answer :)

Peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]