From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SLyXV-00073F-JE for garchives@archives.gentoo.org; Sun, 22 Apr 2012 15:17:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C50F0E0941; Sun, 22 Apr 2012 15:17:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C061EE083D for ; Sun, 22 Apr 2012 15:16:22 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id BEA821B4009; Sun, 22 Apr 2012 15:16:21 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] .LIBPATTERNS harmful? Date: Sun, 22 Apr 2012 11:17:38 -0400 User-Agent: KMail/1.13.7 (Linux/3.4.0-rc1; KDE/4.6.5; x86_64; ; ) Cc: Steven J Long References: In-Reply-To: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart22271731.ScZIq9a4HR"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201204221117.39554.vapier@gentoo.org> X-Archives-Salt: 34f0a064-5122-49b9-93d4-4028b724e62b X-Archives-Hash: e81539c52ae8318b7d42c99e1bb17ec3 --nextPart22271731.ScZIq9a4HR Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Sunday 22 April 2012 00:44:11 Steven J Long wrote: > I can find nothing overriding it in portage, which makes sense, since in > general one cannot know if the package in question uses gmake .LIBPATTERNS > to link to locally-built libs. However I can't help thinking of it as > harmful for a package manager, since a command like ld would be given a > parameter of say, /usr/lib/libfoo.so, not -lfoo, meaning LDFLAGS would be > irrelevant for its lookup. =2ELIBPATTERNS only matters if you specify the -lfoo in the dependency, and= then=20 link in via an automatic make variable. e.g. this: $ cat Makefile all: test test: -lm $ echo 'main(){}' > test.c $ make cc test.c /usr/lib/libm.so -o test so the easy answer is: don't add -lfoo flags as dependencies to make target= s. =20 if you want to have something link in a library, do: $ cat Makefile all: test test: LDLIBS +=3D -lm $ make cc test.c -lm -o test > I'd hope upstream would accept them, since it makes cross-development > easier. (One definitely does not want make expanding -lname to a library = in > /lib or /usr/lib in that case, and it's better to error out if the library > can't be found than link to host libs.) i've seen this usage in only one or two packages before. and when i notifi= ed=20 the respective upstream, they weren't really doing it on purpose, so a simp= le=20 patch (like i showed above) they were fine with merging. =2Dmike --nextPart22271731.ScZIq9a4HR Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJPlCETAAoJEEFjO5/oN/WBZHMQANqBAavCWnak3pdn1MzFzGJh oSEqMfh0Bl0BlWBFB/1H4aLjudgTSToyVJRS+IYNvs8klZtue98dUheraDUX2qsI PwZSex4vBnp7RstBfER3Jq5PR61vNq8RN4hcrwvea3cNlQhr/0LgFYu0/zZ4PoYv 1jRDPYAiYVn05dhajWxhXwCpvY10P37ODNBEfYRm/UJ6GSjcN1NMYfKYPLbzf2iR LGWsXsPEVw7ncUJQ/mZqv4Rbn/KEvHs3jskpy/Sflr7HRrI9NiCqVgg4XAO+VLZ6 nz/unNyQVSB4UOOaTudTyqD4PeGJnv1Sel+i1dr8cPNMAUqzar6zmuvVjCzn6fAP 4QPWR/t8dwAkf55r6agL5qXbuox6q+WXAeVMiPqAx+NnXyj3xq6MAFvFa1mRn83U ok0hX3ZvHQFvcwH7/k4tjIy4KFbeEupnqVpKVQ065cmbSmAhcTU154b/+Ol1T0e4 GSJVIfwkWxC8qVVa/Ncxy7x5G98elgcly4wVAl41b3Lxm20QduzMo47OqbxzJF/q M1jXK5Im/6ZuN0Q9maiHg+wbLN7HJscQXsnikp3LmaCc8cUjqxDZGXpBqdVYkv5/ 0SrPuEPJahDcn6F2bDSiZHWw83HWRxQu/EuLeY+Yf7BKeb2gPhHDXLZkRzoclpJH 4T5tZ5QygR5ky69I5HHQ =6TFm -----END PGP SIGNATURE----- --nextPart22271731.ScZIq9a4HR--