On 26/09/2012 13:28, Bernard Berthomieu wrote:
Same question, but symmetric, for solaris 11 (x86) 64bit: I could successfully build a 32 bit poly (default for gcc on that machine), but could not build a 64 bit version ...
I think you'll have to experiment there unless someone has an answer. I've not had much success with Solaris/X86 myself.
Well, I tried, along the same lines:
--build=x86_64-solaris and --build=amd64-solaris CFLAGS='-m64 -O3 -I../libffi/include' CXXFLAGS='-m64 -O3 -I../libffi/include' CCASFLAGS='-m64 -O3'
But I get an error when building: elfexport.cpp: In member function `virtual void ELFExport::exportStore()': elfexport.cpp:365: error: `R_X86_64_64' undeclared (first use this function)
Solaris 11 has sys/elf_386.h and sys/elf_amd64.h, the latter defining R_AMD64_64, but elf_amd64.h is not loaded to in elfexport.cpp ...
Looks like 64 bit solaris requires some tweaking of configure and changes to elfexport.cpp. I'll try to understand the issues later.
From the comment near the top of elfexport.cpp it seems that there is an explicit inclusion of sys/elf_386.h if it is present:
// Solaris seems to put processor-specific constants in separate files #ifdef HAVE_SYS_ELF_SPARC_H #include <sys/elf_SPARC.h> #endif #ifdef HAVE_SYS_ELF_386_H #include <sys/elf_386.h> #endif
Does it work if you add #include <sys/elf_amd64.h> just after that (without any ifdef)? If so it would be easy for me to fix.
David