Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions config.mak.dev
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ endif
endif
endif

# glibc 2.43 headers unconditionally use _Generic even when we ask the
# compiler to stick to -std=gnu99 and unlike GCC, clang lacks a
# workaround to squelch warnings from system headers.
ifneq ($(filter clang1,$(COMPILER_FEATURES)),) # if we are using clang
DEVELOPER_CFLAGS += -Wno-c11-extensions
endif

# https://bugzilla.redhat.com/show_bug.cgi?id=2075786
ifneq ($(filter gcc12,$(COMPILER_FEATURES)),)
DEVELOPER_CFLAGS += -Wno-error=stringop-overread
Expand Down
6 changes: 6 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,12 @@ if get_option('warning_level') in ['2','3', 'everything'] and compiler.get_argum
libgit_c_args += cflag
endif
endforeach

# Clang generates warnings when compiling glibc 2.43 because of the use of
# _Generic.
if compiler.get_id() == 'clang'
libgit_c_args += '-Wno-c11-extensions'
endif
endif

if get_option('breaking_changes')
Expand Down