Date: Thu, 25 Jul 2013 09:38:40 +0000 (UTC) From: John Marino <marino@FreeBSD.org> 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 Message-ID: <201307250938.r6P9ceF5061499@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <bsd.port.pre.mk> -_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 <bsd.port.options.mk> -_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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307250938.r6P9ceF5061499>