I'm assuming -iprefix + -iwithprefix would locate DIR to same place as
if specified by -idirafter, from below info gcc:
`-iwithprefix DIR'
`-iwithprefixbefore DIR'
Append DIR to the prefix specified previously with `-iprefix', and
add the resulting directory to the include search path.
`-iwithprefixbefore' puts it in the same place `-I' would;
`-iwithprefix' puts it where `-idirafter' would.
However, it didn't with gcc-4.1.2 (FC7):
(it was same with FC3, gcc-3.4.2)
$ cat test.c
/* this should be included by system directory's include/err.h */
#include <err.h>
$ cat ./include/err.h
#error "Choke me"
$ gcc -iprefix ./ -iwithprefix include/ -c test.c
In file included from test.c:2:
./include/err.h:1:2: error: #error "Choke me"
$ gcc -idirafter ./include/ -c test.c
$
With -idirafter -v, include search path was:
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc/i386-redhat-linux/4.1.2/include
/usr/include
./include/
End of search list.
Whereas -iwitprefix -v, include search path was:
#include "..." search starts here:
#include <...> search starts here:
./include/
/usr/local/include
/usr/lib/gcc/i386-redhat-linux/4.1.2/include
/usr/include
So, as opposed to the gcc info, -iwithprefix does not seem to put DIR
where -idirafter would.
--
Summary: -iwithprefix does not locate DIR where -idirafter would
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kaminaga at sm dot sony dot co dot jp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34502