Page MenuHomeFreeBSD

Move obj-tools and obj-kernel-tools up one level
AcceptedPublic

Authored by emaste on Mon, Nov 21, 7:01 PM.

Details

Reviewers
brooks
bdrewery
Summary

Move these out of the ${WORLDTMP} sysroot-ish. This is a small step to making ${WORLDTMP} a real sysroot, which will contain target headers and libraries required for cross building, but not the toolchain.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.

I have another change in my wip tree that changes WORLDTMP to be ${OBJTOP}/sysroot instead of ${OBJTOP}/tmp, but the compiler still lives in ${WORLDTMP}/usr/bin/cc and friends. Next step would be to move those out, leaving only headers + libraries.

I like the idea of moving in this direction.

This revision is now accepted and ready to land.Mon, Nov 21, 9:11 PM

The tool chain and legacy/ binaries are the main items that need to be moved before ${WORLDTMP} is approximately a sysroot. Beyond those two there are a small number of locale files, some dtrace .d scripts, libxo csv.enc, snmp defs/tc.def, and share/misc/magic bits that I'm not sure belong in the sysroot (but are rather small and could be addressed individually in the future).

Oh, from share/mk/local.dirdeps.mk

# Cleanup a buildworld's WORLDTMP so that any files generated from it
# or using it will rebuild with the DIRDEPS SYSROOT.  Otherwise existing
# object .meta files may still reference those directories and not be
# rebuilt and lead to incorrect Makefile.depend files due to lack of
# .dirdep files.
.if !defined(NO_CLEANUP_WORLDTMP) && exists(${OBJTOP}/tmp/_worldtmp)
cleanup_worldtmp: .PHONY .NOMETA
        @echo "Cleaning leftover WORLDTMP from buildworld."
        -rm -rf ${OBJTOP}/tmp/*
        -chflags -R 0 ${OBJTOP}/tmp/*
        rm -rf ${OBJTOP}/tmp
beforedirdeps: cleanup_worldtmp
.endif

so presumably this should also clean up obj-tools/ and obj-kernel-tools/