Skip to content

Commit 0d55382

Browse files
Makefile: Fix build with Clang
It doesn't know -Wdiscarded-qualifiers. Reported by @pjonsson on #247. I really need to switch to CMake - #242 Signed-off-by: Thiago Macieira <[email protected]>
1 parent fd2f6cf commit 0d55382

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ cflags += -std=gnu99 $(CFLAGS)
240240

241241
ifneq ($(DISABLE_WERROR),1)
242242
cflags += \
243-
-Werror=discarded-qualifiers \
243+
$(shell $(CC) -S -Werror -Wdiscarded-qualifiers -o - -xc /dev/null >/dev/null 2>&1 && echo -Werror=discarded-qualifiers) \
244244
-Werror=incompatible-pointer-types \
245245
-Werror=implicit-function-declaration \
246246
-Werror=int-conversion

0 commit comments

Comments
 (0)