-# $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
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
.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)
---
> 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.