gcc-3.0/gcc/aclocal.m4 AC_FUNC_MMAP_ANYWHERE braindamage

Alexandre Oliva aoliva@redhat.com
Fri Jul 27 02:18:00 GMT 2001

On Jul  3, 2001, David Gordon Hogan <dhog@plan9.bell-labs.com> wrote:

> In the definition of AC_FUNC_MMAP_ANYWHERE, in gcc-3.0/gcc/aclocal.m4,
> we see:

>    * ) if test -c /dev/zero
>        then ac_cv_func_mmap_dev_zero=yes
>        else ac_cv_func_mmap_dev_zero=no
>        fi ;;
>   esac])

> So if we're cross compiling, and the BUILD machine has /dev/zero,
> we assume that the TARGET machine has both mmap() and /dev/zero
> (and that they work together)!

This is indeed a problem (except for s/TARGET/HOST/).  Would you
please post a patch such that we assume no mmap_dev_zero support
instead of relying on /dev/zero, fixing the comment?  That chunk of
code is only used when we're cross compiling, so it doesn't make sense
to depend on properties of the build machine.

Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

More information about the Gcc-bugs mailing list