Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move zsvjmp assembler files to unix/os and merge them #117

Merged
merged 3 commits into from
Aug 19, 2020

Conversation

olebole
Copy link
Member

@olebole olebole commented Jul 29, 2020

Since the zsvjmp.[sS] files were the last remnants of unix/as.<arch>, this will remove these subdirectories. This has a number of advantages:

  • the directory structure simplifies a bit
  • there are no longer files outside of their supposed location (zsvjmp.s belongs to libos.a; its source therefore belong to unix/os)
  • The correct code is now selected by the compiler and not by make <arch>. This is a step on the way to make make <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.
  • No longer code duplication; which makes an extension to macOS/arm64 (probably) quite simple

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:

  • macOS has a leading underscore on symbols, so _zsvjmp_, others don't have this: zsvjmp_ (the trailing underscore is from being a Fortran symbol)
  • The 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 previously setjmp)
    • __sigsetjmp@PLT (Linux on x86-64, i386, x32)
    • __sigsetjmp@plt (Linux on riscv64))

The code still needs some tests with the different architectures.

@olebole olebole force-pushed the remove-as.arch branch 4 times, most recently from 2668692 to 330f410 Compare July 30, 2020 14:55
@olebole
Copy link
Member Author

olebole commented Aug 6, 2020

The different architectures could be successfully built on Debian experimental, including the use of __sigsetjmp on the alpha architecture.
The use of _sigsetjmp on macOS 32bit was tested on Travis.

@olebole olebole merged commit 39e7dba into iraf-community:master Aug 19, 2020
@olebole olebole deleted the remove-as.arch branch August 19, 2020 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant