Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseTools: LinuxGcc5ToolChain: Run for GCC Toolchain #6223

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

os-d
Copy link
Contributor

@os-d os-d commented Sep 19, 2024

Description

The GCC5 TOOL_CHAIN_TAG is being deprecated in favor of GCC. LinuxGcc5ToolChain.py needs to be updated to find the correct ARM/AARCH64/RISCV/LOONGARCH64 compilers for the GCC TOOL_CHAIN_TAG, as well, otherwise it defaults to the system GCC, which is typically X64 based.

In order to keep this backward and forward compatible, the plugin now checks for the substring "GCC" in the TOOL_CHAIN_TAG and will set either the "GCC5" or "GCC" env variables used by tools_def.template to find the GCC compiler for the requested architecture.

This plugin is also renamed to drop the old GCC5. This is not a breaking change as the plugin is discovered automatically by the build system, not specified by name.

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

Tested building an ARM64 package on an x64 host with both TOOL_CHAIN_TAG=GCC and TOOL_CHAIN_TAG=GCC5.

Integration Instructions

N/A.

@tianocore-assign-reviewers
Copy link

WARNING: Cannot add some reviewers: A user specified as a reviewer for this PR is not a collaborator of the repository. Please add them as a collaborator to the repository so they can be requested in the future.

Non-collaborators requested:

Attn Admins:


Admin Instructions:

  • Add the non-collaborators as collaborators to the appropriate team(s) listed in teams
  • If they are no longer needed as reviewers, remove them from Maintainers.txt

@lgao4
Copy link
Contributor

lgao4 commented Sep 20, 2024

Will GCC5 tool chain be replaced by GCC tool chain? Is there the detail proposal for this change?

@os-d
Copy link
Contributor Author

os-d commented Sep 20, 2024

@lgao4 here is the thread where @bcran added the GCC toolchain and deprecated the GCC5 (and earlier) toolchain: https://listman.redhat.com/archives/edk2-devel-archive/2023-May/063099.html

@lgao4
Copy link
Contributor

lgao4 commented Sep 23, 2024

@lgao4 here is the thread where @bcran added the GCC toolchain and deprecated the GCC5 (and earlier) toolchain: https://listman.redhat.com/archives/edk2-devel-archive/2023-May/063099.html

Got it. Is this Plugin used in CI system? Which consumer needs to be updated?

@os-d
Copy link
Contributor Author

os-d commented Sep 23, 2024

@lgao4 here is the thread where @bcran added the GCC toolchain and deprecated the GCC5 (and earlier) toolchain: https://listman.redhat.com/archives/edk2-devel-archive/2023-May/063099.html

Got it. Is this Plugin used in CI system? Which consumer needs to be updated?

@lgao4, this plugin is used in the CI system for GCC builds on Linux. The CI system is still currently using GCC5, which is why this has not failed before (this is a prerequisite to moving the CI system to use GCC). No consumer needs to be updated because I made the script backwards compatible with GCC5.

@os-d
Copy link
Contributor Author

os-d commented Sep 26, 2024

@lgao4 @bcran friendly reminder for reviewing.

@os-d
Copy link
Contributor Author

os-d commented Sep 29, 2024

@lgao4 any further comment or can this be merged?

The GCC5 TOOL_CHAIN_TAG is being deprecated in favor of
GCC. LinuxGcc5ToolChain.py needs to be updated to find
the correct ARM/AARCH64/RISCV/LOONGARCH64 compilers for
the GCC TOOL_CHAIN_TAG, as well, otherwise it defaults
to the system GCC, which is typically X64 based.

In order to keep this backward and forward compatible,
the plugin now checks for the substring "GCC" in the
TOOL_CHAIN_TAG and will set either the "GCC5" or "GCC"
env variables used by tools_def.template to find the
GCC compiler for the requested architecture.

This plugin is also renamed to drop the old GCC5.

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
@lgao4 lgao4 added the push Auto push patch series in PR if all checks pass label Sep 30, 2024
@tianocore-assign-reviewers
Copy link

WARNING: Cannot add some reviewers: A user specified as a reviewer for this PR is not a collaborator of the repository. Please add them as a collaborator to the repository so they can be requested in the future.

Non-collaborators requested:

Attn Admins:


Admin Instructions:

  • Add the non-collaborators as collaborators to the appropriate team(s) listed in teams
  • If they are no longer needed as reviewers, remove them from Maintainers.txt

@mergify mergify bot merged commit 21e1fc5 into tianocore:master Sep 30, 2024
126 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants