This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: Subject: Problems: 5.8.1, Solaris, Configure, sched_yield(), -lrt & -lposix4
authorAlan Burlison <Alan.Burlison@uk.sun.com>
Tue, 1 Jul 2003 00:03:24 +0000 (01:03 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 1 Jul 2003 05:04:50 +0000 (05:04 +0000)
Message-ID: <3F00C1BC.3020103@sun.com>

p4raw-id: //depot/perl@19897

Configure
Makefile.SH
config_h.SH
configure.com
hints/solaris_2.sh
perl.h
uconfig.h
uconfig.sh

index a15eeb7..c273354 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -565,7 +565,6 @@ d_msgrcv=''
 d_msgsnd=''
 d_msync=''
 d_munmap=''
-d_nanosleep=''
 d_nice=''
 d_nl_langinfo=''
 d_off64_t=''
@@ -1268,10 +1267,8 @@ archname=''
 usereentrant='undef'
 : List of libraries we want.
 : If anyone needs -lnet, put it in a hint file.
-libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl'
-libswanted="$libswanted dld ld sun m c cposix posix"
-libswanted="$libswanted ndir dir crypt sec"
-libswanted="$libswanted ucb bsd BSD PW x util rt posix4"
+libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun"
+libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
 : We probably want to search /usr/shlib before most other libraries.
 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
@@ -14239,10 +14236,6 @@ eval $inlibc
 set munmap d_munmap
 eval $inlibc
 
-: see if nanosleep exists
-set nanosleep d_nanosleep
-eval $inlibc
-
 : see if nice exists
 set nice d_nice
 eval $inlibc
@@ -20718,7 +20711,6 @@ d_msgsnd='$d_msgsnd'
 d_msync='$d_msync'
 d_munmap='$d_munmap'
 d_mymalloc='$d_mymalloc'
-d_nanosleep='$d_nanosleep'
 d_nice='$d_nice'
 d_nl_langinfo='$d_nl_langinfo'
 d_nv_preserves_uv='$d_nv_preserves_uv'
index 77d67b4..43ad32f 100644 (file)
@@ -494,7 +494,7 @@ $(LIBPERL): $& perl$(OBJ_EXT) $(obj) $(LIBPERLEXPORT)
        case "$useshrplib" in
        true)
                $spitshell >>Makefile <<'!NO!SUBS!'
-       $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj)
+       $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) $(libs)
 !NO!SUBS!
                case "$osname" in
                aix)
index ce00a53..d4c4319 100644 (file)
@@ -2662,12 +2662,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
  */
 #$d_msghdr_s HAS_STRUCT_MSGHDR /**/
 
-/* HAS_NANOSLEEP:
- *     This symbol, if defined, indicates that the nanosleep
- *     system call is available to sleep with 1E-9 sec accuracy.
- */
-#$d_nanosleep HAS_NANOSLEEP            /**/
-
 /* HAS_NL_LANGINFO:
  *     This symbol, if defined, indicates that the nl_langinfo routine is
  *     available to return local data.  You will also need <langinfo.h>
index 60fc9e8..54b6673 100644 (file)
@@ -5529,7 +5529,6 @@ $ WC "d_unlink_all_versions='undef'"
 $ WC "d_unordered='undef'"
 $ WC "d_usleep='" + d_usleep + "'"
 $ WC "d_usleepproto='" + d_usleep + "'"
-$ WC "d_nanosleep='undef'"
 $ WC "d_ustat='undef'"
 $ WC "d_vendorarch='undef'"
 $ WC "d_vendorlib='undef'"
index bc49dae..5d643de 100644 (file)
@@ -330,6 +330,21 @@ to the beginning of your PATH.
 END
        fi
 fi
+
+# Check to see if the selected compiler and linker
+# support the -z ignore, -z lazyload and -z combreloc flags.
+echo "int main() { return(0); } " > try.c
+       zflgs=''
+for zf in ignore lazyload combreloc; do
+       if ${cc:-cc} -o try try.c -z $zf > /dev/null 2>&1; then
+               zflgs="$zflgs -z $zf"
+       fi
+done
+if test -n "$zflgs"; then
+       ccdlflags="$ccdlflags $zflgs"
+       lddlflags="$lddlflags -G $zflgs"
+fi
+
 # as --version or ld --version might dump core.
 rm -f try try.c core
 EOCBU
@@ -341,12 +356,8 @@ case "$usethreads" in
 $define|true|[yY]*)
         ccflags="-D_REENTRANT $ccflags"
 
-        # sched_yield is in -lposix4 up to Solaris 2.6, in -lrt starting with Solaris 2.7
-       case `uname -r` in
-       5.[0-6] | 5.5.1) sched_yield_lib="posix4" ;;
-       *) sched_yield_lib="rt";
-       esac
-        set `echo X "$libswanted "| sed -e "s/ c / $sched_yield_lib pthread c /"`
+       sched_yield='yield'
+        set `echo X "$libswanted "| sed -e "s/ c / pthread c /"`
         shift
         libswanted="$*"
 
@@ -496,7 +507,7 @@ Cannot continue, aborting.
 EOM
                exit 1
            fi
-           case "$cc -v 2>/dev/null" in
+           case "${cc:-cc} -v 2>/dev/null" in
            *gcc*)
                echo 'int main() { return 0; }' > try.c
                case "`${cc:-cc} -mcpu=v9 -m64 -S try.c 2>&1 | grep 'm64 is not supported by this configuration'`" in
@@ -561,7 +572,7 @@ case "$uselongdouble" in
 #include <sunmath.h>
 int main() { (void) powl(2, 256); return(0); }
 EOM
-               if cc try.c -lsunmath -o try > /dev/null 2>&1 && ./try; then
+               if ${cc:-cc} try.c -lsunmath -o try > /dev/null 2>&1 && ./try; then
                        libswanted="$libswanted sunmath"
                fi
        else
diff --git a/perl.h b/perl.h
index 66e6a67..8e35168 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -4371,7 +4371,6 @@ extern void moncontrol(int);
 
    HAS_UALARM
    HAS_USLEEP
-   HAS_NANOSLEEP
 
    HAS_SETITIMER
    HAS_GETITIMER
index a937c71..5f912ee 100644 (file)
--- a/uconfig.h
+++ b/uconfig.h
  */
 /*#define HAS_STRUCT_MSGHDR    / **/
 
-/* HAS_NANOSLEEP:
- *     This symbol, if defined, indicates that the nanosleep
- *     system call is available to sleep with 1E-9 sec accuracy.
- */
-/*#define HAS_NANOSLEEP                / **/
-
 /* HAS_NL_LANGINFO:
  *     This symbol, if defined, indicates that the nl_langinfo routine is
  *     available to return local data.  You will also need <langinfo.h>
index f64ec02..93c4194 100755 (executable)
@@ -239,7 +239,6 @@ d_msgsnd='undef'
 d_msync='undef'
 d_munmap='undef'
 d_mymalloc='undef'
-d_nanosleep='undef'
 d_nice='undef'
 d_nl_langinfo='undef'
 d_nv_preserves_uv='undef'