Suggested patch to egcs-19981019/config.guess => autoconf-1.

rodneybrown@pmsc.com rodneybrown@pmsc.com
Thu Oct 22 06:02:00 GMT 1998


On HP-UX 9.04 and 10.20 HP /usr/lib/sched.models maps Model identifiers to HPPA
revision and Chipset. On our 10.20 box with the HP unbundled compiler installed
/opt/langtools/lib/sched.models
is a later version. The enclosed patch will grab the HP_ARCH based on the model
found in the
file, falling back to hppa-1.0 for unrecognized (non-68000) systems.
If this is available on HP-UX 11 and future release, config.guess shouldn't need
changing for new
HP models. This should also simplify changes when hppa-2.0 is supported by gcc.

--- config.guess.orig   Thu Oct 22 17:26:55 1998
+++ config.guess    Oct 22 18:37:54 1998
@@ -363,17 +363,30 @@
     *9??*:MPE/iX:*:*)
    echo hppa1.0-hp-mpeix
    exit 0 ;;
-    9000/[3478]??:HP-UX:*:*)
-   case "${UNAME_MACHINE}" in
-       9000/31? )            HP_ARCH=m68000 ;;
-       9000/[34]?? )         HP_ARCH=m68k ;;
-       9000/6?? )        HP_ARCH=hppa1.0 ;;
-       9000/78? )        HP_ARCH=hppa1.1 ;; # FIXME: really hppa2.0
-       9000/7?? )        HP_ARCH=hppa1.1 ;;
-       9000/8[67]1 | 9000/80[24] | 9000/8[78]9 | 9000/893 )
-                 HP_ARCH=hppa1.1 ;; # FIXME: really hppa2.0
-       9000/8?[13679] )      HP_ARCH=hppa1.1 ;;
-       9000/8?? )            HP_ARCH=hppa1.0 ;;
+    9000/*:HP-UX:*:*)
+   # As at HP-UX 9.04 and 10.20 (HPPA Machines), 
+   # HP maintain a file mapping model identifier to HPPA Revision
+   # and chipset in /usr/lib/sched.models and if the unbundled
+   # compiler is installed in /opt/langtools/lib/sched.models
+   HP_MODEL=`echo ${UNAME_MACHINE} | sed -e 's:^9000/::'`
+   if test -r /opt/langtools/lib/sched.models ; then
+       HP_MODEL_FILE=/opt/langtools/lib/sched.models
+   elif test -r /usr/lib/sched.models ; then
+       HP_MODEL_FILE=/usr/lib/sched.models
+   else
+       HP_MODEL_FILE=/dev/null
+   fi
+   HPPA_REV=`sed -ne "s/^${HP_MODEL}[  ][  ]*\\([^     ]*\\)[  ].*$/\\1/p"
$HP_MODEL_FILE`
+   case ${HPPA_REV} in
+       1\.0* ) HP_ARCH=hppa1.0 ;;
+       1\.1* ) HP_ARCH=hppa1.1 ;;
+       2\.* )  HP_ARCH=hppa1.1 ;;
+       * )
+       case "${HP_MODEL}" in
+           31? )            HP_ARCH=m68000 ;;
+           [34]?? )         HP_ARCH=m68k ;;
+           * )          HP_ARCH=hppa1.0 ;; # Fall-back position
+       esac ;;
    esac
    HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    echo ${HP_ARCH}-hp-hpux${HPUX_REV}

(And as an attachment in case CC-Mail has it's wicked way)
 




More information about the Gcc mailing list