Compile error with CONFIG_MULTI_DTB_FIT and not SPL
When changing some MIPS configs from CONFIG_OF_EMBED to CONFIG_OF_SEPARATE, I ran into this compile issue since SPL is not enabled. The fix is to guard the <spl.h> header with the CONFIG_SPL_LIBCOMMON_SUPPORT preprocessor symbol.
It seems that the <spl.h> is not needed even when SPL is enabled, but I'm not 100% sure on that. The code at lines 55..57 guarded by CONFIG_SPL_LIBCOMMON_SUPPORT does not require the <spl.h> header file.
--- common/common_fit.c | 2 ++ 1 file changed, 2 insertions(+)
common/common_fit.c +2 -0
@@ -8,7 +8,9 @@#include <errno.h> #include <image.h> #include <linux/libfdt.h> +#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT #include <spl.h> +#endif ulong fdt_getprop_u32 (const void *fdt,int node,const char *prop) {
Signature · 1 line
2.7.4
Quoted 19 lines · Lars Povlsen
When changing some MIPS configs from
CONFIG_OF_EMBEDtoCONFIG_OF_SEPARATE, I ran into this compile issue since SPL is not enabled. The fix is to guard the <spl.h> header with theCONFIG_SPL_LIBCOMMON_SUPPORTpreprocessor symbol.It seems that the <
spl.h> is not needed even when SPL is enabled, but I'm not 100% sure on that. The code at lines 55..57 guarded byCONFIG_SPL_LIBCOMMON_SUPPORTdoes not require the <spl.h> header file.Signed-off-by Lars Povlsen <[email protected]>--- common/common_fit.c | 2 ++ 1 file changed, 2 insertions(+)common/common_fit.c +0
-0
common/common_fit.c line 12
Quoted 5 lines
common/common_fit.c +1
-0@@ -8,7 +8,9 @@#include <errno.h> #include <image.h> #include <linux/libfdt.h> +#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT #include <spl.h>
I believe that spl.h is not needed at all here. It should be removed JJ
Quoted 4 lines
common/common_fit.c +1
-0+#endif ulong fdt_getprop_u32 (const void *fdt,int node,const char *prop) {
...
Quoted 1 line
I believe that
spl.his not needed at all here. It should be removed JJ
Thanks for the feedback, I have sent a new patch to that effect.
---Lars