This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: trouble building gcc-3.2 --target=m68k-linux from scratch


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]