Subject: misc/3301: Allow -Werror to be turned off
To: None <gnats-bugs@gnats.netbsd.org>
From: Simon J. Gerraty <sjg@quick.com.au>
List: netbsd-bugs
Date: 03/08/1997 09:11:52
>Number:         3301
>Category:       misc
>Synopsis:       don't hard code -Werror in bsd.sys.mk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Mar  7 14:20:03 1997
>Last-Modified:
>Originator:     Simon J. Gerraty
>Organization:
Zen Programming...
>Release:        Feb22
>Environment:
	
System: NetBSD zen.quick.com.au 1.2C NetBSD 1.2C (ZEN) #5: Mon Mar 3 16:18:58 EST 1997 root@zen.quick.com.au:/share/usr.src/sys/arch/i386/compile/ZEN i386


>Description:
	
Often when building current, some parts of the system will not compile
with -Werror, also many 3rd party software will not compile with this
flag.  Fixing all the warnings in all the s/w in the world is
unrealistic, so hard coding -Werror is counter productive.

The patch below does not change the current behaviour, but allows
-Werror to be easily turned off.

>How-To-Repeat:
	
Apply the patch then
make WERROR=

>Fix:
	
*** bsd.sys.mk.~1~      Fri May 17 03:50:45 1996
--- bsd.sys.mk  Sat Mar  8 08:54:41 1997
***************
*** 2,8 ****
  #
  # Overrides used for NetBSD source tree builds.
  
! CFLAGS+= -Werror
  
  .if defined(DESTDIR)
  CFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include
--- 2,9 ----
  #
  # Overrides used for NetBSD source tree builds.
  
! WERROR?= -Werror
! CFLAGS+= ${WERROR}
  
  .if defined(DESTDIR)
  CFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include
>Audit-Trail:
>Unformatted: