X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Fvos.sh;h=3401c83e39d3db8d7512fc2d919ca49de77c10cf;hb=a4cc96117b620fea7c0739c9e20f017a5fdeeb52;hp=f9b9a8898679b18424dde81971a77c3194106fb9;hpb=48e3bbddf569369fe6921f305df6ab7290c91152;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/vos.sh b/hints/vos.sh index f9b9a88..3401c83 100644 --- a/hints/vos.sh +++ b/hints/vos.sh @@ -3,14 +3,14 @@ # This is a hints file for Stratus VOS, using the POSIX environment # in VOS 14.4.0 and higher. # -# VOS POSIX is based on POSIX.1-1996. It ships with gcc as the standard -# compiler. +# VOS POSIX is based on POSIX.1-1996 and contains elements of +# POSIX.1-2001. It ships with gcc as the standard compiler. # # Paul Green (Paul.Green@stratus.com) # C compiler and default options. cc=gcc -ccflags="-D_SVID_SOURCE -D_POSIX_C_SOURCE=199509L" +ccflags="-D_SVID_SOURCE -D_POSIX_C_SOURCE=200112L" # Make command. make="/system/gnu_library/bin/gmake" @@ -18,7 +18,11 @@ make="/system/gnu_library/bin/gmake" _make="/system/gnu_library/bin/gmake" # Architecture name -archname="hppa1.1" +if test `uname -m` = i786; then + archname="i786" +else + archname="hppa1.1" +fi # Executable suffix. # No, this is not a typo. The ".pm" really is the native @@ -37,11 +41,13 @@ loclibpth="$loclibpth /system/object_library" glibpth="$loclibpth" # Include library paths -locincpth="/system/stcp/include_library" -locincpth="$locincpth /system/stcp/include_library/arpa" -locincpth="$locincpth /system/stcp/include_library/net" -locincpth="$locincpth /system/stcp/include_library/netinet" -locincpth="$locincpth /system/stcp/include_library/protocols" +# Pick up vos/syslog.h on Continuum Platform. +if test "$archname" = "i786"; then + locincpth="" +else + locincpth=`pwd`/vos +fi +locincpth="$locincpth /system/stcp/include_library" locincpth="$locincpth /system/include_library/sysv" usrinc="/system/include_library" @@ -94,3 +100,60 @@ hostcat="cat /system/stcp/hosts" # VOS does not have socketpair() but we supply one in vos.c d_sockpair="define" + +# Once we have the compiler flags defined, Configure will +# execute the following call-back script. See hints/README.hints +# for details. +cat > UU/cc.cbu <<'EOCBU' +# This script UU/cc.cbu will get 'called-back' by Configure after it +# has prompted the user for the C compiler to use. + +# Compile and run the a test case to see if bug gnu_g++-220 is +# present. If so, lower the optimization level when compiling +# pp_pack.c. This works around a bug in unpack. + +echo " " +echo "Testing whether bug gnu_g++-220 is fixed in your compiler..." + +# Try compiling the test case. +if $cc -o t001 -O $ccflags $ldflags ../hints/t001.c; then + gccbug=`$run ./t001` + if [ "X$gccversion" = "X" ]; then + # Done too late in Configure if hinted + gccversion=`$cc -dumpversion` + fi + case "$gccbug" in + *fails*) cat >&4 <> config.sh ;; + *) echo "You specified pp_pack_cflags yourself, so we'll go with your value." >&4 ;; + esac + ;; + *) echo "Your compiler is ok." >&4 + ;; + esac +else + echo " " + echo "*** WHOA THERE!!! ***" >&4 + echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4 + case "$knowitall" in + '') + echo " You'd better start hunting for one and let me know about it." >&4 + exit 1 + ;; + esac +fi + +$rm -f t001$_o t001$_exe t001.kp +EOCBU + + +# VOS 14.7 has minimal support for dynamic linking. Too minimal for perl. +usedl="undef"