Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion base/comps/components-full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,6 @@
[components.fakeroot]
[components.fast_float]
[components.fcgi]
[components.fcode-utils]
[components.fdk-aac-free]
[components.fdupes]
[components.fedora-iot-config]
Expand Down
16 changes: 16 additions & 0 deletions base/comps/fcode-utils/fcode-utils.comp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[components.fcode-utils]

# Upstream project is dormant (last release v1.0.3 in 2014). The codebase uses
# K&R-style function pointer declarations (e.g. void (*funct)()) and redefines
# bool via typedef, which are incompatible with C23 defaults in GCC 15:
# 1. bool is a keyword in C23; typedef to bool is a hard error
# 2. () means zero params in C23; calling through () pointers with args is an error
# 3. Incompatible pointer type assignments are promoted to errors
# An upstream fix (partial) exists but is not merged: https://github.com/openbios/fcode-utils/pull/32
# Fedora has not patched this either as of rawhide (Feb 2026).
# Force C17 mode to restore pre-C23 semantics until upstream modernizes.
[[components.fcode-utils.overlays]]
description = "Fix GCC 15/C23 build failures by forcing C17 mode for K&R-style function pointers and bool typedef"
type = "spec-search-replace"
regex = 'CFLAGS=.%\{optflags\}.'
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex pattern uses . as a wildcard to match the quote characters around %{optflags}. While this works, it could be more precise by using literal quote characters instead. Consider changing the regex to use explicit quotes for better clarity and to avoid potential edge cases:

Change from:
regex = 'CFLAGS=.%\{optflags\}.'

To:
regex = 'CFLAGS="%\{optflags\}"'

This makes the pattern more explicit about matching double-quoted CFLAGS assignments. However, since you've already validated this with prep-sources and build testing, the current pattern is acceptable.

Suggested change
regex = 'CFLAGS=.%\{optflags\}.'
regex = 'CFLAGS="%\{optflags\}"'

Copilot uses AI. Check for mistakes.
replacement = 'CFLAGS="%{optflags} -std=gnu17"'