From d31c95a11af56c5724be204fc80703e3fbe8e86a Mon Sep 17 00:00:00 2001 From: osy <50960678+osy@users.noreply.github.com> Date: Sat, 2 Jan 2021 21:08:54 -0800 Subject: [PATCH] build: remove -DLIBUCONTEXT_ASSEMBLY Meson does not support separate defines for .S compile. --- Makefile | 2 +- arch/aarch64/makecontext.c | 1 + arch/aarch64/trampoline.c | 1 + arch/arm/makecontext.c | 1 + arch/arm/trampoline.c | 1 + arch/common/common-defs.h | 6 ------ arch/m68k/makecontext.c | 1 + arch/m68k/trampoline.c | 1 + arch/ppc/makecontext.c | 1 + arch/ppc64/makecontext.c | 1 + arch/riscv64/makecontext.c | 1 + arch/riscv64/trampoline.c | 1 + arch/s390x/makecontext.c | 1 + arch/sh/makecontext.c | 1 + arch/sh/trampoline.c | 1 + arch/x86/makecontext.c | 1 + arch/x86/trampoline.c | 1 + arch/x86_64/makecontext.c | 1 + arch/x86_64/trampoline.c | 1 + 19 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index fc1c9bf..73ee45b 100644 --- a/Makefile +++ b/Makefile @@ -105,7 +105,7 @@ docs: ${MANPAGES} $(CC) -std=gnu99 -D_BSD_SOURCE -fPIC -DPIC ${CFLAGS} ${CPPFLAGS} -c -o $@ $< .S.o: - $(CC) -fPIC -DPIC -DLIBUCONTEXT_ASSEMBLY ${CFLAGS} ${CPPFLAGS} -c -o $@ $< + $(CC) -fPIC -DPIC ${CFLAGS} ${CPPFLAGS} -c -o $@ $< ${LIBUCONTEXT_NAME}_clean: rm -f ${LIBUCONTEXT_NAME} diff --git a/arch/aarch64/makecontext.c b/arch/aarch64/makecontext.c index fcc6ffd..5afd0ac 100644 --- a/arch/aarch64/makecontext.c +++ b/arch/aarch64/makecontext.c @@ -17,6 +17,7 @@ #include #include #include "defs.h" +#include extern void libucontext_trampoline(void); diff --git a/arch/aarch64/trampoline.c b/arch/aarch64/trampoline.c index 83eb453..699a050 100644 --- a/arch/aarch64/trampoline.c +++ b/arch/aarch64/trampoline.c @@ -1,2 +1,3 @@ #include "defs.h" +#include #include "common-trampoline.c" diff --git a/arch/arm/makecontext.c b/arch/arm/makecontext.c index 6e98907..76191fa 100644 --- a/arch/arm/makecontext.c +++ b/arch/arm/makecontext.c @@ -19,6 +19,7 @@ #include "defs.h" +#include extern void libucontext_trampoline(void); diff --git a/arch/arm/trampoline.c b/arch/arm/trampoline.c index 83eb453..699a050 100644 --- a/arch/arm/trampoline.c +++ b/arch/arm/trampoline.c @@ -1,2 +1,3 @@ #include "defs.h" +#include #include "common-trampoline.c" diff --git a/arch/common/common-defs.h b/arch/common/common-defs.h index 3e8b607..8ba97bf 100644 --- a/arch/common/common-defs.h +++ b/arch/common/common-defs.h @@ -58,10 +58,4 @@ PROC_NAME(__proc): \ #define REG_OFFSET(__reg) (MCONTEXT_GREGS + ((__reg) * REG_SZ)) -#ifndef LIBUCONTEXT_ASSEMBLY - -#include - -#endif - #endif diff --git a/arch/m68k/makecontext.c b/arch/m68k/makecontext.c index a454688..f567eb2 100644 --- a/arch/m68k/makecontext.c +++ b/arch/m68k/makecontext.c @@ -17,6 +17,7 @@ #include #include #include "defs.h" +#include extern void libucontext_trampoline(void); diff --git a/arch/m68k/trampoline.c b/arch/m68k/trampoline.c index 83eb453..699a050 100644 --- a/arch/m68k/trampoline.c +++ b/arch/m68k/trampoline.c @@ -1,2 +1,3 @@ #include "defs.h" +#include #include "common-trampoline.c" diff --git a/arch/ppc/makecontext.c b/arch/ppc/makecontext.c index 2c1325c..a91104e 100644 --- a/arch/ppc/makecontext.c +++ b/arch/ppc/makecontext.c @@ -17,6 +17,7 @@ #include "defs.h" +#include extern void libucontext_trampoline(void); diff --git a/arch/ppc64/makecontext.c b/arch/ppc64/makecontext.c index 891f85e..aafccec 100644 --- a/arch/ppc64/makecontext.c +++ b/arch/ppc64/makecontext.c @@ -17,6 +17,7 @@ #include "defs.h" +#include extern void libucontext_trampoline(void); diff --git a/arch/riscv64/makecontext.c b/arch/riscv64/makecontext.c index 57b9bc3..a456d5c 100644 --- a/arch/riscv64/makecontext.c +++ b/arch/riscv64/makecontext.c @@ -17,6 +17,7 @@ #include #include #include "defs.h" +#include extern void libucontext_trampoline(void); diff --git a/arch/riscv64/trampoline.c b/arch/riscv64/trampoline.c index 83eb453..699a050 100644 --- a/arch/riscv64/trampoline.c +++ b/arch/riscv64/trampoline.c @@ -1,2 +1,3 @@ #include "defs.h" +#include #include "common-trampoline.c" diff --git a/arch/s390x/makecontext.c b/arch/s390x/makecontext.c index e306680..6f7cc8e 100644 --- a/arch/s390x/makecontext.c +++ b/arch/s390x/makecontext.c @@ -18,6 +18,7 @@ #include "defs.h" +#include extern void libucontext_trampoline(void); diff --git a/arch/sh/makecontext.c b/arch/sh/makecontext.c index 1430a35..b039dfd 100644 --- a/arch/sh/makecontext.c +++ b/arch/sh/makecontext.c @@ -17,6 +17,7 @@ #include #include #include "defs.h" +#include extern void libucontext_trampoline(void); diff --git a/arch/sh/trampoline.c b/arch/sh/trampoline.c index 83eb453..699a050 100644 --- a/arch/sh/trampoline.c +++ b/arch/sh/trampoline.c @@ -1,2 +1,3 @@ #include "defs.h" +#include #include "common-trampoline.c" diff --git a/arch/x86/makecontext.c b/arch/x86/makecontext.c index 14d0355..571c13b 100644 --- a/arch/x86/makecontext.c +++ b/arch/x86/makecontext.c @@ -17,6 +17,7 @@ #include #include #include "defs.h" +#include extern void libucontext_trampoline(void); diff --git a/arch/x86/trampoline.c b/arch/x86/trampoline.c index 83eb453..699a050 100644 --- a/arch/x86/trampoline.c +++ b/arch/x86/trampoline.c @@ -1,2 +1,3 @@ #include "defs.h" +#include #include "common-trampoline.c" diff --git a/arch/x86_64/makecontext.c b/arch/x86_64/makecontext.c index 33156b7..4458507 100644 --- a/arch/x86_64/makecontext.c +++ b/arch/x86_64/makecontext.c @@ -17,6 +17,7 @@ #include #include "defs.h" +#include extern void libucontext_trampoline(void); diff --git a/arch/x86_64/trampoline.c b/arch/x86_64/trampoline.c index 83eb453..699a050 100644 --- a/arch/x86_64/trampoline.c +++ b/arch/x86_64/trampoline.c @@ -1,2 +1,3 @@ #include "defs.h" +#include #include "common-trampoline.c"