diff options
author | marino <marino@FreeBSD.org> | 2013-07-25 17:38:40 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2013-07-25 17:38:40 +0800 |
commit | f95b3285c1c6fb705aa42e34a1c1f30c34bf8bd5 (patch) | |
tree | de37dfed4b21c7e8053474f77744f82a62d6157e | |
parent | 9c3149ba99877dba4f872c51c400ceccdd10cbb7 (diff) | |
download | freebsd-ports-gnome-f95b3285c1c6fb705aa42e34a1c1f30c34bf8bd5.tar.gz freebsd-ports-gnome-f95b3285c1c6fb705aa42e34a1c1f30c34bf8bd5.tar.zst freebsd-ports-gnome-f95b3285c1c6fb705aa42e34a1c1f30c34bf8bd5.zip |
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
-rw-r--r-- | audio/penguinsap/Makefile | 10 | ||||
-rw-r--r-- | audio/xmms-sapplug/Makefile | 8 |
2 files changed, 10 insertions, 8 deletions
diff --git a/audio/penguinsap/Makefile b/audio/penguinsap/Makefile index a5d5405553e7..37a39bfc8c76 100644 --- a/audio/penguinsap/Makefile +++ b/audio/penguinsap/Makefile @@ -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: 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" |