aboutsummaryrefslogtreecommitdiffstats
path: root/community/binaryen
diff options
context:
space:
mode:
authorDaniel Isaksen <d@duniel.no>2018-11-17 16:56:11 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-11-18 08:45:13 +0000
commitcf2684fcfa561cc244b990d8f95fa6bf53604013 (patch)
tree80df0aa2f7a4e408620c8cccea5581179261eac2 /community/binaryen
parent897809b9c8dd52e99a83f3059485002ef9e94082 (diff)
downloadaports-cf2684fcfa561cc244b990d8f95fa6bf53604013.tar.bz2
aports-cf2684fcfa561cc244b990d8f95fa6bf53604013.tar.xz
community/binaryen: backport a GCC 8 fix from upstream
Diffstat (limited to 'community/binaryen')
-rw-r--r--community/binaryen/APKBUILD6
-rw-r--r--community/binaryen/fix-gcc8-wcatch-value.patch48
2 files changed, 52 insertions, 2 deletions
diff --git a/community/binaryen/APKBUILD b/community/binaryen/APKBUILD
index 2e18346afe..51674e35b1 100644
--- a/community/binaryen/APKBUILD
+++ b/community/binaryen/APKBUILD
@@ -12,7 +12,8 @@ checkdepends="nodejs python2"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/WebAssembly/$pkgname/archive/version_$pkgver.tar.gz
link-dynamically.patch
- ignore-type-limits-error.patch"
+ ignore-type-limits-error.patch
+ fix-gcc8-wcatch-value.patch"
builddir="$srcdir/$pkgname-version_$pkgver"
case "$CARCH" in
@@ -50,4 +51,5 @@ package() {
sha512sums="89aa73c1686fb6d54c91990acbc7cd6c1bc7e6da57731bf009fe507c955c98c91582b5b9924c3c3f6a2d36d55ae73f1be79911cdce93dfd74954bca46861c8ad binaryen-40.tar.gz
9729655be0d952385de959bf7dd84a075b192fe4b221bb5c23e562a83a2bf9202a07536ad393157b23e0447f28bdd16283f64a63588ca42597bb59e9551219c8 link-dynamically.patch
-3b95a197cd8805dfa714cf9f31adc1437b6d29bd4082f752c16d98c40cd024b110c02a412285c78251cb5d0b3080c0f9e4d45d8dd0166c71b9462b1610191ab8 ignore-type-limits-error.patch"
+3b95a197cd8805dfa714cf9f31adc1437b6d29bd4082f752c16d98c40cd024b110c02a412285c78251cb5d0b3080c0f9e4d45d8dd0166c71b9462b1610191ab8 ignore-type-limits-error.patch
+f937a9f9f7f2cab97aa15ade3a800b8924755b27ae4e9e8951ee97dc79d54c95db28d3c71b32c2ed0b5711d6e1884c33cc307564abe759f6ea3c23db60d433a1 fix-gcc8-wcatch-value.patch"
diff --git a/community/binaryen/fix-gcc8-wcatch-value.patch b/community/binaryen/fix-gcc8-wcatch-value.patch
new file mode 100644
index 0000000000..445afc96f3
--- /dev/null
+++ b/community/binaryen/fix-gcc8-wcatch-value.patch
@@ -0,0 +1,48 @@
+Made from https://github.com/WebAssembly/binaryen/pull/1400
+
+Should probably just be removed when the package version is bumped.
+
+- Daniel Isaksen <d@duniel.no>
+
+diff --git a/src/tools/asm2wasm.cpp b/src/tools/asm2wasm.cpp
+index 3f70e0388e..cecae7a819 100644
+--- a/src/tools/asm2wasm.cpp
++++ b/src/tools/asm2wasm.cpp
+@@ -87,7 +87,7 @@ int main(int argc, const char *argv[]) {
+ [&trapMode](Options *o, const std::string &argument) {
+ try {
+ trapMode = trapModeFromString(argument);
+- } catch (std::invalid_argument e) {
++ } catch (std::invalid_argument& e) {
+ std::cerr << "Error: " << e.what() << "\n";
+ exit(EXIT_FAILURE);
+ }
+diff --git a/src/tools/s2wasm.cpp b/src/tools/s2wasm.cpp
+index 6e7b2c05e2..3643993b7f 100644
+--- a/src/tools/s2wasm.cpp
++++ b/src/tools/s2wasm.cpp
+@@ -92,7 +92,7 @@ int main(int argc, const char *argv[]) {
+ [&trapMode](Options *o, const std::string &argument) {
+ try {
+ trapMode = trapModeFromString(argument);
+- } catch (std::invalid_argument e) {
++ } catch (std::invalid_argument& e) {
+ std::cerr << "Error: " << e.what() << "\n";
+ exit(EXIT_FAILURE);
+ }
+diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
+index 0de3edf3f6..78a150f814 100644
+--- a/src/wasm/wasm-s-parser.cpp
++++ b/src/wasm/wasm-s-parser.cpp
+@@ -1408,9 +1408,9 @@ Name SExpressionWasmBuilder::getLabel(Element& s) {
+ uint64_t offset;
+ try {
+ offset = std::stoll(s.c_str(), nullptr, 0);
+- } catch (std::invalid_argument) {
++ } catch (std::invalid_argument&) {
+ throw ParseException("invalid break offset");
+- } catch (std::out_of_range) {
++ } catch (std::out_of_range&) {
+ throw ParseException("out of range break offset");
+ }
+ if (offset > nameMapper.labelStack.size()) throw ParseException("invalid label", s.line, s.col);