From f9fc7eb49f3208f15022d1451d5c4ba4e5f5a5f5 Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Sat, 4 May 2024 23:20:12 -0700 Subject: [PATCH] Fix MODE=dbg build errors --- libc/tinymath/exp10.c | 2 +- third_party/chibicc/test/BUILD.mk | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libc/tinymath/exp10.c b/libc/tinymath/exp10.c index f80d13963..f42d7d574 100644 --- a/libc/tinymath/exp10.c +++ b/libc/tinymath/exp10.c @@ -128,7 +128,7 @@ exp10 (double x) Approximate the two components separately. */ /* s = 2^(k/N), using lookup table. */ - uint64_t e = ki << (52 - EXP_TABLE_BITS); + uint64_t e = (uint64_t)ki << (52 - EXP_TABLE_BITS); uint64_t i = (ki & IndexMask) * 2; uint64_t u = __exp_data.tab[i + 1]; uint64_t sbits = u + e; diff --git a/third_party/chibicc/test/BUILD.mk b/third_party/chibicc/test/BUILD.mk index f5a47118f..602d5a6bc 100644 --- a/third_party/chibicc/test/BUILD.mk +++ b/third_party/chibicc/test/BUILD.mk @@ -11,6 +11,7 @@ # GCC-built chibicc, and a second time with chibicc-built chibicc ifeq ($(ARCH), x86_64) +ifneq ($(MODE), dbg) PKGS += THIRD_PARTY_CHIBICC_TEST @@ -75,6 +76,7 @@ o/$(MODE)/third_party/chibicc/test/%.o: \ @$(COMPILE) -wAOBJECTIFY.c $(CHIBICC) $(CHIBICC_FLAGS) $(OUTPUT_OPTION) -c $< endif +endif .PHONY: o/$(MODE)/third_party/chibicc/test o/$(MODE)/third_party/chibicc/test: \