Mercurial > hg > index.cgi
comparison Makefile @ 557:b2ee86298516
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.
author | William Astle <lost@l-w.ca> |
---|---|
date | Fri, 08 Sep 2023 00:35:11 -0600 |
parents | 80b21c6b4a6b |
children |
comparison
equal
deleted
inserted
replaced
556:928c033c0cd0 | 557:b2ee86298516 |
---|---|
46 | 46 |
47 # The format truncation warnings are bleeping stupid when applied to | 47 # The format truncation warnings are bleeping stupid when applied to |
48 # snprintf() and friends. I'm using snprintf() precisely to prevent | 48 # snprintf() and friends. I'm using snprintf() precisely to prevent |
49 # overflows and I don't care if the string is truncated, so why should | 49 # overflows and I don't care if the string is truncated, so why should |
50 # I need to test the return value? Bleeping stupid. | 50 # I need to test the return value? Bleeping stupid. |
51 CFLAGS ?= -O3 -Wall -Wno-char-subscripts -Wno-format-truncation | 51 |
52 # -O3 breaks the build on some compiler/system targets so default to | |
53 # -O2 which seems okay for now. Ideally identifying what breaks at | |
54 # -O3 is indicated, but so far, identifying the specific source of | |
55 # the breakage has been problematic. | |
56 CFLAGS ?= -O2 -Wno-char-subscripts -Wno-format-truncation | |
52 | 57 |
53 MAIN_TARGETS := lwasm/lwasm$(PROGSUFFIX) \ | 58 MAIN_TARGETS := lwasm/lwasm$(PROGSUFFIX) \ |
54 lwlink/lwlink$(PROGSUFFIX) \ | 59 lwlink/lwlink$(PROGSUFFIX) \ |
55 lwar/lwar$(PROGSUFFIX) \ | 60 lwar/lwar$(PROGSUFFIX) \ |
56 lwlink/lwobjdump$(PROGSUFFIX) \ | 61 lwlink/lwobjdump$(PROGSUFFIX) \ |