From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35393 invoked by alias); 19 Sep 2017 16:04:03 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 35007 invoked by uid 89); 19 Sep 2017 16:04:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Director, chief, director, Chief X-HELO: zmcc-5-mx.zmailcloud.com Received: from zmcc-5-mx.zmailcloud.com (HELO zmcc-5-mx.zmailcloud.com) (52.201.171.122) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Sep 2017 16:04:01 +0000 Received: from zmcc-5-mta-1.zmailcloud.com (127.37.197.104.bc.googleusercontent.com [104.197.37.127]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by zmcc-5-mx.zmailcloud.com (Postfix) with ESMTPS id 8F197404C8; Tue, 19 Sep 2017 11:07:22 -0500 (CDT) Received: from zmcc-5-mta-1.zmailcloud.com (localhost [127.0.0.1]) by zmcc-5-mta-1.zmailcloud.com (Postfix) with ESMTPS id C0592C2761; Tue, 19 Sep 2017 11:03:59 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by zmcc-5-mta-1.zmailcloud.com (Postfix) with ESMTP id B2286C273A; Tue, 19 Sep 2017 11:03:59 -0500 (CDT) Received: from zmcc-5-mta-1.zmailcloud.com ([127.0.0.1]) by localhost (zmcc-5-mta-1.zmailcloud.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BJE3Ls2Q6HDt; Tue, 19 Sep 2017 11:03:59 -0500 (CDT) Received: from [192.168.1.204] (unknown [83.136.45.31]) by zmcc-5-mta-1.zmailcloud.com (Postfix) with ESMTPSA id 2DE56C26F7; Tue, 19 Sep 2017 11:03:59 -0500 (CDT) Subject: Re: dependency list for static libraries To: Simon Richter , binutils@sourceware.org References: <53b8973b-40a4-2550-3307-66d7f13707d5@symas.com> From: Howard Chu Message-ID: <45c82e04-8224-0ff7-1a36-01b14b088fb1@symas.com> Date: Tue, 19 Sep 2017 16:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0 SeaMonkey/2.53a1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00160.txt.bz2 Simon Richter wrote: > Hi, >=20 > On 19.09.2017 17:49, Howard Chu wrote: >=20 >> We often get link errors when switching from dynamic linking to static >> linking, because dynamic libraries list all of their own dependency >> libraries, and static libraries don't. (And the program being linked >> doesn't know about those indirect dependencies.) >=20 > That is what libtool's .la files do =E2=80=94 these have a list of extra > dependencies to be linked when linking statically. Libtool files are a poor solution and an additional admin overhead. Not eve= ry=20 project uses libtool. Indeed, we only use it when we're creating shared=20 libraries; for a project that only uses static archives nobody bothers with= =20 it. This functionality rightfully belongs in the linker itself. --=20 -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/