svn commit: r325404 - head/share/mk

Simon J. Gerraty sjg at juniper.net
Sun Nov 5 16:26:48 UTC 2017


Bryan Drewery <bdrewery at FreeBSD.org> wrote:
> > ${.OBJDIR} == /${RELDIR})) make[6]: Fatal errors encountered -- cannot continue make[6]:
> > stopped
> > in /usr/obj/usr/src/amd64.amd64/sys/THOR/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-5.2.0/out/freebsd.amd64/release/bin/src/vboxdrv
> > *** Error code 1
> 
> Weird, can you try this please? http://dpaste.com/3HR1EQH.txt
> 

That will work, but you could remove the check for SRCTOP since it isn't
used in the conditional.

FWIW this is happening because make is being run from within OBJTOP
during kernel module build, and thus the logic in src.sys.env.mk
isn't defining RELDIR.

If OBJTOP were defined (it is in my case) the following
which is similar to what we have in our internal trees
would fix it.

In the FreeBSD tree though OBJTOP may not defined until some time later.
And if you want to .export it you need to use .export-env and play games
to get it into a form that will work as TARGET_SPEC_VARS change values.

Index: share/mk/src.sys.env.mk
===================================================================
--- share/mk/src.sys.env.mk	(revision 325436)
+++ share/mk/src.sys.env.mk	(working copy)
@@ -10,6 +10,8 @@
 RELTOP= .
 .elif ${.CURDIR:M${SRCTOP}/*}
 RELDIR:= ${.CURDIR:S,${SRCTOP}/,,}
+.elif ${.CURDIR:M${OBJTOP}/*}
+RELDIR:= ${.CURDIR:S,${OBJTOP}/,,}
 .endif
 RELTOP?= 	${RELDIR:C,[^/]+,..,g}
 RELOBJTOP?=	${RELTOP}


More information about the svn-src-all mailing list