Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile: run PPD and RPATH fixup in host-fialize
Currently, the gdbinit is generated and installed during post install hooks, either from the gdb package, or from the external-toolchain package. When using per-package directories (PPD), the staging directory of the either package is stored in the generated gdbinit, which is not going to be valid when all the PPD staging dirs get merged into the final staging: it would lack any library installed afterwards, i.e. mostly everything would be missing (but the libraries from the C toolchain in the case of an external toolchain). Similarly, all the RPATH will point to various PPD drectories. This does not cause any issue when the final host is aggregated, because the PPD directories still exist when we call programs from there (e.g. from the fs infra, or from post-image scripts). However, we knew that would not always be possible to keep the PPD directories: we have the prepare-sdk rule that runs a cleanup pass on the RPATH, and also applies the generic PPD fixups. When we introduced prepare-sdk in c32ad51 (core/sdk: generate the SDK tarball ourselves), we did not yet have support for PPD for the host directory, and especially, we did not have the host-finalize rule, which was only introduced in d0f4f95 (Makefile: rework main directory creation logic) which kick-started the introduction of PPD. At that point, we did not realise that the rpath fixups from prepare-sdk, would be better moved to the new host-finalize rule, because that had no impact unless one would need an SDK. Later, in 25e60fb (Makefile: fix SDK relocation for per-package-dirs), we eventually introduced the PPD generic fixups in the prepare-sdk rule. Again, we did not realise that those fixups would be better placed in the host-finalize rule rather than the prepare-sdk. While fixing the RPATH in host-finalize is not critical, fixing up the PPD paths actually is, as the gdbinit case demonstrate. As such, move the PPD fixups to the host-finalize step, and while at it, also move the RPATH fixups. This now does not leave much to do in the prepare-sdk step, and that could very well be moved to the host-finalize rule as well. However, some people may have started to rely on prepare-sdk in its 6 years of existence, and the little script it installs is not needed unless one really needs an SDK. So leave it as it is for now. Reported-by: Casey Reeves <[email protected]> Signed-off-by: Yann E. MORIN <[email protected]> Tested-by: Casey Reeves <[email protected]> Cc: Thomas Petazzoni <[email protected]> Cc: Brandon Maier <[email protected]> Tested-by: Brandon Maier <[email protected]> Acked-by: TIAN Yuanhao <[email protected]>
- Loading branch information