Skip to contentSkip to conversation

common/board_f.c: fix compile error when tracing disabled

PATCH Superseded Kevin Hilman 3 participants 3 messages Dec 9, 2014 – Dec 30, 2014

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 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 the call to trace_early_init() with #ifdef CONFIG_TRACE.

---
Applies to v2015.01-rc3

 common/board_f.c | 2 ++
 1 file changed, 2 insertions(+)
common/board_f.c +2 -0
index 98c9c728ce73..cfd77f865361 100644
@@ -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()? */
Signature · 1 line
2.1.3
#1 lore raw

PATCH 1/1 common/board_f.c: fix compile error when tracing disabled

Hi Kevin,

Quoted 22 lines · Kevin Hilman

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 the call to trace_early_init() with #ifdef CONFIG_TRACE.

---
Applies to v2015.01-rc3

 common/board_f.c | 2 ++
 1 file changed, 2 insertions(+)
common/board_f.c +0 -0
index 98c9c728ce73..cfd77f865361 100644

common/board_f.c static init_fnc_t init_sequence_f[] = { · line 821

Quoted 9 lines
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()? */

Thanks - can you please also try removing the static inline stuff for this in trace.h? It doesn't work.

Regards,
Simon

#2 lore raw
In reply to Kevin Hilman
Quoted 11 lines · Kevin Hilman

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 the call to trace_early_init() with #ifdef CONFIG_TRACE.

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/20141229/2d01eaf8/attachment.pgp>