From 9d0a377efe685c5635bdcfc4f07bb9c01e5d5544 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 1 Mar 2013 12:19:32 +0100 Subject: [PATCH] Add 'seoul_libc_support' library This library contains the subset of the libc that is needed for the Seoul VMM. Related to issue #666. --- libports/lib/mk/libc-common.inc | 10 ++++++++-- ports/lib/import/import-seoul_libc_support.mk | 1 + ports/lib/mk/seoul_libc_support.mk | 7 +++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 ports/lib/import/import-seoul_libc_support.mk create mode 100644 ports/lib/mk/seoul_libc_support.mk diff --git a/libports/lib/mk/libc-common.inc b/libports/lib/mk/libc-common.inc index f61d38e98..3e74a431f 100644 --- a/libports/lib/mk/libc-common.inc +++ b/libports/lib/mk/libc-common.inc @@ -1,4 +1,10 @@ -LIBC_DIR = $(REP_DIR)/contrib/libc-8.2.0 +# +# We use 'select_from_repositories' rather than specifying the patch via +# 'REP_DIR' to enable other repositories to include this file. For example, +# this enables 'ports/lib/mk/seoul_libc_support.mk' to reuse the definitions. +# + +LIBC_DIR = $(call select_from_repositories,contrib/libc-8.2.0) # local libc includes INC_DIR += $(LIBC_DIR)/libc/locale @@ -24,4 +30,4 @@ CC_OPT += -DPIC # # Use libc import rules also for building the libc itself # -include $(REP_DIR)/lib/import/import-libc.mk +include $(call select_from_repositories,lib/import/import-libc.mk) diff --git a/ports/lib/import/import-seoul_libc_support.mk b/ports/lib/import/import-seoul_libc_support.mk new file mode 100644 index 000000000..6981d3ed5 --- /dev/null +++ b/ports/lib/import/import-seoul_libc_support.mk @@ -0,0 +1 @@ +include $(call select_from_repositories,lib/import/import-libc.mk) diff --git a/ports/lib/mk/seoul_libc_support.mk b/ports/lib/mk/seoul_libc_support.mk new file mode 100644 index 000000000..cba5f3500 --- /dev/null +++ b/ports/lib/mk/seoul_libc_support.mk @@ -0,0 +1,7 @@ +include $(call select_from_repositories,lib/mk/libc-common.inc) + +SRC_C = stdlib/strtoul.c +SRC_C += $(addprefix string/,strchr.c strncpy.c strspn.c strcspn.c strstr.c strlen.c strnlen.c strcpy.c memcmp.c strcmp.c) +SRC_C += sys/__error.c gen/errno.c locale/none.c locale/table.c + +vpath %.c $(LIBC_DIR)/libc