From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88046 invoked by alias); 31 May 2015 13:50:55 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 88036 invoked by uid 89); 31 May 2015 13:50:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Date: Sun, 31 May 2015 22:01:00 -0000 From: Mike Frysinger To: Andreas Schwab Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] memusagestat: use local glibc when linking [BZ #18465] Message-ID: <20150531135050.GJ4496@vapier> Mail-Followup-To: Andreas Schwab , libc-alpha@sourceware.org References: <1433013240-3040-1-git-send-email-vapier@gentoo.org> <87wpzpakcu.fsf@igel.home> <20150531045618.GE4496@vapier> <87y4k5ozk1.fsf@igel.home> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kr14OxHsRwZHHqxS" Content-Disposition: inline In-Reply-To: <87y4k5ozk1.fsf@igel.home> X-SW-Source: 2015-05/txt/msg00884.txt.bz2 --kr14OxHsRwZHHqxS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1342 On 31 May 2015 11:40, Andreas Schwab wrote: > Mike Frysinger writes: > > On 30 May 2015 22:20, Andreas Schwab wrote: > >> Mike Frysinger writes: > >> > The memusagestat is the only binary that has its own link line which > >> > causes it to be linked against the existing installed C library. It > >> > has been this way since it was originally committed in 1999, but I > >> > don't see any reason as to why. > >>=20 > >> Probably because $(objpfx)memusagestat.o is compiled specially. > > > > how so ? >=20 > # The configure.ac check for libgd and its headers did not use $SYSINCLUD= ES. > # The directory specified by --with-headers usually contains only the bas= ic > # kernel interface headers, not something like libgd. So the simplest th= ing > # is to presume that the standard system headers will be ok for this file. > $(objpfx)memusagestat.o: sysincludes =3D # nothing i'm not sure how that is relevant to the linking phase. if anything, the=20 snippets i posted suggest we should be linking against the local glibc and linking against the installed C is broken. after all, it's using headers from the local glibc, not the system. there's no guarantee that the two are compatible. it seemingly works because people rarely run a host C lib that isn't glibc while compiling glibc. -mike --kr14OxHsRwZHHqxS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVaxG6AAoJEEFjO5/oN/WBNocQANatkz5DJhod4/O9pxLceknN d2T0nN1vmNiHshNz7J6NwWEeqihqyxPNdgVQFlWBN9KO7uBaZbAZEEPtCV29Bqy1 Yss+UdK/oMBRHzCIU2kPmMjiS5ldbXVg224JJNCHy21YSGVvY/Fe4QALgVyQE4Nl EYokO6tWw7KBnW30rhN8b2tJGIRcLvkhyv6IN4uD5HFbi6grZuh3CR7YvY/7js4M /3t7pxqpktGMu7astABrhmtlGC3gqP+tCBjGQgVB5wkXdBLh7VYV+GGxYVTersGt oQ1hZbTHB2hFZbxUH2RBr44vZeZePtwUTzUwYSg5eHeXtxlll3KYC35H1hgUB7DC TtfQpyEz5DmnvOn+4zgWBUH/oLUvc/oEY5O/U9zwvXlhqGpuiRG3qk+CuKpj6Zah INbNv4/SjkpKNAX2ztuhqJT0HDMKJubrG2Jy9BZEkxOqGNrqDKZVgbYzYVpPsoaA 6lWiBVi65SFGdYv4hpx6uvJweuKThYb9hfy3yWwZj9JXQY25s8ucWU8m8vc4Qx6e Nr9GosrGwJK5KdSuOaPlyOosg9rvNkzYnQfc0iJECbQc1DUPA2sTT0Y3/tAwTPUI 1IgVtLiu6Z0lV8ReBr+EFhkyoIgKUFFRYyehZGE2r3CcJpH83lgT8I763xPQzu1+ ahowXRckFOsrhAd8F0vN =abEu -----END PGP SIGNATURE----- --kr14OxHsRwZHHqxS--