From 2d6ec700cbfc8a18b60ccfba1ae49cb038967570 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 31 Aug 2025 15:44:09 -0400 Subject: Fix for compiler flags --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 10d7b84a..983f41ae 100644 --- a/Makefile +++ b/Makefile @@ -58,11 +58,7 @@ ifeq ($(shell $(CC) -v 2>&1 | grep -c "gcc version"), 1) -Wlogical-op -Wpacked-not-aligned -Wshadow=compatible-local -Wshadow=global -Wshadow=local \ -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ -Wsync-nand -Wtrampolines -Wvector-operation-performance -Wcast-align=strict - CCONFIG += -fsanitize=signed-integer-overflow -fno-sanitize-recover -fno-signaling-nans -endif - -ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1) - CCONFIG += -fno-finite-math-only + CCONFIG += -fsanitize=signed-integer-overflow -fno-sanitize-recover -fno-signaling-nans -fno-finite-math-only endif OS := $(shell uname -s) -- cgit v1.2.3 From a571ccffd795a595e990a3405dcf977aafc33c6c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 31 Aug 2025 15:45:27 -0400 Subject: Move compiler flag to GCC only --- src/tomo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tomo.c b/src/tomo.c index 3d08be75..da10df87 100644 --- a/src/tomo.c +++ b/src/tomo.c @@ -81,7 +81,7 @@ static OptionalBool_t verbose = false, quiet = false, show_version = false, show static OptionalText_t show_codegen = NONE_TEXT, cflags = Text("-Werror -fdollars-in-identifiers -std=c2x -Wno-trigraphs " " -ffunction-sections -fdata-sections" - " -fno-signed-zeros -fno-finite-math-only " + " -fno-signed-zeros " " -D_XOPEN_SOURCE -D_DEFAULT_SOURCE -fPIC -ggdb" #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) " -D_BSD_SOURCE" @@ -222,7 +222,7 @@ int main(int argc, char *argv[]) { bool is_gcc = (system(String(cc, " -v 2>&1 | grep -q 'gcc version'")) == 0); if (is_gcc) { cflags = Texts(cflags, Text(" -fsanitize=signed-integer-overflow -fno-sanitize-recover" - " -fno-signaling-nans -fno-trapping-math")); + " -fno-signaling-nans -fno-trapping-math -fno-finite-math-only")); } bool is_clang = (system(String(cc, " -v 2>&1 | grep -q 'clang version'")) == 0); -- cgit v1.2.3