Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Aug 2013 21:03:39 GMT
From:      "r4721@tormail.org" <r4721@tormail.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/181007: [patch] improve clang detection in net/socat
Message-ID:  <201308032103.r73L3dNq063458@oldred.freebsd.org>
Resent-Message-ID: <201308032110.r73LA0fJ046103@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 03 21:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     r4721@tormail.org
>Release:        
>Organization:
>Environment:
>Description:
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.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

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


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308032103.r73L3dNq063458>