Commit Graph

234 Commits (4d8abf9b3b89c1bce87563dd061f46c0321ab7c3)

Author SHA1 Message Date
Ariadne Conill 4d8abf9b3b update README a bit 2021-03-09 00:42:26 -07:00
Ariadne Conill 7b8f3f6d04 NEWS for 1.1. 2021-03-09 00:33:41 -07:00
Ariadne Conill fb1d203677 everywhere: drop _GNU_SOURCE requirement 2021-03-09 00:25:13 -07:00
Ariadne Conill 1ad20e03e5 add riscv32 port 2021-03-09 00:00:26 -07:00
Ariadne Conill 464f98a01b
Merge pull request #27 from utmapp/qemu-support-v2
Remaining fixes for Apple Silicon and QEMU
2021-03-08 20:48:30 -06:00
osy 9b1d8f01a6 aarch64: remove usage of FUNC macro for clang
Clang's arm64 assembler does not support multiple directives on a single
line. C macros ALWAYS expand to a single line.
2021-03-08 15:13:34 -08:00
osy 5d66c194a7 x86_64: define reg names if not defined
_GNU_SOURCE can be defined without defining REG_X macros so it is not a
good indicator. (QEMU for example defines it in the build system.) x86
and x86_64 should have consistant looking defs.h so ifndef guards are
added to each REG_X definition.
2021-03-08 14:02:58 -08:00
osy f3e1b876c7 project: move freestanding include headers
This is needed because in libucontext.h we include "libucontext/bits.h".
We therefore need to have bits.h in somepath/libucontext/bits.h. In the
Makefile, somepath/freestanding/bits.h was copied to the right path but
in the meson build system, the include copy happens at the end.
2021-03-08 13:02:27 -08:00
Ariadne Conill f04d423e63
Merge pull request #26 from lpereira/armv7l-makefile-fix
Fix ARCH deduction on armv7l when using Makefiles
2021-02-05 11:46:37 -07:00
Leandro Pereira 7823593b6f Fix ARCH deduction on armv7l when using Makefiles
The Makefile on ARMv7l devices (e.g. Raspberry Pi 400 running the
stock Raspbian distro) was failing to deduct the architecture and
empty libraries were being built as a result.  Building with Meson
works fine; only building with make generated empty libraries.

Add an override for armv7l -> arm in the Makefile to address this.
2021-02-05 08:46:38 -08:00
Ariadne Conill 7df60a2504 build: fix install of libucontext_posix.a 2021-01-09 01:00:05 -07:00
Ariadne Conill b757e1268c libucontext 1.0. 2021-01-09 00:57:00 -07:00
Ariadne Conill c4b5fedc1d add NEWS for libucontext 1.0 2021-01-09 00:56:37 -07:00
Ariadne Conill 63b15f130a set SOVERSION to 1 where appropriate 2021-01-09 00:55:58 -07:00
Ariadne Conill 98d7493b2a meson: bump std level to gnu11, since we use static_assert 2021-01-08 16:29:37 -07:00
Ariadne Conill 9affe94dee
Merge pull request #25 from q66/ppc-no-alias
fix ALIAS usage in ppc, fix meson build, hide libucontext_trampoline
2021-01-08 09:59:47 -05:00
Daniel Kolesa f3e0033a06 meson: remove the subproject-based library checking
this is not idiomatic, and should not be done (and it did not even
work in the first place); meson is capable of building both
libraries via library() and then you can choose on commandline

