CPPFLAGS+= -fno-stack-protector -D_NETBSD_SOURCE
LDFLAGS+= -T ${.CURDIR}/arch/${ARCH}/kernel.lds
-LDFLAGS+= -nostdlib -L${LIBDIR}
+LDFLAGS+= -nostdlib -L${DESTDIR}/${LIBDIR}
LDADD+= -lminlib
DPADD+= ${LIBMINLIB}
-.if ${CC} == "gcc"
+.if !empty(CC:M*gcc)
LDADD+= -lgcc -lsys -lgcc -lminc
-.elif ${CC} == "clang"
+.elif !empty(CC:M*clang)
LDADD+= -L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic -lminc
DPADD+= ${LIBC}
.endif
makedb:
${TOOL_MAKEWHATIS} ${DESTDIR}${WHATISDBDIR}
.if ${MKUNPRIVED} != "no"
- echo ".${WHATISDBDIR}/whatis.db type=file mode=0444 uname=${BINOWN} gname=${BINGRP}" \
- | ${METALOG.add}
+# echo ".${WHATISDBDIR}/whatis.db type=file mode=0444 uname=${BINOWN} gname=${BINGRP}" \
+# | ${METALOG.add}
.endif
.include <bsd.subdir.mk>
.PATH: ${.CURDIR}/.. ${.CURDIR}/../../lib
-LDFLAGS+= -nostdlib -Wl,-N -Wl,-e,boot_start
+LDFLAGS+= -nostdlib -Wl,-N -Wl,-e,boot_start -L${DESTDIR}/${LIBDIR}
CPPFLAGS+= -I ${.CURDIR}/.. -I ${.CURDIR}/../../lib -I ${S}/lib/libsa
CPPFLAGS+= -I ${.OBJDIR}
# Make sure we override any optimization options specified by the user
.PATH: ${.CURDIR}/.. ${.CURDIR}/../../lib
-LDFLAGS+= -nostdlib -Wl,-N -Wl,-e,start
+LDFLAGS+= -nostdlib -Wl,-N -Wl,-e,start -L${DESTDIR}/${LIBDIR}
CPPFLAGS+= -DBOOTXX
# CPPFLAGS+= -D__daddr_t=int32_t
CPPFLAGS+= -I ${.CURDIR}/../../lib -I ${.OBJDIR}
CPPFLAGS+= -DXXfs_stat=${FS}_stat
CPPFLAGS+= -DFS=${FS}
# clang generates too big bootxx_xxx
-.if (${CC} == "clang")
+.if !empty(CC:M*clang)
CPPFLAGS+= -Os
.endif
# CPPFLAGS+= -DBOOT_MSG_COM0