Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Apr 2012 14:58:06 +0400
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        toolchain@freebsd.org, current@freebsd.org
Subject:   Re: [RFC] Un-staticise the toolchain
Message-ID:  <20120427105806.GB4477@lo0.su>
In-Reply-To: <20120427085859.GY2358@deviant.kiev.zoral.com.ua>
References:  <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <20120426134140.GF14350@lo0.su> <20120427085859.GY2358@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120427105806.GB4477>