Makefile fixups for cross compilation

This commit is contained in:
Dirk Vogt 2012-05-01 16:09:06 +02:00 committed by Thomas Veerman
parent c2c39af6bb
commit c735b0bb2c
4 changed files with 8 additions and 8 deletions

View file

@ -15,12 +15,12 @@ CFLAGS += -D__kernel__
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

View file

@ -7,8 +7,8 @@ WHATISDBDIR?= /usr/man
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>

View file

@ -34,7 +34,7 @@ BINMODE=444
.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

View file

@ -39,7 +39,7 @@ BINMODE=444
.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}
@ -52,7 +52,7 @@ CPPFLAGS+= -DXXfs_read=${FS}_read
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