Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1435020

[PATCH 2/4] tools lib subcmd: Respect WERROR=0 for build

From Chris Phlipot <cphlipot0@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 2/4] tools lib subcmd: Respect WERROR=0 for build
Date 2016-07-01 07:20 +0200
Message-ID <rPZ1T-2y2-7@gated-at.bofh.it> (permalink)
References <rPZ1T-2y2-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


this enables the workaround for compilers that generate warnings when
compiling libsubcmd.

Signed-off-by: Chris Phlipot <cphlipot0@gmail.com>
---
 tools/lib/subcmd/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/lib/subcmd/Makefile b/tools/lib/subcmd/Makefile
index a810370..ce4b7e5 100644
--- a/tools/lib/subcmd/Makefile
+++ b/tools/lib/subcmd/Makefile
@@ -19,7 +19,13 @@ MAKEFLAGS += --no-print-directory
 LIBFILE = $(OUTPUT)libsubcmd.a
 
 CFLAGS := $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
-CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
+CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -O6 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
+
+# Treat warnings as errors unless directed not to
+ifneq ($(WERROR),0)
+  CFLAGS += -Werror
+endif
+
 CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
 
 CFLAGS += -I$(srctree)/tools/include/
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] perf tool: Fix Android build Chris Phlipot <cphlipot0@gmail.com> - 2016-07-01 07:20 +0200
  [PATCH 3/4] perf tool: Fix build when sysconf doesn't support cache line size Chris Phlipot <cphlipot0@gmail.com> - 2016-07-01 07:20 +0200
    Re: [PATCH 3/4] perf tool: Fix build when sysconf doesn't support  cache line size Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-05 00:50 +0200
      Re: [PATCH 3/4] perf tool: Fix build when sysconf doesn't support  cache line size Chris Phlipot <cphlipot0@gmail.com> - 2016-07-05 02:20 +0200
        Re: [PATCH 3/4] perf tool: Fix build when sysconf doesn't support  cache line size Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-05 02:30 +0200
          Re: [PATCH 3/4] perf tool: Fix build when sysconf doesn't support  cache line size Chris Phlipot <cphlipot0@gmail.com> - 2016-07-05 02:50 +0200
            Re: [PATCH 3/4] perf tool: Fix build when sysconf doesn't support  cache line size Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-05 03:00 +0200
  [PATCH 2/4] tools lib subcmd: Respect WERROR=0 for build Chris Phlipot <cphlipot0@gmail.com> - 2016-07-01 07:20 +0200
    [tip:perf/core] tools lib subcmd: Respect WERROR=0 for build tip-bot for Chris Phlipot <tipbot@zytor.com> - 2016-07-05 12:30 +0200
  [PATCH 1/4] tools lib api: Respect WERROR=0 for build Chris Phlipot <cphlipot0@gmail.com> - 2016-07-01 07:20 +0200
    [tip:perf/core] tools lib api: Respect WERROR=0 for build tip-bot for Chris Phlipot <tipbot@zytor.com> - 2016-07-05 12:30 +0200
  [PATCH 4/4] perf tool: Update android build documentation Chris Phlipot <cphlipot0@gmail.com> - 2016-07-01 07:20 +0200
    [tip:perf/core] perf tools: Update android build documentation tip-bot for Chris Phlipot <tipbot@zytor.com> - 2016-07-05 12:30 +0200

csiph-web