diff options
author | danh-arm <dan.handley@arm.com> | 2016-04-18 12:04:22 +0100 |
---|---|---|
committer | danh-arm <dan.handley@arm.com> | 2016-04-18 12:04:22 +0100 |
commit | 81b491ff37a7027766410a91d9837e093248300d (patch) | |
tree | b0e331167b26e40a35cea27a9828b58610d47864 | |
parent | 7b4838e4fc4b55522b59fa69ac53c81237458c6e (diff) | |
parent | 10c252c14b7f446c0b49ef1aafbd5d37804577dd (diff) |
Merge pull request #595 from sandrine-bailleux-arm/sb/unoptimised-build
Add support for unoptimised (-O0) build
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | include/common/context_mgmt.h | 3 | ||||
-rw-r--r-- | include/lib/bakery_lock.h | 2 | ||||
-rw-r--r-- | make_helpers/build_macros.mk | 6 | ||||
-rw-r--r-- | make_helpers/windows.mk | 2 |
5 files changed, 11 insertions, 12 deletions
@@ -136,7 +136,7 @@ export Q $(eval $(call add_define,DEBUG)) ifneq (${DEBUG}, 0) BUILD_TYPE := debug - CFLAGS += -g + TF_CFLAGS += -g ASFLAGS += -g -Wa,--gdwarf-2 # Use LOG_LEVEL_INFO by default for debug builds LOG_LEVEL := 40 @@ -179,12 +179,12 @@ ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \ -Werror -Wmissing-include-dirs \ -mgeneral-regs-only -D__ASSEMBLY__ \ ${DEFINES} ${INCLUDES} -CFLAGS += -nostdinc -ffreestanding -Wall \ +TF_CFLAGS += -nostdinc -ffreestanding -Wall \ -Werror -Wmissing-include-dirs \ -mgeneral-regs-only -mstrict-align \ -std=c99 -c -Os \ ${DEFINES} ${INCLUDES} -CFLAGS += -ffunction-sections -fdata-sections +TF_CFLAGS += -ffunction-sections -fdata-sections LDFLAGS += --fatal-warnings -O1 LDFLAGS += --gc-sections @@ -331,7 +331,7 @@ endif # Check if -pedantic option should be used ifeq (${DISABLE_PEDANTIC},0) - CFLAGS += -pedantic + TF_CFLAGS += -pedantic endif # Using the ARM Trusted Firmware BL2 implies that a BL33 image also needs to be @@ -487,7 +487,7 @@ msg_start: # Check if deprecated declarations should be treated as error or not. ifeq (${ERROR_DEPRECATED},0) - CFLAGS += -Wno-error=deprecated-declarations + TF_CFLAGS += -Wno-error=deprecated-declarations endif # Expand build macros for the different images diff --git a/include/common/context_mgmt.h b/include/common/context_mgmt.h index 11786a18..a76ecbe3 100644 --- a/include/common/context_mgmt.h +++ b/include/common/context_mgmt.h @@ -55,7 +55,6 @@ void cm_set_context_by_index(unsigned int cpu_idx, unsigned int security_state); void *cm_get_context(uint32_t security_state); void cm_set_context(void *context, uint32_t security_state); -inline void cm_set_next_context(void *context); void cm_init_context(uint64_t mpidr, const struct entry_point_info *ep) __deprecated; void cm_init_my_context(const struct entry_point_info *ep); @@ -80,7 +79,7 @@ uint32_t cm_get_scr_el3(uint32_t security_state); * return. This initializes the SP_EL3 to a pointer to a 'cpu_context' set for * the required security state ******************************************************************************/ -inline void cm_set_next_context(void *context) +static inline void cm_set_next_context(void *context) { #if DEBUG uint64_t sp_mode; diff --git a/include/lib/bakery_lock.h b/include/lib/bakery_lock.h index 8a538917..6b8157e6 100644 --- a/include/lib/bakery_lock.h +++ b/include/lib/bakery_lock.h @@ -96,7 +96,7 @@ typedef bakery_info_t bakery_lock_t; #endif /* __USE_COHERENT_MEM__ */ -inline void bakery_lock_init(bakery_lock_t *bakery) {} +static inline void bakery_lock_init(bakery_lock_t *bakery) {} void bakery_lock_get(bakery_lock_t *bakery); void bakery_lock_release(bakery_lock_t *bakery); diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk index 5171ff00..c963b7af 100644 --- a/make_helpers/build_macros.mk +++ b/make_helpers/build_macros.mk @@ -208,11 +208,11 @@ $(eval IMAGE := IMAGE_BL$(call uppercase,$(3))) $(OBJ): $(2) @echo " CC $$<" - $$(Q)$$(CC) $$(CFLAGS) -D$(IMAGE) -c $$< -o $$@ + $$(Q)$$(CC) $$(TF_CFLAGS) $$(CFLAGS) -D$(IMAGE) -c $$< -o $$@ $(PREREQUISITES): $(2) | bl$(3)_dirs @echo " DEPS $$@" - $$(Q)$$(CC) $$(CFLAGS) -M -MT $(OBJ) -MF $$@ $$< + $$(Q)$$(CC) $$(TF_CFLAGS) $$(CFLAGS) -M -MT $(OBJ) -MF $$@ $$< ifdef IS_ANYTHING_TO_BUILD -include $(PREREQUISITES) @@ -351,7 +351,7 @@ ifdef MAKE_BUILD_STRINGS else @echo 'const char build_message[] = "Built : "$(BUILD_MESSAGE_TIMESTAMP); \ const char version_string[] = "${VERSION_STRING}";' | \ - $$(CC) $$(CFLAGS) -xc - -o $(BUILD_DIR)/build_message.o + $$(CC) $$(TF_CFLAGS) $$(CFLAGS) -xc - -o $(BUILD_DIR)/build_message.o endif $$(Q)$$(LD) -o $$@ $$(LDFLAGS) -Map=$(MAPFILE) --script $(LINKERFILE) \ $(BUILD_DIR)/build_message.o $(OBJS) diff --git a/make_helpers/windows.mk b/make_helpers/windows.mk index 8ac82460..fe5e8c1f 100644 --- a/make_helpers/windows.mk +++ b/make_helpers/windows.mk @@ -104,6 +104,6 @@ BUILT_TIME_DATE_STRING = const char build_message[] = "Built : "${BUILD_MESSAGE_ VERSION_STRING_MESSAGE = const char version_string[] = "${VERSION_STRING}"; define MAKE_BUILD_STRINGS @echo $$(BUILT_TIME_DATE_STRING) $$(VERSION_STRING_MESSAGE) | \ - $$(CC) $$(CFLAGS) -x c - -o $1 + $$(CC) $$(TF_CFLAGS) $$(CFLAGS) -x c - -o $1 endef |