Hello,
I'm seeing the following issue when building SeaBIOS with gcc > 4.8:
Compiling whole program out/ccode32flat.o Compiling whole program out/code32seg.o Compiling whole program out/ccode16.o /tmp//ccecsJuF.s: Assembler messages: /tmp//ccecsJuF.s:539: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:545: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:966: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:1484: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:1813: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:1922: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:2626: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:2632: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:2793: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:3050: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:3056: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:3387: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:3649: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:3829: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:4111: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:4620: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:4626: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:5538: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:5544: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:6140: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:6146: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:7186: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:7192: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:7376: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:7382: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:7732: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:7799: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:7805: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:8001: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:8007: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:8932: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:10170: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:10176: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:10919: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:10925: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:11315: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:11321: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:11824: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:11830: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:12337: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:12343: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:12523: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:12647: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:12653: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:13019: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:13535: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:13671: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:13677: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:14363: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:14369: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:14862: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:14962: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:14968: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:15297: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:15303: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:15854: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:15860: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:16243: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:16249: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:16445: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:16451: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:16814: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:16820: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:17392: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:17503: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:17613: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:17706: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:17712: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:18306: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:18312: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:18450: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:18456: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:18802: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:18808: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:19122: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:19128: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:19372: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:19378: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:19692: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:19698: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:20491: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:20497: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:20603: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:20609: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:21003: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:21009: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:21658: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:21958: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:22162: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:22633: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:22848: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:22854: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:24399: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:24405: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:25008: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:25014: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:25412: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:26448: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:26454: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:27363: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:27597: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:27686: Error: register save offset not a multiple of 8 /tmp//ccecsJuF.s:27692: Error: register save offset not a multiple of 8 Makefile:154: recipe for target 'out/ccode16.o' failed gmake: *** [out/ccode16.o] Error 1
This works fine when using gcc 4.8, but fails in the same way with gcc 5.4. The assembler version used is:
GNU assembler version 2.25.1 (x86_64-portbld-freebsd11.0) using BFD version (GNU Binutils) 2.25.1
What causes this issue seems to be the usage of the "-m16" gcc flag, which was introduced in gcc 4.9 AFAICT. The following workaround solves the issue, but I would like to know if anyone else has seen this with newer gcc versions, or if the gcc version from FreeBSD ports is broken.
Thanks, Roger.
--- diff --git a/Makefile b/Makefile index 4930b3a..19a1e7d 100644 --- a/Makefile +++ b/Makefile @@ -73,8 +73,7 @@ CFLAGSSEG := $(COMMONCFLAGS) -DMODESEGMENT=1 -fno-defer-pop \ $(call cc-option,$(CC),-fno-jump-tables,-DMANUAL_NO_JUMP_TABLE) \ $(call cc-option,$(CC),-fno-tree-switch-conversion,) CFLAGS32SEG := $(CFLAGSSEG) -DMODE16=0 -CFLAGS16 := $(CFLAGSSEG) -DMODE16=1 \ - $(call cc-option,$(CC),-m16,-Wa$(COMMA)src/code16gcc.s) \ +CFLAGS16 := $(CFLAGSSEG) -DMODE16=1 -Wa$(COMMA)src/code16gcc.s \ $(call cc-option,$(CC),--param large-stack-frame=4,-fno-inline)
# Run with "make V=1" to see the actual compile commands