summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Vargas <roberto.vargas@arm.com>2018-05-08 10:27:10 +0100
committerRoberto Vargas <roberto.vargas@arm.com>2018-08-03 11:31:33 +0100
commit61f72a34250d063da67f4fc2b0eb8c3fda3376be (patch)
tree32525006860b45c10588400c7741980ec7954b5c
parentfec364847861e5a04dfd44a8d77cb25bf64820c7 (diff)
Create a library file for libc
TF Makefile was linking all the objects files generated for the c library instead of creating a static library that could be used in the linking stage. Change-Id: I721daea097e9b13cbb42c9f8eaa2af8fea0799cf Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
-rw-r--r--Makefile14
-rw-r--r--include/lib/libc/assert.h (renamed from include/lib/stdlib/assert.h)0
-rw-r--r--include/lib/libc/inttypes.h (renamed from include/lib/stdlib/inttypes.h)0
-rw-r--r--include/lib/libc/machine/_inttypes.h (renamed from include/lib/stdlib/machine/_inttypes.h)0
-rw-r--r--include/lib/libc/machine/_limits.h (renamed from include/lib/stdlib/machine/_limits.h)0
-rw-r--r--include/lib/libc/machine/_stdint.h (renamed from include/lib/stdlib/machine/_stdint.h)0
-rw-r--r--include/lib/libc/machine/_types.h (renamed from include/lib/stdlib/machine/_types.h)0
-rw-r--r--include/lib/libc/machine/endian.h (renamed from include/lib/stdlib/machine/endian.h)0
-rw-r--r--include/lib/libc/stdbool.h (renamed from include/lib/stdlib/stdbool.h)0
-rw-r--r--include/lib/libc/stddef.h (renamed from include/lib/stdlib/stddef.h)0
-rw-r--r--include/lib/libc/stdio.h (renamed from include/lib/stdlib/stdio.h)0
-rw-r--r--include/lib/libc/stdlib.h (renamed from include/lib/stdlib/stdlib.h)0
-rw-r--r--include/lib/libc/string.h (renamed from include/lib/stdlib/string.h)0
-rw-r--r--include/lib/libc/strings.h (renamed from include/lib/stdlib/strings.h)0
-rw-r--r--include/lib/libc/sys/_null.h (renamed from include/lib/stdlib/sys/_null.h)0
-rw-r--r--include/lib/libc/sys/_stdint.h (renamed from include/lib/stdlib/sys/_stdint.h)0
-rw-r--r--include/lib/libc/sys/_timespec.h (renamed from include/lib/stdlib/sys/_timespec.h)0
-rw-r--r--include/lib/libc/sys/_types.h (renamed from include/lib/stdlib/sys/_types.h)0
-rw-r--r--include/lib/libc/sys/cdefs.h (renamed from include/lib/stdlib/sys/cdefs.h)0
-rw-r--r--include/lib/libc/sys/ctype.h (renamed from include/lib/stdlib/sys/ctype.h)0
-rw-r--r--include/lib/libc/sys/endian.h (renamed from include/lib/stdlib/sys/endian.h)0
-rw-r--r--include/lib/libc/sys/errno.h (renamed from include/lib/stdlib/sys/errno.h)0
-rw-r--r--include/lib/libc/sys/limits.h (renamed from include/lib/stdlib/sys/limits.h)0
-rw-r--r--include/lib/libc/sys/stdarg.h (renamed from include/lib/stdlib/sys/stdarg.h)0
-rw-r--r--include/lib/libc/sys/stdint.h (renamed from include/lib/stdlib/sys/stdint.h)0
-rw-r--r--include/lib/libc/sys/timespec.h (renamed from include/lib/stdlib/sys/timespec.h)0
-rw-r--r--include/lib/libc/sys/types.h (renamed from include/lib/stdlib/sys/types.h)0
-rw-r--r--include/lib/libc/time.h (renamed from include/lib/stdlib/time.h)0
-rw-r--r--include/lib/libc/xlocale/_strings.h (renamed from include/lib/stdlib/xlocale/_strings.h)0
-rw-r--r--include/lib/libc/xlocale/_time.h (renamed from include/lib/stdlib/xlocale/_time.h)0
-rw-r--r--lib/libc/abort.c (renamed from lib/stdlib/abort.c)0
-rw-r--r--lib/libc/assert.c (renamed from lib/stdlib/assert.c)0
-rw-r--r--lib/libc/exit.c (renamed from lib/stdlib/exit.c)0
-rw-r--r--lib/libc/libc.mk (renamed from lib/stdlib/stdlib.mk)6
-rw-r--r--lib/libc/mem.c (renamed from lib/stdlib/mem.c)0
-rw-r--r--lib/libc/printf.c (renamed from lib/stdlib/printf.c)0
-rw-r--r--lib/libc/putchar.c (renamed from lib/stdlib/putchar.c)0
-rw-r--r--lib/libc/puts.c (renamed from lib/stdlib/puts.c)0
-rw-r--r--lib/libc/sscanf.c (renamed from lib/stdlib/sscanf.c)0
-rw-r--r--lib/libc/strchr.c (renamed from lib/stdlib/strchr.c)0
-rw-r--r--lib/libc/strcmp.c (renamed from lib/stdlib/strcmp.c)0
-rw-r--r--lib/libc/strlen.c (renamed from lib/stdlib/strlen.c)0
-rw-r--r--lib/libc/strncmp.c (renamed from lib/stdlib/strncmp.c)0
-rw-r--r--lib/libc/strnlen.c (renamed from lib/stdlib/strnlen.c)0
-rw-r--r--lib/libc/subr_prf.c (renamed from lib/stdlib/subr_prf.c)0
-rw-r--r--lib/libc/timingsafe_bcmp.c (renamed from lib/stdlib/timingsafe_bcmp.c)0
46 files changed, 10 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 26098641..9c0ab722 100644
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@ CHECKCODE_ARGS := --no-patch
# Do not check the coding style on imported library files or documentation files
INC_LIB_DIRS_TO_CHECK := $(sort $(filter-out \
include/lib/libfdt \
- include/lib/stdlib, \
+ include/lib/libc, \
$(wildcard include/lib/*)))
INC_DIRS_TO_CHECK := $(sort $(filter-out \
include/lib, \
@@ -53,7 +53,7 @@ INC_DIRS_TO_CHECK := $(sort $(filter-out \
LIB_DIRS_TO_CHECK := $(sort $(filter-out \
lib/compiler-rt \
lib/libfdt% \
- lib/stdlib, \
+ lib/libc, \
$(wildcard lib/*)))
ROOT_DIRS_TO_CHECK := $(sort $(filter-out \
lib \
@@ -198,7 +198,7 @@ DTC_FLAGS += -I dts -O dtb
# Common sources and include directories
################################################################################
include lib/compiler-rt/compiler-rt.mk
-include lib/stdlib/stdlib.mk
+include lib/libc/libc.mk
BL_COMMON_SOURCES += common/bl_common.c \
common/tf_log.c \
@@ -211,8 +211,7 @@ BL_COMMON_SOURCES += common/bl_common.c \
plat/common/plat_log_common.c \
plat/common/${ARCH}/plat_common.c \
plat/common/${ARCH}/platform_helpers.S \
- ${COMPILER_RT_SRCS} \
- ${STDLIB_SRCS}
+ ${COMPILER_RT_SRCS}
INCLUDES += -Iinclude \
-Iinclude/bl1 \
@@ -671,6 +670,7 @@ ifeq (${ERROR_DEPRECATED},0)
endif
$(eval $(call MAKE_LIB_DIR))
+$(eval $(call MAKE_LIB,c))
# Expand build macros for the different images
ifeq (${NEED_BL1},yes)
@@ -747,7 +747,7 @@ realclean distclean:
checkcodebase: locate-checkpatch
@echo " CHECKING STYLE"
@if test -d .git ; then \
- git ls-files | grep -E -v 'libfdt|stdlib|docs|\.md' | \
+ git ls-files | grep -E -v 'libfdt|libc|docs|\.md' | \
while read GIT_FILE ; \
do ${CHECKPATCH} ${CHECKCODE_ARGS} -f $$GIT_FILE ; \
done ; \
@@ -755,7 +755,7 @@ checkcodebase: locate-checkpatch
find . -type f -not -iwholename "*.git*" \
-not -iwholename "*build*" \
-not -iwholename "*libfdt*" \
- -not -iwholename "*stdlib*" \
+ -not -iwholename "*libc*" \
-not -iwholename "*docs*" \
-not -iwholename "*.md" \
-exec ${CHECKPATCH} ${CHECKCODE_ARGS} -f {} \; ; \
diff --git a/include/lib/stdlib/assert.h b/include/lib/libc/assert.h
index db567dbb..db567dbb 100644
--- a/include/lib/stdlib/assert.h
+++ b/include/lib/libc/assert.h
diff --git a/include/lib/stdlib/inttypes.h b/include/lib/libc/inttypes.h
index 269f3e7c..269f3e7c 100644
--- a/include/lib/stdlib/inttypes.h
+++ b/include/lib/libc/inttypes.h
diff --git a/include/lib/stdlib/machine/_inttypes.h b/include/lib/libc/machine/_inttypes.h
index 7dfe9c3d..7dfe9c3d 100644
--- a/include/lib/stdlib/machine/_inttypes.h
+++ b/include/lib/libc/machine/_inttypes.h
diff --git a/include/lib/stdlib/machine/_limits.h b/include/lib/libc/machine/_limits.h
index 3bdc66f1..3bdc66f1 100644
--- a/include/lib/stdlib/machine/_limits.h
+++ b/include/lib/libc/machine/_limits.h
diff --git a/include/lib/stdlib/machine/_stdint.h b/include/lib/libc/machine/_stdint.h
index ee5372d5..ee5372d5 100644
--- a/include/lib/stdlib/machine/_stdint.h
+++ b/include/lib/libc/machine/_stdint.h
diff --git a/include/lib/stdlib/machine/_types.h b/include/lib/libc/machine/_types.h
index 037fdf2f..037fdf2f 100644
--- a/include/lib/stdlib/machine/_types.h
+++ b/include/lib/libc/machine/_types.h
diff --git a/include/lib/stdlib/machine/endian.h b/include/lib/libc/machine/endian.h
index 57e33b17..57e33b17 100644
--- a/include/lib/stdlib/machine/endian.h
+++ b/include/lib/libc/machine/endian.h
diff --git a/include/lib/stdlib/stdbool.h b/include/lib/libc/stdbool.h
index e39aef7d..e39aef7d 100644
--- a/include/lib/stdlib/stdbool.h
+++ b/include/lib/libc/stdbool.h
diff --git a/include/lib/stdlib/stddef.h b/include/lib/libc/stddef.h
index ea88214f..ea88214f 100644
--- a/include/lib/stdlib/stddef.h
+++ b/include/lib/libc/stddef.h
diff --git a/include/lib/stdlib/stdio.h b/include/lib/libc/stdio.h
index 57e5c7fa..57e5c7fa 100644
--- a/include/lib/stdlib/stdio.h
+++ b/include/lib/libc/stdio.h
diff --git a/include/lib/stdlib/stdlib.h b/include/lib/libc/stdlib.h
index b1ac1bf9..b1ac1bf9 100644
--- a/include/lib/stdlib/stdlib.h
+++ b/include/lib/libc/stdlib.h
diff --git a/include/lib/stdlib/string.h b/include/lib/libc/string.h
index 56677b2c..56677b2c 100644
--- a/include/lib/stdlib/string.h
+++ b/include/lib/libc/string.h
diff --git a/include/lib/stdlib/strings.h b/include/lib/libc/strings.h
index 2210df04..2210df04 100644
--- a/include/lib/stdlib/strings.h
+++ b/include/lib/libc/strings.h
diff --git a/include/lib/stdlib/sys/_null.h b/include/lib/libc/sys/_null.h
index 92706c6a..92706c6a 100644
--- a/include/lib/stdlib/sys/_null.h
+++ b/include/lib/libc/sys/_null.h
diff --git a/include/lib/stdlib/sys/_stdint.h b/include/lib/libc/sys/_stdint.h
index d0f92493..d0f92493 100644
--- a/include/lib/stdlib/sys/_stdint.h
+++ b/include/lib/libc/sys/_stdint.h
diff --git a/include/lib/stdlib/sys/_timespec.h b/include/lib/libc/sys/_timespec.h
index d51559c2..d51559c2 100644
--- a/include/lib/stdlib/sys/_timespec.h
+++ b/include/lib/libc/sys/_timespec.h
diff --git a/include/lib/stdlib/sys/_types.h b/include/lib/libc/sys/_types.h
index c59afd31..c59afd31 100644
--- a/include/lib/stdlib/sys/_types.h
+++ b/include/lib/libc/sys/_types.h
diff --git a/include/lib/stdlib/sys/cdefs.h b/include/lib/libc/sys/cdefs.h
index 70c09fdb..70c09fdb 100644
--- a/include/lib/stdlib/sys/cdefs.h
+++ b/include/lib/libc/sys/cdefs.h
diff --git a/include/lib/stdlib/sys/ctype.h b/include/lib/libc/sys/ctype.h
index f2758b77..f2758b77 100644
--- a/include/lib/stdlib/sys/ctype.h
+++ b/include/lib/libc/sys/ctype.h
diff --git a/include/lib/stdlib/sys/endian.h b/include/lib/libc/sys/endian.h
index d50110ca..d50110ca 100644
--- a/include/lib/stdlib/sys/endian.h
+++ b/include/lib/libc/sys/endian.h
diff --git a/include/lib/stdlib/sys/errno.h b/include/lib/libc/sys/errno.h
index f5955145..f5955145 100644
--- a/include/lib/stdlib/sys/errno.h
+++ b/include/lib/libc/sys/errno.h
diff --git a/include/lib/stdlib/sys/limits.h b/include/lib/libc/sys/limits.h
index c56a337d..c56a337d 100644
--- a/include/lib/stdlib/sys/limits.h
+++ b/include/lib/libc/sys/limits.h
diff --git a/include/lib/stdlib/sys/stdarg.h b/include/lib/libc/sys/stdarg.h
index c315dfce..c315dfce 100644
--- a/include/lib/stdlib/sys/stdarg.h
+++ b/include/lib/libc/sys/stdarg.h
diff --git a/include/lib/stdlib/sys/stdint.h b/include/lib/libc/sys/stdint.h
index aa5ac81d..aa5ac81d 100644
--- a/include/lib/stdlib/sys/stdint.h
+++ b/include/lib/libc/sys/stdint.h
diff --git a/include/lib/stdlib/sys/timespec.h b/include/lib/libc/sys/timespec.h
index 2505cef8..2505cef8 100644
--- a/include/lib/stdlib/sys/timespec.h
+++ b/include/lib/libc/sys/timespec.h
diff --git a/include/lib/stdlib/sys/types.h b/include/lib/libc/sys/types.h
index ae2ea33a..ae2ea33a 100644
--- a/include/lib/stdlib/sys/types.h
+++ b/include/lib/libc/sys/types.h
diff --git a/include/lib/stdlib/time.h b/include/lib/libc/time.h
index 08200cfb..08200cfb 100644
--- a/include/lib/stdlib/time.h
+++ b/include/lib/libc/time.h
diff --git a/include/lib/stdlib/xlocale/_strings.h b/include/lib/libc/xlocale/_strings.h
index da1cff3e..da1cff3e 100644
--- a/include/lib/stdlib/xlocale/_strings.h
+++ b/include/lib/libc/xlocale/_strings.h
diff --git a/include/lib/stdlib/xlocale/_time.h b/include/lib/libc/xlocale/_time.h
index 6da49a42..6da49a42 100644
--- a/include/lib/stdlib/xlocale/_time.h
+++ b/include/lib/libc/xlocale/_time.h
diff --git a/lib/stdlib/abort.c b/lib/libc/abort.c
index 65ce4cca..65ce4cca 100644
--- a/lib/stdlib/abort.c
+++ b/lib/libc/abort.c
diff --git a/lib/stdlib/assert.c b/lib/libc/assert.c
index 97fab4b0..97fab4b0 100644
--- a/lib/stdlib/assert.c
+++ b/lib/libc/assert.c
diff --git a/lib/stdlib/exit.c b/lib/libc/exit.c
index afc3f934..afc3f934 100644
--- a/lib/stdlib/exit.c
+++ b/lib/libc/exit.c
diff --git a/lib/stdlib/stdlib.mk b/lib/libc/libc.mk
index 82116235..ded3d745 100644
--- a/lib/stdlib/stdlib.mk
+++ b/lib/libc/libc.mk
@@ -4,7 +4,7 @@
# SPDX-License-Identifier: BSD-3-Clause
#
-STDLIB_SRCS := $(addprefix lib/stdlib/, \
+LIBC_SRCS := $(addprefix lib/libc/, \
abort.c \
assert.c \
exit.c \
@@ -21,5 +21,5 @@ STDLIB_SRCS := $(addprefix lib/stdlib/, \
subr_prf.c \
timingsafe_bcmp.c)
-INCLUDES += -Iinclude/lib/stdlib \
- -Iinclude/lib/stdlib/sys
+INCLUDES += -Iinclude/lib/libc \
+ -Iinclude/lib/libc/sys
diff --git a/lib/stdlib/mem.c b/lib/libc/mem.c
index 65b62fde..65b62fde 100644
--- a/lib/stdlib/mem.c
+++ b/lib/libc/mem.c
diff --git a/lib/stdlib/printf.c b/lib/libc/printf.c
index f6156414..f6156414 100644
--- a/lib/stdlib/printf.c
+++ b/lib/libc/printf.c
diff --git a/lib/stdlib/putchar.c b/lib/libc/putchar.c
index 8265667b..8265667b 100644
--- a/lib/stdlib/putchar.c
+++ b/lib/libc/putchar.c
diff --git a/lib/stdlib/puts.c b/lib/libc/puts.c
index 284cf8c5..284cf8c5 100644
--- a/lib/stdlib/puts.c
+++ b/lib/libc/puts.c
diff --git a/lib/stdlib/sscanf.c b/lib/libc/sscanf.c
index a5876cff..a5876cff 100644
--- a/lib/stdlib/sscanf.c
+++ b/lib/libc/sscanf.c
diff --git a/lib/stdlib/strchr.c b/lib/libc/strchr.c
index 4247dcd3..4247dcd3 100644
--- a/lib/stdlib/strchr.c
+++ b/lib/libc/strchr.c
diff --git a/lib/stdlib/strcmp.c b/lib/libc/strcmp.c
index bb86e0f2..bb86e0f2 100644
--- a/lib/stdlib/strcmp.c
+++ b/lib/libc/strcmp.c
diff --git a/lib/stdlib/strlen.c b/lib/libc/strlen.c
index 23c3d392..23c3d392 100644
--- a/lib/stdlib/strlen.c
+++ b/lib/libc/strlen.c
diff --git a/lib/stdlib/strncmp.c b/lib/libc/strncmp.c
index f45f4a22..f45f4a22 100644
--- a/lib/stdlib/strncmp.c
+++ b/lib/libc/strncmp.c
diff --git a/lib/stdlib/strnlen.c b/lib/libc/strnlen.c
index d48502bd..d48502bd 100644
--- a/lib/stdlib/strnlen.c
+++ b/lib/libc/strnlen.c
diff --git a/lib/stdlib/subr_prf.c b/lib/libc/subr_prf.c
index c1035624..c1035624 100644
--- a/lib/stdlib/subr_prf.c
+++ b/lib/libc/subr_prf.c
diff --git a/lib/stdlib/timingsafe_bcmp.c b/lib/libc/timingsafe_bcmp.c
index d0981580..d0981580 100644
--- a/lib/stdlib/timingsafe_bcmp.c
+++ b/lib/libc/timingsafe_bcmp.c