Skip to content

Commit ba7f8e7

Browse files
committed
modules/linux: ppc64 gcc 15.1 fixes (TODO: verify all needed?)
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
1 parent 4f3face commit ba7f8e7

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

modules/linux

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,18 @@ ifeq "$(CONFIG_LINUX_VERSION)" "4.14.62"
145145
EXTRA_FLAGS += -Wno-cast-function-type
146146
endif
147147

148+
# PowerPC specific alignment fixes for GCC 15.1.0
149+
ifeq "$(CONFIG_TARGET_ARCH)" "ppc64"
150+
# Comprehensive GCC 15.1.0 PowerPC compatibility flags
151+
EXTRA_FLAGS += -fno-stack-protector
152+
EXTRA_FLAGS += -O1
153+
EXTRA_FLAGS += -fno-schedule-insns -fno-schedule-insns2
154+
EXTRA_FLAGS += -fno-reorder-blocks
155+
EXTRA_FLAGS += -fno-tree-vectorize
156+
# Force GNU C11 for PowerPC boot code to avoid C23 bool keyword conflicts
157+
EXTRA_FLAGS += -std=gnu11
158+
endif
159+
148160
linux_target := \
149161
O="$(build)/$(linux_dir)" \
150162
ARCH="$(LINUX_ARCH)" \
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/arch/powerpc/boot/Makefile 2025-08-19 18:11:03.942092926 +0000
2+
+++ b/arch/powerpc/boot/Makefile 2025-08-19 18:11:03.943875445 +0000
3+
@@ -79,7 +79,7 @@
4+
$(call cc-option,-mno-pcrel) \
5+
$(call cc-option,-mno-mma) \
6+
$(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \
7+
- -fomit-frame-pointer -fno-builtin -fPIC
8+
+ -fomit-frame-pointer -fno-builtin -fPIC -std=gnu11
9+
10+
BOOTAFLAGS := $(BOOTTARGETFLAGS) -D__ASSEMBLY__
11+

0 commit comments

Comments
 (0)