This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: trouble building gcc-3.2 --target=m68k-linux from scratch
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Peter dot Barada at motorola dot com
- Date: Mon, 19 Aug 2002 17:32:42 -0500 (CDT)
- Subject: Re: trouble building gcc-3.2 --target=m68k-linux from scratch
- Organization: Networks and Infrastructure Lab (IL02/2240), Motorola Labs
In article <200208191724.g7JHOoS19048@hyper.wm.sps.mot.com> Peter Barada
writes:
> [...] gthr-posix.h:37:21: pthread.h: No such file or directory
> Configure created ghtr-default.h with '#include <pthread.h>' since it
> found a pthread.h that can be used, but that was by using the *host*
> compiler to find [phtread.h], not the *target* compiler. [...]
Hi Peter,
Oops. This is related to a recent change in the default compiler
configuration. I believe that all cross ports are actually latently
affected by the underlying issue you found.
The original test in configure.in:
AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
presumes that it is configuring for native bootstrap since it uses the
default autoconf expansion which itself knows nothing about the gcc
bootstrap process (and alternate system headers to use)...
Seems that the test would have to be written to set have_pthread_h
using a check based on the headers to be used by the installed
compiler (i.e. path provided with --with-headers). Perhaps (formed
via cut-n-paste of other constructs in configure.in):
if [test x$host != x$target]; then
if [test x$with_headers = x]; then
have_pthread_h=
else
# set have_pthread_h with a test based on value of with_headers
fi
else
AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
fi
Regards,
Loren