Fix GCC image building

This commit is contained in:
Arun Thomas
2011-07-09 15:04:42 +02:00
parent a97a80178e
commit b956c8735e
42 changed files with 64 additions and 57 deletions

View File

@@ -22,26 +22,17 @@ CFLAGS += -D__kernel__
LDFLAGS+= -.o
.elif ${COMPILER_TYPE} == "gnu"
CFLAGS+=-march=i386
CPPFLAGS+= -ffreestanding -fno-stack-protector
CPPFLAGS+= -ffreestanding -fno-stack-protector -D_NETBSD_SOURCE
LDFLAGS+= -T ${.CURDIR}/arch/${ARCH}/kernel.lds
LDFLAGS+= -nostdlib -L${LIBDIR}
.endif
.if (${NBSD_LIBC} != "no")
LDADD+= -lminlib
DPADD+= ${LIBMINLIB}
CPPFLAGS+= -D_NETBSD_SOURCE
.else
.if ${CC} == "gcc"
DPADD+= ${LIBC}
LDADD+= -lgcc -lc -lgcc
LDADD+= -lgcc -lsys -lgcc
.elif ${CC} == "clang"
LDADD+= -L/usr/pkg/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic
DPADD+= ${LIBC}
LDADD+= -L/usr/pkg/lib
LDADD+= -lCompilerRT-Generic -lc -lCompilerRT-Generic
.endif
.endif
CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${ARCH}/include -I${MINIXSRCDIR}