diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2019-02-08 13:20:37 +0000 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2019-02-08 13:42:38 +0000 |
commit | 70b0f2789e93f253bec5cbd2986d0de023c1bdf4 (patch) | |
tree | 4de89a2865b8412b3061567f40ee497b45851904 /make_helpers | |
parent | e05663051671bdec38056a2da5ddebd390b4abca (diff) |
libc: Move setjmp to libc folder
Now that setjmp() and longjmp() are compliant with the standard they can
be moved with the other libc files.
Change-Id: Iea3b91c34eb353ace5e171e72f331602d57774d5
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'make_helpers')
-rw-r--r-- | make_helpers/build_macros.mk | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk index 73b84c38a3..4a264d7eeb 100644 --- a/make_helpers/build_macros.mk +++ b/make_helpers/build_macros.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -206,6 +206,22 @@ $(OBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | lib$(3)_dirs endef +# MAKE_S_LIB builds an assembly source file and generates the dependency file +# $(1) = output directory +# $(2) = source file (%.S) +# $(3) = library name +define MAKE_S_LIB +$(eval OBJ := $(1)/$(patsubst %.S,%.o,$(notdir $(2)))) +$(eval DEP := $(patsubst %.o,%.d,$(OBJ))) + +$(OBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | lib$(3)_dirs + $$(ECHO) " AS $$<" + $$(Q)$$(AS) $$(ASFLAGS) $(MAKE_DEP) -c $$< -o $$@ + +-include $(DEP) + +endef + # MAKE_C builds a C source file and generates the dependency file # $(1) = output directory @@ -263,7 +279,7 @@ $(1): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | bl$(3)_dirs endef -# MAKE_LIB_OBJS builds both C source files +# MAKE_LIB_OBJS builds both C and assembly source files # $(1) = output directory # $(2) = list of source files # $(3) = name of the library @@ -272,6 +288,10 @@ define MAKE_LIB_OBJS $(eval REMAIN := $(filter-out %.c,$(2))) $(eval $(foreach obj,$(C_OBJS),$(call MAKE_C_LIB,$(1),$(obj),$(3)))) + $(eval S_OBJS := $(filter %.S,$(REMAIN))) + $(eval REMAIN := $(filter-out %.S,$(REMAIN))) + $(eval $(foreach obj,$(S_OBJS),$(call MAKE_S_LIB,$(1),$(obj),$(3)))) + $(and $(REMAIN),$(error Unexpected source files present: $(REMAIN))) endef |