Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit eca63c1

Browse files
djix123dragonmux
authored andcommitted
misc: only add certain compiler flags on non-OSX platforms
1 parent 4a62286 commit eca63c1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,22 @@ PLATFORM_DIR = platforms/$(PROBE_HOST)
33
VPATH += $(PLATFORM_DIR) target
44
ENABLE_DEBUG ?=
55

6+
SYS = $(shell $(CC) -dumpmachine)
7+
68
ifneq ($(V), 1)
79
MAKEFLAGS += --no-print-dir
810
Q := @
911
endif
1012

11-
CFLAGS += -Wall -Wextra -Werror -Wmaybe-uninitialized \
12-
-Wreturn-type -Wstringop-overflow -Wunsafe-loop-optimizations \
13+
CFLAGS += -Wall -Wextra -Werror -Wreturn-type \
1314
-Wno-char-subscripts \
1415
-std=c11 -g3 -MD -I./target \
1516
-I. -Iinclude -I$(PLATFORM_DIR)
1617

18+
ifeq (filter, macosx darwin, $(SYS))
19+
CFLAGS += -Wmaybe-uninitialized -Wstringop-overflow -Wunsafe-loop-optimizations
20+
endif
21+
1722
ifeq ($(ENABLE_DEBUG), 1)
1823
CFLAGS += -DENABLE_DEBUG
1924
endif

0 commit comments

Comments
 (0)