bug-libtool
[Top][All Lists]
Advanced

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

AC_PROG_NM when compiling for mingw


From: Bruno Haible
Subject: AC_PROG_NM when compiling for mingw
Date: Thu, 23 Apr 2009 22:54:08 +0200
User-agent: KMail/1.9.9

Hi,

My preferred way to compile for mingw is from the cygwin environment, through
the following commands:

   PATH=/usr/local/mingw/bin:$PATH
   export PATH
   ./configure --host=i586-pc-mingw32 --prefix=/usr/local/mingw \
     CPPFLAGS="-mno-cygwin -Wall -I/usr/local/mingw/include" \
     CFLAGS="-mno-cygwin -O2 -g" \
     CXXFLAGS="-mno-cygwin -O2 -g" \
     LDFLAGS="-mno-cygwin -L/usr/local/mingw/lib"

But in this situation, the AC_PROG_NM macro does not set NM to the value
/usr/bin/nm, as expected. Rather, I see this:

  checking for BSD- or MS-compatible name lister (nm)... (cached) no
  checking for i586-pc-mingw32-dumpbin... link -dump -symbols
  checking the name lister (link -dump -symbols) interface... (cached) BSD nm

Two things are wrong here:
  1) the non-recognition of the 'nm' program,
  2) the use of the wrong 'link' program. In the Cygwin environment, 'link'
     is the POSIX 'link' command [1] from coreutils, not the Microsoft Visual
     Studio linker.

Question: Should AC_PROG_NM (actually LT_PATH_NM) be changed to recognize
this compilation environment? Or should the user explicitly pass NM="nm"
as argument to 'configure'?

Bruno

[1] http://www.opengroup.org/onlinepubs/9699919799/utilities/link.html




reply via email to

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