Ticket Hash: faa62e09348b11a9459e2ea03df10a7ac3affab9
Title: Error building tdom on RiscV
Status: Closed Type: Build_Problem
Severity: Important Priority: Immediate
Subsystem: Resolution: Implemented
Last Modified: 2024-07-02 22:38:24
Version Found In: 0.9.3
User Comments:
anonymous added on 2023-10-30 19:35:03:

File domhtml.c generates a compiler error when using default "-O2":

Assembler messages: Fatal error: Infinite loop encountered whilst attempting to compute the addresses of symbols in section .text

This happens on RiscV running Debian with gcc 12.2.0.

Guarding the following initialization with optimization pragmas, removes the error.

#ifdef __riscv
#pragma GCC push_options
#pragma GCC optimize ("O0")
#endif

static Er er_sequences[] = {
   { "amp",       "&",        0 },
   ...
   { "diams",     "\xE2\x99\xA6",    0 }, 
};
#ifdef __riscv
#pragma GCC pop_options
#endif

rolf added on 2024-07-02 22:38:24:
Added [55d88884ed73c699] as temporary work around for this bug of the gcc build chain on RiscV