summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/mk/bsd.prog.mk13
-rw-r--r--sys/arch/powerpc/patches18
2 files changed, 9 insertions, 22 deletions
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index e1b31f55c80..86a21ebd73f 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.prog.mk,v 1.7 1996/12/08 14:42:32 downsj Exp $
+# $OpenBSD: bsd.prog.mk,v 1.8 1997/01/15 00:36:56 niklas Exp $
# $NetBSD: bsd.prog.mk,v 1.55 1996/04/08 21:19:26 jtc Exp $
# @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
@@ -12,6 +12,11 @@
CFLAGS+= ${COPTS}
+.if (${MACHINE_ARCH} == "powerpc")
+CRTBEGIN?= ${DESTDIR}/usr/lib/crtbegin.o
+CRTEND?= ${DESTDIR}/usr/lib/crtend.o
+.endif
+
LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o
LIBC?= ${DESTDIR}/usr/lib/libc.a
LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a
@@ -69,12 +74,12 @@ LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
.if defined(OBJS) && !empty(OBJS)
.if defined(DESTDIR)
-${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}
- ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib ${LIBCRT0} ${OBJS} ${LDADD} -lgcc -lc -lgcc
+${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${CRTBEGIN} ${CRTEND} ${DPADD}
+ ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib ${LIBCRT0} ${CRTBEGIN} ${OBJS} ${LDADD} -lgcc -lc -lgcc ${CRTEND}
.else
-${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}
+${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${CRTBEGIN} ${CRTEND} ${DPADD}
${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
.endif # defined(DESTDIR)
diff --git a/sys/arch/powerpc/patches b/sys/arch/powerpc/patches
index c64d0d29407..c8690280e58 100644
--- a/sys/arch/powerpc/patches
+++ b/sys/arch/powerpc/patches
@@ -131,24 +131,6 @@ diff -r1.9 fdisk.c
---
> if (getshort(&mboot.signature) != BOOT_MAGIC) {
> warnx("invalid fdisk partition table found!\n");
-Index: src/share/mk/bsd.prog.mk
-# Support DESTDIR compilation under elf.
-# This is needed for alpha, but not currently
-# needed for mips because they still use stabs.
-===================================================================
-RCS file: /cvs/src/share/mk/bsd.prog.mk,v
-retrieving revision 1.7
-diff -r1.7 bsd.prog.mk
-14a15,19
-> .if (${MACHINE_ARCH} == "powerpc")
-> CRTBEGIN?= ${DESTDIR}/usr/lib/crtbegin.o
-> CRTEND?= ${DESTDIR}/usr/lib/crtend.o
-> .endif
->
-73c78
-< ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib ${LIBCRT0} ${OBJS} ${LDADD} -lgcc -lc -lgcc
----
-> ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib ${LIBCRT0} ${CRTBEGIN} ${OBJS} ${LDADD} -lgcc -lc -lgcc ${CRTEND}
Index: src/sys/kern/vfs_cache.c
# Probably a bug in the port, but this makes the system MANY TIMES
# more stablility.