diff --git a/docs/changes.txt b/docs/changes.txt index 283e3c0d4..96dd0e729 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -88,6 +88,7 @@ - Fixed build failed for 18600 with Apple Metal - Fixed build failed for 4410 with vector width > 1 - Fixed build failure for almost all hash modes that make use of hc_swap64 and/or hc_swap64_S with Apple Metal +- Fixed clang identification in src/Makefile - Fixed debug mode 5 by adding the missing colon between original-word and finding-rule - Fixed display problem of the "Optimizers applied" list for algorithms using OPTI_TYPE_SLOW_HASH_SIMD_INIT2 and/or OPTI_TYPE_SLOW_HASH_SIMD_LOOP2 - Fixed incompatible pointer types (salt1 and salt2 buf) in 3730 a3 kernel diff --git a/src/Makefile b/src/Makefile index 1cd440645..786fb4b19 100644 --- a/src/Makefile +++ b/src/Makefile @@ -37,6 +37,8 @@ endif ifeq ($(DEBUG),1) $(info "## Detected Operating System : $(UNAME)") +$(info "## Detected CC : $(CC)") +$(info "## Detected CXX : $(CXX)") endif ## @@ -188,15 +190,17 @@ CFLAGS += -Wextra endif ## because LZMA SDK -ifeq ($(CC),clang) -#No longer supported in clang 10.0.0 -#CFLAGS += -Wno-enum-conversion +ifneq (,$(findstring clang, $(CC))) CFLAGS += -Wno-typedef-redefinition +else +ifeq ($(CC),cc) +CFLAGS += -Wno-typedef-redefinition +endif endif ifeq ($(USE_SYSTEM_LZMA),0) CFLAGS_LZMA += -D_7ZIP_ST -ifneq ($(CC),clang) +ifeq (,$(findstring clang, $(CC))) CFLAGS_LZMA += -Wno-misleading-indentation endif endif @@ -208,12 +212,15 @@ CFLAGS_ZLIB += -Wno-implicit-function-declaration CFLAGS_ZLIB += -Wno-unused-parameter CFLAGS_ZLIB += -DIOAPI_NO_64 CFLAGS_ZLIB += -DUNZ_BUFSIZE=262144 +ifneq (,$(findstring clang, $(CC))) +CFLAGS_ZLIB += -Wno-deprecated-non-prototype -Wno-unknown-warning-option +endif endif ## because UNRAR ifeq ($(ENABLE_UNRAR),1) ifeq ($(USE_SYSTEM_UNRAR),0) -ifneq ($(CC),clang) +ifeq (,$(findstring clang, $(CC))) CFLAGS_UNRAR += -Wno-class-memaccess CFLAGS_UNRAR += -Wno-misleading-indentation CFLAGS_UNRAR += -Wno-format-overflow