diff options
author | sjg <sjg@FreeBSD.org> | 2014-05-05 18:15:18 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2014-05-05 18:15:18 +0000 |
commit | 5978bd2e084896955540d13b7a400f6883cc9599 (patch) | |
tree | c9b66d2c0f9feb62ac54b422a65004be260835e1 | |
parent | 9be5b0883db2300f7466db69c91deb3d4ece1264 (diff) | |
download | FreeBSD-src-5978bd2e084896955540d13b7a400f6883cc9599.zip FreeBSD-src-5978bd2e084896955540d13b7a400f6883cc9599.tar.gz |
Avoid /etc/make.conf
and make it easier to deal with compiler updates
-rw-r--r-- | share/mk/local.sys.mk | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk index 2ac427f..71e4a8f 100644 --- a/share/mk/local.sys.mk +++ b/share/mk/local.sys.mk @@ -1,6 +1,9 @@ WITH_INSTALL_AS_USER= yes .if defined(.PARSEDIR) # bmake +SRCCONF:= ${.PARSEDIR}/src.conf +# ensure we are self contained +__MAKE_CONF:= ${SRCCONF} # some handy macros _this = ${.PARSEDIR:tA}/${.PARSEFILE} @@ -207,13 +210,15 @@ STAGE_SYMLINKS_DIR= ${STAGE_OBJTOP} .if ${MACHINE} != "host" CFLAGS_LAST+= -nostdinc .endif -CFLAGS_LAST+= -isystem ${STAGE_OBJTOP}/usr/include +GCCVER?= 4.2 +CLANGVER?= 3.4 +CFLAGS_LAST+= -isystem ${STAGE_OBJTOP}/usr/include -I${STAGE_OBJTOP}/usr/include CFLAGS_LAST += ${CFLAGS_LAST.${COMPILER_TYPE}} LDFLAGS_LAST+= -B${STAGE_LIBDIR} -L${STAGE_LIBDIR} -CXXFLAGS_LAST += -isystem ${STAGE_OBJTOP}/usr/include/c++/${GCCVER:U4.2} +CXXFLAGS_LAST += -isystem ${STAGE_OBJTOP}/usr/include/c++/${GCCVER} -I${STAGE_OBJTOP}/usr/include/c++/${GCCVER} # backward doesn't get searched if -nostdinc -CXXFLAGS_LAST += -isystem ${STAGE_OBJTOP}/usr/include/c++/${GCCVER:U4.2}/backward -CFLAGS_LAST.clang += -isystem ${STAGE_OBJTOP}/usr/include/clang/${CLANGVER:U3.3} +CXXFLAGS_LAST += -isystem ${STAGE_OBJTOP}/usr/include/c++/${GCCVER}/backward -I${STAGE_OBJTOP}/usr/include/c++/${GCCVER}/backward +CFLAGS_LAST.clang += -isystem ${STAGE_OBJTOP}/usr/include/clang/${CLANGVER} -I${STAGE_OBJTOP}/usr/include/clang/${CLANGVER} CXXFLAGS_LAST += ${CFLAGS_LAST.${COMPILER_TYPE}} .else # if ld suppored sysroot, this would suffice |