From owner-freebsd-current@FreeBSD.ORG Fri Apr 27 10:58:08 2012 Return-Path: Delivered-To: current@freebsd.org Received: from lo0.su (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by hub.freebsd.org (Postfix) with ESMTP id 321D2106564A; Fri, 27 Apr 2012 10:58:07 +0000 (UTC) (envelope-from ru@freebsd.org) Date: Fri, 27 Apr 2012 14:58:06 +0400 From: Ruslan Ermilov To: Konstantin Belousov Message-ID: <20120427105806.GB4477@lo0.su> References: <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <20120426134140.GF14350@lo0.su> <20120427085859.GY2358@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120427085859.GY2358@deviant.kiev.zoral.com.ua> Cc: toolchain@freebsd.org, current@freebsd.org Subject: Re: [RFC] Un-staticise the toolchain X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 10:58:08 -0000 On Fri, Apr 27, 2012 at 11:58:59AM +0300, Konstantin Belousov wrote: > On Thu, Apr 26, 2012 at 05:41:40PM +0400, Ruslan Ermilov wrote: > > On Thu, Apr 26, 2012 at 12:35:48PM +0300, Konstantin Belousov wrote: [...] > > > Patch below makes the dynamically linked toolchain a default, adding an > > > WITHOUT_SHARED_TOOLCHAIN build-time option for real conservators. > > > > > > I did not looked in details why including bsd.own.mk makes NO_MAN > > > non-functional. Please see the diffs for gnu/usr.bin/cc1*/Makefile. > > > > Because you include bsd.own.mk before NO_MAN is defined, and the way > > how .if works in make(1). > > What is the 'right' thing to do then ? > > Postpone the inclusion of bsd.own.mk after NO_MAN definition ? This makes > the .if $MK_SHARED_TOOLCHAIN to not work. > > Or, continue to do what I have done, using 'MAN=' instead ? Two ways, both are demonstrated by gnu/lib/libgcov/Makefile: - Define NO_* before including bsd.own.mk so it sets the corresponding MK_* variable appropriately, and before testing the MK_*. - Remove NO_*, include bsd.own.mk, then set MK_MAN=no. (The nearby gnu/lib/libssp/Makefile has a similar problem with NO_PROFILE.) > N.B. I will commit the change, with defaults kept to build toolchain static, > just to avoid bikeshed. I think this is the right approach. Regarding your patch... By placing SHARED_TOOLCHAIN to __DEFAULT_NO_OPTIONS list in bsd.own.mk, you already had MK_SHARED_TOOLCHAIN set to "no" by default, which preserves the current status quo of building toolchain static. But you misspelled tools/build/options/WITH_STATIC_TOOLCHAIN, probably as the result of iteratively modifying your change. The option and this file should be named WITH_SHARED_TOOLCHAIN, the opposite of the default. Anyway, checking that the resulting src.conf(5) manpage sounds sensible is a good idea. As for the contents of this file, I wouldn't call "ar/ranlib" a "librarian" but rather a "library archives manager", as per POSIX. Your diff also suggests that it misses a newline at EOF.