From 78e880a29f9dcfe2eeb3fe63c9a67aa800acbe12 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 8 Jan 2021 02:37:47 -0700 Subject: [PATCH] test POSIX ABI compatibility in libucontext itself, too --- .gitignore | 1 + Makefile | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c318186..35d4f49 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ include/libucontext/bits.h examples/cooperative_threading test_libucontext test_libucontext_posix +test_libucontext_bare_posixabi libucontext.a libucontext.so libucontext.so.* diff --git a/Makefile b/Makefile index 06d714a..fc1c9bf 100644 --- a/Makefile +++ b/Makefile @@ -134,7 +134,7 @@ ${LIBUCONTEXT_POSIX_STATIC_NAME}_clean: libucontext_posix_obj_clean: rm -f ${LIBUCONTEXT_POSIX_OBJ} -check_clean: check_bare_clean check_posix_clean +check_clean: check_bare_clean check_posix_clean check_bare_posixabi_clean check_bare_clean: rm -f test_libucontext @@ -142,6 +142,9 @@ check_bare_clean: check_posix_clean: rm -f test_libucontext_posix +check_bare_posixabi_clean: + rm -f test_libucontext_bare_posixabi + docs_clean: rm -f ${MANPAGES} @@ -187,6 +190,16 @@ test_libucontext_posix: test_libucontext_posix.c ${LIBUCONTEXT_POSIX_NAME} $(CC) -std=gnu99 -D_BSD_SOURCE ${CFLAGS} ${CPPFLAGS} $@.c -o $@ -L. -lucontext -lucontext_posix endif +ifeq ($(EXPORT_UNPREFIXED),yes) +check: check_libucontext_bare_posixabi + +check_libucontext_bare_posixabi: test_libucontext_bare_posixabi ${LIBUCONTEXT_SONAME} + env LD_LIBRARY_PATH=$(shell pwd) ./test_libucontext_bare_posixabi + +test_libucontext_bare_posixabi: test_libucontext_posix.c ${LIBUCONTEXT_NAME} + $(CC) -std=gnu99 -D_BSD_SOURCE ${CFLAGS} ${CPPFLAGS} test_libucontext_posix.c -o $@ -L. -lucontext +endif + check: test_libucontext ${LIBUCONTEXT_SONAME} env LD_LIBRARY_PATH=$(shell pwd) ./test_libucontext