Re: compiling nhc98 on AIX



About this list Date view Thread view Subject view Author view

Zoltan Vorosbaranyi (vbzoli@hbrt.hu)
Wed, 21 Feb 2001 20:48:24 +0100 (CET)


Dear Malcolm, Az Úr 2001. esztendejében, 2. hó 21. napján Malcolm Wallace ezt írta vala: | [compile nhc98 on AIX 4.3.3 using gcc 2.95.2.1] | Zoltan, | | > First, I added -D__PPC__ to the OPT flag into top level Makefile.inc, | > because it seemed to me that some header file requires this define. | | This suggests to me that the endian check at configure-time has failed | somehow. Can you check the line from the output of ./configure that | looks something like | | This machine's endian-ness is: -DHIGH_BYTE_FIRST | | If it actually reports -DLOW_BYTE_FIRST, then we have made a wrong | assumption about PPC systems. I know the Apple Mac PPC is big-endian, | but perhaps IBM PPC machines are little-endian? | | > After I replaced harch with config.guess from some GNU program to be | > able to correctly identify the powerpc-ibm-aix4.3.3.0 target instead | > of the 005406DA4C00-AIX-3 target string | | So that I can improve 'harch', can you report the results of each of these | commands for me please?: | uname -p uname: Not a recognized flag: p | uname -m 005406DA4C00 | uname -s AIX | uname -r 3 (It is just the release (i.e. second) number...) | arch | machine There's no arch and machine commands. Maybe oslevel could be used: # oslevel 4.3.3.0 The processor type can be detected using the following code: if /etc/lsattr -EHl proc0 | grep -i powerpc; then proc=powerpc else proc=power fi | | > Tried to evaluate beyond end of function. | > Instruction pointer at 10009 | > What, run() returned! | | These error messages are a classic symptom that we have guessed the | endian-ness of the machine wrongly. To be absolutely certain, could | you please compile and run the following little C program and report | its output? This machine's endian-ness is: -DHIGH_BYTE_FIRST | #include <stdio.h> | main() { | union { | unsigned i; | char s[4]; | } convert; | convert.i = 0x34333231; | fwrite(&convert.s,sizeof(char),4,stdout); | fputc('\n',stdout); | } It prints: 4321 So it is big endian. | | Another test whose output would be very useful in allowing us to add | a symbol like __PPC__ automatically at configuration time is: | | $ cpp -dM /dev/null #define _AIX 1 #define _LONG_LONG 1 #define _ARCH_COM 1 #define __CHAR_UNSIGNED__ 1 #define _AIX32 1 #define _AIX41 1 #define _AIX43 1 #define _POWER 1 #define _IBMR2 1 I think the _ARCH_COM symbol defines the common instruction subset. And, it defines _POWER symbol. In fact these machines use the POWER3 CPU, but lsattr claims that it is a PowerPC_RS64-III. I'll try to check whether this processor is compatible with PowerPC or POWER (I also tried to compile ghc using HC soures, but failed on bad assembly instruction...). Thank you for the quick answer! :)) Zoli


About this list Date view Thread view Subject view Author view