All of lore.kernel.org
 help / color / mirror / Atom feed
From: mwilck@suse.com
To: Christophe Varoqui <christophe.varoqui@opensvc.com>,
	Benjamin Marzinski <bmarzins@redhat.com>
Cc: dm-devel@redhat.com, Martin Wilck <mwilck@suse.com>
Subject: [PATCH 02/11] multipath-tools: Makefile.inc: separate out OPTFLAGS
Date: Tue, 12 May 2020 00:39:22 +0200	[thread overview]
Message-ID: <20200511223931.18261-3-mwilck@suse.com> (raw)
In-Reply-To: <20200511223931.18261-1-mwilck@suse.com>

From: Martin Wilck <mwilck@suse.com>

OPTFLAGS is what distribution builds would typically override. That
should not include the warning flags we use.

Moreover, in the definition of CFLAGS, put $(CFLAGS) first to make it
easier for the user to spot her input in the build logs.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 Makefile.inc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index d4d1e0dd..7a59db85 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -93,14 +93,14 @@ STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector)
 ERROR_DISCARDED_QUALIFIERS := $(call TEST_CC_OPTION,-Werror=discarded-qualifiers,)
 WNOCLOBBERED := $(call TEST_CC_OPTION,-Wno-clobbered,)
 
-OPTFLAGS	= -O2 -g -pipe -Werror -Wall -Wextra -Wformat=2 -Werror=implicit-int \
+OPTFLAGS	:= -O2 -g $(STACKPROT) --param=ssp-buffer-size=4
+WARNFLAGS	:= -Werror -Wall -Wextra -Wformat=2 -Werror=implicit-int \
 		  -Werror=implicit-function-declaration -Werror=format-security \
-		  $(WNOCLOBBERED) \
-		  -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \
-		  $(STACKPROT) --param=ssp-buffer-size=4
+		  $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS)
 CPPFLAGS	:= -Wp,-D_FORTIFY_SOURCE=2 
-CFLAGS		:= $(OPTFLAGS) -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
-		   -MMD -MP $(CFLAGS)
+CFLAGS		:= $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe \
+		   -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
+		   -MMD -MP
 BIN_CFLAGS	= -fPIE -DPIE
 LIB_CFLAGS	= -fPIC
 SHARED_FLAGS	= -shared
-- 
2.26.2

  parent reply	other threads:[~2020-05-11 22:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 22:39 [PATCH 00/11] Minor fixes for multipath-tools mwilck
2020-05-11 22:39 ` [PATCH 01/11] multipath-tools: Makefile: more dependency fixes for parallel build mwilck
2020-05-11 22:39 ` mwilck [this message]
2020-05-11 22:39 ` [PATCH 03/11] multipath-tools: Makefile.inc: allow user settings for LDFLAGS mwilck
2020-05-11 22:39 ` [PATCH 04/11] multipath-tools: Makefile.inc: set -Wno-error=clobbered mwilck
2020-05-11 22:39 ` [PATCH 05/11] libmultipath: discovery.c: use %z qualifier for size_t mwilck
2020-05-11 22:39 ` [PATCH 06/11] libmultipath: eliminate more signed/unsigned comparisons mwilck
2020-05-11 22:39 ` [PATCH 07/11] libmultipath: set_uint: fix parsing for 32bit mwilck
2020-05-11 22:39 ` [PATCH 08/11] multipath-tools tests/Makefile: add -lmpathcmd to LIBDEPS mwilck
2020-05-11 22:39 ` [PATCH 09/11] multipath tools tests/Makefile: Fix OBJDEPS for hwtable-test mwilck
2020-05-11 22:39 ` [PATCH 10/11] multipath-tools tests/test-lib.c: drop __wrap_is_claimed_by_foreign mwilck
2020-05-11 22:39 ` [PATCH 11/11] multipath-tools tests/directio: fix -Wmaybe-uninitalized warning mwilck
2020-05-15  1:30 ` [PATCH 00/11] Minor fixes for multipath-tools Benjamin Marzinski

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=20200511223931.18261-3-mwilck@suse.com \
    --to=mwilck@suse.com \
    --cc=bmarzins@redhat.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@redhat.com \
    /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.