mbox series

[0/2] Fix SPDX processing with AMD toolchain building

Message ID 1721073367-2668-1-git-send-email-mark.hatle@kernel.crashing.org
Headers show
Series Fix SPDX processing with AMD toolchain building | expand

Message

Mark Hatle July 15, 2024, 7:56 p.m. UTC
AMD (Xilinx) toolchain building for our 'vitis' product line seems to trigger
two issues with the SPDX processing.  Specifically:

*) Baremetal toolchain elements may have directories listed in them, which
   triggers a hashing failure

*) The toolchains are built of multilib packages, which triggers a failure
   reported as 'No SPDX file found for package ....'


I think the first change is pretty obvious what needs to happen if directory
names can end up in the debugsrc list.  (Why they end up there, I have no
idea -- but this is all built from existing YP binutils, gcc, and newlib.)

The second patch it was tracked down that when multilibs are activated, the
system won't use the correct 'sstate_arch' to search for the files.  This
was resolved following a similar approach to the PACKAGE_ARCHs, but does
make the assumption that 'package.bbclass' is available in all instances.


Reproducing the build environment:

git clone https://git.yoctoproject.org/poky -b master
git clone https://github.com/Xilinx/meta-xilinx -b master-next
. ./poky oe-init-build-env
bitbake-layers add-layer ../meta-xilinx/meta-xilinx-core \
    ../meta-xilinx/meta-microblaze ../meta-xilinx/meta-xilinx-standalone \
    ../meta-xilinx/meta-vitis-tc

Build for each of the toolchains (really only aarch64-tc is needed to 
demonstrate the issues)

MACHINE=<machine> DISTRO=xilinx-standalone bitbake meta-xilinx-toolchain

Where machine is one of:
  aarch32-tc
  aarch64-tc
  arm-rm-tc
  microblaze-tc
  riscv-tc

(aarch64-tc has by far the fewest multilibs so is the fastest to parse and
build.)

Any questions, let me know!

(Also these changes were made available to https://git.yoctoproject.org/poky-contrib mgh/spdx-fixes)

Mark Hatle (2):
  create-sdpx-2.2.bbclass: Switch from exists to isfile checking
    debugsrc
  package.bbclass: Add ALL_MULTILIB_SSTATE_ARCHS

 meta/classes-global/package.bbclass  |  1 +
 meta/classes/create-spdx-2.2.bbclass | 15 ++++++++-------
 2 files changed, 9 insertions(+), 7 deletions(-)