]> xenbits.xensource.com Git - qemu-xen.git/commit
target/xtensa/xtensa-semi: Fix compilation problem on Haiku
authorThomas Huth <thuth@redhat.com>
Tue, 6 Jul 2021 08:18:22 +0000 (10:18 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 9 Jul 2021 16:42:46 +0000 (18:42 +0200)
commit3b51b506686f41dba55a0e9567c4d9a7ffb8632c
tree421c3ea13441a53b2e5eecb300f38b152fa8b75d
parent4c6dd9a0262d39eb8570ba077b5320df682603d1
target/xtensa/xtensa-semi: Fix compilation problem on Haiku

The errno numbers are very large on Haiku, so the linking currently
fails there with a "final link failed: memory exhausted" error
message. We should not use the errno number as array indexes here,
thus convert the code to a switch-case statement instead. A clever
compiler should be able to optimize this code in a similar way
anway.

Reported-by: Richard Zak <richard.j.zak@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210706081822.1316551-1-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
target/xtensa/xtensa-semi.c