X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Fvos.sh;h=1ba873104976cb5fc4cf51dce547d82c94a8402e;hb=8e4985cd06cac8609b7c84aab08fe2d8d20f9526;hp=52523be46ebc370a881210a0252cd8a896c6570e;hpb=36df99d62e5fb6553737ac83b8d35e75836213ae;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/vos.sh b/hints/vos.sh index 52523be..1ba8731 100644 --- a/hints/vos.sh +++ b/hints/vos.sh @@ -14,7 +14,8 @@ ccflags="-D_SVID_SOURCE -D_POSIX_C_SOURCE=199509L" # Make command. make="/system/gnu_library/bin/gmake" -_make="/system/gnu_library/bin/gmake" +# indented to not put it into config.sh + _make="/system/gnu_library/bin/gmake" # Architecture name archname="hppa1.1" @@ -37,10 +38,6 @@ 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" locincpth="$locincpth /system/include_library/sysv" usrinc="/system/include_library" @@ -71,3 +68,80 @@ pager="/system/gnu_library/bin/cat.pm" # VOS has a bug that causes _exit() to flush all files. # This confuses the tests. Make 'em happy here. fflushNULL=define + +# VOS has a link() function but it is a dummy. +d_link="undef" + +# VOS does not have truncate() but we supply one in vos.c +d_truncate="define" +archobjs="vos.o" + +# Help gmake find vos.c +test -h vos.c || ln -s vos/vos.c vos.c + +# VOS returns a constant 1 for st_nlink when stat'ing a +# directory. Therefore, we must set this variable to stop +# File::Find using the link count to determine whether there are +# subdirectories to be searched. +dont_use_nlink=define + +# Tell Configure where to find the hosts file. +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 --version | sed 's/.*(GCC) *//'` + 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 + +