diff mbox

[crda,2/4] allow people to turn off -Werror

Message ID 1425498714-8654-2-git-send-email-vapier@gentoo.org (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Mike Frysinger March 4, 2015, 7:51 p.m. UTC
From: Mike Frysinger <vapier@chromium.org>

Forcing -Werror at build time easily breaks across compiler settings,
compiler versions, architectures, C libraries, etc...  Add a knob so
distro peeps can turn it off.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Johannes Berg March 4, 2015, 7:53 p.m. UTC | #1
On Wed, 2015-03-04 at 14:51 -0500, Mike Frysinger wrote:
> From: Mike Frysinger <vapier@chromium.org>
> 
> Forcing -Werror at build time easily breaks across compiler settings,
> compiler versions, architectures, C libraries, etc...  Add a knob so
> distro peeps can turn it off.

> +WERROR = -Werror

Doesn't that need ?= ?

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mike Frysinger March 4, 2015, 8:22 p.m. UTC | #2
On 04 Mar 2015 20:53, Johannes Berg wrote:
> On Wed, 2015-03-04 at 14:51 -0500, Mike Frysinger wrote:
> > From: Mike Frysinger <vapier@chromium.org>
> > 
> > Forcing -Werror at build time easily breaks across compiler settings,
> > compiler versions, architectures, C libraries, etc...  Add a knob so
> > distro peeps can turn it off.
> 
> > +WERROR = -Werror
> 
> Doesn't that need ?= ?

yes, if you wanted to support:
	WERROR= make

but the expectation is that you'd do:
	make WERROR=

in which case this code is working as i intended.  if the maintainers want to 
use ?= then it doesn't matter to me.
-mike
Johannes Berg March 4, 2015, 8:31 p.m. UTC | #3
On Wed, 2015-03-04 at 15:22 -0500, Mike Frysinger wrote:

> yes, if you wanted to support:
> 	WERROR= make
> 
> but the expectation is that you'd do:
> 	make WERROR=
> 
> in which case this code is working as i intended.

Oh, interesting, I wasn't even really aware of this difference :)

Heh. Goes to show why I shouldn't work with build systems ;-)

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mike Frysinger March 4, 2015, 9:51 p.m. UTC | #4
On 04 Mar 2015 21:31, Johannes Berg wrote:
> On Wed, 2015-03-04 at 15:22 -0500, Mike Frysinger wrote:
> > yes, if you wanted to support:
> > 	WERROR= make
> > 
> > but the expectation is that you'd do:
> > 	make WERROR=
> > 
> > in which case this code is working as i intended.
> 
> Oh, interesting, I wasn't even really aware of this difference :)
> 
> Heh. Goes to show why I shouldn't work with build systems ;-)

no worries ... most people shouldn't ;)
-mike
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 46c683d..5f988f4 100644
--- a/Makefile
+++ b/Makefile
@@ -25,8 +25,9 @@  UDEV_RULE_DIR?=/lib/udev/rules.d/
 PUBKEY_DIR?=pubkeys
 RUNTIME_PUBKEY_DIR?=/etc/wireless-regdb/pubkeys
 
+WERROR = -Werror
 CFLAGS += -O2 -fpic
-CFLAGS += -std=gnu99 -Wall -Werror -pedantic
+CFLAGS += -std=gnu99 -Wall $(WERROR) -pedantic
 CFLAGS += -Wall -g
 LDLIBREG += -lreg
 LDLIBS += $(LDLIBREG)