Skip to contentSkip to conversation

master - makefiles: use gcc warns with gcc only

PATCH Zdenek Kabelac 1 participant 1 message Aug 1, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=918e867abe6a455a401346744820d9e54a977749
Commit:        918e867abe6a455a401346744820d9e54a977749
Parent:        57727bb4ebffb30cf21b151cc2f66bfd7d924a81
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Tue Aug 1 00:04:20 2017 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue Aug 1 11:53:13 2017 +0200

makefiles: use gcc warns with gcc only

Avoid passing 'gcc' warning options to non-gcc compiler

---
 make.tmpl.in |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
make.tmpl.in +2 -0
index 2b2ddd1..102079e 100644
@@ -163,6 +163,7 @@ INSTALL_SCRIPT = $(INSTALL) -p $(M_INSTALL_PROGRAM)
 .SUFFIXES:
 .SUFFIXES: .c .cpp .d .o .so .a .po .pot .mo .dylib
 
+ifeq ("$(notdir $(CC))", "gcc")
 WFLAGS +=\
  -Wall\
  -Wcast-align\
@@ -207,6 +208,7 @@ endif
 ifeq ("@HAVE_WSYNCNAND@", "yes")
 WFLAGS += -Wsync-nand
 endif
+endif
 
 ifneq ("@STATIC_LINK@", "yes")
 ifeq ("@HAVE_PIE@", "yes")