Commit Graph

19 Commits (938d0d577113a850b22fa93aae4fc944a91c58af)

Author SHA1 Message Date
Khem Raj e2178de76a Makefile: Add LIBDIR variable
This ensures that it can be installed into custom location and also

Upstream-Status: Submitted
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-03-30 08:21:52 +00:00
Ariadne Conill 8536f1fa3b makefile: add include path for arch/common 2020-03-29 13:46:19 +00:00
Ariadne Conill 5f137a1fe4
Merge pull request #16 from gabrielivascu/master
Makefile: i386, i686 -> x86
2020-03-27 03:09:32 -06:00
Khem Raj 6cfab025e0 pass LDFLAGS to link step
This helps to use OE specific linker flags and fixes

do_package_qa: QA Issue: No GNU_HASH in the ELF binary

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-03-27 08:54:56 +00:00
Gabriel Ivașcu acff6c83eb Makefile: i386, i686 -> x86 2019-10-22 18:08:47 +03:00
Gabriel Ivașcu 2e15b38327 Makefile: Handle static library at clean/install 2019-04-12 10:48:24 +03:00
Gabriel Ivașcu 9cc1a2c0e6 Build static library too 2019-04-09 16:07:39 +03:00
Bobby Bingham 2610c7faa7 ppc32/64: rewrite get/set/swapcontext in assembly
getcontext cannot be correctly implemented in C.

If this calls another function, as it does to call syscall, it needs to
first spill its return address to the stack.  If, after getcontext returns,
its caller then calls other functions, this saved return address can be
clobbered.  When the context saved by getcontext is later restored, the
(now clobbered) return address will be reloaded from the stack, and the
second return from getcontext will return to the wrong location.

Because the powerpc swapcontext syscall allows either the old context or
new context pointers to be null, it is usable for implementing all of
get/set/swapcontext.

We therefore rewrite swapcontext in assembly, and get/setcontext as simple
assembly function wrappers around swapcontext.

The one piece we keep in C is the code to check the return value of the
system call and to set errno.  This code was actually unnecessary before --
libc does this within syscall.  However, now that the system call is made
directly in assembly, bypassing libc, it is truly necessary.  Because errno
is thread-local and the details of how to set it can vary by libc, this
code remains written in C.
2019-04-05 14:44:54 -05:00
William Pitcock f0741bc7a0 build: use -lucontext instead of libucontext.so in linker flags for test program 2018-02-15 04:41:22 +00:00
William Pitcock 70089a405c build: use absolute path for LD_LIBRARY_PATH when testing 2018-02-14 03:30:50 +00:00
William Pitcock 0188f29771 build: remove test_libucontext on make clean 2018-02-14 03:01:35 +00:00
William Pitcock c28af0399e build: rebuild test program if it is modified 2018-02-01 01:27:13 +00:00
William Pitcock 3f63152bbc build: add -Iarch/${ARCH} to CFLAGS 2018-01-31 20:37:00 +00:00
William Pitcock b686d707b2 build: fix arch detection 2018-01-31 05:58:26 +00:00
William Pitcock a6dfb59ef2 build: default ARCH to $(uname -m) 2018-01-31 04:13:32 +00:00
William Pitcock f17103b6f4 build: build testsuite with -ggdb3 2018-01-31 04:12:09 +00:00
William Pitcock 29225e0974 build: add libucontext test program 2018-01-30 03:53:04 +00:00
William Pitcock da10e5a66d implement ucontext functions on x86_64 2018-01-30 03:41:02 +00:00
William Pitcock 6062fc83b1 don't bother with glibc stuff afterall, kernel defines ABI to use 2018-01-29 21:50:49 +00:00