Move zsvjmp assembler files to unix/os and merge them #117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since the
zsvjmp.[sS]
files were the last remnants ofunix/as.<arch>
, this will remove these subdirectories. This has a number of advantages:zsvjmp.s
belongs tolibos.a
; its source therefore belong tounix/os
)make <arch>
. This is a step on the way to makemake <arch>
optional (f.e. on Debian, Mageia and Fedora packages, the bindirs are not architecture dependent anymore). We are also flexible for the name of the upcoming macOS/arm64 release.The downside is a somehow complex
zsvjmp.S
with a long#if defined(arch) … #elif defined(arch) … #endif
chain, with sometimes#if __APPLE__
in between. Reason is that symbols are different between versions:_zsvjmp_
, others don't have this:zsvjmp_
(the trailing underscore is from being a Fortran symbol)setjmp
/sigsetjmp
call has several versions:sigsetjmp
(FreeBSD)_sigsetjmp
(macOS; on 32 bit it was previously_setjmp
)__sigsetjmp
(Linux on arm, mips, ppc, s390x, alpha; on alpha it was previouslysetjmp
)__sigsetjmp@PLT
(Linux on x86-64, i386, x32)__sigsetjmp@plt
(Linux on riscv64))The code still needs some tests with the different architectures.