Bug 1988732

Summary: grub2: Disable annobin for big-endian linking on ppc64le
Product: Red Hat Enterprise Linux 9 Reporter: Florian Weimer <fweimer>
Component: grub2Assignee: Bootloader engineering team <bootloader-eng-team>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bootloader-eng-team, bstinson, fmartine, jwboyer, rharwood
Target Milestone: betaKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1989178 (view as bug list) Environment:
Last Closed: 2021-09-01 10:43:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Florian Weimer 2021-07-31 14:33:26 UTC
Bug 1983727 switches on the annobin plugin for linker invocations. Unfortunately, that causes a grub2 configure test to fail with relocation errors:

+{standard input}: Assembler messages:
+{standard input}:16: Error: reloc 1 not supported by object file format
+{standard input}:17: Error: reloc 1 not supported by object file format
+{standard input}:543: Error: reloc 1 not supported by object file format
+{standard input}:544: Error: reloc 1 not supported by object file format
+{standard input}:618: Error: reloc 1 not supported by object file format
+{standard input}:619: Error: reloc 1 not supported by object file format
+{standard input}:122: Error: reloc 1 not supported by object file format
+{standard input}:123: Error: reloc 1 not supported by object file format
+{standard input}:228: Error: reloc 1 not supported by object file format
+{standard input}:229: Error: reloc 1 not supported by object file format
+{standard input}:334: Error: reloc 1 not supported by object file format
+{standard input}:335: Error: reloc 1 not supported by object file format
+{standard input}:440: Error: reloc 1 not supported by object file format
+{standard input}:441: Error: reloc 1 not supported by object file format

It seems necessary to extend the annobin removal from CFLAGS to LDFLAGS.

Comment 1 Florian Weimer 2021-07-31 14:41:07 UTC
Merge request: https://gitlab.com/redhat/centos-stream/rpms/grub2/-/merge_requests/7

Built against c9s-build-side-221-stack-gate, which has redhat-rpm-config-187-1.el9.

Comment 2 Florian Weimer 2021-07-31 17:15:21 UTC
Booting with a scratch build on this side tag still works, and the reported GCC version has changed:

grub> version
GNU GRUB  version 2.06~rc1
Platform powerpc-ieee1275
Compiler version 11.2.1 20210728 (Red Hat 11.2.1-2)
grub>