2011/8/10 Romain GEISSLER <romain.geiss...@st.com>:
> Hi
>
> Thanks to the recent changes made to stage 2 and 3 (now built with g++), i
> noticed a little error in the configure script that tries the
> system getopt declaration. Indeed, if your system defines it in a system
> header file named "getopt.h" (for example /usr/include/getopt.h on a Red Hat
> 4 configuration), the configure script will incorrectly load
> /path/to/gcc/src/include/getopt.h instead, and thus find no getopt
> declaration.
>
> This can be solved by changing the appropriate -I${srcdir}/../include by
> -iquote ${srcdir}/../include. I added a configure check to verify that the
> compiler accepts the -iquote switch (and fallback to -I otherwise).
> Note that this only solve the getopt case, but -I is certainly often misused
> (instead of -iquote that would prevent error with system header having the
> same name than gcc header).
>
> The attached patch has been tested for regression with a native x86_64
> bootstrap.
>
> config/
>
> 2011-08-10  Romain Geissler  <romain.geiss...@gmail.com>
>
>        * acx.m4 (ACX_CHECK_CC_ACCEPTS_IQUOTE) : Define.
>
>
> gcc/
>
> 2011-08-10  Romain Geissler  <romain.geiss...@gmail.com>
>
>        * configure.ac (acx_cv_cc_accepts_iquote): Define through a call
>        to ACX_CHECK_CC_ACCEPTS_IQUOTE.
>        (CFLAGS for gcc_AC_CHECK_DECLS): Use $acx_cv_cc_accepts_iquote
>        instead of "-I".
>        * configure: Regenerate.
>
>
> Romain Geissler
>

Ping

Reply via email to