[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lib-symbol-versions on msvc9
From: |
Bruno Haible |
Subject: |
Re: lib-symbol-versions on msvc9 |
Date: |
Fri, 06 Jan 2012 17:07:08 +0100 |
User-agent: |
KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; ) |
Hi Simon,
Simon Josefsson wrote in
<https://lists.gnu.org/archive/html/help-libidn/2012-01/msg00003.html>:
> > * mingw with MSVC 9 as compiler
> >
> > Link failure:
> >
> > CCLD libidn.la
> > cl : command line warning D9002 : ignoring unknown option "--version-
> > script=./libidn.map"
> > cl : Befehlszeile warning D9002 : ignoring unknown option "-dll"
> > LINK : fatal error LNK1181: cannot open input file "ink.lib"
> > make[2]: *** [libidn.la] Error 2
>
> I don't have that environment, but can you test whether applying this
> patch to gnulib and running
>
> rm -rf m && ./gnulib-tool --create-testdir --dir m lib-symbol-versions && cd
> m && autoreconf && ./configure
>
> helps? It is a bit weird approach, but simple.
>
> /Simon
>
> diff --git a/m4/ld-version-script.m4 b/m4/ld-version-script.m4
> index fd8c043..5ed93ef 100644
> --- a/m4/ld-version-script.m4
> +++ b/m4/ld-version-script.m4
> @@ -1,4 +1,4 @@
> -# ld-version-script.m4 serial 2
> +# ld-version-script.m4 serial 3
> dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
> dnl This file is free software; the Free Software Foundation
> dnl gives unlimited permission to copy and/or distribute it,
> @@ -26,6 +26,12 @@ AC_DEFUN([gl_LD_VERSION_SCRIPT],
> save_LDFLAGS="$LDFLAGS"
> LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
> cat > conftest.map <<EOF
> +foo
> +EOF
> + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
> + [accepts_syntax_errors=yes], [accepts_syntax_errors=no])
> + if test "$accepts_syntax_errors" = no; then
> + cat > conftest.map <<EOF
> VERS_1 {
> global: sym;
> };
> @@ -34,8 +40,11 @@ VERS_2 {
> global: sym;
> } VERS_1;
> EOF
> - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
> - [have_ld_version_script=yes], [have_ld_version_script=no])
> + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
> + [have_ld_version_script=yes],
> [have_ld_version_script=no])
> + else
> + have_ld_version_script=no
> + fi
> rm -f conftest.map
> LDFLAGS="$save_LDFLAGS"
> AC_MSG_RESULT($have_ld_version_script)
Yes, perfectly fine. Before the patch,
"checking if LD -Wl,--version-script works..."
answered 'yes' on
glibc, FreeBSD, NetBSD, OpenBSD, IRIX, Cygwin, mingw, msvc9
and 'no' on
MacOS X, AIX, HP-UX, Solaris.
With the patch, the answer turns to 'no' on msvc9. Exactly as it should.
Bruno
- Re: lib-symbol-versions on msvc9,
Bruno Haible <=