bug-texinfo
[Top][All Lists]
Advanced

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

Re: XSParagraph build failure with static libperl


From: Ken Brown
Subject: Re: XSParagraph build failure with static libperl
Date: Wed, 7 Jun 2017 15:07:14 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

On 6/7/2017 1:14 PM, Gavin Smith wrote:
On Tue, Jun 06, 2017 at 09:56:37PM -0400, Ken Brown wrote:
I've committed a change to do this.  I copied the test from the
top-level configure.ac to see if we are on MS-Windows:

host_is_windows=no
case "$host" in
    *-mingw32 | *-mingw64 | *-msdosdjgpp )  host_is_windows=yes ;;
esac
AM_CONDITIONAL([HOST_IS_WINDOWS], [test "x$host_is_windows" = "xyes"])

Please someone say if this is wrong for a system where the -no-undefined
flag is needed (e.g. cygwin).

It's wrong on Cygwin.  Without -no-undefined -lperl I get errors like this:

/bin/sh ./libtool  --tag=CC   --mode=link gcc -DPERL_USE_SAFE_PUTENV
-D_GNU_SOURCE -U__STRICT_ANSI__ -ggdb -O2 -pipe
-Wimplicit-function-declaration -fwrapv -fno-strict-aliasing
-fstack-protector-strong -D_FORTIFY_SOURCE=2 -DVERSION=\"0\"
-DXS_VERSION=\"1\" "-I/usr/lib/perl5/5.24/x86_64-cygwin-threads/CORE"
-avoid-version -module    -o XSParagraph.la -rpath /usr/lib/texinfo
XSParagraph_la-XSParagraph.lo XSParagraph_la-xspara.lo
XSParagraph_la-text.lo ./lib/libgnu.la
libtool:   error: can't build x86_64-unknown-cygwin shared library unless
-no-undefined is specified

So I guess it should be

host_is_windows=no
case "$host" in
     *-mingw32 | *-mingw64 | *-msdosdjgpp | *-cygwin )  host_is_windows=yes ;;
esac
AM_CONDITIONAL([HOST_IS_WINDOWS], [test "x$host_is_windows" = "xyes"])

Yes, that would do it. My only suggestion is that it might be better to use something like HOST_NEEDS_NO_UNDEFINED rather than HOST_IS_WINDOWS. Having HOST_IS_WINDOWS defined on Cygwin could cause confusion in the future if someone wants to introduce Windows-specific code, since such code usually isn't appropriate for Cygwin. The need for -no-undefined is an exception.

Ken




reply via email to

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