changeset 63325e5b0a9d in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=63325e5b0a9d
description:
        proto: Fix warnings for protoc v3

        protoc v3 introduces a new syntax for proto files and warns when the
        syntax is not explicitly stated.

        protoc relies on the fact that undefined preprocessor symbols are
        explanded to 0 but since we use -Wundef they end up generating
        warnings.

        Change-Id: If07abeb54e932469c8f2c4d38634a97fdae40f77
        Reviewed-by: Andreas Hansson <[email protected]>
        Reviewed-by: Andreas Sandberg <[email protected]>
        Signed-off-by: Jason Lowe-Power <[email protected]>

diffstat:

 src/proto/SConscript            |  7 ++++++-
 src/proto/inst.proto            |  3 ++-
 src/proto/inst_dep_record.proto |  4 +++-
 src/proto/packet.proto          |  4 +++-
 4 files changed, 14 insertions(+), 4 deletions(-)

diffs (73 lines):

diff -r ada5603bdb1c -r 63325e5b0a9d src/proto/SConscript
--- a/src/proto/SConscript      Fri Jan 27 15:05:01 2017 -0600
+++ b/src/proto/SConscript      Fri Jan 27 15:07:20 2017 -0600
@@ -1,6 +1,6 @@
 # -*- mode:python -*-
 
-# Copyright (c) 2012 ARM Limited
+# Copyright (c) 2012,2017 ARM Limited
 # All rights reserved.
 #
 # The license below extends only to copyright in the software and shall
@@ -45,3 +45,8 @@
     ProtoBuf('packet.proto')
     ProtoBuf('inst.proto')
     Source('protoio.cc')
+
+    # protoc relies on the fact that undefined preprocessor symbols are
+    # explanded to 0 but since we use -Wundef they end up generating
+    # warnings.
+    env.Append(CCFLAGS='-DPROTOBUF_INLINE_NOT_IN_HEADERS=0')
diff -r ada5603bdb1c -r 63325e5b0a9d src/proto/inst.proto
--- a/src/proto/inst.proto      Fri Jan 27 15:05:01 2017 -0600
+++ b/src/proto/inst.proto      Fri Jan 27 15:07:20 2017 -0600
@@ -1,4 +1,4 @@
-// Copyright (c) 2014 ARM Limited
+// Copyright (c) 2014,2017 ARM Limited
 // All rights reserved
 //
 // The license below extends only to copyright in the software and shall
@@ -35,6 +35,7 @@
 //
 // Authors: Ali Saidi
 
+syntax = "proto2";
 
 // Put all the generated messages in a namespace
 package ProtoMessage;
diff -r ada5603bdb1c -r 63325e5b0a9d src/proto/inst_dep_record.proto
--- a/src/proto/inst_dep_record.proto   Fri Jan 27 15:05:01 2017 -0600
+++ b/src/proto/inst_dep_record.proto   Fri Jan 27 15:07:20 2017 -0600
@@ -1,4 +1,4 @@
-// Copyright (c) 2013 ARM Limited
+// Copyright (c) 2013,2017 ARM Limited
 // All rights reserved
 //
 // The license below extends only to copyright in the software and shall
@@ -35,6 +35,8 @@
 //
 // Authors: Radhika Jagtap
 
+syntax = "proto2";
+
 // Put all the generated messages in a namespace
 package ProtoMessage;
 
diff -r ada5603bdb1c -r 63325e5b0a9d src/proto/packet.proto
--- a/src/proto/packet.proto    Fri Jan 27 15:05:01 2017 -0600
+++ b/src/proto/packet.proto    Fri Jan 27 15:07:20 2017 -0600
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2013 ARM Limited
+// Copyright (c) 2012-2013,2017 ARM Limited
 // All rights reserved
 //
 // The license below extends only to copyright in the software and shall
@@ -35,6 +35,8 @@
 //
 // Authors: Andreas Hansson
 
+syntax = "proto2";
+
 // Put all the generated messages in a namespace
 package ProtoMessage;
 
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to