public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: Patch to config.guess (2002-07-03) to detect 64bit HPUX compiler
@ 2002-08-21  5:09 ross.alexander
  2002-08-21  8:58 ` John David Anglin
  0 siblings, 1 reply; 9+ messages in thread
From: ross.alexander @ 2002-08-21  5:09 UTC (permalink / raw)
  To: Ben Elliston; +Cc: binutils, John David Anglin, Albert Chin, Jeff Law


Ben,

There is currently a philosophical problem with hppa*64* at the moment.
At the moment, HPUX has three possible versions for PA2.0 capable
systems, that is hppa2.0, hppa2.0n and hppa2.0w.  Now hppa2.0 == hppa2.0n
but hppa2.0w indicates the OS can *execute* 64bit code.  This has nothing
to do with the current build environment.  Now the 2.0N vs 2.0W comes from
both the .level in PA assembly and more importantly the architecture flags
in cc (ie CC +DA2.0N vs CC +DA2.0W).  However, to go back and stay hppa2.0w
== 64 build
environment rather than hppa2.0w == 64 capable OS may potentially break a
very large amount of code, and it would have to cleared though the gcc and
binutils groups.

How about the following (example)

cpu_host=`if echo "__LP64__" | $CC -E - | grep -q __LP64__; then echo
hppa2.0n; else echo hppa2.0w; fi`



---------------------------------------------------------------------------------

Ross Alexander                           "He knows no more about his
MIS - NEC Europe Limited            destiny than a tea leaf knows
Work ph: +44 20 8752 3394         the history of East India Company"


                                                                                                                              
                      Ben Elliston                                                                                            
                      <bje@redhat.com>         To:       ross.alexander@uk.neceur.com                                         
                                               cc:                                                                            
                      20/08/2002 22:04         Subject:  Re: Patch to config.guess (2002-07-03) to detect 64bit HPUX compiler 
                                                                                                                              
                                                                                                                              




>>>>> "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





^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: Patch to config.guess (2002-07-03) to detect 64bit HPUX compiler
@ 2002-08-23  2:40 ross.alexander
  2002-08-23 14:29 ` John David Anglin
  0 siblings, 1 reply; 9+ messages in thread
From: ross.alexander @ 2002-08-23  2:40 UTC (permalink / raw)
  To: Ben Elliston; +Cc: binutils, John David Anglin, Albert Chin, Jeff Law

[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]

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 #2: config.guess.diff --]
[-- Type: application/octet-stream, Size: 505 bytes --]

*** 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:*:*)

^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <no.id>]

end of thread, other threads:[~2002-12-04  9:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-21  5:09 Patch to config.guess (2002-07-03) to detect 64bit HPUX compiler ross.alexander
2002-08-21  8:58 ` John David Anglin
2002-08-23  2:40 ross.alexander
2002-08-23 14:29 ` John David Anglin
2002-11-29 22:05   ` Ben Elliston
2002-12-03  7:50     ` John David Anglin
     [not found] <no.id>
2002-12-03  8:31 ` John David Anglin
2002-12-03 16:51   ` John David Anglin
2002-12-04  1:53     ` Ben Elliston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).