Skip to content

Commit

Permalink
[upstream_utils] Upgrade Eigen to include GCC 14 patches
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul committed May 22, 2024
1 parent 0c822b4 commit 67a63c1
Show file tree
Hide file tree
Showing 25 changed files with 686 additions and 254 deletions.
15 changes: 6 additions & 9 deletions upstream_utils/eigen_patches/0001-Disable-warnings.patch
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tyler Veness <calcmogul@gmail.com>
Date: Wed, 18 May 2022 09:14:24 -0700
Subject: [PATCH 1/4] Disable warnings
Subject: [PATCH 1/2] Disable warnings

---
Eigen/src/Core/util/DisableStupidWarnings.h | 9 +++++++++
1 file changed, 9 insertions(+)
Eigen/src/Core/util/DisableStupidWarnings.h | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/Eigen/src/Core/util/DisableStupidWarnings.h b/Eigen/src/Core/util/DisableStupidWarnings.h
index 32a427d852355a51dc4263d81498554ff4c3cbba..eb259433c054c21accd2b8a5d744638f8004da40 100644
index 32a427d852355a51dc4263d81498554ff4c3cbba..9f3e3f5b0f15518377c9a8283fd58081902896f2 100644
--- a/Eigen/src/Core/util/DisableStupidWarnings.h
+++ b/Eigen/src/Core/util/DisableStupidWarnings.h
@@ -81,6 +81,15 @@
@@ -81,6 +81,12 @@
// See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325
#pragma GCC diagnostic ignored "-Wattributes"
#endif
+#if __GNUC__>=8
+#pragma GCC diagnostic ignored "-Wclass-memaccess"
+#endif
+#if __GNUC__>=11
+#if __GNUC__>=11 && __GNUC__<=13
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
+#if __GNUC__>=12
Expand Down
2 changes: 1 addition & 1 deletion upstream_utils/eigen_patches/0002-Intellisense-fix.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Johnson <johnson.peter@gmail.com>
Date: Fri, 20 Jan 2023 23:41:56 -0800
Subject: [PATCH 2/4] Intellisense fix
Subject: [PATCH 2/2] Intellisense fix

---
Eigen/src/Core/util/ConfigureVectorization.h | 7 +++++++
Expand Down

This file was deleted.

This file was deleted.

6 changes: 2 additions & 4 deletions upstream_utils/update_eigen.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def unsupported_inclusions(dp, f):
def main():
upstream_root = clone_repo(
"https://gitlab.com/libeigen/eigen.git",
# master on 2024-05-07
"99c18bce6eb225fa5a4861af97189ada1bca3103",
# master on 2024-05-22
"c4d84dfddc9f9edef0fdbe7cf9966d2f4a303198",
shallow=False,
)
wpilib_root = get_repo_root()
Expand All @@ -109,8 +109,6 @@ def main():
for f in [
"0001-Disable-warnings.patch",
"0002-Intellisense-fix.patch",
"0003-Suppress-C-23-deprecation-warnings-for-std-has_denor.patch",
"0004-Fix-compilation-failures-on-constexpr-matrices-with-.patch",
]:
git_am(os.path.join(wpilib_root, "upstream_utils/eigen_patches", f))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Language: Cpp
BasedOnStyle: Google
ColumnLimit: 120
StatementMacros:
- EIGEN_STATIC_ASSERT
SortIncludes: false
AttributeMacros:
- EIGEN_STRONG_INLINE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ using std::ptrdiff_t;
#endif

#include "src/Core/GlobalFunctions.h"
#include "src/Core/DeviceWrapper.h"
// IWYU pragma: end_exports

#include "src/Core/util/ReenableStupidWarnings.h"
Expand Down
Loading

0 comments on commit 67a63c1

Please sign in to comment.