diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-09-25 13:04:31 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-09-25 13:04:31 +0000 |
commit | 431a2809a8044bfcc58e0ae544edaf5126ad083a (patch) | |
tree | ee098f85ce2de551c639b4f7348d37856878963f /lib | |
parent | 67a47b0b605b9b5fcd167d42f1e3178536c83b2a (diff) |
Add an ASPICFLAG variable to bsd.own.mk which a platform use to pass flags
to 'as' to make it compile pic. add defaults for sparc64 which needs picflags
set to -fPIC and ASPICFLAGS to -KPIC.
Also simplifies the systemcall generation for sparc64 PIC mode.
ok epsie@.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/arch/sparc64/SYS.h | 8 | ||||
-rw-r--r-- | lib/libc/sys/Makefile.inc | 11 |
2 files changed, 9 insertions, 10 deletions
diff --git a/lib/libc/arch/sparc64/SYS.h b/lib/libc/arch/sparc64/SYS.h index 2fa1891058b..185653382e0 100644 --- a/lib/libc/arch/sparc64/SYS.h +++ b/lib/libc/arch/sparc64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.2 2001/08/28 22:47:26 art Exp $ */ +/* $OpenBSD: SYS.h,v 1.3 2001/09/25 13:04:30 drahn Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -57,11 +57,7 @@ */ #ifdef PIC #define CALL(name) \ - PIC_PROLOGUE(%g1,%g2); \ - sethi %hi(name),%g2; \ - or %g2,%lo(name),%g2; \ - ldx [%g1+%g2],%g2; \ - jmp %g2; \ + call name, 0; \ nop #else #define CALL(name) \ diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 8424e1ae6ee..a5094ee43a2 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.46 2001/09/20 20:52:09 millert Exp $ +# $OpenBSD: Makefile.inc,v 1.47 2001/09/25 13:04:30 drahn Exp $ # $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/17/93 @@ -96,7 +96,8 @@ ${PASM}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h ${SASM}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h @echo creating ${.TARGET} @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \ - ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.TARGET} + ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | \ + ${AS} ${ASPICFLAG} -o ${.TARGET} .else ${SASM}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h @echo creating ${.TARGET} @@ -129,7 +130,8 @@ ${PPSEUDO}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h ${SPSEUDO}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h @echo creating ${.TARGET} @printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.TARGET} + ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | \ + ${AS} ${ASPICFLAG} -o ${.TARGET} .else ${SPSEUDO}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h @echo creating ${.TARGET} @@ -155,7 +157,8 @@ ${PPSEUDO_NOERR}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/sysc ${SPSEUDO_NOERR}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h @echo creating ${.TARGET} @printf '#include "SYS.h"\nPSEUDO_NOERROR(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.TARGET} + ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | \ + ${AS} ${ASPICFLAG} -o ${.TARGET} .else ${SPSEUDO_NOERR}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h @echo creating ${.TARGET} |