Subject: /usr/src/lib/libc/arch/mips/sys/__sigreturn14.S build fails a/o March 26
To: None <port-sgimips@netbsd.org>
From: sgimips NetBSD list <sgimips@mrynet.com>
List: port-mips
Date: 04/01/2004 01:27:31
Nightly, I was building an sgimips release snapshot and CDROM image.
As of March 26, when drochner submitted changes to the file, it no longer builds
due to __sigreturn14.S using a different macro for assembler macro expansion.
# compile libc/__sigreturn14.o
/sim/sgimips/obj/tooldir.NetBSD-1.6ZK-alpha/bin/mipseb--netbsd-gcc -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT -I/usr/src/lib/libc/include -DHESIOD -DINET6 -DNLS -DYP -D__DBINTERFACE_PRIVATE -DI18NMODULE_MAJOR=4 -I/usr/src/libexec/ld.elf_so -I/usr/src/lib/libc/dlfcn -DCITRUS_ICONV -DWITH_RUNE -I/usr/src/lib/libc -DRESOLVSORT -I. -DPOSIX_MISTAKE -DPORTMAP -DFLOATING_POINT -nostdinc -isystem /sim/sgimips/dest/usr/include -c -traditional-cpp -DALL_STATE -DUSG_COMPAT -I/usr/src/lib/libc/arch/mips -nostdinc -idirafter /sim/sgimips/dest/usr/include /usr/src/lib/libc/arch/mips/sys/__sigreturn14.S -o __sigreturn14.o.tmp
/usr/src/lib/libc/arch/mips/sys/__sigreturn14.S: Assembler messages:
/usr/src/lib/libc/arch/mips/sys/__sigreturn14.S:46: Error: absolute expression required `li'
*** Failed target: __sigreturn14.o
*** Failed command: /sim/sgimips/obj/tooldir.NetBSD-1.6ZK-alpha/bin/mipseb--netbsd-gcc -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT -I/usr/src/lib/libc/include -DHESIOD -DINET6 -DNLS -DYP -D__DBINTERFACE_PRIVATE -DI18NMODULE_MAJOR=4 -I/usr/src/libexec/ld.elf_so -I/usr/src/lib/libc/dlfcn -DCITRUS_ICONV -DWITH_RUNE -I/usr/src/lib/libc -DRESOLVSORT -I. -DPOSIX_MISTAKE -DPORTMAP -DFLOATING_POINT -nostdinc -isystem /sim/sgimips/dest/usr/include -c -traditional-cpp -DALL_STATE -DUSG_COMPAT -I/usr/src/lib/libc/arch/mips -nostdinc -idirafter /sim/sgimips/dest/usr/include /usr/src/lib/libc/arch/mips/sys/__sigreturn14.S -o __sigreturn14.o.tmp
*** Error code 1
Stop.
nbmake: stopped in /usr/src/lib/libc
Current version of /usr/src/lib/libc/arch/mips/sys/__sigreturn14.S:
##### version 1.4, 2004/03/26 20:35:37
PSEUDO(__sigreturn14,compat_16___sigreturn14)
Previously was:
##### version 1.3, 2003/08/07 16:42:17
RSYSCALL(__sigreturn14)
Definitions for RSYSCALL and PSEUDO are in /usr/src/lib/libc/arch/mips/SYS.h:
/*
* Do a normal syscall.
*/
#define RSYSCALL(x) \
PSEUDO(x,x)
#define PSEUDO(x,y) \
LEAF(x); \
PIC_PROLOGUE(x,t9); \
SYSTRAP(y); \
bne a3,zero,err; \
j ra; \
err: \
PIC_CALL(__cerror,t9); \
END(x)
The problem occurs during the SYSTRAP preprocessing (We're not __STDC__ here):
#ifdef __STDC__
# define SYSTRAP(x) li v0,SYS_ ## x; syscall;
#else
# define SYSTRAP(x) li v0,SYS_/**/x; syscall;
#endif
The expansion ends up being:
li $2,SYS_compat_16___sigreturn14;
SYS_compat_16___sigreturn14 is #DEFINEd in /usr/src/sys/include/syscall.h:
#define SYS_compat_16___sigaction14 291
If I change __sigreturn14.S back to using RSYSCALL instead of PSEUDO macro,
the expansion correctly results in:
li $2,SYS_291; syscall;
I don't know if this is a macro error, gcc preprocessor error, or what.
Nonetheless, it is failing and I'm unable to build my nightly release snapshots.
Can anyone address that or tell me if I have a local problem?
Cheers,
-scott