From: Anthony PERARD <anthony.perard@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>, Wei Liu <wl@xen.org>
Subject: [XEN PATCH v3 24/25] tools: Add -Werror by default to all tools/
Date: Fri, 24 Jun 2022 17:04:21 +0100 [thread overview]
Message-ID: <20220624160422.53457-25-anthony.perard@citrix.com> (raw)
In-Reply-To: <20220624160422.53457-1-anthony.perard@citrix.com>
And provide an option to ./configure to disable it.
A follow-up patch will remove -Werror from every other Makefile in
tools/. ("tools: Remove -Werror everywhere else")
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
tools/configure.ac | 1 +
tools/Rules.mk | 4 ++++
config/Tools.mk.in | 1 +
tools/configure | 26 ++++++++++++++++++++++++++
4 files changed, 32 insertions(+)
diff --git a/tools/configure.ac b/tools/configure.ac
index 1094d896fc..06311b99c2 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -79,6 +79,7 @@ m4_include([../m4/header.m4])
AX_XEN_EXPAND_CONFIG()
# Enable/disable options
+AX_ARG_DEFAULT_ENABLE([werror], [Build tools without -Werror])
AX_ARG_DEFAULT_DISABLE([rpath], [Build tools with -Wl,-rpath,LIBDIR])
AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools])
diff --git a/tools/Rules.mk b/tools/Rules.mk
index 26958b2948..a165dc4bda 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -133,6 +133,10 @@ endif
CFLAGS_libxenlight += $(CFLAGS_libxenctrl)
+ifeq ($(CONFIG_WERROR),y)
+CFLAGS += -Werror
+endif
+
ifeq ($(debug),y)
# Use -Og if available, -O0 otherwise
dbg_opt_level := $(call cc-option,$(CC),-Og,-O0)
diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 6c1a0a676f..d0d460f922 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -1,5 +1,6 @@
-include $(XEN_ROOT)/config/Paths.mk
+CONFIG_WERROR := @werror@
CONFIG_RUMP := @CONFIG_RUMP@
ifeq ($(CONFIG_RUMP),y)
XEN_OS := NetBSDRump
diff --git a/tools/configure b/tools/configure
index a052c186a5..986cb1d933 100755
--- a/tools/configure
+++ b/tools/configure
@@ -716,6 +716,7 @@ ocamltools
monitors
githttp
rpath
+werror
DEBUG_DIR
XEN_DUMP_DIR
XEN_PAGING_DIR
@@ -805,6 +806,7 @@ with_xen_scriptdir
with_xen_dumpdir
with_rundir
with_debugdir
+enable_werror
enable_rpath
enable_githttp
enable_monitors
@@ -1490,6 +1492,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-largefile omit support for large files
+ --disable-werror Build tools without -Werror (default is ENABLED)
--enable-rpath Build tools with -Wl,-rpath,LIBDIR (default is
DISABLED)
--enable-githttp Download GIT repositories via HTTP (default is
@@ -4111,6 +4114,29 @@ DEBUG_DIR=$debugdir_path
# Enable/disable options
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+ enableval=$enable_werror;
+fi
+
+
+if test "x$enable_werror" = "xno"; then :
+
+ ax_cv_werror="n"
+
+elif test "x$enable_werror" = "xyes"; then :
+
+ ax_cv_werror="y"
+
+elif test -z $ax_cv_werror; then :
+
+ ax_cv_werror="y"
+
+fi
+werror=$ax_cv_werror
+
+
+
# Check whether --enable-rpath was given.
if test "${enable_rpath+set}" = set; then :
enableval=$enable_rpath;
--
Anthony PERARD
next prev parent reply other threads:[~2022-06-24 16:08 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 16:03 [XEN PATCH v3 00/25] Toolstack build system improvement, toward non-recursive makefiles Anthony PERARD
2022-06-24 16:03 ` [XEN PATCH v3 01/25] tools/console: have one Makefile per program/directory Anthony PERARD
2022-07-08 15:08 ` Luca Fancellu
2022-06-24 16:03 ` [XEN PATCH v3 02/25] tools/debugger/gdbsx: Fix and cleanup makefiles Anthony PERARD
2022-07-08 15:23 ` Luca Fancellu
2022-06-24 16:04 ` [XEN PATCH v3 03/25] tools/examples: cleanup Makefile Anthony PERARD
2022-07-08 15:31 ` Luca Fancellu
2022-06-24 16:04 ` [XEN PATCH v3 04/25] tools/firmware/hvmloader: rework Makefile Anthony PERARD
2022-07-08 15:39 ` Luca Fancellu
2022-07-11 13:38 ` Anthony PERARD
2022-07-11 13:40 ` Luca Fancellu
2022-07-11 13:41 ` Jan Beulich
2022-07-11 13:52 ` Jan Beulich
2022-07-11 17:01 ` Anthony PERARD
2022-06-24 16:04 ` [XEN PATCH v3 05/25] tools/fuzz/libelf: rework makefile Anthony PERARD
2022-07-11 11:23 ` Luca Fancellu
2022-06-24 16:04 ` [XEN PATCH v3 06/25] tools/fuzz/x86_instruction_emulator: " Anthony PERARD
2022-07-11 13:16 ` Luca Fancellu
2022-07-11 14:08 ` Jan Beulich
2022-08-02 17:09 ` Anthony PERARD
2022-08-03 5:56 ` Jan Beulich
2022-08-03 10:15 ` Anthony PERARD
2022-06-24 16:04 ` [XEN PATCH v3 07/25] tools/hotplug: cleanup Makefiles Anthony PERARD
2022-07-22 11:02 ` Luca Fancellu
2022-06-24 16:04 ` [XEN PATCH v3 08/25] tools/libfsimage: Cleanup makefiles Anthony PERARD
2022-07-22 12:07 ` Luca Fancellu
2022-06-24 16:04 ` [XEN PATCH v3 09/25] tools/xenpaging: Rework makefile Anthony PERARD
2022-07-22 12:17 ` Luca Fancellu
2022-06-24 16:04 ` [XEN PATCH v3 10/25] tools/xentop: rework makefile Anthony PERARD
2022-07-22 13:13 ` Luca Fancellu
2022-06-24 16:04 ` [XEN PATCH v3 11/25] tools/xentrace: rework Makefile Anthony PERARD
2022-07-22 13:30 ` Luca Fancellu
2022-08-08 15:35 ` Anthony PERARD
2022-06-24 16:04 ` [XEN PATCH v3 12/25] .gitignore: Cleanup ignores of tools/libs/*/{headers.chk,*.pc} Anthony PERARD
2022-06-29 10:15 ` Juergen Gross
2022-07-05 13:17 ` Bertrand Marquis
2022-06-24 16:04 ` [XEN PATCH v3 13/25] tools/libs/util: cleanup Makefile Anthony PERARD
2022-06-29 10:18 ` Juergen Gross
2022-07-05 13:20 ` Bertrand Marquis
2022-06-24 16:04 ` [XEN PATCH v3 14/25] tools/flask/utils: list build targets in $(TARGETS) Anthony PERARD
2022-07-12 1:30 ` Henry Wang
2022-06-24 16:04 ` [XEN PATCH v3 15/25] libs/libs.mk: Rename $(LIB) to $(TARGETS) Anthony PERARD
2022-06-29 10:19 ` Juergen Gross
2022-07-05 13:21 ` Bertrand Marquis
2022-06-24 16:04 ` [XEN PATCH v3 16/25] libs/libs.mk: Remove the need for $(PKG_CONFIG_INST) Anthony PERARD
2022-06-29 10:22 ` Juergen Gross
2022-07-05 13:27 ` Bertrand Marquis
2022-06-24 16:04 ` [XEN PATCH v3 17/25] libs/libs.mk: Rework target headers.chk dependencies Anthony PERARD
2022-06-29 10:23 ` Juergen Gross
2022-07-05 13:29 ` Bertrand Marquis
2022-06-24 16:04 ` [XEN PATCH v3 18/25] tools: Introduce $(xenlibs-rpath,..) to replace $(SHDEPS_lib*) Anthony PERARD
2022-06-29 10:26 ` Juergen Gross
2022-06-24 16:04 ` [XEN PATCH v3 19/25] tools: Introduce $(xenlibs-ldlibs, ) macro Anthony PERARD
2022-06-29 10:29 ` Juergen Gross
2022-06-24 16:04 ` [XEN PATCH v3 20/25] tools: Introduce $(xenlibs-ldflags, " Anthony PERARD
2022-07-12 1:40 ` Henry Wang
2022-06-24 16:04 ` [XEN PATCH v3 21/25] tools/helper: Cleanup Makefile Anthony PERARD
2022-07-22 14:06 ` Luca Fancellu
2022-06-24 16:04 ` [XEN PATCH v3 22/25] tools/console: Use $(xenlibs-ldlibs,) Anthony PERARD
2022-07-22 14:15 ` Luca Fancellu
2022-06-24 16:04 ` [XEN PATCH v3 23/25] tools/helpers: Fix build of xen-init-dom0 with -Werror Anthony PERARD
2022-07-12 1:31 ` Henry Wang
2022-06-24 16:04 ` Anthony PERARD [this message]
2022-07-22 14:31 ` [XEN PATCH v3 24/25] tools: Add -Werror by default to all tools/ Luca Fancellu
2022-06-24 16:04 ` [XEN PATCH v3 25/25] tools: Remove -Werror everywhere else Anthony PERARD
2022-06-29 8:59 ` Luca Fancellu
2022-06-29 17:22 ` Stefano Stabellini
2022-06-30 7:33 ` Bertrand Marquis
2022-06-30 21:03 ` Stefano Stabellini
2022-07-01 13:26 ` Bertrand Marquis
2022-07-01 17:47 ` Stefano Stabellini
2022-06-29 10:31 ` Juergen Gross
2022-06-27 7:25 ` [XEN PATCH v3 00/25] Toolstack build system improvement, toward non-recursive makefiles Christian Lindig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220624160422.53457-25-anthony.perard@citrix.com \
--to=anthony.perard@citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.