This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug bootstrap/39150] New: Configure scripts have no 64-Bit Solaris defined (only i386-solaris*).


I am building gcc 4.4.0 [trunk revision 144083] for OpenSolaris 2009.06 .


I have ./configured using:

../gcc_trunk/configure --enable-languages=ada,c,c++,fortran,java,objc,obj-c++
--enable-shared --disable-static --enable-multilib --enable-decimal-float
--with-long-double-128 --with-included-gettext --enable-stage1-checking
--enable-checking=release --with-tune=k8 --with-cpu=k8 --with-arch=k8
--with-gnu-as --with-as=/usr/local/bin/as --without-gnu-ld
--with-ld=/usr/bin/ld --with-gmp=/usr/local --with-mpfr=/usr/local

----------

When (some) other people build for a 64-Bit Operating System and they
submit Testsuite Results the results _sometimes_ have entries like these
in: http://gcc.gnu.org/ml/gcc-testresults/2009-02/msg01039.html

...
Native configuration is x86_64-unknown-linux-gnu

                === g++ tests ===

Running target unix/-m32

                === g++ Summary for unix/-m32 ===

# of expected passes            6810
# of expected failures          28
# of unsupported tests          10

Running target unix

                === g++ Summary for unix ===

# of expected passes            6763
# of expected failures          28
# of unsupported tests          20

                === g++ Summary ===

# of expected passes            38731
# of expected failures          282
# of unsupported tests          346
/export/gnu/import/svn/gcc-test/bld/gcc/testsuite/g++/../../g++  version 4.4.0
20090210 (experimental) [trunk revision 144083] (GCC) 
...

----------


When I built gcc and submitted my Testsuite Results I do NOT get
"multilib Tests", see:
http://gcc.gnu.org/ml/gcc-testresults/2009-02/msg01013.html


When I 'file' gcc (built, booted in 64-Bit Mode) using the "file" command I
see:

# file /usr/local/bin/gcc
/usr/local/bin/gcc:     ELF 32-bit LSB executable 80386 Version 1, dynamically
linked, not stripped

I see that as 'acceptable' but technically it is wrong. What is _great_
is that the executable will run in both 32 and 64 bit Boot Mode. So let
us _not_ fix that portion of this Bug.


The "Bug" in gcc 4.4.0 [trunk revision 144083] is that the "config.guess"
(and other related files, EG: config.host) only support the 'HTB' of
i386-pc-solaris2.* and do not support (without a little modification)
either the 'pseudo-name' (it is renamed) amd64-pc-solaris2.* _or_ 
the Target x86_64-pc-solaris2.* .


This issue starts in ../gcc_trunk/config.guess (near line 333):

...
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        eval $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
                SUN_ARCH="x86_64"
            fi
        fi


# I added this section, see:
http://defect.opensolaris.org/bz/show_bug.cgi?id=2820#c6

        case "`isainfo -k`" in
            amd64)
                SUN_ARCH="amd64";;
            *)
                SUN_ARCH="i386";;
        esac

        echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
...


Please notice that (according to the notes in the code) the supposed
purpose of that code is to determine if "it is configured for 64-bit 
objects". The code I added checks the Boot Mode (and assumes that the
compiler will work in the mode it is booted in). In doing so it alters
the Target from 'i386-pc-solaris2.11 to 'x86_64-pc-solaris2.11'.


A few fixes to files '../gcc_trunk/libjava/classpath/config.guess',
'../gcc_trunk/libgcc/config.host' and '../gcc_trunk/gcc/config.gcc'
and we are all set ...

I hope that once I have built gcc with a few small mods that I will
then be able to run the full "multilib Testsuite".


Mine (for now), Fixing, back with the diffs and Test Results,
Rob


-- 
           Summary: Configure scripts have no 64-Bit Solaris defined (only
                    i386-solaris*).
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rob1weld at aol dot com
 GCC build triplet: *-solaris2*
  GCC host triplet: *-solaris2*
GCC target triplet: *-solaris2*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39150


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