Page MenuHomeFreeBSD

Enable powerpc in make tinderbox using clang.
ClosedPublic

Authored by jhb on Jan 4 2020, 3:42 PM.

Details

Summary

powerpcspe is disabled for now until it has been fixed.

This also adjusts the dependencies for kernels so that we
do not build kernels which for a TARGET_ARCH unless that
TARGET_ARCH is enabled in TARGET_ARCHES_${TARGET}. In
particular, this avoids building powerpcspe kernels for
now, but can also be useful to only build, e.g. mips64
via 'make TARGETS=mips TARGET_ARCHES_mips=mips64'.

Test Plan
  • make tinderbox builds powerpc using clang while skipping powerpcspe worlds and kernels

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

I would probably commit the universe_kernconfs change first and then powerpc second.

Makefile
723 ↗(On Diff #66339)

Is the nesting right on the target arch part of this? It looks weird and makes no sense to me

Makefile
723 ↗(On Diff #66339)

It works. :)

You end up with the following dependency chain for powerpc (for example):

universe_kernconfs -> universe_kernconfs_{powerpc,powerpc64}

Then:

universe_kernconfs_powerpc -> universe_kernconfs_powerpc_{GENERIC,LINT}
universe_kernconfs_powerpc64 -> universe_kernconfs_powerpc64_{GENERIC64,LINT64}
universe_kernconfs_powerpcspe -> universe_kernconfs_powerpcspe_MPC58XXSPE

As a result, no powerpcspe kernels are built since universe_kernconfs only depends on powerpc and powerpc64 kernels. Once powerpcspe works with clang, we will add it to TARGET_ARCHES_powerpc which will then enable universe_kernconfs_powerpcspe.

Today what happens is that all of the powerpc kernels regardless of TARGET_ARCH are dependencies of universe_kernconfs_powerpc.

For a non-powerpc example, try the following command:

make TARGETS=mips TARGET_ARCHES_mips=mips64 MAKE_JUST_KERNELS=yes -n tinderbox NO_CLEAN=yes

Stock head will build all mips kernels including o32 and n32 kernels. With this patch it only builds n64 kernels. Worlds already DTRT. If you do MAKE_JUST_WORLDS it will only build the mips64 world.

Part of the weirdness is that universe_kernconfs is built in a nested make invocation where there is only one TARGET active, so using universe_kernconfs_${TARGET}_${TARGET_ARCH} would be redundant. Of course, this means that universe_kernconf_${TARGET}_${kernel} is also kind of redundant and could instead just be universe_kernconf_${kernel} and it would DTRT.

One side effect of this change btw is that kernel builds are now sorted first by target_arch then alphabetically, so now all the armv6 kernels build first rather than v6 and v7 kernels interleaved in alphabetical order.

Ok. Things make sense now....

This revision is now accepted and ready to land.Jan 5 2020, 4:22 AM