From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Goldstein Subject: Re: [PATCH v2 3/4] m4/python: fix checks for Python library support Date: Mon, 22 Feb 2016 13:14:50 -0600 Message-ID: <56CB5E2A.80101@cardoe.com> References: <1455850625-9624-1-git-send-email-cardoe@cardoe.com> <1455850625-9624-3-git-send-email-cardoe@cardoe.com> <22219.13751.865220.68830@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0908748989143806284==" Return-path: In-Reply-To: <22219.13751.865220.68830@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Stefano Stabellini , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============0908748989143806284== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EuDHePFCgsgtJVFKtvX8at7kL3pJRcSuh" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EuDHePFCgsgtJVFKtvX8at7kL3pJRcSuh Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > Regards, > Ian. >=20 You need to put your libraries after the sources. e.g. gcc -W -march=3Dnative -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 --=20 Doug Goldstein --EuDHePFCgsgtJVFKtvX8at7kL3pJRcSuh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0 iQJ8BAEBCgBmBQJWy14tXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNTM5MEQ2RTNFMTkyNzlCNzVDMzIwOTVB MkJDMDNEQzg3RUQxQkQ0AAoJEKK8A9yH7RvUyvwQAJPgHyFvq1vh/GmNqatFQAEv 0meHSB3ZNBe9/G5RFHlQqDaMpy8XuEI4jQnUp+aN37jyVbCe8zFNE35CV+ImbnbM +1UgN0OEjWZDTfgVcfJKswrUSJvRVxOUJ3Z0IILDl947+LUna5rkR/25JzDdQC5h EVGIg50m+eIDhF6PC5j8yKul/SZZNKwgotQcwbGc0ivV4+K8fmpcuXg9QOA/cdmW nJLAvr5Z/UlpRcJi9iEvI4ADfLAhw2Gj8D0DQ+k+yKNhK/MtQrz+NgA+fTFqbHuR 15uleN1Fj1pj7HReQ0ViIkLp0tIa1c/szWkTlju8BkikUUiR8YFpXO4/RwUfyxez mBUJgshgU8T3CrgNDPtTAHGxCEwWTtDY68mwjW/oeF0aDAvfDHmX2iOV/xkLVItW 5zXfhSfYLoUuyS58HsKW3QCsloQ8hRuYKigG+zMvk/F+JMCO/r3JXH90G/NQCRoU zQURiuNeQfix+4AtxHCSG/wdxod4xSaRvKltLNeXNT4o+OZwTOp+UUf84qFycaEO Pp6p49vdLg/Y5pW2VvGKAPr1KKMo6UaUbl/1QyJ5Br8z2rSlaMCdjfPOo+6MCdBW /fPc6ZXQpe0xA22s9Cq5HqlmzOxppxDVCARcLNO1thb7UAy7NQs4H1QLwHHKv6cr bPxcs/nQjdoJsWzgWUyd =NTXl -----END PGP SIGNATURE----- --EuDHePFCgsgtJVFKtvX8at7kL3pJRcSuh-- --===============0908748989143806284== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============0908748989143806284==--