From owner-freebsd-arch@FreeBSD.ORG Wed Nov 5 11:38:44 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65319BBD for ; Wed, 5 Nov 2014 11:38:44 +0000 (UTC) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1627ADB for ; Wed, 5 Nov 2014 11:38:43 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id hi2so1739278wib.1 for ; Wed, 05 Nov 2014 03:38:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=PF3SbsJYYKaljvGybQaWcAzcgYpunjMYFNh1/Caqsew=; b=Nl+BJiqoeVID1VnS8S93dUKvSEilWfWpwcuWgm3zO+rbDXIYKfy7DP5f4shldGtioi HJBELcxNIS+WrlSU3GJr/fVy7kbEz3xNI0xBx6P6o++GFHvdU1IxWoHdgvwsU2rQbLoM 4KjZ5ciaHQ6C9LzrQ5v/mMeQ5ZHJjHAMBnv3QfGmvD2aZjX3ObXLYCn1frRFLD+DQ3O8 AqT5fQqwz9kpWZmyokl3W6U1UGIK217kcWU0DdsWGBw8Ds5YyDNKuVvizhauTcdh/C5C 83fp8dz8Fjg/Y5kfSxlVcFZTi+CwQmMTPopMA8Im7ZuvaOLcJ4y63iBqcNjQ27KPMd7k v3FA== X-Received: by 10.194.76.101 with SMTP id j5mr52444594wjw.57.1415187522304; Wed, 05 Nov 2014 03:38:42 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id l4sm3790221wjx.14.2014.11.05.03.38.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Nov 2014 03:38:41 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 5 Nov 2014 12:38:39 +0100 From: Baptiste Daroussin To: arch@FreeBSD.org Subject: Overlinking in base Message-ID: <20141105113839.GG10388@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OFj+1YLvsEfSXdCH" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2014 11:38:44 -0000 --OFj+1YLvsEfSXdCH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, We do overlink a lot in the base system. I wrote a script to check overlinking on the final binaries and running it on /usr/bin files I got the following results: https://wiki.freebsd.org/Overlinking Most of the overlink are due to LDADD having all the recursive libraries which for dynamic linking we do not need. We might need them for static linking, but I think we should fix those. I think anyway a binary Makefile should only declare its direct dependencies and not the dependencies of its dependencies. I was already proposing in the past to import pkgconf in base to solve this as the library will declare its dependencies in case of dynamic linking and/or in case of static linking (which can be different) This can also be done in pure make(1) regards, Bapt --OFj+1YLvsEfSXdCH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlRaDD8ACgkQ8kTtMUmk6EysJQCfRQIgRa5leygkPsUqDWiR6uLt W/0AnjXevvLQikLsZsxebRIpmxdtycki =lZWp -----END PGP SIGNATURE----- --OFj+1YLvsEfSXdCH--