From fc045f9a6b701decbd932f551a5c2d45c9e2078e Mon Sep 17 00:00:00 2001 From: Tom Rollet Date: Thu, 29 Jul 2021 17:14:18 +0200 Subject: [PATCH 1/3] scons: fix hook for 'deprecated' attribute On the new release, the compilation is polluted by the same warning: > ''deprecated' attribute directive ignored It seems that the hook added in this patch does not work: https://gem5-review.googlesource.com/c/public/gem5/+/45246/1..7 The snippet of code compile with TryCompile on g++{8,9}. It probably comes from the fact that the compilation only creates a warning and not an error. By adding temporarily '-Werror' for this compilation test, it filters the faulty gcc versions. Change-Id: I2b8b7a1a7e06df437b76e98d212947f4f9452311 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48843 Reviewed-by: Gabe Black Maintainer: Gabe Black Tested-by: kokoro (cherry picked from commit a366e66272b7c4b01037d68a7723922b49f506cd) Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50028 Maintainer: Bobby R. Bruce Reviewed-by: Jason Lowe-Power Reviewed-by: Daniel Carvalho --- src/base/SConsopts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/base/SConsopts b/src/base/SConsopts index ea11bd4de0..9fafd641c3 100644 --- a/src/base/SConsopts +++ b/src/base/SConsopts @@ -56,12 +56,21 @@ with gem5_scons.Configure(main) as conf: # alternative stacks. conf.env['HAVE_VALGRIND'] = conf.CheckCHeader('valgrind/valgrind.h') - conf.env['HAVE_DEPRECATED_NAMESPACE'] = conf.TryCompile(''' + +# Check if the compiler supports the [[gnu::deprecated]] attribute +# Create a temporary environment with -Werror in CCFLAGS +werror_env = main.Clone() +werror_env.Append(CCFLAGS=['-Werror']) +with gem5_scons.Configure(werror_env) as conf: + + # Store result in the main environment + main['HAVE_DEPRECATED_NAMESPACE'] = conf.TryCompile(''' int main() {return 0;} namespace [[gnu::deprecated("Test namespace deprecation")]] test_deprecated_namespace {} ''', '.cc') - if not conf.env['HAVE_DEPRECATED_NAMESPACE']: + + if not main['HAVE_DEPRECATED_NAMESPACE']: warning("Deprecated namespaces are not supported by this compiler.\n" "Please make sure to check the mailing list for deprecation " "announcements.") From 94a8afc8434134540f96bd77c6f7d8eb29134b0c Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Tue, 7 Sep 2021 14:41:37 -0700 Subject: [PATCH 2/3] misc: Update release notes for v21.1.0.1 Hotfix Change-Id: I8a99b2602b1fce566006a4e07aee8c3b574a6ae1 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50030 Maintainer: Bobby R. Bruce Reviewed-by: Jason Lowe-Power Reviewed-by: Daniel Carvalho Tested-by: kokoro --- RELEASE-NOTES.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 480e4fef22..a3517c10f8 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,7 @@ +# Version 21.1.0.1 + +**[HOTFIX]** [A "'deprecated' attribute directive ignored" warning was being thrown frequently when trying to build v21.1.0.0](https://gem5.atlassian.net/browse/GEM5-1063). While this issue did not break the build, it made reading the build output difficult and caused confused. As such a patch has been applied to fix this issue. + # Version 21.1.0.0 Since v21.0 we have received 780 commits with 48 unique contributors, closing 64 issues on our [Jira Issue Tracker](https://gem5.atlassian.net/). From 082f0835b098887f0fdb89db908b59221b027686 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Tue, 7 Sep 2021 14:45:52 -0700 Subject: [PATCH 3/3] misc: Update the version to v21.1.0.1 Change-Id: I64055b88bc3ba3f1e104ad796abec6ff4a4b3b11 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50031 Reviewed-by: Bobby R. Bruce Reviewed-by: Jason Lowe-Power Maintainer: Bobby R. Bruce Tested-by: kokoro --- src/Doxyfile | 2 +- src/base/version.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Doxyfile b/src/Doxyfile index ef70b541f1..cee1d0a3c7 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = gem5 # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = v21.1.0.0 +PROJECT_NUMBER = v21.1.0.1 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/src/base/version.cc b/src/base/version.cc index 50ffd40850..91048849aa 100644 --- a/src/base/version.cc +++ b/src/base/version.cc @@ -32,6 +32,6 @@ namespace gem5 /** * @ingroup api_base_utils */ -const char *gem5Version = "21.1.0.0"; +const char *gem5Version = "21.1.0.1"; } // namespace gem5