Page MenuHomeFreeBSD

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

Authored by emaste on Nov 21 2022, 7:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 5 2023, 3:57 AM
Unknown Object (File)
Mar 5 2023, 6:08 PM
Unknown Object (File)
Feb 18 2023, 7:20 AM
Unknown Object (File)
Feb 10 2023, 12:19 AM
Unknown Object (File)
Jan 10 2023, 2:17 AM
Subscribers

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.Nov 21 2022, 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/