From owner-freebsd-arch@FreeBSD.ORG Thu Nov 6 00:25:08 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 E2188FF8; Thu, 6 Nov 2014 00:25:07 +0000 (UTC) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0131.outbound.protection.outlook.com [65.55.169.131]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3831FA2; Thu, 6 Nov 2014 00:25:06 +0000 (UTC) Received: from CO2PR05CA026.namprd05.prod.outlook.com (10.141.241.154) by DM2PR05MB447.namprd05.prod.outlook.com (10.141.104.150) with Microsoft SMTP Server (TLS) id 15.1.6.9; Thu, 6 Nov 2014 00:24:58 +0000 Received: from BL2FFO11FD023.protection.gbl (2a01:111:f400:7c09::121) by CO2PR05CA026.outlook.office365.com (2a01:111:e400:1429::26) with Microsoft SMTP Server (TLS) id 15.1.16.15 via Frontend Transport; Thu, 6 Nov 2014 00:24:57 +0000 Received: from P-EMF01-SAC.jnpr.net (66.129.239.15) by BL2FFO11FD023.mail.protection.outlook.com (10.173.161.102) with Microsoft SMTP Server (TLS) id 15.1.6.13 via Frontend Transport; Thu, 6 Nov 2014 00:24:57 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF01-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Wed, 5 Nov 2014 16:24:55 -0800 Received: from chaos.jnpr.net (chaos.jnpr.net [172.21.16.28]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id sA60OtR25330; Wed, 5 Nov 2014 16:24:55 -0800 (PST) (envelope-from sjg@juniper.net) Received: from chaos (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 03ABC580A3; Wed, 5 Nov 2014 16:24:55 -0800 (PST) To: Baptiste Daroussin Subject: Re: Overlinking in base In-Reply-To: <20141105134006.GL10388@ivaldir.etoilebsd.net> References: <20141105113839.GG10388@ivaldir.etoilebsd.net> <20141105125431.GD53947@kib.kiev.ua> <20141105125931.GJ10388@ivaldir.etoilebsd.net> <20141105133029.GH53947@kib.kiev.ua> <20141105134006.GL10388@ivaldir.etoilebsd.net> Comments: In-reply-to: Baptiste Daroussin message dated "Wed, 05 Nov 2014 14:40:07 +0100." From: "Simon J. Gerraty" X-Mailer: MH-E 8.0.3; nmh 1.3; GNU Emacs 22.3.1 Date: Wed, 5 Nov 2014 16:24:54 -0800 Message-ID: <3912.1415233494@chaos> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:66.129.239.15; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(51704005)(199003)(24454002)(189002)(93916002)(120916001)(106466001)(50986999)(92566001)(19580395003)(88136002)(95666004)(102836001)(57986006)(89996001)(50466002)(93886004)(104166001)(97736003)(84676001)(81156004)(47776003)(50226001)(99396003)(105596002)(21056001)(86362001)(107046002)(64706001)(87936001)(76176999)(44976005)(46102003)(76506005)(33716001)(92726001)(69596002)(4396001)(48376002)(20776003)(6806004)(110136001)(68736004)(77156002)(87286001)(19580405001)(62966003)(117636001)(31966008)(42262002)(62816006); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR05MB447; H:P-EMF01-SAC.jnpr.net; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR05MB447; X-Exchange-Antispam-Report-Test: UriScan:; X-Forefront-PRVS: 0387D64A71 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.15 as permitted sender) Authentication-Results: spf=softfail (sender IP is 66.129.239.15) smtp.mailfrom=sjg@juniper.net; X-OriginatorOrg: juniper.net Cc: Konstantin Belousov , arch@freebsd.org 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: Thu, 06 Nov 2014 00:25:08 -0000 Baptiste Daroussin wrote: > In the second case we could do it via make(1) > LIBADD= liba libc libc > this will open something like a ${PATHTOTHELIB}/link.mk which will define > DYNAMIC_ADD > STATIC_ADD > > And this could be recursive. We do something like that in the Junos build prog makefile might have DPLIBS+= ${LIBFOO} which is exactly equivalent to LDADD+= -lfoo DPADD+= ${LIBFOO} but ensures that they stay in sync (not so important now with meta mode). bsd.libnames.mk can then have DPLIBS_libfoo += ${LIBGOO} DPLIBS_libgoo += ${LIBZOO} All of which is processed by dpadd.mk which you can find in contrib/bmake/mk Though dpadd.mk ignores DPLIBS_libgoo += ${LIBZOO} if LIBZOO has already been added.