Bug 235632

Summary: Build failure in rescue if MAKEOBJDIRPREFIX is set
Product: Base System Reporter: Kristof Provost <kp>
Component: binAssignee: freebsd-bugs mailing list <bugs>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Kristof Provost freebsd_committer 2019-02-09 23:57:31 UTC
I'm unable to build world when MAKEOBJDIRPREFIX is set. For example
"make buildworld buildkernel MAKEOBJDIRPREFIX=/home/kp/objdir" fails.

This build was with r343930.

The build failure occurs in rescue, for cat:

cc -target x86_64-unknown-freebsd13.0 --sysroot=/home/kp/objdir/usr/src/tmp -B/home/kp/objdir/usr/src/tmp/usr/bin -O2 -pipe   -std=gnu99    -Qunused-arguments   -static  -nostdlib -Wl,-dc -r -o cat.lo cat_stub.o /home/kp/objdir/usr/src/rescue/rescue//usr/src/bin/cat/cat.o
cc: error: no such file or directory: '/home/kp/objdir/usr/src/rescue/rescue//usr/src/bin/cat/cat.o'
*** Error code 1

Stop.
make[5]: stopped in /usr/home/kp/objdir/usr/src/rescue/rescue
*** Error code 1

Stop.
make[4]: stopped in /usr/src/rescue/rescue
*** Error code 1

Stop.
make[3]: stopped in /usr/src/rescue
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1
Comment 1 Kristof Provost freebsd_committer 2019-02-09 23:59:49 UTC
Full build log: https://people.freebsd.org/~kp/bug235632.log