Date: Thu, 23 Feb 2023 23:33:54 -0800 From: "Simon J. Gerraty" <sjg@juniper.net> To: Mark Millard <marklmi@yahoo.com> Cc: Bryan Drewery <bdrewery@FreeBSD.org>, Current FreeBSD <freebsd-current@FreeBSD.org>, Peter <pmc@citylink.dinoex.sub.org>, <sjg@juniper.net> Subject: Re: FYI: Why META_MODE rebuilds so much for building again after installworld (no source changes) Message-ID: <30.1677224034@kaos.jnpr.net> In-Reply-To: <21F1E7D4-D709-4DFF-98D6-51795B9BB291@yahoo.com> References: <B74790D9-FBC2-4818-BEAF-34E5B705C460@yahoo.com> <3345EBA5-A09C-4E3F-B94D-39F57F56BDBB@yahoo.com> <DB0C7B41-2101-4C5C-BFC8-3C95CC0B9F6F@yahoo.com> <73088.1611797582@kaos.jnpr.net> <CB7040D0-3BF4-496F-A54F-87E5378016E0@yahoo.com> <F6BF110D-7855-4A10-A53F-52B34282234F@yahoo.com> <10819.1677108389@kaos.jnpr.net> <76FA98EF-6184-4D7E-A01F-0EE8117D0D10@yahoo.com> <29887.1677115125@kaos.jnpr.net> <27790339-240F-4C97-97C7-38AFD8DE03D5@yahoo.com> <7FB6F619-6E71-4075-8A6C-573564371DD5@yahoo.com> <2655.1677134606@kaos.jnpr.net> <242BB478-B2FE-4BCC-A56E-098F3FEB3EE1@yahoo.com> <42586.1677183334@kaos.jnpr.net> <AE95CF5D-0B7E-4DA3-8777-5FA47E1751D8@yahoo.com> <30.1677189836@kaos.jnpr.net> <1B5FCF8A-0DFD-4246-8464-65A44A40529F@yahoo.com> <93460.1677202939@kaos.jnpr.net> <F02F01EE-9866-4F37-884B-74A2665A5F08@yahoo.com> <17672.1677210880@kaos.jnpr.net> <21F1E7D4-D709-4DFF-98D6-51795B9BB291@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Mark Millard <marklmi@yahoo.com> wrote: > > Perhaps you want to be using > > > > .MAKE.META.IGNORE_PATHS+= ${MAKEOBJDIRPREFIX}/tmp/legacy/usr > > or is that ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH}/tmp/legacy/usr > > > > I had started with trying to use MAKEOBJDIRPREFIX but it > appeared to end up with an empty expansion in something > I'd looked at, making the addition to > .MAKE.META.IGNORE_PATHS ineffective. > > But with the .info lines in place, I should probably > recheck an example with ${MAKEOBJDIRPREFIX} in it. > (Expecting .MAKE.META.IGNORE_PATHS to not work but > showing what happens for the MAKEOBJDIRPREFIX use.) > This turns out to be different for "modules" vs. > "pure kernel". I start with a "modules" example > below. Yes, if the value of MAKEOBJDIRPREFIX isn't consistent that's going to cause problems (I'd call it a bug). If so don't use MAKEOBJDIRPREFIX directly, set some other variable and export that. Hmm src.sys.obj.mk plays games with MAKEOBJDIRPREFIX so that's probably not a good option. Perhaps: diff --git a/share/mk/src.sys.obj.mk b/share/mk/src.sys.obj.mk index 3b48fc3c5514..3c7e570dbdbd 100644 --- a/share/mk/src.sys.obj.mk +++ b/share/mk/src.sys.obj.mk @@ -67,6 +67,9 @@ SB_OBJROOT?= ${SB}/obj/ OBJROOT?= ${SB_OBJROOT} .endif OBJROOT?= ${_default_makeobjdirprefix}${SRCTOP}/ +# save the value before we mess with it +_OBJROOT:= ${OBJROOT:tA} +.export _OBJROOT .if ${OBJROOT:M*/} != "" OBJROOT:= ${OBJROOT:H:tA}/ .else and then something like? .MAKE.META.IGNORE_PATHS += ${_OBJROOT}/${MACHINE}.${MACHINE_ARCH}/tmp/legacy/usr > and still not right (MAKEOBJDIRPREFIX expanded > to empty). See above > I still do not know notation to make .MAKE.META.IGNORE_PATHS > effective for the specific list of tmp/legacy/usr/sbin/* > examples in question. > > Effectively, it appears that the coverage of > .MAKE.META.IGNORE_PATHS is just incomplete (via the > notational constraints it is used within). No, your problem has nothing to do with .MAKE.META.IGNORE_PATHS but with the build's lack of a consistent definition of OBJTOP or OBJROOT or whatever you want to call it. You could I guess take note of .OBJDIR when setting .MAKE.META.IGNORE_PATHS and if it match */sys/compile* and tweak things accordingly so you actually get the value you want. The messing about with MAKEOBJDIRPREFIX has been around so long I don't know how you could go about fixing it at this point. FWIW in our build we make a clear distinction between things build for the "host" (all the tools you care about are actually host tools not target tools I think), and those built for a target. Everything built for host is found under ${HOST_OBJTOP} and everything for the targets is under ${OBJTOP} which we define consistently mk -V OBJTOP -V HOST_OBJTOP:tA /var/obj/FreeBSD/main/obj/amd64.amd64 /var/obj/FreeBSD/main/obj/freebsd13-amd64 (the :tA is needed there so you can see the relationship - HOST_OBJTOP comes from environment) mk -n buildworld -V OBJTOP Setting legacy build env... /var/obj/FreeBSD/main/obj/h/sjg/work/FreeBSD/main/src/amd64.amd64 and as you know, that value does not remain consistent thoughout the tree which makes it of questionable value. --sjg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?30.1677224034>