diff options
author | sjg <sjg@FreeBSD.org> | 2013-02-16 01:19:18 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2013-02-16 01:19:18 +0000 |
commit | ac20e093eb16ae6501f7c41eee0145b591865f59 (patch) | |
tree | 31a4d6cc46165cd7992db8163b77196367ab4554 /share | |
parent | be67cf95c8392e418fdd3f90c7c2130969b1d155 (diff) | |
download | FreeBSD-src-ac20e093eb16ae6501f7c41eee0145b591865f59.zip FreeBSD-src-ac20e093eb16ae6501f7c41eee0145b591865f59.tar.gz |
If MAKESYSPATH contained .../ entry resolve it so that it still works
when we launch make from obj tree.
If we don't have sysroot support we need some c++ and clang specific
include dirs in the stage tree.
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/local.sys.mk | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk index d136201..f366328 100644 --- a/share/mk/local.sys.mk +++ b/share/mk/local.sys.mk @@ -108,6 +108,11 @@ WITH_STAGING_PROG= yes PYTHON ?= /usr/local/bin/python .if ${.MAKE.LEVEL} == 0 +.if ${MAKESYSPATH:Uno:M*.../*} != "" +# make sure this is resolved +MAKESYSPATH:= ${MAKESYSPATH:S,:, ,g:C,\.\.\./.*,${_this:H},:ts:} +.export MAKESYSPATH +.endif # this works best if share/mk is ready for it. BUILD_AT_LEVEL0= no # By default only MACHINE0 updates dependencies @@ -146,8 +151,13 @@ STAGE_SYMLINKS_DIR= ${STAGE_OBJTOP} CFLAGS_LAST+= -nostdinc .endif CFLAGS_LAST+= -isystem ${STAGE_OBJTOP}/usr/include -isystem ${STAGE_OBJTOP}/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:U4.2} +# 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/3.2 +CXXFLAGS_LAST += ${CFLAGS_LAST.${COMPILER_TYPE}} .else # if ld suppored sysroot, this would suffice CFLAGS_LAST+= --sysroot=${STAGE_OBJTOP} -isystem ${STAGE_OBJTOP}/include @@ -202,6 +212,11 @@ MAKE_PRINT_VAR_ON_ERROR+= \ OBJTOP \ ${MAKE_PRINT_VAR_ON_ERROR_XTRAS} +.if ${.MAKE.LEVEL} > 0 +MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH +.endif + + # these are handy # we can use this for a cheap timestamp at the start of a target's script, # but not at the end - since make will expand both at the same time. |