Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Mar 2015 12:13:35 +0100
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        Don Lewis <truckman@FreeBSD.org>, ports@FreeBSD.org
Subject:   Re: possible to adjust OPTIONS_DEFAULT based on COMPILER_TYPE?
Message-ID:  <CEE2B5394D9EF0AA17DEF6C7@ogg.in.absolight.net>
In-Reply-To: <201503102330.t2ANUZ5H086530@gw.catspoiler.org>
References:  <201503102330.t2ANUZ5H086530@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help
+--On 10 mars 2015 16:30:35 -0700 Don Lewis <truckman@FreeBSD.org> wrote:
| I've run into a situation where I'd like to change OPTIONS_DEFAULT based
| on the value of the value of COMPILER_TYPE.  I'm setting USE_GCC=yes. If
| the base compiler is gcc, then I can enable a particular option to make
| the port more featureful.  If the base compiler is clang, then some of
| the other ports the option depends on are C++ code that gets compiled
| with clang and the port breaks because of the libstdc++ vs. libc++
| conflict.  In that case, I'd like to disable the option to at least have
| working binary packages available, even though they aren't as
| featureful.
| 
| This doesn't look possible, though.  OPTIONS_DEFAULT needs to be set
| before the .include <bsd.port.options.mk>, and COMPILER_TYPE isn't set
| until after that, or possibly even after bsd.port.pre.mk.

Mmmm, yes, you're kinda stuck, I've already had a look, and it's not
possible to have options working including port.options and also be able to
change stuff after it.

Though, USE_GCC=yes will never use the old base gcc, but always lang/gcc
(well, the one defined in bsd.default-versions, which if left alone is
lang/gcc), USE_GCC=any will use gcc from base though, but I'm not sure you
can have a good reason to use it.

-- 
Mathieu Arnold



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