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]

-m64 problem on Sun Ultra Enterprise 3000, Solaris 7, gcc 2.95.2



I am trying to build a complier for 64-bit programs for a
Sun Ultra Enterprise 3000 running Solaris 7 (SunOS 2.7),
booted in 64-bit mode. ("isainfo -v" reports "64-bit sparcv9
applications" are enabled)

I downloaded the source for GCC 2.95.2 from gcc.org, and 
a precompiled sparc-sun-solaris2.7 version of gcc 2.8.1 from Sun.
I built the 2.95.2 compiler using the configuration command
	.../configure --prefix=../local --enable-shared --enable-languages=c
The compiler built without apparant problems.
When I compile "hello.c" (the obvious thing) with no options or with
-m32, it produces the expected output. 

However, -m64 option causes
	cc1: -m64 is not supported by this configuration
	cc1: -mptr32 not allowed on -m64
and internal errors; the complete --save-temps output is appended
below.

I guessed that 'configure' is not identifying the system as 
64-bit.  When I attempt to force the build as a cross-compile using
	.../configure ... --target=sparcv9-sun-solaris2.7
I have quite a set of problems with config.h files 
(incomplete #include statements), uncreated directories, and 
finally he can't find 'ld'.

When I add --host=sparcv9-sun-solaris2.7, "make cccp" fails with 
	gcc  -DIN_GCC -DHAIFA  -DSVR4  -g  -DHAVE_CONFIG_H  -o cccp 
		cccp.o cexp.o intl.o prefix.o version.o  mbchar.o  
		obstack.o alloca.o       ../libiberty/libiberty.a
	ld: fatal: file cccp.o: wrong machine class
	ld: fatal: File processing errors. No output written to cccp
(BTW, this option is not documented on the gcc/configure web page)


Well!  ....Where do I go from here?
Thanks for any help.

	-Marshall



> /archive/gcc-64/obj64b/local/bin/gcc -m64 -v --save-temps hello.c
Reading specs from /archive/gcc-64/obj64b/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs
gcc version 2.95.2 19991024 (release)
 /archive/gcc-64/obj64b/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__arch64__ -Acpu(sparc64) -Amachine(sparc64) hello.c hello.i
GNU CPP version 2.95.2 19991024 (release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /archive/gcc-64/obj64b/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/../../../../sparc-sun-solaris2.7/include
 /archive/gcc-64/obj64b/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /archive/gcc-64/obj64b/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/../../../../include/g++-3
End of omitted list.
 /archive/gcc-64/obj64b/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/cc1 hello.i -quiet -dumpbase hello.c -m64 -version -o hello.s
cc1: -m64 is not supported by this configuration
cc1: -mptr32 not allowed on -m64
GNU C version 2.95.2 19991024 (release) (sparc-sun-solaris2.7) compiled by GNU C version 2.95.2 19991024 (release).
hello.c: In function `main':
hello.c:6: internal error--unrecognizable insn:
(insn 8 6 10 (set (reg:DI 8 %o0)
        (symbol_ref:DI ("*.LLC0"))) -1 (nil)
    (nil))
> 



  

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