diff options
author | John Marino <marino@FreeBSD.org> | 2013-07-25 09:38:40 +0000 |
---|---|---|
committer | John Marino <marino@FreeBSD.org> | 2013-07-25 09:38:40 +0000 |
commit | a9220e6634f0c6e23f3fb83de5eaf6eedb02708e (patch) | |
tree | de37dfed4b21c7e8053474f77744f82a62d6157e /audio/xmms-sapplug/Makefile | |
parent | Revert upstream patch that seems to be causing firefox and thunderbird to (diff) |
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
Diffstat (limited to 'audio/xmms-sapplug/Makefile')
-rw-r--r-- | audio/xmms-sapplug/Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/audio/xmms-sapplug/Makefile b/audio/xmms-sapplug/Makefile index e83381444f14..c6d7216da7b0 100644 --- a/audio/xmms-sapplug/Makefile +++ b/audio/xmms-sapplug/Makefile @@ -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" |