Commit f0b489c1 authored by Dan Handley's avatar Dan Handley
Browse files

Move stdlib header files to include/lib/stdlib

* Move stdlib header files from include/stdlib to include/lib/stdlib for
  consistency with other library headers.
* Fix checkpatch paths to continue excluding stdlib files.
* Create stdlib.mk to define the stdlib source files and include directories.
* Include stdlib.mk from the top level Makefile.
* Update stdlib header path in the fip_create Makefile.
* Update porting-guide.md with the new paths.

Change-Id: Ia92c2dc572e9efb54a783e306b5ceb2ce24d27fa
parent a7e53033
...@@ -112,11 +112,26 @@ CHECK_IGNORE := --ignore COMPLEX_MACRO \ ...@@ -112,11 +112,26 @@ CHECK_IGNORE := --ignore COMPLEX_MACRO \
--ignore GIT_COMMIT_ID --ignore GIT_COMMIT_ID
CHECKPATCH_ARGS := --no-tree --no-signoff ${CHECK_IGNORE} CHECKPATCH_ARGS := --no-tree --no-signoff ${CHECK_IGNORE}
CHECKCODE_ARGS := --no-patch --no-tree --no-signoff ${CHECK_IGNORE} CHECKCODE_ARGS := --no-patch --no-tree --no-signoff ${CHECK_IGNORE}
# Do not check the coding style on C library files or documentation files # Do not check the coding style on imported library files or documentation files
INCLUDE_DIRS_TO_CHECK := $(sort $(filter-out include/stdlib, $(wildcard include/*))) INC_LIB_DIRS_TO_CHECK := $(sort $(filter-out \
LIB_DIRS_TO_CHECK := $(sort $(filter-out lib/stdlib, $(wildcard lib/*))) include/lib/stdlib, \
ROOT_DIRS_TO_CHECK := $(sort $(filter-out lib include docs %.md, $(wildcard *))) $(wildcard include/lib/*)))
CHECK_PATHS := ${ROOT_DIRS_TO_CHECK} ${INCLUDE_DIRS_TO_CHECK} ${LIB_DIRS_TO_CHECK} INC_DIRS_TO_CHECK := $(sort $(filter-out \
include/lib, \
$(wildcard include/*)))
LIB_DIRS_TO_CHECK := $(sort $(filter-out \
lib/stdlib, \
$(wildcard lib/*)))
ROOT_DIRS_TO_CHECK := $(sort $(filter-out \
lib \
include \
docs \
%.md, \
$(wildcard *)))
CHECK_PATHS := ${ROOT_DIRS_TO_CHECK} \
${INC_DIRS_TO_CHECK} \
${INC_LIB_DIRS_TO_CHECK} \
${LIB_DIRS_TO_CHECK}
################################################################################ ################################################################################
...@@ -193,26 +208,15 @@ LDFLAGS += --gc-sections ...@@ -193,26 +208,15 @@ LDFLAGS += --gc-sections
################################################################################ ################################################################################
# Common sources and include directories # Common sources and include directories
################################################################################ ################################################################################
include lib/stdlib/stdlib.mk
BL_COMMON_SOURCES += common/bl_common.c \ BL_COMMON_SOURCES += common/bl_common.c \
common/tf_printf.c \ common/tf_printf.c \
common/aarch64/debug.S \ common/aarch64/debug.S \
lib/aarch64/cache_helpers.S \ lib/aarch64/cache_helpers.S \
lib/aarch64/misc_helpers.S \ lib/aarch64/misc_helpers.S \
lib/stdlib/abort.c \ plat/common/aarch64/platform_helpers.S \
lib/stdlib/assert.c \ ${STDLIB_SRCS}
lib/stdlib/exit.c \
lib/stdlib/mem.c \
lib/stdlib/printf.c \
lib/stdlib/putchar.c \
lib/stdlib/puts.c \
lib/stdlib/sscanf.c \
lib/stdlib/strchr.c \
lib/stdlib/strcmp.c \
lib/stdlib/strlen.c \
lib/stdlib/strncmp.c \
lib/stdlib/subr_prf.c \
plat/common/aarch64/platform_helpers.S
INCLUDES += -Iinclude/bl1 \ INCLUDES += -Iinclude/bl1 \
-Iinclude/bl31 \ -Iinclude/bl31 \
...@@ -227,8 +231,6 @@ INCLUDES += -Iinclude/bl1 \ ...@@ -227,8 +231,6 @@ INCLUDES += -Iinclude/bl1 \
-Iinclude/lib/aarch64 \ -Iinclude/lib/aarch64 \
-Iinclude/lib/cpus/aarch64 \ -Iinclude/lib/cpus/aarch64 \
-Iinclude/plat/common \ -Iinclude/plat/common \
-Iinclude/stdlib \
-Iinclude/stdlib/sys \
${PLAT_INCLUDES} \ ${PLAT_INCLUDES} \
${SPD_INCLUDES} ${SPD_INCLUDES}
......
...@@ -2035,12 +2035,12 @@ library only contains those C library definitions required by the local ...@@ -2035,12 +2035,12 @@ library only contains those C library definitions required by the local
implementation. If more functionality is required, the needed library functions implementation. If more functionality is required, the needed library functions
will need to be added to the local implementation. will need to be added to the local implementation.
Versions of [FreeBSD] headers can be found in `include/stdlib`. Some of these Versions of [FreeBSD] headers can be found in `include/lib/stdlib`. Some of
headers have been cut down in order to simplify the implementation. In order to these headers have been cut down in order to simplify the implementation. In
minimize changes to the header files, the [FreeBSD] layout has been maintained. order to minimize changes to the header files, the [FreeBSD] layout has been
The generic C library definitions can be found in `include/stdlib` with more maintained. The generic C library definitions can be found in
system and machine specific declarations in `include/stdlib/sys` and `include/lib/stdlib` with more system and machine specific declarations in
`include/stdlib/machine`. `include/lib/stdlib/sys` and `include/lib/stdlib/machine`.
The local C library implementations can be found in `lib/stdlib`. In order to The local C library implementations can be found in `lib/stdlib`. In order to
extend the C library these files may need to be modified. It is recommended to extend the C library these files may need to be modified. It is recommended to
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment