From c81a9189948854776693823121b8ac6a3187d5b1 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Tue, 22 Apr 2008 12:47:59 +0000 Subject: [PATCH] Redo a change in rev 1.160 with more proper way: > Don't make linker warnings fatal on linking static libs since > there is no proper way to avoid "FOO is a patented algorithm" warnings. Ok'ed by christos@ and dogcow@ on tech-toolchain, and tested build.sh build for sun2, news68k, alpha and newsmips. --- share/mk/bsd.sys.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 83075b4730af..dbe621dd418d 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.sys.mk,v 1.161 2008/04/15 00:08:05 tsutsui Exp $ +# $NetBSD: bsd.sys.mk,v 1.162 2008/04/22 12:47:59 tsutsui Exp $ # # Build definitions used for NetBSD source tree builds. @@ -17,8 +17,13 @@ CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith # we wanted, and now we don't get anymore. CFLAGS+= -Wno-sign-compare -Wno-traditional # Set linker warnings to be fatal +# XXX no proper way to avoid "FOO is a patented algorithm" warnings +# XXX on linking static libs +.if (!defined(MKPIC) || ${MKPIC} != "no") && \ + (!defined(LDSTATIC) || ${LDSTATIC} != "-static") LDFLAGS+= -Wl,--fatal-warnings .endif +.endif .if ${WARNS} > 1 CFLAGS+= -Wreturn-type -Wswitch -Wshadow .endif