tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: linker warnings (Re: CVS commit: src/share/mk)



christos%astron.com@localhost wrote:

> >> Module Name:       src
> >> Committed By:      lukem
> >> Date:              Mon Mar  3 06:33:17 UTC 2008
> >> 
> >> Modified Files:
> >>    src/share/mk: bsd.sys.mk
> >> 
> >> Log Message:
> >> Set linker warnings to be fatal if ${WARNS} > 0.
> >
> >How can we avoid
> >"warning: RC5 is a patented algorithm; link against libcrypto_rc5.a"
> >"warning: IDEA is a patented algorithm; link against libcrypto_idea.a"
> >warnings on NOPIC port(s)?
> 
> just elide them in NOPIC ports.

dogcow%babymeat.com@localhost wrote on source-changes:

> (I'm not convinced this is the proper place to put in the LDFLAGS
> flag, though...)

I think it's still worth to put all WARNS stuff into one place.

Is this patch okay? build.sh build works at least on sun2 and news68k.
---

Index: share/mk/bsd.sys.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.sys.mk,v
retrieving revision 1.161
diff -u -r1.161 bsd.sys.mk
--- share/mk/bsd.sys.mk 15 Apr 2008 00:08:05 -0000      1.161
+++ share/mk/bsd.sys.mk 20 Apr 2008 16:30:14 -0000
@@ -17,8 +17,13 @@
 # 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

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index