config-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

x86_64-solaris


From: Karl Berry
Subject: x86_64-solaris
Date: Tue, 17 Jul 2018 21:33:21 GMT

Hi Ben - I received a report that the current config.guess returns
i386-pc-solaris2.11 when it should be x86_64-pc-solaris2.11. See below
for details + possible patch. I don't know if it is possible to rely on
isainfo as the user suggests. But sure hope it can be fixed somehow.
--thanks, karl.

Date: Tue, 17 Jul 2018 17:00:22 +0300
From: Apostolos Syropoulos <address@hidden>
To: Karl Berry <address@hidden>
Subject: Re: [tlbuild] x86_64 or i386 on Solaris

karl> We run config.guess, which should do the right thing. [...]

No this is not working properly! It reports that  my system is

i386-pc-solaris2.11

while it should report that it is

œôòëx86_64-pc-solaris2.11

The problem is that by default the compiler generates 32bit binaries
regardless of the system. And since config.guess  uses the compiler
to deduce the system it guesses... bananas. œôòëThis is a little patch that
solves this problem:

--- config.guess.orig   2018-07-17 16:43:01.233335207 +0000
+++ config.guess        2018-07-17 16:57:29.951134157 +0000
@@ -394,16 +394,12 @@
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        set_cc_for_build
        SUN_ARCH=i386
-       # If there is a compiler, see if it is configured for 64-bit
objects.
-       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
-       # This test works for both compilers.
-       if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
-           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') |
\
-               (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-               grep IS_64BIT_ARCH >/dev/null
-           then
+       # We use the Solaris isainfo command to guess what kind of system
we have
+       # The command isainfo -b returns either 32 or 64 depending on the
kind of
+       # system we are on.
+       SUN_ISA=`isainfo -b`
+       if [ "$SUN_ISA" == "64" ]; then
                SUN_ARCH=x86_64
-           fi
        fi
        echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e
's/[^.]*//'`"
        exit ;;

A.S.


-- 
Apostolos Syropoulos
Xanthi, GREECE



reply via email to

[Prev in Thread] Current Thread [Next in Thread]