[gem5-dev] [S] Change in gem5/gem5[develop]: base: Use include for GCC v7
Bobby Bruce has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/69598?usp=email ) Change subject: base: Use include for GCC v7 .. base: Use include for GCC v7 gem5 officially supports GCC 7+. In GCC 7 the "filesystem" module was added but only in the "experimental" namespace as "". In GCC 8+ the module can be found as "". Because of this, include guards to handle this. They include "" for the GCC v7 case and the "" for all other versions. This bug was partially responsible for this compiler tests failures: https://jenkins.gem5.org/job/compiler-checks/570 Note: gem5 does not support GCC versions <7. Thus the "#if __GNUC__ >=8 #else #endif" logic is valid. Change-Id: I31db5488f272f9652edebf24ecefca3722369076 --- M src/base/socket.cc 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/base/socket.cc b/src/base/socket.cc index 2e9f815..0f47b2a 100644 --- a/src/base/socket.cc +++ b/src/base/socket.cc @@ -39,7 +39,19 @@ #include #include -#include + +#if (defined(__GNUC__) && (__GNUC__ >= 8)) || defined(__clang__) +#include +#else +// This is only reachable if we're using GCC 7 (note: gem5 does not support +// GCC versions older than GCC 7 as they do not support the C++17 +// standard). +// If we're using GCC 7, we need to use . +#include +namespace std { +namespace filesystem = experimental::filesystem; +} +#endif #include "base/logging.hh" #include "base/output.hh" -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69598?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I31db5488f272f9652edebf24ecefca3722369076 Gerrit-Change-Number: 69598 Gerrit-PatchSet: 1 Gerrit-Owner: Bobby Bruce Gerrit-MessageType: newchange ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[develop]: base: Use include for GCC v7
Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/69598?usp=email ) Change subject: base: Use include for GCC v7 .. base: Use include for GCC v7 gem5 officially supports GCC 7+. In GCC 7 the "filesystem" module was added but only in the "experimental" namespace as "". In GCC 8+ the module can be found as "". Because of this, include guards to handle this. They include "" for the GCC v7 case and the "" for all other versions. This bug was partially responsible for this compiler tests failures: https://jenkins.gem5.org/job/compiler-checks/570 Note: gem5 does not support GCC versions <7. Thus the "#if __GNUC__ >=8 #else #endif" logic is valid. Change-Id: I31db5488f272f9652edebf24ecefca3722369076 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69598 Tested-by: kokoro Reviewed-by: Bobby Bruce Maintainer: Bobby Bruce --- M src/base/socket.cc 1 file changed, 13 insertions(+), 1 deletion(-) Approvals: Bobby Bruce: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/src/base/socket.cc b/src/base/socket.cc index 2e9f815..0f47b2a 100644 --- a/src/base/socket.cc +++ b/src/base/socket.cc @@ -39,7 +39,19 @@ #include #include -#include + +#if (defined(__GNUC__) && (__GNUC__ >= 8)) || defined(__clang__) +#include +#else +// This is only reachable if we're using GCC 7 (note: gem5 does not support +// GCC versions older than GCC 7 as they do not support the C++17 +// standard). +// If we're using GCC 7, we need to use . +#include +namespace std { +namespace filesystem = experimental::filesystem; +} +#endif #include "base/logging.hh" #include "base/output.hh" -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69598?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I31db5488f272f9652edebf24ecefca3722369076 Gerrit-Change-Number: 69598 Gerrit-PatchSet: 2 Gerrit-Owner: Bobby Bruce Gerrit-Reviewer: Bobby Bruce Gerrit-Reviewer: Daniel Carvalho Gerrit-Reviewer: kokoro Gerrit-MessageType: merged ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[develop]: base: Use include for GCC v7
Melissa Jost has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/69840?usp=email ) Change subject: base: Use include for GCC v7 .. base: Use include for GCC v7 This change adds include guards to the inclusion of the filesystem module to ensure GCC 7 can work properly, addressing an issue in the compiler tests. Change-Id: I642f79bd801baf4766572368b9339e34be46d1c3 --- M src/mem/shared_memory_server.cc 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/mem/shared_memory_server.cc b/src/mem/shared_memory_server.cc index 3e49164..f99655c 100644 --- a/src/mem/shared_memory_server.cc +++ b/src/mem/shared_memory_server.cc @@ -39,7 +39,18 @@ #include #include #include -#include +#if (defined(__GNUC__) && (__GNUC__ >= 8)) || defined(__clang__) +#include +#else +// This is only reachable if we're using GCC 7 (note: gem5 does not support +// GCC versions older than GCC 7 as they do not support the C++17 +// standard). +// If we're using GCC 7, we need to use . +#include +namespace std { +namespace filesystem = experimental::filesystem; +} +#endif #include "base/logging.hh" #include "base/output.hh" -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69840?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I642f79bd801baf4766572368b9339e34be46d1c3 Gerrit-Change-Number: 69840 Gerrit-PatchSet: 1 Gerrit-Owner: Melissa Jost Gerrit-MessageType: newchange ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[develop]: base: Use include for GCC v7
Melissa Jost has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/69840?usp=email ) Change subject: base: Use include for GCC v7 .. base: Use include for GCC v7 This change adds include guards to the inclusion of the filesystem module to ensure GCC 7 can work properly, addressing an issue in the compiler tests. Change-Id: I642f79bd801baf4766572368b9339e34be46d1c3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69840 Maintainer: Jason Lowe-Power Reviewed-by: Richard Cooper Tested-by: kokoro Reviewed-by: Jason Lowe-Power --- M src/mem/shared_memory_server.cc 1 file changed, 12 insertions(+), 1 deletion(-) Approvals: kokoro: Regressions pass Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved Richard Cooper: Looks good to me, approved diff --git a/src/mem/shared_memory_server.cc b/src/mem/shared_memory_server.cc index 3e49164..f99655c 100644 --- a/src/mem/shared_memory_server.cc +++ b/src/mem/shared_memory_server.cc @@ -39,7 +39,18 @@ #include #include #include -#include +#if (defined(__GNUC__) && (__GNUC__ >= 8)) || defined(__clang__) +#include +#else +// This is only reachable if we're using GCC 7 (note: gem5 does not support +// GCC versions older than GCC 7 as they do not support the C++17 +// standard). +// If we're using GCC 7, we need to use . +#include +namespace std { +namespace filesystem = experimental::filesystem; +} +#endif #include "base/logging.hh" #include "base/output.hh" -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69840?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-MessageType: merged Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I642f79bd801baf4766572368b9339e34be46d1c3 Gerrit-Change-Number: 69840 Gerrit-PatchSet: 2 Gerrit-Owner: Melissa Jost Gerrit-Reviewer: Bobby Bruce Gerrit-Reviewer: Daniel Carvalho Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Melissa Jost Gerrit-Reviewer: Richard Cooper Gerrit-Reviewer: kokoro Gerrit-CC: Giacomo Travaglini ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org