package/mesa3d: fix nouveau std::isinf related compile failure
PATCH 1/1 package/mesa3d: fix nouveau std::isinf related compile failure
Add missing cmath include to already existing patch 0005-src-gallium-drivers-nouveau-codegen-nv50_ir_ra.cpp-p.patch.
Fixes:
http://autobuild.buildroot.net/results/cbefc5d4a4fefb674e596400fa1d2698cd89c5b3/
http://autobuild.buildroot.net/results/dc974da012f53fa4ed3be616f937b0afae423d66/
../src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp: In member function 'bool nv50_ir::GCRA::simplify()':
../src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp:1348:19: error: expected unqualified-id before '(' token
if (std::isinf(bestScore)) {
^---
Notes:
- There are already three mesa3d upstream commits which tried to fix the same problem [1], [2], [3].
Maybe the check for glibc in [3] is the root cause for the buildroot failures both using uclibc.
[1] https://cgit.freedesktop.org/mesa/mesa/commit/?id=f525db6358fbaa7b4296d2e6484e0b1ae703ac78
[2] https://cgit.freedesktop.org/mesa/mesa/commit/?id=121a0cedc80c5541d51599383486ba9a7397c6ce
[3] https://cgit.freedesktop.org/mesa/mesa/commit/?id=649704f1f7c9e1d0990d34a76154b2eb656bee42
--- ...ers-nouveau-codegen-nv50_ir_ra.cpp-p.patch | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-)
package/mesa3d/0005-src-gallium-drivers-nouveau-codegen-nv50_ir_ra.cpp-p.patch +17 -6
@@ -1,4 +1,4 @@ -From f2ce27b761eeca301a109856f20ed9a8eb06796d Mon Sep 17 00:00:00 2001 +From 07de6302aefbe340e54276b4a9a8edd9a3fba270 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine <[email protected]> Date: Sat, 28 Dec 2019 21:49:43 +0100 Subject: [PATCH] src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp: prefix
@@ -25,15 +25,26 @@ Fixes: Signed-off-by: Fabrice Fontaine <[email protected]> [Upstream status: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3227] + +[Added missing cmath include] +Signed-off-by: Peter Seiderer <[email protected]> --- - src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp -index 6df2664da22..e81fb117213 100644 +index 6df2664..5959210 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp -@@ -1345,7 +1345,7 @@ GCRA::simplify() +@@ -24,6 +24,7 @@ + #include "codegen/nv50_ir_target.h" + + #include <algorithm> ++#include <cmath> + #include <stack> + #include <limits> + #if __cplusplus >= 201103L +@@ -1345,7 +1346,7 @@ GCRA::simplify() bestMaxReg = it->maxReg; } }
@@ -43,5 +54,5 @@ index 6df2664da22..e81fb117213 100644 return false; } -- -2.24.0 +2.25.1
Signature · 1 line
2.25.1
PATCH 1/1 package/mesa3d: fix nouveau std::isinf related compile failure
Hi Peter,
Le 02/03/2020 ? 12:07, Peter Seiderer a ?crit?:
Quoted 12 lines
Add missing cmath include to already existing patch 0005-src-gallium-drivers-nouveau-codegen-nv50_ir_ra.cpp-p.patch.
Fixes:
http://autobuild.buildroot.net/results/cbefc5d4a4fefb674e596400fa1d2698cd89c5b3/
http://autobuild.buildroot.net/results/dc974da012f53fa4ed3be616f937b0afae423d66/../src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp: In member function 'bool
nv50_ir::GCRA::simplify()':
../src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp:1348:19: error: expected unqualified-id before '(' tokenif (std::isinf(bestScore)) { ^
Quoted 7 lines
Signed-off-by Peter Seiderer <[email protected]>---
Notes:
- There are already three mesa3d upstream commits which tried to fix the same problem [1], [2], [3].
Maybe the check for glibc in [3] is the root cause for the buildroot failures both using uclibc.
uClibc impersonate Glibc 2.10 IIRC. That is why the test is false and the cmath header is not added.
Best regards,
Romain
Quoted 57 lines
[1] https://cgit.freedesktop.org/mesa/mesa/commit/?id=f525db6358fbaa7b4296d2e6484e0b1ae703ac78
[2] https://cgit.freedesktop.org/mesa/mesa/commit/?id=121a0cedc80c5541d51599383486ba9a7397c6ce
[3] https://cgit.freedesktop.org/mesa/mesa/commit/?id=649704f1f7c9e1d0990d34a76154b2eb656bee42--- ...ers-nouveau-codegen-nv50_ir_ra.cpp-p.patch | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-)package/mesa3d/0005-src-gallium-drivers-nouveau-codegen-nv50_ir_ra.cpp-p.patch +17
-6@@ -1,4 +1,4 @@ -From f2ce27b761eeca301a109856f20ed9a8eb06796d Mon Sep 17 00:00:00 2001 +From 07de6302aefbe340e54276b4a9a8edd9a3fba270 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine <[email protected]> Date: Sat, 28 Dec 2019 21:49:43 +0100 Subject: [PATCH] src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp: prefix@@ -25,15 +25,26 @@ Fixes: Signed-off-by: Fabrice Fontaine <[email protected]> [Upstream status: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3227] + +[Added missing cmath include] +Signed-off-by: Peter Seiderer <[email protected]> --- - src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp -index 6df2664da22..e81fb117213 100644 +index 6df2664..5959210 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp -@@ -1345,7 +1345,7 @@ GCRA::simplify() +@@ -24,6 +24,7 @@ + #include "codegen/nv50_ir_target.h" + + #include <algorithm> ++#include <cmath> + #include <stack> + #include <limits> + #if __cplusplus >= 201103L +@@ -1345,7 +1346,7 @@ GCRA::simplify() bestMaxReg = it->maxReg; } }@@ -43,5 +54,5 @@ index 6df2664da22..e81fb117213 100644 return false; } -- -2.24.0 +2.25.1