-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libzycorec: Core library needed by Zyan libraries
The ZyCoreC library provides platform independent types and macros used by for Zyan libraries. We use this library only to provide the data type definitions for libzydis. Since we have a libc (including nolibc) in Unikraft, the source files are not required to be compiled in our use case. Because libzydis will be the only library so far that needs these headers, we hide libzycorec from the menu. Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
- Loading branch information
1 parent
8643821
commit caee38d
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Invisible library configuration for libzycore-c, the Zyan Core Library for C | ||
config LIBZYCOREC | ||
bool | ||
default n | ||
depends on ARCH_X86_32 || ARCH_X86_64 | ||
select LIBNOLIBC if !HAVE_LIBC | ||
select LIBUKTIME if !HAVE_LIBC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# ------------------------------------------------------- | ||
# ZycoreC | ||
# ------------------------------------------------------- | ||
|
||
$(eval $(call addlib_s,libzycorec,$(CONFIG_LIBZYCOREC))) | ||
|
||
LIBZYCOREC_COMMIT=482298aecb59072f617fe8c53b91afd252ef1058 | ||
LIBZYCOREC_URL=https://github.com/zyantific/zycore-c/archive/$(LIBZYCOREC_COMMIT).tar.gz | ||
|
||
$(eval $(call fetch,libzycorec,$(LIBZYCOREC_URL))) | ||
|
||
LIBZYCOREC_EXTRACTED=$(LIBZYCOREC_ORIGIN)/zycore-c-$(LIBZYCOREC_COMMIT) | ||
LIBZYCOREC_SOURCES=$(LIBZYCOREC_EXTRACTED)/src | ||
LIBZYCOREC_INCLUDES=$(LIBZYCOREC_EXTRACTED)/include | ||
LIBZYCOREC_COMPFLAGS-y=-Wno-implicit-fallthrough | ||
|
||
CINCLUDES-$(CONFIG_LIBZYCOREC) += -I$(LIBZYCOREC_BASE)/include | ||
CINCLUDES-$(CONFIG_LIBZYCOREC) += -I$(LIBZYCOREC_INCLUDES) | ||
|
||
# | ||
# NOTE: We use the only headers of this library for now | ||
# | ||
|
||
#LIBZYCOREC_SRCS-y += $(LIBZYCOREC_SOURCES)/Allocator.c | ||
#LIBZYCOREC_SRCS-y += $(LIBZYCOREC_SOURCES)/ArgParse.c | ||
#LIBZYCOREC_SRCS-y += $(LIBZYCOREC_SOURCES)/Bitset.c | ||
#LIBZYCOREC_SRCS-y += $(LIBZYCOREC_SOURCES)/Format.c | ||
#LIBZYCOREC_SRCS-y += $(LIBZYCOREC_SOURCES)/List.c | ||
#LIBZYCOREC_SRCS-y += $(LIBZYCOREC_SOURCES)/String.c | ||
#LIBZYCOREC_SRCS-y += $(LIBZYCOREC_SOURCES)/Vector.c | ||
#LIBZYCOREC_SRCS-y += $(LIBZYCOREC_SOURCES)/Zycore.c | ||
#LIBZYCOREC_SRCS-y += $(LIBZYCOREC_SOURCES)/API/Memory.c | ||
#LIBZYCOREC_SRCS-$(CONFIG_LIBPTHREAD_EMBEDDED) += $(LIBZYCOREC_SOURCES)/API/Synchronization.c | ||
#LIBZYCOREC_SRCS-$(CONFIG_LIBPTHREAD_EMBEDDED) += $(LIBZYCOREC_SOURCES)/API/Thread.c | ||
#LIBZYCOREC_SRCS-$(CONFIG_LIBVFSCORE) += $(LIBZYCOREC_SOURCES)/API/Terminal.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
#ifndef ZYCORE_EXPORT_H | ||
#define ZYCORE_EXPORT_H | ||
|
||
#ifdef ZYCORE_STATIC_DEFINE | ||
# define ZYCORE_EXPORT | ||
# define ZYCORE_NO_EXPORT | ||
#else | ||
# ifndef ZYCORE_EXPORT | ||
# ifdef Zycore_EXPORTS | ||
/* We are building this library */ | ||
# define ZYCORE_EXPORT | ||
# else | ||
/* We are using this library */ | ||
# define ZYCORE_EXPORT | ||
# endif | ||
# endif | ||
|
||
# ifndef ZYCORE_NO_EXPORT | ||
# define ZYCORE_NO_EXPORT | ||
# endif | ||
#endif | ||
|
||
#ifndef ZYCORE_DEPRECATED | ||
# define ZYCORE_DEPRECATED __attribute__ ((__deprecated__)) | ||
#endif | ||
|
||
#ifndef ZYCORE_DEPRECATED_EXPORT | ||
# define ZYCORE_DEPRECATED_EXPORT ZYCORE_EXPORT ZYCORE_DEPRECATED | ||
#endif | ||
|
||
#ifndef ZYCORE_DEPRECATED_NO_EXPORT | ||
# define ZYCORE_DEPRECATED_NO_EXPORT ZYCORE_NO_EXPORT ZYCORE_DEPRECATED | ||
#endif | ||
|
||
#if 0 /* DEFINE_NO_DEPRECATED */ | ||
# ifndef ZYCORE_NO_DEPRECATED | ||
# define ZYCORE_NO_DEPRECATED | ||
# endif | ||
#endif | ||
|
||
#endif /* ZYCORE_EXPORT_H */ |