[Open64-devel] Native building pro64 on Itanium machine.
Brought to you by:
ributzka,
suneeljain
|
From: Peng Z. <pen...@cs...> - 2001-11-17 05:07:03
|
I enclosed the process that I build pro64 on my machine. Please look at it and give me your feedback. Did you experience some different? And another thing is about SPEC2000 installation. Can you tell me which benchmark you cannot build gracefully or there is some glitches when the generated executables run? Thanks. =========================================================== Thanks to Jin Lin from UMN, Hongbo Yang from Udel and Alban Douillet from Udel, I built sgicc on a HP Itanium machine(Workstations i2000). ================================================================ System information: >cat /proc/version Linux version 2.4.7-2smp (bhc...@bo...) (gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-96)) #1 SMP Tue Aug 14 04:31:14 EDT 2001 >gcc -v Reading specs from /usr/lib/gcc-lib/ia64-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-96) >as -v GNU assembler version 2.10.91 (ia64-unknown-linux) using BFD version 2.10.91.0.2 !!! NOTE: The assembler with in Red Hat Linux 7.1 2.96-96(GNU assembler version 2.11.90.0.8 (ia64-redhat-linux) using BFD version 2.11.90.0.8) does __NOT__ work I download as.2.10.91.0.2 so that I can use sgicc properly. ================================================================ The files need to be modified: 1. Modification related with the definition of FLT_MAX osprey1.0/be/cg/cflow.cxx osprey1.0/be/cg/gra_mon/gra_lrange.cxx osprey1.0/be/cg/gra_mon/gra_split.cxx insert "#include <kpathsea/c-minmax.h>" 2. Modification related with the definition of DBL_MAX osprey1.0/be/lno/doacross.cxx osprey1.0/be/lno/parallel.cxx osprey1.0/be/lno/cross_snl.cxx insert "#include <kpathsea/c-minmax.h>" 3. osprey1.0/common/com/ir_bcom.h http://www.cs.ualberta.ca/~pengzhao/open64-devel/msg00088.html 4. osprey1.0/driver/lang_defs.c This file defines some MACRO that tells the sgicc to find the executable it needs (e.g. gfec, gcc, as etc) Frankly, I don't know the exact meaning for these MACRO. Can you tell me? +#define DEST_DIRECTORY "/usr/scratch/pengzhao/sgicc/" +#define NAMEPREFIX "" +#define BINPATH DEST_DIRECTORY "bin" +#define LIBPATH DEST_DIRECTORY "lib/gcc-lib/ia64-sgi-linux/sgicc-1.0" +#define ALTLIBPATH LIBPATH + #define PHASEPATH DEST_DIRECTORY "lib/gcc-lib/ia64-sgi-linux/sgicc-1.0" +#define GNUPHASEPATH PHASEPATH There are some problem with the directories after installation(e.g sgicc complains that some symbolic link to gcc,g++,as is bad). But when I make some manipulation on the directory or link, all are solved. 5. Handle "cannot find sys/elf.h" osprey1.0/fake_ld/common/linker.h change sys/elf.h to asm/elf.h 6. Add "-fpic" in the Makefiles for correctly generating ipa.so osprey1.0/ipa/inline/Makefile.gbase osprey1.0/ipa/local/Makefile.gbase osprey1.0/ipa/lw_inline/Makefile.gbase osprey1.0/ipa/main/Makefile.gbase At least osprey1.0/ipa/main/Makefile.gbase should be modified, I don't know is it necessary to modify the other three files. 7. Use shared.pl to modify the Makefiles so that we can utilize the Makefile.cross to natively build Pro64 (I get this from Jin Lin and make some modification) After making the sgicc etc, I use "make build -f Make.NUE.lib -e" to buildthe libraries. I also enclose a patch file, use it this way: >cp patch pro64 >cd pro64 >ls INSTALL* Make.cross* README.src* patch pro64.spec* osprey1.0/ Make.NUE.lib* README >cd osprey1.0 >patch -p1 < ../patch =========================================================== But there is some problem with that: It is a little weired that my hello-world program(with -fb_create in compilation) on the itanium box quit normally without any message dictated by the program. So it is very difficult to insert other printf statements. (In gdb, the messages dictated by printf can show. When I abandon profiling option, the messeage also appears). I contact Jin Lin and Alban, who also have itanium machine and let them run my executable. Jin Lin say it is ok on his machine, but Alban say it prints nothing. Any idea? I put the test.s, test.o and test at http://www.cs.ualberta.ca/~pengzhao/test.s http://www.cs.ualberta.ca/~pengzhao/test.o http://www.cs.ualberta.ca/~pengzhao/test BTW: I use following command line to compile the program: sgicc -fb_create ./test -o test test.c -L/usr/scratch/pengzhao/sgicc/lib/gcc-lib/ia64-sgi-linux/sgicc-1.0 -linstr -lstdc++ -v -g -keep Please give your comments or answer the questions. Thanks. Peng Zhao (pen...@cs...) |