diff options
author | Andy Dougherty <doughera@lafayette.edu> | 2004-03-16 11:38:58 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-03-16 21:29:41 +0000 |
commit | 3bf55fe9d8000eec3ee2afa7455b435ffc747d7d (patch) | |
tree | 4a1d8d2c970c6a0dd11155c2997061b621d1dd50 /hints | |
parent | a606db64bb69d2ebf58c43b1329766e526d29c6c (diff) | |
download | perl-3bf55fe9d8000eec3ee2afa7455b435ffc747d7d.tar.gz |
Re: Perl and Parrot disagree about sched_yield on Solaris
Message-ID: <Pine.SOL.4.58.0403161635590.27628@maxwell.phys.lafayette.edu>
p4raw-id: //depot/perl@22512
Diffstat (limited to 'hints')
-rw-r--r-- | hints/solaris_2.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh index 7ffc53c6ef..c2a2edef0d 100644 --- a/hints/solaris_2.sh +++ b/hints/solaris_2.sh @@ -345,11 +345,25 @@ case "$usethreads" in $define|true|[yY]*) ccflags="-D_REENTRANT $ccflags" - sched_yield='yield' + # -lpthread overrides some lib C functions, so put it before c. set `echo X "$libswanted "| sed -e "s/ c / pthread c /"` shift libswanted="$*" + # sched_yield is available in the -lrt library. However, + # we can also pick up the equivalent yield() function in the + # normal C library. To avoid pulling in unnecessary + # libraries, we'll normally avoid sched_yield()/-lrt and + # just use yield(). However, we'll honor a command-line + # override : "-Dsched_yield=sched_yield". + # If we end up using sched_yield, we're going to need -lrt. + sched_yield=${sched_yield:-yield} + if test "$sched_yield" = "sched_yield"; then + set `echo X "$libswanted "| sed -e "s/ pthread / rt pthread /"` + shift + libswanted="$*" + fi + # On Solaris 2.6 x86 there is a bug with sigsetjmp() and siglongjmp() # when linked with the threads library, such that whatever positive # value you pass to siglongjmp(), sigsetjmp() returns 1. |