Igor Schein on Fri, 16 Jul 1999 19:03:07 -0400 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
64bit executable under Solaris 2.7 |
Hi, last few days I've been building 64bit gp version 2.0.16 under Solaris 2.7, and I thought I'd share my findings. Using WorkShop 5.0 cc, I used configuration solaris-none, CC="cc -xarch=v9" and OPTFLAGS="-fast -xarch=v9" (you need -xarch=v9 twice, because otherwise Configure won't figure out to use 87654321 for type long). The following patch was needed because of a WorkShop bug (Sun BugID #4254959, Gerhard) --- src/basemath/trans3.c~ Tue Jun 29 08:12:58 1999 +++ src/basemath/trans3.c Fri Jul 16 18:34:38 1999 @@ -398,7 +398,8 @@ else { /* written by Manfred Radimersky */ l = lg(x); - n = 3 * bit_accuracy(l) / 4; + n = bit_accuracy(l); + n = 3 * n / 4; y = negr(x); if(gcmpgs(y, n) < 0) { p1 = p2 = p3 = y; This following cosmetic patch cleans up a lone warning: --- src/kernel/none/mp.c~ Tue Jun 29 08:11:22 1999 +++ src/kernel/none/mp.c Fri Jul 16 18:45:42 1999 @@ -900,8 +900,9 @@ z = z ^ (z<<16); /* or z = z - (z<<16) */ #ifdef LONG_IS_64BIT return s + tab[(z&0xffffffff)>>26]; -#endif +else return tab[z>>26]; +#endif } GEN Having done that, I encountered a bug in quadray()/quadhilbert() - quadhilbert(777) raises SIGBUS. However, it'll be extremely hard for me to debug it, because gdb doesn't understand 64bit format, and I don't have dbx. A prospect of having to use adb gives me horror chills. I'll listen for any useful suggestion, or for a volunteer effort from any1 who has both Solaris 2.7 and dbx. At the same time, I've been trying to build 64bit gp using egcs. This has been a very messy experience, and I won't go into details, unless some1 is interested. The bottom line is I haven't succeeded. I wanted though to express my gratitude to genius of Casper Dik for his pointers ( as if he hasn't received enough praise all over the world ) Thanks for listening. Igor