Skip to content

Added cross-compilation binutils and kernel-headers.#6945

Merged
PawelWMS merged 11 commits intomicrosoft:mainfrom
PawelWMS:pawelwi/fixing_binutils
Jan 18, 2024
Merged

Added cross-compilation binutils and kernel-headers.#6945
PawelWMS merged 11 commits intomicrosoft:mainfrom
PawelWMS:pawelwi/fixing_binutils

Conversation

@PawelWMS
Copy link
Copy Markdown
Contributor

@PawelWMS PawelWMS commented Dec 7, 2023

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

This is a fix for a breaking change I introduced in #6815. The original change caused other package to start failing with the configure: error: C compiler cannot create executables error and the native binutils package contained cross-<binary_name>.mo files meant for cross-binutils-common instead of the plain <binary_name>.mo. The original change was reverted and this is an updated version.

The main changes are:

  • Instead of using a single directory with the sources for binutils and have multiple configure and make calls point to that directory, I've added copies of the source for each pair of configure and make calls. For reasons still unknown to me, the original approach caused the configure: error: C compiler cannot create executables error. I'd greatly appreciate an explanation from someone more experienced, what was wrong and how to avoid copying the original sources. For now, however, that I've implemented the said workaround and created a separate bug to address it in the future.
  • Updated the build steps to produce the cross-<binary_name>.mo only for the cross-binutils-common subpackage.
Change Log
  • Fixed the build issues with packages depending on binutils.
  • Fixed .mo files generation in binutils.spec.
Does this affect the toolchain?

Yes.

Associated issues
Test Methodology

@microsoft-github-policy-service microsoft-github-policy-service Bot added the main PR Destined for main label Dec 8, 2023
@PawelWMS PawelWMS marked this pull request as ready for review December 8, 2023 01:04
@PawelWMS PawelWMS requested a review from a team as a code owner December 8, 2023 01:04
@PawelWMS PawelWMS marked this pull request as draft December 8, 2023 03:21
@PawelWMS PawelWMS force-pushed the pawelwi/fixing_binutils branch from b5d0276 to b9e341a Compare December 8, 2023 04:21
@PawelWMS PawelWMS changed the title Fixed .mo files placement in 'binutils'. Added cross-compilation binutils and kernel-headers. Dec 11, 2023
@PawelWMS PawelWMS marked this pull request as ready for review December 11, 2023 23:51
@PawelWMS PawelWMS requested a review from a team as a code owner December 11, 2023 23:51
Comment thread SPECS/kernel-headers/kernel-headers.spec
@PawelWMS
Copy link
Copy Markdown
Contributor Author

Builds finished successfully, merging.

@PawelWMS PawelWMS merged commit 119bf40 into microsoft:main Jan 18, 2024
@PawelWMS PawelWMS deleted the pawelwi/fixing_binutils branch January 18, 2024 19:14
PawelWMS added a commit to PawelWMS/CBL-Mariner that referenced this pull request Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

main PR Destined for main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants