Building all host tools with tools-only_defconfig and HOST_TOOLS_ALL=y
on macOS stops at crc8.o:
arch/sandbox/include/asm/sections.h:21:13: error: argument to
'section' attribute is not valid for this target
The tools-only build uses the sandbox asm/sections.h, whose getopt
section names are not valid Mach-O sections. crc8.c needs the header
only for __rcode, which is empty in host builds anyway. Define __rcode
for the host instead, as crc32.c does for __efi_runtime.
Fixes: 3b52337c759a ("lib: Mark crc8 as relocation code")
Signed-off-by: Josef Schlehofer <[email protected]>
---
lib/crc8.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/crc8.c b/lib/crc8.c
index bbb229c3892..635466f688a 100644
--- a/lib/crc8.c
+++ b/lib/crc8.c
@@ -5,8 +5,10 @@
#ifdef USE_HOSTCC
#include <arpa/inet.h>
-#endif
+#define __rcode
+#else
#include <asm/sections.h>
+#endif
#include <u-boot/crc.h>
#define POLY (0x1070U << 3)
--
2.54.0 (Apple Git-157)