it defaults to only shared, but we want both out of box, so specify
that
2021-01-08 15:56:42 +01:00
Daniel Kolesa 4801f0bdd8 all: mark the trampoline symbol hidden
this should not be a part of the public ABI
2021-01-08 15:17:13 +01:00
Daniel Kolesa 739894e9a7 meson: fix build 2021-01-08 15:17:13 +01:00
Daniel Kolesa efa6464e41 ppc, ppc64: do not use ALIAS for libucontext_swapcontext 2021-01-08 15:17:11 +01:00
osy d592961b1a build: add meson build 2021-01-08 04:25:56 -07:00
Ariadne Conill b1902729f7 aarch64: fix freestanding structure layout when building with clang 2021-01-08 11:19:01 +00:00
Ariadne Conill 5546fde1e5 aarch64: add static asserts for struct layout 2021-01-08 10:39:47 +00:00
Ariadne Conill 09f78ddc28 alias __makecontext too 2021-01-08 10:37:27 +00:00
osy fffb55011b arm: fix broken FETCH_LINKPTR 2021-01-08 03:20:14 -07:00
osy f7eed30132 build: guard _GNU_SOURCE define if build system defines it 2021-01-08 03:16:05 -07:00
Ariadne Conill 3064ad6dbc build: use head -n1 when reading VERSION 2021-01-08 03:12:33 -07:00
osy 9983d136af build: move version number to file 2021-01-08 03:11:47 -07:00
osy d31c95a11a build: remove -DLIBUCONTEXT_ASSEMBLY
Meson does not support separate defines for .S compile.
2021-01-08 03:11:25 -07:00
Ariadne Conill e4233715f3 mips: use PROC_NAME where appropriate 2021-01-08 03:10:10 -07:00
osy 163c11d989 build: support mach-o ABI 2021-01-08 03:05:06 -07:00
osy b6e60b5d64 include: missing stddef.h include for size_t 2021-01-08 03:04:01 -07:00
osy 73d5e101ad build: respect EXPORT_UNPREFIXED for libucontext_makecontext 2021-01-08 03:02:43 -07:00
Ariadne Conill e45956896a common-trampoline: use register keyword to force register allocation 2021-01-08 03:00:37 -07:00
osy e1e6508af2 defs: use register output only for FETCH_LINKPTR 2021-01-08 02:59:43 -07:00
Ariadne Conill 638770cfd0 x86_64: add static assert verifying memory layout 2021-01-08 02:56:45 -07:00
Ariadne Conill 78e880a29f test POSIX ABI compatibility in libucontext itself, too 2021-01-08 02:37:47 -07:00
Ariadne Conill 39a2958561 add previous ABI symbols 2021-01-08 02:30:50 -07:00
Ariadne Conill 5e6e421c54
Merge pull request #23 from q66/static-only-fix
build: depend on headers for the static target
2021-01-08 04:24:13 -05:00
Ariadne Conill 91c8837c93
Merge pull request #24 from q66/ppc-fixes
ppc, ppc64: tag global symbols as functions
2021-01-08 04:23:59 -05:00
Daniel Kolesa cf05112306 ppc, ppc64: use common ALIAS/FUNC/END macros 2021-01-08 04:52:46 +01:00
Daniel Kolesa 6026980cac ppc, ppc64: tag global symbols as functions
it is necessary to tag these symbols as functions otherwise the
linker gets confused; this previously manifested as the internal
functions (pre-rename) like __getcontext leaking into the symbol
table of things linked against libucontext that used the ucontext
POSIX API through the weak aliases

it also had another bad effect and that is if you tried to use
libucontext's API (post-rename), the linker would warn you during
compile time that the type is unknown, and the resulting program
would crash at runtime

after properly tagging everything, I no longer notice any leakage,
i.e. there don't seem to be any references to the aliased symbols
in the resulting symbol table when using the aliases, and using
the libucontext prefixed symbols directly also works
2021-01-08 04:27:27 +01:00
Daniel Kolesa 03927d4c4c build: depend on headers for the static target
this fixes static-only build, i.e. "make libucontext.a"
2021-01-08 03:01:32 +01:00
Ariadne Conill d81154a61c riscv64: port to C trampoline 2020-12-12 00:08:48 -07:00
Ariadne Conill 11a40293be riscv64: simplify the context swapping 2020-12-12 07:05:09 +00:00
Ariadne Conill 6763b5ba1e README: note which archs support C trampoline 2020-12-11 23:53:09 -07:00
Ariadne Conill c986ba340e build: use ARCH=ppc64 by default on ppc64le 2020-12-12 06:46:08 +00:00
Ariadne Conill 22b91690bc aarch64: move to C trampoline 2020-12-12 06:43:58 +00:00
Ariadne Conill afcca79d7b arm: move to C trampoline 2020-12-12 06:40:27 +00:00
Ariadne Conill a6a64b0711 build: fix test_libucontext_posix linkage 2020-12-12 06:37:31 +00:00