common/board_f.c: fix compile error when tracing disabled
PATCH v3 1/1 common/board_f.c: fix compile error when tracing disabled
From: Kevin Hilman <[email protected]>
When CONFIG_TRACE is disabled, linking fails with:
common/built-in.o:(.data.init_sequence_f+0x8): undefined reference to `trace_early_init'
To fix, wrap trace init calls with #ifdef CONFIG_TRACE.
While at it, remove the static inline version of the init call from trace.h as suggested by Simon Glass, since it doesnt work.
---
Applies to v2015.01-rc3
v3: Actually remove the static inlines this time. :/
common/board_f.c | 2 ++ include/trace.h | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-)
common/board_f.c +2 -0
@@ -813,7 +813,9 @@ static init_fnc_t init_sequence_f[] = {#endif setup_mon_len, setup_fdt, +#ifdef CONFIG_TRACE trace_early_init, +#endif initf_malloc,#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)/* TODO: can this go into arch_cpu_init()? */
include/trace.h +0 -7
@@ -89,14 +89,7 @@ int trace_list_calls(void *buff, int buff_size, unsigned int *needed);*/ void trace_set_enabled (int enabled); -#ifdef CONFIG_TRACE_EARLY int trace_early_init (void ); -#else -static inline int trace_early_init (void ) -{ -return 0 ; -} -#endif /** * Init the trace system
Signature · 1 line
2.1.3
PATCH v3 1/1 common/board_f.c: fix compile error when tracing disabled
Quoted 14 lines · Kevin Hilman
From: Kevin Hilman <[email protected]>
When
CONFIG_TRACEis disabled, linking fails with:common/built-in.o:(.data.init_sequence_f+0x8): undefined reference to `trace_early_init'
To fix, wrap trace init calls with #ifdef
CONFIG_TRACE.While at it, remove the static inline version of the init call from
trace.has suggested by Simon Glass, since it doesnt work.Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>Signed-off-by Kevin Hilman <[email protected]>
Quoted 8 lines
---
Applies to v2015.01-rc3v3: Actually remove the static inlines this time. :/
common/board_f.c | 2 ++ include/trace.h | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-)
PATCH v3 1/1 common/board_f.c: fix compile error when tracing disabled
In reply to Kevin HilmanQuoted 8 lines · Kevin Hilman
From: Kevin Hilman <[email protected]>
When
CONFIG_TRACEis disabled, linking fails with:common/built-in.o:(.data.init_sequence_f+0x8): undefined reference to `trace_early_init'
To fix, wrap trace init calls with #ifdef
CONFIG_TRACE.
Quoted 7 lines
While at it, remove the static inline version of the init call from
trace.has suggested by Simon Glass, since it doesnt work.Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>Signed-off-by Kevin Hilman <[email protected]>Acked-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150112/888c096f/attachment.pgp>