Date: Wed, 16 Sep 2015 00:22:16 +0200 From: Baptiste Daroussin <bapt@FreeBSD.org> To: Dmitry Marakasov <amdmi3@FreeBSD.org> Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r397026 - head/Mk/Uses Message-ID: <20150915222216.GA35129@ivaldir.etoilebsd.net> In-Reply-To: <201509152124.t8FLOgeN003164@repo.freebsd.org> References: <201509152124.t8FLOgeN003164@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 15, 2015 at 09:24:42PM +0000, Dmitry Marakasov wrote: > Author: amdmi3 > Date: Tue Sep 15 21:24:42 2015 > New Revision: 397026 > URL: https://svnweb.freebsd.org/changeset/ports/397026 >=20 > Log: > - Use -isystem instead of -I to add ${LOCALBASE}/include to the list of= header search paths > =20 > First, this prevents ports which use strict -Werror settings from > build failures in third party headers (real life example is > devel/pructl which uses -Werror -Weverything and fails in libedit > header on actually harmless padding warning). > =20 > Second, this prevents ports which install headers from picking up > their own headers from LOCALBASE instead of using ones from WRKDIR, > which leads to any kind of problems when upgrading via ports. > =20 > PR: 203101 > Approved by: bapt > Differential Revision: D3618 Just to give a bit more information. Both clang and gcc will lookup for includes (cross building case taken appa= rt) in that order: 1. -Isomthing 2. -isystem something 3. /usr/include (plus internal path) Meaning some ports were messed up by the fact we used to add -I${LOCALBASE}= in *FLAGS and their build system also providing -I. by having a lookup path th= at looks like the following: 1. -I${LOCALBASE}/include (first in the CFLAG) 2. -I. 3. -isystem 4. internal Meaning if a header is both in the localbase (older version already install= ed) and in sources (newer version) the older version will be used which can res= ult in a lot of different breakage (either silent wrong macros definitions) or noisy: building errors and other kind of crap. Best regards, Bapt --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlX4mhgACgkQ8kTtMUmk6EyzWQCeJ+ksuYOE2WGoSgXNEzTfcRth wksAn1fvvPawEBfaq11SmU0fRIGa6jxy =Zq4A -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150915222216.GA35129>