ports/181007: [patch] improve clang detection in net/socat

r4721 at tormail.org r4721 at tormail.org
Sat Aug 3 21:10:01 UTC 2013

>Number:         181007
>Category:       ports
>Synopsis:       [patch] improve clang detection in net/socat
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 03 21:10:00 UTC 2013
>Originator:     r4721 at tormail.org
changes the clang detector to use a pattern match instead of a conditional define and always test. this fixes build on 9-stable with WITH_CLANG_IS_CC and saves some shell commands.

tested with both clang as cc and gcc as cc, the cflag was only inserted with clang.


Patch attached with submission follows:

Index: net/socat/Makefile
--- net/socat/Makefile	(revision 324019)
+++ net/socat/Makefile	(working copy)
@@ -33,11 +34,9 @@
-.if(${OSVERSION} >= 1000024)
-CCISCLANG!=	${CC} --version | ${HEAD} -1 | ${GREP} 'clang'
+CCISCLANG!=	${CC} --version
-.if ${CC} == clang || defined(CCISCLANG)
+.if !empty(CCISCLANG:M*clang*)
 CFLAGS+=	-Wno-unused-comparison


More information about the freebsd-ports-bugs mailing list