Patch to config.guess (2002-07-03) to detect 64bit HPUX compiler

ross.alexander@uk.neceur.com ross.alexander@uk.neceur.com
Fri Aug 23 02:40:00 GMT 2002


Ben,

I couldn't find the code you were referring to but here is a cut of that
patch.  It still requires
a C compiler but does not create temporary files.  It has not been tested
with aCC but has
been with gcc, cc and cc +DA2.0W.

*** config.guess.orig   Fri Aug 23 09:27:15 2002
--- config.guess  Fri Aug 23 10:33:51 2002
***************
*** 625,630 ****
--- 625,639 ----
                rm -f $dummy.c $dummy && rmdir $tmpdir
            fi ;;
      esac
+     if [ ${HP_ARCH} = "hppa2.0w" ];
+         then
+         CC_FOR_BUILD=${CC-cc}
+         if echo "__LP64__" | $CC_FOR_BUILD $CCOPTS -E - | grep -q
__LP64__; then
+           HP_ARCH="hppa2.0w"
+         else
+           HP_ARCH="hppa64"
+         fi
+     fi
      echo ${HP_ARCH}-hp-hpux${HPUX_REV}
      exit 0 ;;
      ia64:HP-UX:*:*)



(See attached file: config.guess.diff)


>>>>> "ross" == ross alexander <ross.alexander@uk.neceur.com> writes:

  ross> Config.guess will return hppa64-hp-hpux??.?? if $CC produces
  ross> 64bit output, ie 64bit gcc or CC +DA2.0W.

  ross> (See attached file: config.guess.diff)

I am really resisting patches that use the nasty inline shell fragment
`$set_cc_for_build'.  It is a constant source of frustrations.  I am
loathe to use it more -- is there any way you can use other system
facilities to discover the same information?

If you look at some of the Linux detection code, there are some nice
tricks there that employ pipelines through cpp, if that's what you
need.

Ben





-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.guess.diff
Type: application/octet-stream
Size: 505 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20020823/69cb47fd/attachment.obj>


More information about the Binutils mailing list