d859a77dbd
Linking on Haiku OS fails: /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: error: libqemu-mips-softmmu.fa.p/target_mips_tcg_sysemu_mips-semi.c.o(.rodata) is too large (0xffff405a bytes) /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: final link failed: memory exhausted collect2: error: ld returned 1 exit status This is because the host_to_mips_errno[] uses errno as index, for example: static const uint16_t host_to_mips_errno[] = { [ENAMETOOLONG] = 91, ... and Haiku defines [*] ENAMETOOLONG as: 12 /* Error baselines */ 13 #define B_GENERAL_ERROR_BASE INT_MIN .. 22 #define B_STORAGE_ERROR_BASE (B_GENERAL_ERROR_BASE + 0x6000) ... 106 #define B_NAME_TOO_LONG (B_STORAGE_ERROR_BASE + 4) ... 211 #define ENAMETOOLONG B_TO_POSIX_ERROR(B_NAME_TOO_LONG) so the array ends up beeing indeed too big. Since POSIX errno can't be use as indexes on Haiku, rewrite errno_mips() using a switch statement. [*] https://github.com/haiku/haiku/blob/r1beta3/headers/os/support/Errors.h#L130 Reported-by: Richard Zak <richard.j.zak@gmail.com> Suggested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210706130723.1178961-1-f4bug@amsat.org> |
||
---|---|---|
.. | ||
sysemu | ||
user | ||
dsp_helper.c | ||
exception.c | ||
fpu_helper.c | ||
ldst_helper.c | ||
lmmi_helper.c | ||
meson.build | ||
micromips_translate.c.inc | ||
mips16e_translate.c.inc | ||
mips32r6.decode | ||
mips64r6.decode | ||
msa_helper.c | ||
msa_helper.h.inc | ||
msa_translate.c | ||
msa.decode | ||
mxu_translate.c | ||
nanomips_translate.c.inc | ||
op_helper.c | ||
rel6_translate.c | ||
sysemu_helper.h.inc | ||
tcg-internal.h | ||
trace-events | ||
trace.h | ||
translate_addr_const.c | ||
translate.c | ||
translate.h | ||
tx79_translate.c | ||
tx79.decode | ||
txx9_translate.c |