Skip to content

Commit 244ecc5

Browse files
committed
Makefile.inc1: Avoid including cwd in path
Buildworld failed when objcopy tried to overwrite itself, with `objcopy: open objcopy failed: Text file busy`. The PATH ended up with `::`, effectively including the current directory, and we found the wrong objcopy. PR: 261215 Sponsored by: The FreeBSD Foundation (cherry picked from commit ac7ed26) (cherry picked from commit e425d43)
1 parent 8699896 commit 244ecc5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile.inc1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,10 @@ XPATH= ${WORLDTMP}/bin:${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin
607607
# When building we want to find the cross tools before the host tools in ${BPATH}.
608608
# We also need to add UNIVERSE_TOOLCHAIN_PATH so that we can find the shared
609609
# toolchain files (clang, lld, etc.) during make universe/tinderbox
610-
STRICTTMPPATH= ${XPATH}:${BPATH}:${UNIVERSE_TOOLCHAIN_PATH}
610+
STRICTTMPPATH= ${XPATH}:${BPATH}
611+
.if defined(UNIVERSE_TOOLCHAIN_PATH)
612+
STRICTTMPPATH:=${STRICTTMPPATH}:${UNIVERSE_TOOLCHAIN_PATH}
613+
.endif
611614
# We should not be using tools from /usr/bin accidentally since this could cause
612615
# the build to break on other systems that don't have that tool. For now we
613616
# still allow using the old behaviour (inheriting $PATH) if

0 commit comments

Comments
 (0)