On 23/02/07, Rafael Garcia-Suarez <rgarciasuarez@gmail.com> wrote: > > As NPTL is the default for modern Linux (2.6), this patch seems > > reasonable. > > Older Linux distributions could simply readd the -DTHREADS_HAVE_PIDS > > hint > > to their compile flags. > > What about testing the threading model in the hints file with > something like getconf GNU_LIBPTHREAD_VERSION ? Well, that's not > perfect either, since you can run perl with a different kernel than > the one you've compiled it with... I've now commited this after some testing. Change 30758 by rgs@stcosmo on 2007/03/26 10:09:21 On Linux, don't compile with -DTHREADS_HAVE_PIDS if the kernel uses the NPTL threading model Affected files ... ... //depot/perl/hints/linux.sh#64 edit Differences ... ==== //depot/perl/hints/linux.sh#64 (text) ==== @@ -308,9 +308,15 @@ # This script UU/usethreads.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use threads. cat > UU/usethreads.cbu <<'EOCBU' +if getconf GNU_LIBPTHREAD_VERSION | grep NPTL >/dev/null 2>/dev/null +then + threadshavepids="" +else + threadshavepids="-DTHREADS_HAVE_PIDS" +fi case "$usethreads" in $define|true|[yY]*) - ccflags="-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS $ccflags" + ccflags="-D_REENTRANT -D_GNU_SOURCE $threadshavepids $ccflags" if echo $libswanted | grep -v pthread >/dev/null then set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`Thread Previous