svn commit: r397026 - head/Mk/Uses
Baptiste Daroussin
bapt at FreeBSD.org
Tue Sep 15 22:22:21 UTC 2015
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
>
> Log:
> - Use -isystem instead of -I to add ${LOCALBASE}/include to the list of header search paths
>
> 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).
>
> 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.
>
> 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 appart)
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 that
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 installed)
and in sources (newer version) the older version will be used which can result
in a lot of different breakage (either silent wrong macros definitions) or
noisy: building errors and other kind of crap.
Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-head/attachments/20150916/b1020522/attachment.bin>
More information about the svn-ports-head
mailing list