summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-electronics/chisel/files/chisel-2.2.20-Wall.patch')
-rw-r--r--sci-electronics/chisel/files/chisel-2.2.20-Wall.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/sci-electronics/chisel/files/chisel-2.2.20-Wall.patch b/sci-electronics/chisel/files/chisel-2.2.20-Wall.patch
new file mode 100644
index 0000000..4879a2e
--- /dev/null
+++ b/sci-electronics/chisel/files/chisel-2.2.20-Wall.patch
@@ -0,0 +1,83 @@
+commit 660bd0360e5ef0248201db744593a2d8b3b21c04
+Author: Palmer Dabbelt <palmer.dabbelt@eecs.berkeley.edu>
+Date: Mon Nov 24 10:36:14 2014 -0800
+
+ Various -Wextra fixups
+
+ It appears that some more errors have either creeped into the Chisel
+ C++ header files or into GCC's "-Wextra -pedantic" set. This patch
+ uses the same techniques as last time to hide these new errors.
+
+diff --git a/src/main/resources/emulator_api.h b/src/main/resources/emulator_api.h
+index 8f411da..b287469 100644
+--- a/src/main/resources/emulator_api.h
++++ b/src/main/resources/emulator_api.h
+@@ -4,6 +4,12 @@
+
+ #include "emulator_mod.h"
+
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wunused-function"
++#pragma GCC diagnostic ignored "-Wsign-compare"
++#pragma GCC diagnostic ignored "-Wunused-parameter"
++#pragma GCC diagnostic ignored "-Wunused-variable"
++
+ #include <string>
+ #include <sstream>
+ #include <map>
+@@ -23,7 +29,7 @@ static std::string itos(int in) {
+ * Copy one val_t array to another.
+ * nb must be the exact number of bits the val_t represents.
+ */
+-static void val_cpy(val_t* dst, val_t* src, int nb) {
++static __attribute__((unused)) void val_cpy(val_t* dst, val_t* src, int nb) {
+ for (int i=0; i<val_n_words(nb); i++) {
+ dst[i] = src[i];
+ }
+@@ -44,7 +50,7 @@ static void val_empty(val_t* dst, int nb) {
+ * is capped by the width of a single val_t element.
+ * nb must be the exact number of bits the val_t represents.
+ */
+-static void val_set(val_t* dst, val_t nb, val_t num) {
++static __attribute__((unused)) void val_set(val_t* dst, val_t nb, val_t num) {
+ val_empty(dst, nb);
+ dst[0] = num;
+ }
+@@ -660,4 +666,6 @@ protected:
+ std::map<std::string, mod_t*> snapshot_table;
+ };
+
++#pragma GCC diagnostic pop
++
+ #endif
+diff --git a/src/main/resources/emulator_mod.h b/src/main/resources/emulator_mod.h
+index 994ddba..3c76b6b 100644
+--- a/src/main/resources/emulator_mod.h
++++ b/src/main/resources/emulator_mod.h
+@@ -5,6 +5,7 @@
+ #define __IS_EMULATOR_MOD__
+
+ #pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wpragmas"
+ #pragma GCC diagnostic ignored "-Wunused-parameter"
+ #pragma GCC diagnostic ignored "-Wsign-compare"
+ #pragma GCC diagnostic ignored "-Wparentheses"
+@@ -13,6 +14,9 @@
+ #pragma GCC diagnostic ignored "-Wtype-limits"
+ #pragma GCC diagnostic ignored "-Wunused-function"
+ #pragma GCC diagnostic ignored "-Wunused-variable"
++#pragma GCC diagnostic ignored "-Wreorder"
++#pragma GCC diagnostic ignored "-Wsometimes-uninitialized"
++#pragma GCC diagnostic ignored "-pedantic"
+
+ #include <assert.h>
+ #include <inttypes.h>
+@@ -1564,7 +1568,7 @@ class mem_t {
+ }
+ };
+
+-static char hex_to_char[] = "0123456789abcdef";
++static __attribute__((unused)) char hex_to_char[] = "0123456789abcdef";
+
+ static int char_to_hex[] = {
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,