Patch binaryen for GCC 8
This commit is contained in:
parent
87264cb5b7
commit
d93a6f052c
57
0001-Fix-Wcatch-value-from-GCC-8.patch
Normal file
57
0001-Fix-Wcatch-value-from-GCC-8.patch
Normal file
@ -0,0 +1,57 @@
|
||||
From 327c3d06258576cc9d9f2e5c0861abc72ebd10ef Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 2 Feb 2018 16:23:04 -0800
|
||||
Subject: [PATCH] Fix -Wcatch-value from GCC 8
|
||||
|
||||
These instances may simply be caught by reference instead.
|
||||
---
|
||||
src/tools/asm2wasm.cpp | 2 +-
|
||||
src/tools/s2wasm.cpp | 2 +-
|
||||
src/wasm/wasm-s-parser.cpp | 4 ++--
|
||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/tools/asm2wasm.cpp b/src/tools/asm2wasm.cpp
|
||||
index 75a2c4d15e2e..6d14067d240f 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 32af57dba5bf..c5e1d52b8d96 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 0de3edf3f6b4..78a150f8146c 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);
|
||||
--
|
||||
2.14.3
|
||||
|
@ -62,6 +62,9 @@ ExclusiveArch: %{rust_arches}
|
||||
%endif
|
||||
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
|
||||
|
||||
# https://github.com/WebAssembly/binaryen/pull/1400
|
||||
Patch1: 0001-Fix-Wcatch-value-from-GCC-8.patch
|
||||
|
||||
# Get the Rust triple for any arch.
|
||||
%{lua: function rust_triple(arch)
|
||||
local abi = "gnu"
|
||||
@ -282,6 +285,10 @@ test -f '%{local_rust_root}/bin/rustc'
|
||||
|
||||
%setup -q -n %{rustc_package}
|
||||
|
||||
pushd src/binaryen
|
||||
%patch1 -p1 -b .catch-value
|
||||
popd
|
||||
|
||||
# We're disabling jemalloc, but rust-src still wants it.
|
||||
# rm -rf src/jemalloc/
|
||||
|
||||
@ -481,6 +488,7 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
|
||||
%changelog
|
||||
* Tue Feb 06 2018 Josh Stone <jistone@redhat.com> - 1.23.0-3
|
||||
- Use full-bootstrap to work around a rebuild issue.
|
||||
- Patch binaryen for GCC 8
|
||||
|
||||
* Thu Feb 01 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.23.0-2
|
||||
- Switch to %%ldconfig_scriptlets
|
||||
|
Loading…
Reference in New Issue
Block a user