← Commit list

db793480c

Denys Vlasenko
Denys Vlasenko
2020-12-14
SUCCESS Duration: 149s

Subject

build system: combat gcc zealotry in data alignment

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

arch/i386/Makefile+8 -0
@@ -11,3 +11,11 @@ ifeq ($(CONFIG_STACK_OPTIMIZATION_386),y)
# from aligning stack to 16 bytes. (Which is gcc's way of supporting SSE).
CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2,)
endif
+
+# "Control how GCC aligns variables.
+# Supported values for type are compat uses increased alignment value
+# compatible uses GCC 4.8 and earlier, abi uses alignment value as specified by the psABI,
+# and cacheline uses increased alignment value to match the cache line size.
+# compat is the default."
+# "abi" seems to be somewhat successful in preventing oversealous data alignment.
+CFLAGS += $(call cc-option,-malign-data=abi,)