diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2018-01-26 14:39:15 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2018-01-26 14:39:15 +0000 |
commit | 37fb040f200ca3285bb79203046f77b9b4dab432 (patch) | |
tree | c1ea401515e24f99153bd4a409e8abc8df05cd7e /audio/libsidplay | |
parent | 1d02b8c8d10b309b2cf8011324b93d3932551d52 (diff) |
audio/libsidplay: unbreak build with Clang 6 (C++14 by default)
configure:4036: c++ -o conftest -O2 -pipe -O3 -fno-strict-aliasing -fno-omit-frame-pointer -march=native -fstack-protector -fstack-protector conftest.cc >&5
In file included from conftest.cc:32:
In file included from /usr/include/c++/v1/stdlib.h:94:
/usr/include/stdlib.h:97:1: error: function declared '[[noreturn]]' after its first declaration
_Noreturn void exit(int);
^
/usr/include/sys/cdefs.h:280:22: note: expanded from macro '_Noreturn'
#define _Noreturn [[noreturn]]
^
conftest.cc:11:6: note: declaration missing '[[noreturn]]' attribute is here
void exit (int);
^
[...]
configure:4053: error: cannot compute sizeof (char), 77
samples.cpp:80:2: error: constant expression evaluates to 128 which cannot be narrowed to type 'sbyte' (aka 'signed char') [-Wc++11-narrowing]
0x80,0x91,0xa2,0xb3,0xc4,0xd5,0xe6,0xf7,
^~~~
samples.cpp:80:2: note: insert an explicit cast to silence this issue
0x80,0x91,0xa2,0xb3,0xc4,0xd5,0xe6,0xf7,
^~~~
static_cast<sbyte>( )
PR: 224947
Reported by: pkg-fallout (blocks 8 ports)
Submitted by: tijl (autoreconf)
Approved by: portmgr blanket
Notes
Notes:
svn path=/head/; revision=459997
Diffstat (limited to 'audio/libsidplay')
-rw-r--r-- | audio/libsidplay/Makefile | 2 | ||||
-rw-r--r-- | audio/libsidplay/files/patch-src_samples.cpp | 31 |
2 files changed, 32 insertions, 1 deletions
diff --git a/audio/libsidplay/Makefile b/audio/libsidplay/Makefile index f8349c4e32ec..550756eb1cab 100644 --- a/audio/libsidplay/Makefile +++ b/audio/libsidplay/Makefile @@ -17,7 +17,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING GNU_CONFIGURE= yes CONFIGURE_ENV= sid_cv_have_ios_binary=yes INSTALL_TARGET= install-strip -USES= libtool tar:tgz +USES= autoreconf libtool tar:tgz USE_LDCONFIG= yes .include <bsd.port.pre.mk> diff --git a/audio/libsidplay/files/patch-src_samples.cpp b/audio/libsidplay/files/patch-src_samples.cpp new file mode 100644 index 000000000000..ccc4d2ba4735 --- /dev/null +++ b/audio/libsidplay/files/patch-src_samples.cpp @@ -0,0 +1,31 @@ +samples.cpp:80:2: error: constant expression evaluates to 128 which cannot be narrowed to type 'sbyte' (aka 'signed char') [-Wc++11-narrowing] + 0x80,0x91,0xa2,0xb3,0xc4,0xd5,0xe6,0xf7, + ^~~~ +samples.cpp:80:2: note: insert an explicit cast to silence this issue + 0x80,0x91,0xa2,0xb3,0xc4,0xd5,0xe6,0xf7, + ^~~~ + static_cast<sbyte>( ) + +--- src/samples.cpp.orig 2002-05-22 17:38:18 UTC ++++ src/samples.cpp +@@ -77,7 +77,7 @@ sampleChannel ch4, ch5; + + const sbyte galwayNoiseTab1[16] = + { +- 0x80,0x91,0xa2,0xb3,0xc4,0xd5,0xe6,0xf7, ++ (sbyte)0x80,(sbyte)0x91,(sbyte)0xa2,(sbyte)0xb3,(sbyte)0xc4,(sbyte)0xd5,(sbyte)0xe6,(sbyte)0xf7, + 0x08,0x19,0x2a,0x3b,0x4c,0x5d,0x6e,0x7f + }; + +@@ -86,9 +86,9 @@ sbyte galwayNoiseSamTab[16]; + + const sbyte sampleConvertTab[16] = + { +-// 0x81,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff, ++// (sbyte)0x81,(sbyte)0x99,(sbyte)0xaa,(sbyte)0xbb,(sbyte)0xcc,(sbyte)0xdd,(sbyte)0xee,(sbyte)0xff, + // 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x7f +- 0x81,0x90,0xa0,0xb0,0xc0,0xd0,0xe0,0xf0, ++ (sbyte)0x81,(sbyte)0x90,(sbyte)0xa0,(sbyte)0xb0,(sbyte)0xc0,(sbyte)0xd0,(sbyte)0xe0,(sbyte)0xf0, + 0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70 + }; + |