This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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





Attachment: config.guess.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]