Received: from PACIFIC-CARRIER-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA15717; Thu, 7 Dec 95 16:41:21 EST
Received: from indy4.maths.uq.oz.au by MIT.EDU with SMTP
	id AA25583; Thu, 7 Dec 95 16:40:07 EST
Received: (from ll@localhost) by indy4.maths.uq.oz.au (8.7.1/8.7.1) id HAA14654 for proven@mit.edu; Fri, 8 Dec 1995 07:40:00 -0800 (PST)
From: "Lawrence Lau" <ll@indy1.maths.uq.oz.au>
Message-Id: <9512080740.ZM14652@indy4.maths.uq.oz.au>
Date: Fri, 8 Dec 1995 07:39:59 -0800
Reply-To: ll@maths.uq.oz.au
X-Mailer: Z-Mail (3.2.0 26oct94 MediaMail)
To: proven@MIT.EDU
Subject: SGI port of phthreads
X-Zm-Priority: Medium
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii

G'day,

Glad to see that someone has gotten a jump ahead of those guys at SGI.

Just some comments after downloading & compiling the pthread package.

Does the package require gcc, gas & gmake to work properly? Normal make just
gives up the ghost. I used gcc 2.7.2 and the standard assembler but had some
hassles due to some funny effects with the assembler. gcc didn't like compiling
syscall-template.S, gave
as0: Error: /usr/include/sys.s, line 26:Expected cpp-generated line number

After altering the pthread/GNUmakefile.inc to use $(AS) rather than $(CC) the
native assembler gave some funny errors. For some wierd reason, it generated
the following code
  0x0:  03e00008        jr      ra
  0x4:  00021023        subu    v0,zero,v0
  0x8:  00000000        nop
  0xc:  00000000        nop

instead of the expected
  0x0:  03e00008        jr      ra
  0x4:  00021023        subu    v0,zero,v0
        machdep_sys_open:
  [syscall-template.S:  51] 0x8:        240203ed        li      v0,1005
  [syscall-template.S:  51] 0xc:        0000000c        syscall
  [syscall-template.S:  51] 0x10:       14e0fffb        bne     a3,zero,0
  [syscall-template.S:  51] 0x14:       00000000        nop
  [syscall-template.S:  51] 0x18:       03e00008        jr      ra
  [syscall-template.S:  51] 0x1c:       00000000        nop

Traced this down to something funny with the preprocessing phase of as. If I
alter the pthread/GNUmakefile.inc to

obj/syscalls.o: syscall-template.S
        -rm -rf obj/syscalls
        mkdir obj/syscalls
        for syscall in $(STD_SYSCALLS) ; do \
          echo $$syscall ; \
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
          $(AS) -E $(CFLAGS) -DSYSCALL_NAME=$$syscall -c syscall-template.S >
obj/syscalls/S$$syscall.s ; \
          $(AS) $(CFLAGS) obj/syscalls/S$$syscall.s -o
obj/syscalls/S$$syscall.o; \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          $(SYSCALL_PIC_COMPILE) ; \
        done
        x=`pwd` && cd obj/syscalls && ld -r -o ../syscalls.o S*.o && cd $$x
        rm -r obj/syscalls
endif

to force it to recognise the machine_dep_[SysCalls]. So finally the library is
built. The only test that it failed was get_pw. I'll play around with it some
more and see what else comes out. For your info, my machine was an Indy running
Irix 5.3. As soon as the other machines are back up, I'll also test it on a
Indigo, Indigo 2 and possibly Power Challenge.

Kudos to you for undertaking a challenging task in developing this package!

Lawrence

-- 
