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
|
LIBDIR := /lib
|
||||||
CFLAGS := -ggdb3 -O2 -Wall
|
CFLAGS := -ggdb3 -O2 -Wall
|
||||||
CPPFLAGS := -Iarch/${ARCH} -Iarch/common
|
CPPFLAGS := -Iarch/${ARCH} -Iarch/common
|
||||||
|
EXPORT_UNPREFIXED := yes
|
||||||
|
|
||||||
|
ifeq ($(EXPORT_UNPREFIXED),yes)
|
||||||
|
CFLAGS += -DEXPORT_UNPREFIXED
|
||||||
|
endif
|
||||||
|
|
||||||
LIBUCONTEXT_C_SRC = $(wildcard arch/${ARCH}/*.c)
|
LIBUCONTEXT_C_SRC = $(wildcard arch/${ARCH}/*.c)
|
||||||
LIBUCONTEXT_S_SRC = $(wildcard arch/${ARCH}/*.S)
|
LIBUCONTEXT_S_SRC = $(wildcard arch/${ARCH}/*.S)
|
||||||
|
|
|
@ -36,9 +36,13 @@ __proc: \
|
||||||
.size __proc,.-__proc;
|
.size __proc,.-__proc;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef EXPORT_UNPREFIXED
|
||||||
#define ALIAS(__alias, __real) \
|
#define ALIAS(__alias, __real) \
|
||||||
.weak __alias; \
|
.weak __alias; \
|
||||||
__alias = __real;
|
__alias = __real;
|
||||||
|
#else
|
||||||
|
#define ALIAS(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define REG_OFFSET(__reg) (MCONTEXT_GREGS + ((__reg) * REG_SZ))
|
#define REG_OFFSET(__reg) (MCONTEXT_GREGS + ((__reg) * REG_SZ))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue