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

Re: [Xen-devel] [PATCH v2 3/4] m4/python: fix checks for Python library support



On 2/22/16 1:14 PM, Doug Goldstein wrote:
> On 2/22/16 10:22 AM, Ian Jackson wrote:
>> Doug Goldstein writes ("[PATCH v2 3/4] m4/python: fix checks for Python 
>> library support"):
>>> AC_CHECK_LIB() was running gcc -Llib -lm -lutils conftest.c which on
>>> platforms that do as needed operations by default will result in
>>> underlinking. Instead AC_CHECK_LIB() suggests supplying the extra
>>> libraries necessary in a 5th argument.
>>
>> I'm afraid I don't quite follow why the code in the patch has the
>> effect you desire.  Why does setting LDFLAGS not work ?  Forgive me if
>> I'm being dense - I'm afraid I have a cold.
>>
>> Regards,
>> Ian.
>>
> 
> You need to put your libraries after the sources. e.g.
> 
> gcc -W -march=native -Llibs -o program program.c -lm -lcustom
> 
> Not before. That's why there's a difference between LIBS and LDFLAGS.
> The proper order is:
> 
> COMPILER CFLAGS LDFLAGS SOURCES LIBS
> 
> The reason is the compiler reduces the symbols to only the symbols used
> in each stage. By putting the libraries first the symbols are all
> reduced out and the result is a compiler failure.
> 
> I can link you to the Gentoo docs on this:
> https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Failure_in_..2Fconfigure
> 
> 

Does this answer your question?

-- 
Doug Goldstein

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.