Bug 181007 - [patch] improve clang detection in net/socat
Summary: [patch] improve clang detection in net/socat
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Emanuel Haupt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-03 22:10 UTC by r4721@tormail.org
Modified: 2013-08-04 17:00 UTC (History)
0 users

See Also:


Attachments
file.diff (475 bytes, patch)
2013-08-03 22:10 UTC, r4721@tormail.org
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description r4721@tormail.org 2013-08-03 22:10:00 UTC
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.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-08-03 22:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ehaupt

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Emanuel Haupt freebsd_committer freebsd_triage 2013-08-04 16:57:50 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-08-04 16:57:53 UTC
Author: ehaupt
Date: Sun Aug  4 15:57:40 2013
New Revision: 324242
URL: http://svnweb.freebsd.org/changeset/ports/324242

Log:
  Change the clang detector to use a pattern match instead of a conditional
  define and always test. This fixes build on 9-STABLE and saves some shell
  commands.
  
  PR:		181007
  Submitted by:	"r4721@tormail.org" <r4721@tormail.org>

Modified:
  head/net/socat/Makefile

Modified: head/net/socat/Makefile
==============================================================================
--- head/net/socat/Makefile	Sun Aug  4 15:43:18 2013	(r324241)
+++ head/net/socat/Makefile	Sun Aug  4 15:57:40 2013	(r324242)
@@ -33,11 +33,9 @@ CFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 .endif
 
-.if(${OSVERSION} >= 1000024)
-CCISCLANG!=	${CC} --version | ${HEAD} -1 | ${GREP} 'clang'
-.endif
+CCISCLANG!=	${CC} --version
 
-.if ${CC} == clang || !empty(CCISCLANG)
+.if !empty(CCISCLANG:M*clang*)
 CFLAGS+=	-Wno-unused-comparison
 .endif
 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"