Re: Does kernel use system stdarg.h?

Russell King (rmk@arm.linux.org.uk)
Sat, 28 Sep 2002 18:26:43 +0100


On Sat, Sep 28, 2002 at 12:59:11PM +0200, Tomas Szepe wrote:
> > It certainly looks like it. gcc 3.0.3 appears to ignore
> > "-iwithprefix include", where as gcc 2.95.x, 2.96, 3.1 and 3.2 all
> > work as expected.
>
> No. Try building/installing gcc-3.2 with '--prefix=/usr/gcc-3.2'
> and '--prefix=/usr'. The former won't work with '-iwithprefix include',
> the latter will. GCC build bug?

Maybe.

I've just checked the GCC 3.2 info files, and it appears that the
definition of -iwithprefix has changed.

gcc 2.9[156] comes with this description:

`-iwithprefix DIR'
Add a directory to the second include path. The directory's name
is made by concatenating PREFIX and DIR, where PREFIX was
specified previously with `-iprefix'. If you have not specified a
prefix yet, the directory containing the installed passes of the
compiler is used as the default.

whereas gcc 3.2 comes with:

`-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.

Use of these options is discouraged.

This seems to leave us with no official guaranteed way to get at the
compiler specific includes, which is Bad News(tm). We obviously can't
use "-I/usr/lib/gcc-lib/`gcc -dumpmachine`/`gcc -dumpversion`/" and
we've already had problems with the 2.4 "gcc -print-search-dirs"
version.

This leaves us with one option:

gcc -print-file-name=include

This works, but its also not official:

`-print-file-name=LIBRARY'
Print the full absolute name of the library file LIBRARY that
would be used when linking--and don't do anything else. With this
option, GCC does not compile or link anything; it just prints the
file name.

Maybe we need to go back to the gcc folk and get -iwithprefix
reinstated...

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html
	  "I know toolchain people.  They _love_ to change things."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/