# HG changeset patch # User William Astle # Date 1694154911 21600 # Node ID b2ee86298516c7f991f30cd1fea5a110d02aee13 # Parent 928c033c0cd0f11681d77fb274a47a2820d5cc05 Reduce default optimization level to -O2 It seems -O3 isn't as reliable as it maybe should be. There is plenty of information out there indicating that it is more likely to trigger compiler bugs so setting the default to -O2 instead. diff -r 928c033c0cd0 -r b2ee86298516 Makefile --- a/Makefile Fri Sep 08 00:32:40 2023 -0600 +++ b/Makefile Fri Sep 08 00:35:11 2023 -0600 @@ -48,7 +48,12 @@ # snprintf() and friends. I'm using snprintf() precisely to prevent # overflows and I don't care if the string is truncated, so why should # I need to test the return value? Bleeping stupid. -CFLAGS ?= -O3 -Wall -Wno-char-subscripts -Wno-format-truncation + +# -O3 breaks the build on some compiler/system targets so default to +# -O2 which seems okay for now. Ideally identifying what breaks at +# -O3 is indicated, but so far, identifying the specific source of +# the breakage has been problematic. +CFLAGS ?= -O2 -Wno-char-subscripts -Wno-format-truncation MAIN_TARGETS := lwasm/lwasm$(PROGSUFFIX) \ lwlink/lwlink$(PROGSUFFIX) \