[Bug 261215] objcopy fails to work on itself which make buildworld with NO_CLEAN fail

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 16 Aug 2024 15:18:48 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261215

Andriy Gapon <avg@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Open

--- Comment #2 from Andriy Gapon <avg@FreeBSD.org> ---
I can confirm that the problem is real and the two options from comment #1
along with WITH_DEBUG_FILES are enough to reproduce it.

The problem happens because of
STRICTTMPPATH=  ${XPATH}:${BPATH}:${UNIVERSE_TOOLCHAIN_PATH}
in Makefile.inc1 when UNIVERSE_TOOLCHAIN_PATH is not set.

In that case TMPPATH ends up having "::" in the middle.
The empty component in PATH means current directory.
So, when objcopy is being built and objcopy executable already exists in the
build directory, the build uses that executable to create the same file from
objcopy.full.
That leads to the error.

-- 
You are receiving this mail because:
You are the assignee for the bug.