
Hello, I'm trying to build ghc-8.10.2 on OpenBSD 6.7, the build finally fails with an error message from the assembler: ===--- building phase 0 gmake --no-print-directory -f ghc.mk phase=0 phase_0_builds gmake[1]: Nothing to be done for 'phase_0_builds'. ===--- building phase 1 gmake --no-print-directory -f ghc.mk phase=1 phase_1_builds gmake[1]: Nothing to be done for 'phase_1_builds'. ===--- building final phase gmake --no-print-directory -f ghc.mk phase=final all "inplace/bin/ghc-stage1" -optc-Wall -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Wno-aggregate-return -optc-Iincludes -optc-Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-ghcconstants/header -optc-Iincludes/dist-install/build -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-DFS_NAMESPACE=rts -optc-fno-strict-aliasing -optc-fno-common -optc-Irts/dist/build/./autogen -optc-Werror=unused-but-set-variable -optc-Wno-error=inline -optc-O2 -optc-fomit-frame-pointer -optc-g -optc-DRtsWay=\"rts_v\" -optc-w -static -O0 -H64m -Wall -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Iincludes/dist-install/build -Irts -Irts/dist/build -DCOMPILING_RTS -DFS_NAMESPACE=rts -this-unit-id rts -dcmm-lint -i -irts -irts/dist/build -Irts/dist/build -irts/dist/build/./autogen -Irts/dist/build/./autogen -O2 -Wcpp-undef -Wnoncanonical-monad-instances -c rts/StgCRun.c -o rts/dist/build/StgCRun.o rts/StgCRun.c: Assembler messages: rts/StgCRun.c:382:0: error: Error: CFI instruction used without previous .cfi_startproc | 382 | "movq %%rbx,0(%%rax)\n\t" | ^ rts/StgCRun.c:383:0: error: Error: CFI instruction used without previous .cfi_startproc | 383 | "movq %%rbp,8(%%rax)\n\t" | ^ rts/StgCRun.c:384:0: error: Error: CFI instruction used without previous .cfi_startproc | 384 | "movq %%r12,16(%%rax)\n\t" | ^ rts/StgCRun.c:385:0: error: Error: CFI instruction used without previous .cfi_startproc | 385 | "movq %%r13,24(%%rax)\n\t" | ^ rts/StgCRun.c:386:0: error: Error: CFI instruction used without previous .cfi_startproc | 386 | "movq %%r14,32(%%rax)\n\t" | ^ rts/StgCRun.c:387:0: error: Error: CFI instruction used without previous .cfi_startproc | 387 | "movq %%r15,40(%%rax)\n\t" | ^ rts/StgCRun.c:388:0: error: Error: CFI instruction used without previous .cfi_startproc | 388 | #if defined(mingw32_HOST_OS) | ^ rts/StgCRun.c:389:0: error: Error: CFI instruction used without previous .cfi_startproc | 389 | /* | ^ rts/StgCRun.c:390:0: error: Error: CFI instruction used without previous .cfi_startproc | 390 | * Additional callee saved registers on Win64. This must match | ^ `egcc' failed in phase `Assembler'. (Exit code: 1) gmake[1]: *** [rts/ghc.mk:322: rts/dist/build/StgCRun.o] Error 1 gmake: *** [Makefile:128: all] Error 2 Looking in the source file rts/StgCRun.c and reading the GNU assembler manual concerning CFI directives, it seems to me that in the function StgRunIsImplementedInAssembler starting on line 368 the assembler block should perhaps have started with .cfi_startproc and ended with .cfi_endproc . Although I suspect it's perhaps a question of telling GCC not to expect those directives. I'm using gcc-8.3.0 and ghc-8.6.4 to compile. I would be grateful for any insight anyone might have to offer. -- Kindly, Björn Gohla