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 <200208192246.g7JMkl909384@hyper.wm.sps.mot.com>,
Peter Barada <pbarada@mail.wm.sps.mot.com> writes:

>> 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):

> The config is done --without-headers, so the test for any target
> header should be written to fail since --without-headers is on the
> configure line. Of course I don't know if that will mess up anything
> else.

FYI, AFAIS there are really only two such target headers being checked
incorrectly: have_pthread_h and have_thread_h.  My proposed solution
should cover both although I only showed the change as it affects
have_pthread_h.  How about this instead:

if [test x$host != x$target]; then
	if [test x$with_headers = x]; then
		have_thread_h=
		have_pthread_h=
	else
		# set have_*thread_h with a test based on value of with_headers
	fi
else
	AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
	AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
fi

> Is there anyway to get this 'fixed' for gcc-3.2.1 so those of use
> doing cross-compilation don't get bit again(even if its just a
> documentation change)?

If an autoconf guru for gcc agrees with my analysis, then we could
submit a formal patch.  However, I still don't know what actual code
should go in the shell comment above without more investigation.

Regards,
Loren


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