mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
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.
This commit is contained in:
parent
4ed4429c63
commit
6bc671bb67
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/bmake/; revision=246866
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user