fix sysroot clang

Change-Id: I63adf8460e7fdbe3d9d5ad6c828ae5758cb1643c
This commit is contained in:
Lionel Sambuc 2013-04-17 13:01:55 +02:00
parent d44c3377db
commit 84a7c3f464
6 changed files with 54 additions and 38 deletions

View file

@ -41,7 +41,7 @@ CPPFLAGS+= -I. -I${.CURDIR}
# A. Generate C tools used to build ash
.for tool in init nodes signames syntax
${.OBJDIR}/mk${tool}: ${.CURDIR}/mk${tool}.c
${HOST_CC} ${.ALLSRC} -o ${.TARGET}
${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} ${.ALLSRC} -o ${.TARGET}
CLEANFILES+= ${.OBJDIR}/mk${tool}
.endfor

View file

@ -4,7 +4,7 @@ FILESDIR= /usr/lib/keymaps
.src.map:
${_MKTARGET_CREATE}
${HOST_CC} ${HOST_LDFLAGS} -DKEYSRC=\"$<\" -o ${.OBJDIR}/${.TARGET}_genmap ${.CURDIR}/genmap.c
${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} ${HOST_LDFLAGS} -DKEYSRC=\"$<\" -o ${.OBJDIR}/${.TARGET}_genmap ${.CURDIR}/genmap.c
${.OBJDIR}/${.TARGET}_genmap > ${.OBJDIR}/${.TARGET}
rm -f ${.OBJDIR}/${.TARGET}_genmap

View file

@ -128,8 +128,4 @@ CPPFLAGS+= -DUSE_SYSDEBUG
CPPFLAGS.sched_start.c+= -I${NETBSDSRCDIR}
.if (${CC} == "gcc") || (${CC} == "clang")
LDADD+= -lminc
.endif
.include <bsd.lib.mk>

View file

@ -24,11 +24,40 @@ INFOGRP?= operator
DOCGRP?= operator
MKBINUTILS?= no
MKGDB:= no
MKGCC?= no
MKGCCCMDS?= no
MKPROFILE?= no
MKSLJIT?= no
#MINIX-specific variables
MKCOVERAGE?= no
# LSC MINIX does not support these features ATM.
USE_FORT:= no
USE_SSP:= no
MKCRYPTO:= no
MKGDB:= no
MKGROFF:= no
MKHESIOD:= no
MKHTML:= no
MKINET6:= no
MKIPFILTER:= no
MKISCSI:= no
MKKERBEROS:= no
MKKMOD:= no
MKLDAP:= no
MKLINT:= no
MKLVM:= no
MKMDNS:= no
MKNLS:= no
MKNPF:= no
MKPAM:= no
MKPF:= no
MKPOSTFIX:= no
MKRUMP:= no
MKSKEY:= no
MKYP:= no
# LSC MINIX SMP Support?
.ifdef CONFIG_SMP
SMP_FLAGS += -DCONFIG_SMP
@ -63,6 +92,17 @@ USETOOLS?= never
MKBITCODE:=no
. endif
. endif # ${_HAVE_GOLD:U} == ""
# If DESTDIR was specified, and we are not using the tools, then make sure to
# build out-of-tree and to refer only DESTDIR for target binaries
# The case when using tools is already handled below.
. if ${DESTDIR:U} != ""
CPPFLAGS+= --sysroot=${DESTDIR}
LDFLAGS+= --sysroot=${DESTDIR}
. if defined(HAVE_LLVM)
LDFLAGS+= -L${DESTDIR}/usr/lib
. endif
. endif # ${DESTDIR:U} != ""
. endif # ${USETOOLS:Uno} != "yes"
. if !defined(HOSTPROG) && !defined(HOSTLIB)
@ -933,36 +973,8 @@ MKBINUTILS?= ${MKBFD}
MKZFS?= yes
.endif
# Some tough Minix defaults
MKCOVERAGE?= no
MKPROFILE?= no
# LSC: MINIX: Has to be here, otherwise libgcc_s.a is not found!?
MKSTATICLIB:= yes
MKLINT:= no
# LSC MINIX does not support these features ATM.
USE_FORT:= no
USE_SSP:= no
MKYP:= no
MKPF:= no
MKNLS:= no
MKHESIOD:= no
MKPOSTFIX:= no
MKKMOD:= no
MKEXTSRC:= no
MKRUMP:= no
MKSKEY:= no
MKCRYPTO:= no
MKMDNS:= no
MKNPF:= no
MKISCSI:= no
MKLVM:= no
MKKERBEROS:= no
MKLDAP:= no
MKPAM:= no
MKIPFILTER:= no
MKINET6:= no
MKGROFF:= no
MKHTML:= no
#
# MK* options which default to "yes".

View file

@ -97,14 +97,22 @@ typedef uint64_t u_int64_t;
#ifdef __minix
typedef uint8_t u8_t;
#define u8_t uint8_t
typedef uint16_t u16_t;
#define u16_t uint16_t
typedef uint32_t u32_t;
#define u32_t uint32_t
typedef uint64_t u64_t;
#define u64_t uint64_t
typedef int8_t i8_t;
#define i8_t int8_t
typedef int16_t i16_t;
#define i16_t int16_t
typedef int32_t i32_t;
#define i32_t int32_t
typedef int64_t i64_t;
#define i64_t int64_t
#ifdef _NETBSD_SOURCE
/* some Minix specific types that do not conflict with posix */

View file

@ -111,7 +111,7 @@ OBJS.${o} += common.o
# LSC Make sure there is not leftover after a failed testrun
clean: .PHONY .MAKE
$(MAKE) -C select clean
rm -rf DIR*
@${MAKE} -C select clean || true
@rm -rf DIR*
.include <bsd.prog.mk>