From d7688a41df4cbe51e52bfebbab7d411548ed7738 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 30 Mar 2020 02:22:43 -0500 Subject: [PATCH 1/3] README: Remove support section This is no longer a member of the gcompat family of projects; remove the mention of that and the gcompat mailing list link. --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 97a03b6..1db0516 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,3 @@ $ make ARCH=x86_64 check $ make ARCH=x86_64 DESTDIR=out install ``` - -## support - -`libucontext` is offered as part of the `gcompat` project. Accordingly, please address all questions -and bug reports to gcompat@lists.adelielinux.org. From e2178de76a7d3f41fed7cc5bef3e68eea623a72a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 30 Mar 2020 08:21:20 +0000 Subject: [PATCH 2/3] Makefile: Add LIBDIR variable This ensures that it can be installed into custom location and also Upstream-Status: Submitted Signed-off-by: Khem Raj --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a8dedc2..74ebdbf 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ ifeq ($(ARCH),$(filter $(ARCH),i386 i686)) override ARCH = x86 endif +LIBDIR := /lib CFLAGS = -ggdb3 -O2 -Wall -Iarch/${ARCH} -Iarch/common LIBUCONTEXT_C_SRC = $(wildcard arch/${ARCH}/*.c) @@ -13,8 +14,8 @@ LIBUCONTEXT_SOVERSION = 0 LIBUCONTEXT_NAME = libucontext.so LIBUCONTEXT_STATIC_NAME = libucontext.a LIBUCONTEXT_SONAME = libucontext.so.${LIBUCONTEXT_SOVERSION} -LIBUCONTEXT_PATH = /lib/${LIBUCONTEXT_SONAME} -LIBUCONTEXT_STATIC_PATH = /lib/${LIBUCONTEXT_STATIC_NAME} +LIBUCONTEXT_PATH = ${LIBDIR}/${LIBUCONTEXT_SONAME} +LIBUCONTEXT_STATIC_PATH = ${LIBDIR}/${LIBUCONTEXT_STATIC_NAME} all: ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_STATIC_NAME} @@ -39,9 +40,9 @@ clean: ${LIBUCONTEXT_OBJ} test_libucontext install: all - install -D -m755 ${LIBUCONTEXT_NAME} ${DESTDIR}/${LIBUCONTEXT_PATH} - install -D -m664 ${LIBUCONTEXT_STATIC_NAME} ${DESTDIR}/${LIBUCONTEXT_STATIC_PATH} - ln -sf ${LIBUCONTEXT_SONAME} ${DESTDIR}/lib/${LIBUCONTEXT_NAME} + install -D -m755 ${LIBUCONTEXT_NAME} ${DESTDIR}${LIBUCONTEXT_PATH} + install -D -m664 ${LIBUCONTEXT_STATIC_NAME} ${DESTDIR}${LIBUCONTEXT_STATIC_PATH} + ln -sf ${LIBUCONTEXT_SONAME} ${DESTDIR}${LIBDIR}/${LIBUCONTEXT_NAME} check: test_libucontext ${LIBUCONTEXT_SONAME} env LD_LIBRARY_PATH=$(shell pwd) ./test_libucontext From 467ee2916d0eacbd32af10ead14e5d86e365fa2b Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 30 Mar 2020 17:25:30 -0500 Subject: [PATCH 3/3] x86: Update copyright statement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit d0ccf2f96f12bfa040cc056f7dc26b3fd25c168d contains the makecontext fix from Adélie commit aaeb73ea701388e55b7640e32509a5f6a57f6350[1], as seen at AdelieLinux/libucontext@aaeb73ea – but it didn't include the addition of my author line. The full commit text, for future documentation/reference, was: ``` x86: Write link pointer at correct stack offset It must come *after* the parameters, not *before*. ``` Fixes: d0ccf2f96f12 ("x86: modernize") Signed-off-by: A. Wilcox [1]: https://code.foxkit.us/adelie/libucontext/commit/aaeb73ea701388e55b7640e32509a5f6a57f6350 --- arch/x86/makecontext.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/makecontext.c b/arch/x86/makecontext.c index ee9c2e2..bc8163c 100644 --- a/arch/x86/makecontext.c +++ b/arch/x86/makecontext.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2018 Ariadne Conill + * Copyright (c) 2019 A. Wilcox * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above