summaryrefslogtreecommitdiff
path: root/hints
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-03-26 10:09:21 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-03-26 10:09:21 +0000
commitbb47c2333c2ccd252abbfcb3092724fb025ec682 (patch)
tree1ee66cb4b5d3031aa0e1352ed979922d37c2cecd /hints
parent6057429f70b01566da284c30e14c36ffb550516b (diff)
downloadperl-bb47c2333c2ccd252abbfcb3092724fb025ec682.tar.gz
On Linux, don't compile with -DTHREADS_HAVE_PIDS if the
kernel uses the NPTL threading model p4raw-id: //depot/perl@30758
Diffstat (limited to 'hints')
-rw-r--r--hints/linux.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/hints/linux.sh b/hints/linux.sh
index bd6afd29f5..fea63e0671 100644
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -308,9 +308,15 @@ fi
# 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 /'`