From: H.Merijn Brand Date: Thu, 16 May 2002 14:22:21 +0000 (+0200) Subject: [ PATCH ] AIX 4.3 / gcc / threads X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=86c089c690ac36d1514bed39655e7fe276a62ef9;p=p5sagit%2Fp5-mst-13.2.git [ PATCH ] AIX 4.3 / gcc / threads From: "H.Merijn Brand" Message-Id: <20020516141856.6661.H.M.BRAND@hccnet.nl> p4raw-id: //depot/perl@16625 --- diff --git a/hints/aix.sh b/hints/aix.sh index ef3ff07..da7a456 100644 --- a/hints/aix.sh +++ b/hints/aix.sh @@ -141,7 +141,12 @@ cc_type=xlc case "$cc" in *gcc*) cc_type=gcc - ccdlflags='-Xlinker' ;; + ccdlflags='-Xlinker' + if [ "X$gccversion" = "X" ]; then + # Done too late in Configure if hinted + gccversion=`$cc --version | sed 's/.*(GCC) *//` + fi + ;; *) ccversion=`lslpp -L | grep 'C for AIX Compiler$' | awk '{print $2}'` case "$ccversion" in '') ccversion=`lslpp -L | grep 'IBM C and C++ Compilers LUM$' | awk '{print $2}'` @@ -245,7 +250,20 @@ case "$usethreads" in $define|true|[yY]*) ccflags="$ccflags -DNEED_PTHREAD_INIT" case "$cc" in - gcc) ;; + *gcc*) +echo "GCC $gccversion disabling some _r functions" >&4 + case "$gccversion" in + 3*) d_drand48_r='undef' + d_endgrent_r='undef' + d_endpwent_r='undef' + d_getgrent_r='undef' + d_getpwent_r='undef' + d_random_r='undef' + d_srand48_r='undef' + d_strerror_r='undef' + ;; + esac + ;; cc_r) ;; cc|xl[cC]_r) echo >&4 "Switching cc to cc_r because of POSIX threads." @@ -254,9 +272,9 @@ $define|true|[yY]*) # --jhi@iki.fi cc=cc_r - case "`oslevel`" in - 4.2.1.*) i_crypt='undef' ;; - esac + case "`oslevel`" in + 4.2.1.*) i_crypt='undef' ;; + esac ;; '') cc=cc_r