Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2012 00:10:01 +0100
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Alexander Best <arundel@FreeBSD.org>, freebsd-toolchain@FreeBSD.org
Subject:   Re: setting CC/CXX/CPP unconditionally in src.conf
Message-ID:  <4F4ABBC9.6030104@zedat.fu-berlin.de>
In-Reply-To: <A579A4B9-EF69-49BF-B84C-BD601DD9E359@bsdimp.com>
References:  <20120226213703.GA33988@freebsd.org> <A579A4B9-EF69-49BF-B84C-BD601DD9E359@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig95B164B31D63C87111572961
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 02/26/12 23:38, Warner Losh wrote:
>=20
> On Feb 26, 2012, at 2:37 PM, Alexander Best wrote:
>=20
>> hi there,
>>
>> any chance support for setting CC/CXX/CPP unconditionally in src.conf =
could be
>> added before the release of freebsd 10.0? the way it is done atm is re=
ally not
>> intuitive. the rule should really be:
>>
>> - make.conf =3D applies globally
>> - src.conf  =3D applies only to /usr/src
>> ( maybe a ports.conf or port.conf could be introduced at some point, t=
oo)
>> ... the current situation, where only certain variables can be set in =
src.conf
>> is not ideal.
>=20
> What doesn't work?  Or rather, how does it work now?
>=20
> Warner
>=20

At the moment, as far as I realized myself and read herin the mailing
list, setting

CC
CXX
CPP

in /etc/src.conf for only kernel builds doesn't work. I tried. I tried
hard! One must set these variables in /etc/make.conf.

The manpage for src.conf(5) is not clear. I would expect that even
compiler settings need to go into src.conf - that is the way I handled
it the first time and failed.

/etc/make.conf contains a mix of systemwide variables also involving the
/usr/src tree AND the ports tree. Since FreeBSD make a big deal being
different in keeping the core system and its ports, I'd expect a also
clear cut: everything that involves the coresystem (/usr/src) is about
to go into /etc/src.conf, everything that has to do with conditions for
ports should go elsewere (/usr/local/etc/ports.conf would be nice).

At this moment I personally keep conditions for the CLANG environment in
/etc/make.conf - partially conditional and unconditional. For each port
I stumble into which is incapable being compiled with CLANG or need
special features like OpenMP which is CLANg incapable of, do have their
conditional lines like

=2Eif ${.CURDIR:M/usr/ports/graphics/ImageMagick*}
#USE_GCC=3D               4.6+
CC=3D                     cc
CXX=3D                    c++
CPP=3D                    cpp
=2Eendif

This mixing in /etc/make.conf is messy and confusing.

Even if /etc/src.conf is only for booleans as "WITH_XXXX=3DYES" or
"WITHOUT_XXXX=3DYES", there should be a strict separation between the
source system and anything related to ports, even in case of costs of
having a kind of redundancy.

/etc/make.conf should define the base, even for /usr/src, etc/src.conf
should set conditions for /usr/src and another config, like the proposed
/etc/ports.conf or better /usr/local/etc/ports.conf should inherit
make.conf and override those variables if demanded by the user.

This is some kind of "wish" I'd like to see and that would make the OS
compiler configuration more logical.

Oliver


--------------enig95B164B31D63C87111572961
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iQEcBAEBAgAGBQJPSrvPAAoJEOgBcD7A/5N8UgIH/3lSA0GLfTlw1mOrgOkeQ6I8
/rIL5Ut4HIIz49JJvX5b52cgZ1bCG6A0GyP4/v4lti53Oty8d0ykMVvzSr350VZS
z0/tjwaylpsKe9eYddiyat/W3R3huxO5fiA07RleKdOg3eZnJOajO8LW9ACAoQfk
FJR7FwwTW0Fb57j+3Ua1Z8BV4/6HvZR4qMldJdWQY3GXvZGlwhVGAVnSJqWKiWr0
428QgQ97lMlINyrIET5mCNjijaRdt36l1QA3gYeOqVclLboBx3A1+DtCbRHtOVh/
M9ZeiY6dFrIBDJzm4w6nhLBcaN/kbcH595ra4zJ1mE16DNgf2NNGNFr5fXHBtoQ=
=RTVM
-----END PGP SIGNATURE-----

--------------enig95B164B31D63C87111572961--



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