Subject: bin/11843: most uses of -idirafter in NetBSD sources are 'iffy'.
To: None <>
From: None <>
List: netbsd-bugs
Date: 12/29/2000 18:12:17
>Number:         11843
>Category:       bin
>Synopsis:       most uses of -idirafter in NetBSD sources are 'iffy'.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 29 18:12:00 PST 2000
>Originator:     Chris Demetriou
>Release:        NetBSD-current as of 2000-12-29
NetBSD sources as above (some slightly older), with a GCC from
development sources as of a month or two ago (but source
compiler source code eyeball-compared in a few relevant
places against the current source).
Most uses of -idirafter in the NetBSD sources are 'iffy'.

-idirafter is used to indicate the system include path, in
various places where DESTDIR builds are used.

-idirafter is inconsistently documented.  The manual page (never
canonical for gcc! 8-) says one thing, 'gcc -v -help' says
another, but the info files (the canonical gcc documentation)
simply says that '-idirafter' adds to the 'second' include path.

-isystem is used to add directories to the system include path.

It would appear that in the version of gcc that we supply, the second
include path is treated as a system include path, i.e. warnings
are suppressed if generated by those includes.  This does not
appear to be the case with the current GCC development sources, and
therefore warnings are produced and -Werror causes death.

DESTDIR compile NetBSD sources with current-ish GCC bits.
replace broken uses of -idirafter, and add mention of -isystem where
appropriate.  A quick grep of almost-current sources makes me think
that the uses in the following files (relative to src) need to have
-idirafter changed to -isystem:


and the following file to have -isystem added where -idirafter is supported: