From c312e25597ab123fa12928d30ead3e3bd975779f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C5=8Dshin?= Date: Sun, 17 Dec 2023 17:25:11 -0500 Subject: [PATCH] Fix the build on Apple Silicon Build was broken by third_party/bash due to `__floatditf` not being found, even though `rg __floatditf` shows no results other than its definition. I don't know if __aarch64__ is the right check, but hopefully this commit will be short-lived. --- third_party/bash/builtins_printf.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/third_party/bash/builtins_printf.c b/third_party/bash/builtins_printf.c index 2ec4e1ba8..1897d2b6f 100644 --- a/third_party/bash/builtins_printf.c +++ b/third_party/bash/builtins_printf.c @@ -193,6 +193,14 @@ static intmax_t tw; static char *conv_buf; static size_t conv_bufsize; +#ifdef __aarch64__ +#define _COSMO_SOURCE +#include "libc/assert.h" +void __floatditf(int a) { // XXX TODO FIXME missing symbol not found in source + npassert(false); +} +#endif /* __arch64__ */ + int printf_builtin (list) WORD_LIST *list;