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, 29 Feb 2016 12:00:52 -0600 Message-ID: <56D48754.3060102@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> <56CB5E2A.80101@cardoe.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8771428769043681984==" Return-path: In-Reply-To: <56CB5E2A.80101@cardoe.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" 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) --===============8771428769043681984== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="I1VWJ0sIMAibA62jevQE605DULJOHdstL" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --I1VWJ0sIMAibA62jevQE605DULJOHdstL Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 Pytho= n 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. >> >=20 > You need to put your libraries after the sources. e.g. >=20 > gcc -W -march=3Dnative -Llibs -o program program.c -lm -lcustom >=20 > Not before. That's why there's a difference between LIBS and LDFLAGS. > The proper order is: >=20 > COMPILER CFLAGS LDFLAGS SOURCES LIBS >=20 > 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. >=20 > I can link you to the Gentoo docs on this: > https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Failur= e_in_..2Fconfigure >=20 >=20 Does this answer your question? --=20 Doug Goldstein --I1VWJ0sIMAibA62jevQE605DULJOHdstL 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 iQJ8BAEBCgBmBQJW1IdWXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNTM5MEQ2RTNFMTkyNzlCNzVDMzIwOTVB MkJDMDNEQzg3RUQxQkQ0AAoJEKK8A9yH7RvUfQIP/2a1HAa+BkcYBNTu3TbdZBsW cZw7weQW1XmFM1wHY/EQxITG2ymY7YUuh15wQX/rNn+PxRst/Xb2hNoRW20JrDZE Nj9ewomyEd/a7Y2/iJRjzZ1eqfj7DPbpEWVej+yoqcZC3n2O6Qo5CeiSckA5fZgS gx64hNBnOrcoX1x5vNV8M9Yq6ze7pGKh+qHzkbBjitgQqF/0aZKBbXyZEWgNumWT p2ZfqaVtfn3gUafrwc8HVah389T0h3mdZl29xmDqzC4fGPHNmi2hQYuzFPsj0NWH B0Zt9bizNoxuT1taCWNySgDy7ZDzFY18SVhqNDTe4Tp7cUkALzCG1e0h9aJud6Xg 5ClDPBqxX5iftifUt1YugUcpMFylwZogqgOXxcA/fUhrcLEphg5IhOwyYMhQGfFx p+Js6AP6hXwH5csMt7gJw5uPwtDdl6vnOePvKf50MDK3XUCO2YEdotbcz97ahPrV 4J3eHmbpBFbFLCCTmQJ09UlREuMzX52eKJsd/JDHIWgmiI2PVZsZfAi98+4DYMqg qKGGFkaTyWs0mpspQJGQhUYE5gcLzHn0rT+fIPDGP8iN2XGYbd6JhnJ87SpXYudf Vfb5Slky8tN+TrFHULw5lNCLlFtwl2XPGYXay3yd37cGW/BXJXYR08JFXcgJRts5 6flCQTHocsYrzDH9hPvI =wq0h -----END PGP SIGNATURE----- --I1VWJ0sIMAibA62jevQE605DULJOHdstL-- --===============8771428769043681984== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============8771428769043681984==--