From owner-svn-ports-head@FreeBSD.ORG Thu Jul 25 09:38:41 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1B33E8D4; Thu, 25 Jul 2013 09:38:41 +0000 (UTC) (envelope-from marino@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E2DC22B7D; Thu, 25 Jul 2013 09:38:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6P9ceOh061501; Thu, 25 Jul 2013 09:38:40 GMT (envelope-from marino@svn.freebsd.org) Received: (from marino@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6P9ceF5061499; Thu, 25 Jul 2013 09:38:40 GMT (envelope-from marino@svn.freebsd.org) Message-Id: <201307250938.r6P9ceF5061499@svn.freebsd.org> From: John Marino Date: Thu, 25 Jul 2013 09:38:40 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r323632 - in head/audio: penguinsap xmms-sapplug X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jul 2013 09:38:41 -0000 Author: marino Date: Thu Jul 25 09:38:40 2013 New Revision: 323632 URL: http://svnweb.freebsd.org/changeset/ports/323632 Log: audio/xmms-sapp, audio/penguinsap: Rework exception flags The wrong C++ flag, --no-exceptions, was being passed to these ports. The correct flag is "-fno-exceptions". Apparently gcc accepts the former, but clang does not. The current code states that clang version 3.2 will accept --no-exceptions, but this isn't the case either. However, both of these ports will build without a no-exceptions flag with clang. GCC still requires it. Rework the clang detection code. If code is not detected, -fno-exceptions is added to CXXFLAGS, otherwise nothing is done. Besides fixing the flag handling, this implemention avoids the bmake errors that _CLANG!= was generating. Approved by: bapt (mentor), maintainer Modified: head/audio/penguinsap/Makefile head/audio/xmms-sapplug/Makefile Modified: head/audio/penguinsap/Makefile ============================================================================== --- head/audio/penguinsap/Makefile Thu Jul 25 09:36:57 2013 (r323631) +++ head/audio/penguinsap/Makefile Thu Jul 25 09:38:40 2013 (r323632) @@ -22,12 +22,12 @@ PLIST_FILES= bin/sap .include -_CLANG!= clang --version | ${HEAD} -1 | ${SED} -e 's/.*clang version \([0-9]\)\.\([0-9]\).*/\1\2/' +_CLANG!= ${CXX} --version | ${HEAD} -1 | ${SED} -e 's/.*clang version \([0-9]\)\.\([0-9]\).*/\1\2/' +ISCLANG= ${_CLANG:M[34][0-9]} -.if ${CXX:T} != "clang++" -.if ${_CLANG} < 33 -CXXFLAGS+= --no-exceptions -.endif +# clang can build this without -fno-exceptions +.if empty(ISCLANG) +CXXFLAGS+= -fno-exceptions .endif post-patch: Modified: head/audio/xmms-sapplug/Makefile ============================================================================== --- head/audio/xmms-sapplug/Makefile Thu Jul 25 09:36:57 2013 (r323631) +++ head/audio/xmms-sapplug/Makefile Thu Jul 25 09:38:40 2013 (r323632) @@ -29,10 +29,12 @@ OPTIONS_DEFINE= OPTIMIZED_CFLAGS .include -_CLANG!= ${CC} --version | ${HEAD} -1 | ${SED} -e 's/.*clang version \([0-9]\)\.\([0-9]\).*/\1\2/' +_CLANG!= ${CXX} --version | ${HEAD} -1 | ${SED} -e 's/.*clang version \([0-9]\)\.\([0-9]\).*/\1\2/' +ISCLANG= ${_CLANG:M[34][0-9]} -.if ${CXX:T} != "clang++" && !defined(_CLANG) -CXXFLAGS+= --no-exceptions +# clang can build this without -fno-exceptions +.if empty(ISCLANG) +CXXFLAGS+= -fno-exceptions .endif .if ${ARCH} == "amd64" || ${ARCH} == "ia64"