Make strong function defninition replace a weak one
This commit is contained in:
parent
3eb784b758
commit
9925c623b5
3 changed files with 18 additions and 7 deletions
12
common.mk
12
common.mk
|
|
@ -134,9 +134,15 @@ $$($(1)_OBJ_DIR)%.o: $$($(1)_REAL_ROOT)%.S $$($(1)_MAKEFILE) $(wildcard $(ROOT)*
|
||||||
$$($(1)_CC_BASE) -c $$< -o $$@
|
$$($(1)_CC_BASE) -c $$< -o $$@
|
||||||
$$($(1)_CC_BASE) -MM -MT $$@ -MF $$(@:.o=.d) $$<
|
$$($(1)_CC_BASE) -MM -MT $$@ -MF $$(@:.o=.d) $$<
|
||||||
|
|
||||||
# the component is shown to depend on both obj and source files so we get a meaningful error message
|
$(1)_AR_IN_FILES = $$($(1)_OBJ_FILES)
|
||||||
# for missing explicitly named source files
|
|
||||||
$$($(1)_AR): $$($(1)_OBJ_FILES) $$($(1)_SRC_FILES)
|
# the component is shown to depend on both obj and source files so we get
|
||||||
|
# a meaningful error message for missing explicitly named source files
|
||||||
|
ifeq ($(INCLUDE_SRC_IN_AR),1)
|
||||||
|
$(1)_AR_IN_FILES += $$($(1)_SRC_FILES)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$$($(1)_AR): $$($(1)_AR_IN_FILES)
|
||||||
$(vecho) "AR $$@"
|
$(vecho) "AR $$@"
|
||||||
$(Q) mkdir -p $$(dir $$@)
|
$(Q) mkdir -p $$(dir $$@)
|
||||||
$(Q) $(AR) cru $$@ $$^
|
$(Q) $(AR) cru $$@ $$^
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,12 @@
|
||||||
# for 'usage' as this module is a drop-in replacement for the original polled
|
# for 'usage' as this module is a drop-in replacement for the original polled
|
||||||
# version of reading from the UART.
|
# version of reading from the UART.
|
||||||
|
|
||||||
INC_DIRS += $(ROOT)extras/stdin_uart_interrupt
|
INC_DIRS += $(stdin_uart_interrupt_ROOT)
|
||||||
|
|
||||||
# args for passing into compile rule generation
|
# args for passing into compile rule generation
|
||||||
extras/stdin_uart_interrupt_INC_DIR = $(ROOT)extras/stdin_uart_interrupt
|
stdin_uart_interrupt_SRC_DIR = $(stdin_uart_interrupt_ROOT)
|
||||||
extras/stdin_uart_interrupt_SRC_DIR = $(ROOT)extras/stdin_uart_interrupt
|
|
||||||
|
|
||||||
$(eval $(call component_compile_rules,extras/stdin_uart_interrupt))
|
INCLUDE_SRC_IN_AR = 0
|
||||||
|
EXTRA_LDFLAGS = -Wl,--whole-archive $(stdin_uart_interrupt_AR) -Wl,--no-whole-archive
|
||||||
|
|
||||||
|
$(eval $(call component_compile_rules,stdin_uart_interrupt))
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,9 @@ PRINTF_SCANF_FLOAT_SUPPORT ?= 1
|
||||||
|
|
||||||
FLAVOR ?= release # or debug
|
FLAVOR ?= release # or debug
|
||||||
|
|
||||||
|
# Include source files into a static library. It improves error messages.
|
||||||
|
INCLUDE_SRC_IN_AR ?= 1
|
||||||
|
|
||||||
# Compiler names, etc. assume gdb
|
# Compiler names, etc. assume gdb
|
||||||
CROSS ?= xtensa-lx106-elf-
|
CROSS ?= xtensa-lx106-elf-
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue