texinfo-devel
[Top][All Lists]
Advanced

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

Re: Using Perl's cc


From: Gavin Smith
Subject: Re: Using Perl's cc
Date: Sat, 11 Jul 2015 17:33:19 +0100

On 11 July 2015 at 16:45, Eli Zaretskii <address@hidden> wrote:
>> >   . -no-undefined -- without this flag, libtool will not build shared
>> >     libraries on Windows, because building a shared library on Windows
>> >     cannot leave any unresolved references
>>
>> Shouldn't libtool provide this flag automatically?
>
> I don't know.  What I see in several other projects I built, they all
> manually add -no-undefined in Makefile.am, on all supported platforms,
> not just on Windows, probably to avoid another configure-time test.

I see in the gnulib documentation it recommends adding this flag.
(Info node (gnulib)Libtool and Windows).

>> >   . -lperl520 and the corresponding -L switch need to be given to
>> >     provide the import library for building the shared library, with
>> >     symbols that tell the linker how to find functions defined by Perl
>> >     itself that the XS extension calls; without that library I have
>> >     tons of undefined references
>>
>> Is there any way of detecting these flag automatically? For example,
>> on my system the configuration values for Perl are in a file
>> /usr/lib/perl5/Config_heavy.pl. If you have a file like that on your
>> system, you could look to see if "-lperl520" is given anywhere.
>
> Yes, I have such a file; and yes, libperl520.a is mentioned there.
> But I see no -lperl520.  Can you tell me how to get Config_heavy.pl to
> report some useful values?  Maybe it will spit out the -lperl520
> argument as well.

Follow what's done in configure.ac to get configuration values, using
the fetch_conf.pl script. I also found out that you can get
confguration values with commands like "perl -V:cc" ("perl -V" for an
overview).

If you can get an ExtUtils::MakeMaker makefile working, you could copy
what it does. That would be possible, but could be time-consuming. I
did that for some parts of the existing Makefile.am. I think that
/usr/share/perl5/ExtUtils/MM_Win32.pm and
/usr/share/perl5/ExtUtils/MM_Unix.pm could be the relevant files. It's
"perl Makefile.PL" to create the Makefile.



reply via email to

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