build: add support for EXPORT_UNPREFIXED=no
In an EXPORT_UNPREFIXED=no build, getcontext/makecontext/setcontext/swapcontext symbols are not provided.pull/21/head
parent
8b7cefd98d
commit
fe19127c66
5
Makefile
5
Makefile
|
@ -6,6 +6,11 @@ endif
|
|||
LIBDIR := /lib
|
||||
CFLAGS := -ggdb3 -O2 -Wall
|
||||
CPPFLAGS := -Iarch/${ARCH} -Iarch/common
|
||||
EXPORT_UNPREFIXED := yes
|
||||
|
||||
ifeq ($(EXPORT_UNPREFIXED),yes)
|
||||
CFLAGS += -DEXPORT_UNPREFIXED
|
||||
endif
|
||||
|
||||
LIBUCONTEXT_C_SRC = $(wildcard arch/${ARCH}/*.c)
|
||||
LIBUCONTEXT_S_SRC = $(wildcard arch/${ARCH}/*.S)
|
||||
|
|
|
@ -36,9 +36,13 @@ __proc: \
|
|||
.size __proc,.-__proc;
|
||||
#endif
|
||||
|
||||
#ifdef EXPORT_UNPREFIXED
|
||||
#define ALIAS(__alias, __real) \
|
||||
.weak __alias; \
|
||||
__alias = __real;
|
||||
#else
|
||||
#define ALIAS(...)
|
||||
#endif
|
||||
|
||||
#define REG_OFFSET(__reg) (MCONTEXT_GREGS + ((__reg) * REG_SZ))
|
||||
|
||||
|
|
Loading…
Reference in New Issue