diff options
Diffstat (limited to 'src/Makefile')
| -rw-r--r-- | src/Makefile | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile index 9846d8e..f0c6706 100644 --- a/src/Makefile +++ b/src/Makefile | |||
| @@ -9,7 +9,26 @@ RANDOMX_DIR ?= $(HOME)/RandomX | |||
| 9 | 9 | ||
| 10 | IMGUI_DIR = imgui | 10 | IMGUI_DIR = imgui |
| 11 | 11 | ||
| 12 | CXXFLAGS = -std=gnu++14 -O2 -w -fpermissive -pthread \ | 12 | # -w used to sit here and suppressed every diagnostic in the build, including |
| 13 | # the one that mattered: `%I64d` is MSVC-only, glibc mis-parses it as the GNU | ||
| 14 | # `I` flag with a width of 64 and an `int` conversion, and the resulting vararg | ||
| 15 | # desynchronisation segfaulted the node while logging a received block (issue | ||
| 16 | # #5, deterministic at height 1062 -- the first block carrying a real | ||
| 17 | # transaction). GCC had been reporting it all along: | ||
| 18 | # | ||
| 19 | # warning: format '%d' expects argument of type 'int', | ||
| 20 | # but argument 4 has type 'int64_t' | ||
| 21 | # | ||
| 22 | # -w cannot be narrowed: it wins over any -W or -Werror= that follows it, so it | ||
| 23 | # has to go. The four -Wno- entries below are the categories this 2009-era tree | ||
| 24 | # genuinely produces (measured: 248 deprecated-declarations, 157 write-strings, | ||
| 25 | # 18 narrowing, 1 unused-result); silencing them by name instead of silencing | ||
| 26 | # everything keeps the build quiet while leaving format errors fatal. | ||
| 27 | WARNFLAGS = -Wformat -Werror=format \ | ||
| 28 | -Wno-deprecated-declarations -Wno-write-strings \ | ||
| 29 | -Wno-narrowing -Wno-unused-result | ||
| 30 | |||
| 31 | CXXFLAGS = -std=gnu++14 -O2 $(WARNFLAGS) -fpermissive -pthread \ | ||
| 13 | -DSECP256K1_STATIC \ | 32 | -DSECP256K1_STATIC \ |
| 14 | -I$(SECP_INC) -I$(RANDOMX_DIR)/src \ | 33 | -I$(SECP_INC) -I$(RANDOMX_DIR)/src \ |
| 15 | -I/usr/include/nlohmann \ | 34 | -I/usr/include/nlohmann \ |