Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 851831 - sys-boot/grub-2.06-r2: clang-14: error: optimization flag '-falign-jumps=1' is not supported
Summary: sys-boot/grub-2.06-r2: clang-14: error: optimization flag '-falign-jumps=1' i...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
: 853178 (view as bug list)
Depends on:
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2022-06-14 06:59 UTC by nvinson234
Modified: 2022-06-20 15:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,48.12 KB, text/plain)
2022-06-14 07:01 UTC, nvinson234
Details
config.log (config.log,428.44 KB, text/plain)
2022-06-14 07:01 UTC, nvinson234
Details
grub-2.06-falign.patch (grub-2.06-falign.patch,1.67 KB, patch)
2022-06-14 07:03 UTC, nvinson234
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nvinson234 2022-06-14 06:59:58 UTC
sys-boot/grub-2.06-r2 fails to configure because '-falign-jumps=1' is incorrectly added to CFLAGS.

Reproducible: Always

Steps to Reproduce:
1. build grub 2.06-r2 with clang-14
2. observe build failure
3. examine configure.log
Actual Results:  
grub fails to configure with error 'configure: error: could not force soft-float'.  Analysis of config.log shows this is because 'falign-jumps=1' was added to CFLAGS.

Expected Results:  
grub configures and builds succssfully
Comment 1 nvinson234 2022-06-14 07:01:39 UTC
Created attachment 784724 [details]
build.log
Comment 2 nvinson234 2022-06-14 07:01:58 UTC
Created attachment 784727 [details]
config.log
Comment 3 nvinson234 2022-06-14 07:03:41 UTC
Created attachment 784730 [details, diff]
grub-2.06-falign.patch

Patch to fix the issue. Changes backported from upstream's configure.ac.
Comment 4 Mike Gilbert gentoo-dev 2022-06-16 16:12:17 UTC
Please provide a link to the upstream commit that adjusted configure.ac.
Comment 6 Oskari Pirhonen 2022-06-18 00:57:25 UTC
It actually seems to be a combination of that one and the previous one.

eb4868 - configure: Remove obsoleted -malign-{jumps, loops, functions}
e372dc - configure: Check for -falign-jumps=1 beside -falign-loops=1

Links to the other commit too:

https://git.savannah.gnu.org/cgit/grub.git/commit/?id=eb486898dac8cbc29b2cc39f911b657c3417ae34
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-20 14:27:07 UTC
*** Bug 853178 has been marked as a duplicate of this bug. ***
Comment 8 Mike Gilbert gentoo-dev 2022-06-20 15:05:18 UTC
(In reply to Oskari Pirhonen from comment #6)

Thanks for the tip.
Comment 9 Larry the Git Cow gentoo-dev 2022-06-20 15:10:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=830e49d291888e4d9ef8fec431a104f7cf9d1e21

commit 830e49d291888e4d9ef8fec431a104f7cf9d1e21
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2022-06-20 15:08:49 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2022-06-20 15:08:57 +0000

    sys-boot/grub: backport changes to fix build with clang
    
    Closes: https://bugs.gentoo.org/851831
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-boot/grub/Manifest            | 2 +-
 sys-boot/grub/grub-2.06-r2.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)