Previously FXSDK_COMPILER_INSTALL would be stored as the install prefix.
However, this prefix is subject to unannounced changes when the compiler
version is upgraded without reconfiguring the fxlibc, which happens in
the GiteaPC workflow.
This commit avoids the use of CMAKE_INSTALL_PREFIX when using gint with
no specified prefix, and instead uses another cached variable which
leaves the prefix to be dynamically resolved based on the uncached
variable FXSDK_COMPILER_INSTALL, like most repositories do (eg. gint).
We need the cached indicator because we frequently reconfigure and
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT is not persistent.
@update
> CMakeLists.txt
| remove the generation of the shared version of the fxlibc (deprecated, unused)
> include/errno
| add some error macros needed in vhex
> src/string/strerror
| add EINTR support
| add EAGAIN support
| add ENOMEDIUM support
| add EMEDIUMTYPE support
@fix
> include/target/vhex
| add missing headers
@update
> malloc : do not use syscall, involve kmalloc
> realloc : do not use syscall, involve krealloc
> free : do not use syscall, involve kfree
@fix
> _Exit : remove syscall
This version of signal (which does not rely on a notion of userland
processes and is thus excluded from Vhex) follows C99 semantics but does
not generate any signals by default.
Basically, the signal function sets up function pointers and the signal
function calls them. Termination signals call exit() while other signals
call _Exit(), which is a quicker program termination similar to abort().
C99 allows programs to long jump out of signal handlers (!) which is
unbelievably scary because it would bypass stack switching code in Vhex
as well as normal interrupt handler termination in gint.
This is implemented for gint only currently; on Vhex, _Exit() is likely
just going to be a syscall. For CASIOWIN, this is slightly more
difficult, as there is no native exit syscall.
This change provides an optimized hand-written strlen function for
SuperH targets. The original plan was to declare the C-based naive
version weak and just let the linker figure out the proper one to use,
but unfortunately static libraries don't work like that; ld
intentionally stops at the first version even if it's weak. Instead,
some #ifdef's are used in the C-based strlen to not compile it when
unneeded.
The optimized strlen uses 4-byte accesses and cmp/str.