Rebase AlmaLinux X64 ISA-baseline pin onto edk2 20260821 (GCC48 -> GCCNOLTO) #1

Merged
eabdullin merged 1 commit from triage/fix-edk2-manual-86018 into a10s 2026-09-24 07:46:28 +00:00

Problem

The AlmaLinux-only autopatch 0001-BaseTools-pin-the-X64-ISA-baseline-to-x86-64-v2.patch no longer applied after the edk2 rebase from 20260221-7 to 20260821-2, failing %prep on every arch:

error: patch failed: BaseTools/Conf/tools_def.template:865
Rejected hunk #1.

What drifted upstream

Upstream reorganized BaseTools/Conf/tools_def.template and removed the deprecated GCC48/GCC49/GCC5 toolchains. The GCC X64 flag DEFINE block moved from line ~865 to line ~618, and the macro was renamed:

  • old: DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(GCC_IA32_X64_CC_FLAGS) -m64 ...
  • new: DEFINE GCCNOLTO_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) DEF(GCC_IA32_X64_CC_FLAGS) -m64 ...

GCCNOLTO_X64_CC_FLAGS is the successor base: GCC_X64_CC_FLAGS = DEF(GCCNOLTO_X64_CC_FLAGS), and the LTO GCC toolchain used by the spec (%define TOOLCHAIN GCC) derives its X64 CC flags from GCC_X64_CC_FLAGS. So pinning GCCNOLTO_X64_CC_FLAGS propagates the ISA baseline to exactly the toolchain that builds OVMF, preserving the original patch's intent.

Fix

Re-anchored the single one-line hunk onto the renamed/relocated GCCNOLTO_X64_CC_FLAGS line, inserting -march=x86-64-v2 immediately after -m64 (identical placement to the original). The diff body was regenerated with git so the hunk header/counts are correct by construction. The commit message/body is unchanged.

Verification

patch -p1 --fuzz=0 --dry-run and a real patch -p1 --fuzz=0 against a pristine copy of src/ both apply cleanly (exit=0) and yield the intended -march=x86-64-v2 pin.

## Problem The AlmaLinux-only autopatch `0001-BaseTools-pin-the-X64-ISA-baseline-to-x86-64-v2.patch` no longer applied after the edk2 rebase from 20260221-7 to 20260821-2, failing `%prep` on every arch: ``` error: patch failed: BaseTools/Conf/tools_def.template:865 Rejected hunk #1. ``` ## What drifted upstream Upstream reorganized `BaseTools/Conf/tools_def.template` and removed the deprecated `GCC48`/`GCC49`/`GCC5` toolchains. The GCC X64 flag DEFINE block moved from line ~865 to line ~618, and the macro was renamed: - old: `DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(GCC_IA32_X64_CC_FLAGS) -m64 ...` - new: `DEFINE GCCNOLTO_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) DEF(GCC_IA32_X64_CC_FLAGS) -m64 ...` `GCCNOLTO_X64_CC_FLAGS` is the successor base: `GCC_X64_CC_FLAGS = DEF(GCCNOLTO_X64_CC_FLAGS)`, and the LTO GCC toolchain used by the spec (`%define TOOLCHAIN GCC`) derives its X64 CC flags from `GCC_X64_CC_FLAGS`. So pinning `GCCNOLTO_X64_CC_FLAGS` propagates the ISA baseline to exactly the toolchain that builds OVMF, preserving the original patch's intent. ## Fix Re-anchored the single one-line hunk onto the renamed/relocated `GCCNOLTO_X64_CC_FLAGS` line, inserting `-march=x86-64-v2` immediately after `-m64` (identical placement to the original). The diff body was regenerated with git so the hunk header/counts are correct by construction. The commit message/body is unchanged. ## Verification `patch -p1 --fuzz=0 --dry-run` and a real `patch -p1 --fuzz=0` against a pristine copy of `src/` both apply cleanly (`exit=0`) and yield the intended `-march=x86-64-v2` pin.
eabdullin deleted branch triage/fix-edk2-manual-86018 2026-09-24 07:46:28 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
autopatch/edk2!1
No description provided.