Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/7] package/mesa3d: fix build issue with glibc >= 2.26
Date: Sun, 27 Aug 2017 19:36:02 +0200	[thread overview]
Message-ID: <20170827173606.13144-4-romain.naour@gmail.com> (raw)
In-Reply-To: <20170827173606.13144-1-romain.naour@gmail.com>

Issue found while testing glibc 2.26 bump.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 ...-c99_math-fix-build-issue-with-glibc-2.26.patch | 82 ++++++++++++++++++++++
 1 file changed, 82 insertions(+)
 create mode 100644 package/mesa3d/0005-c99_math-fix-build-issue-with-glibc-2.26.patch

diff --git a/package/mesa3d/0005-c99_math-fix-build-issue-with-glibc-2.26.patch b/package/mesa3d/0005-c99_math-fix-build-issue-with-glibc-2.26.patch
new file mode 100644
index 0000000..55e4fcf
--- /dev/null
+++ b/package/mesa3d/0005-c99_math-fix-build-issue-with-glibc-2.26.patch
@@ -0,0 +1,82 @@
+From f8ef875d8b5313d8f15f8680dc0c512c10756ea8 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Sat, 26 Aug 2017 19:20:56 +0200
+Subject: [PATCH] c99_math: fix build issue with glibc >= 2.26
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The workaround is not required anymore since glibc 2.26 and
+trigger a build issue:
+
+In file included from ../../src/gallium/auxiliary/util/u_math.h:44:0,
+                 from ../../src/mesa/main/macros.h:35,
+                 from glsl_types.cpp:25:
+../../include/c99_math.h:196:12: error: ??std::fpclassify??  was not declared in this scope
+ using std::fpclassify;
+            ^~~~~~~~~~
+../../include/c99_math.h:197:12: error: ??std::isfinite??  was not declared in this scope
+ using std::isfinite;
+            ^~~~~~~~
+../../include/c99_math.h:198:12: error: ??std::isinf??  was not declared in this scope
+ using std::isinf;
+            ^~~~~
+../../include/c99_math.h:199:12: error: ??std::isnan??  was not declared in this scope
+ using std::isnan;
+            ^~~~~
+../../include/c99_math.h:200:12: error: ??std::isnormal??  was not declared in this scope
+ using std::isnormal;
+            ^~~~~~~~
+../../include/c99_math.h:201:12: error: ??std::signbit??  was not declared in this scope
+ using std::signbit;
+            ^~~~~~~
+../../include/c99_math.h:202:12: error: ??std::isgreater??  was not declared in this scope
+ using std::isgreater;
+            ^~~~~~~~~
+../../include/c99_math.h:203:12: error: ??std::isgreaterequal??  was not declared in this scope
+ using std::isgreaterequal;
+            ^~~~~~~~~~~~~~
+../../include/c99_math.h:204:12: error: ??std::isless??  was not declared in this scope
+ using std::isless;
+            ^~~~~~
+../../include/c99_math.h:205:12: error: ??std::islessequal??  was not declared in this scope
+ using std::islessequal;
+            ^~~~~~~~~~~
+../../include/c99_math.h:206:12: error: ??std::islessgreater??  was not declared in this scope
+ using std::islessgreater;
+            ^~~~~~~~~~~~~
+../../include/c99_math.h:207:12: error: ??std::isunordered??  was not declared in this scope
+ using std::isunordered;
+            ^~~~~~~~~~~
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ include/c99_math.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/include/c99_math.h b/include/c99_math.h
+index e906c26..6fd257e 100644
+--- a/include/c99_math.h
++++ b/include/c99_math.h
+@@ -193,6 +193,10 @@ fpclassify(double x)
+ #if __cplusplus >= 201103L && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 23))
+ #include <cmath>
+ 
++/* This workaround is not necessary since Glibc 2.26
++ * https://sourceware.org/git/?p=glibc.git;a=commit;h=2072f5c34ede81dde9e0d953d57a0690a66b0f12
++ */
++#if (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 25)
+ using std::fpclassify;
+ using std::isfinite;
+ using std::isinf;
+@@ -206,6 +210,7 @@ using std::islessequal;
+ using std::islessgreater;
+ using std::isunordered;
+ #endif
++#endif
+ 
+ 
+ #endif /* #define _C99_MATH_H_ */
+-- 
+2.9.5
+
-- 
2.9.5

  parent reply	other threads:[~2017-08-27 17:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27 17:35 [Buildroot] [PATCH 0/7] glibc: bump to 2.26 Romain Naour
2017-08-27 17:36 ` [Buildroot] [PATCH 1/7] package/gcc: fix build issue with glibc 2.26 Romain Naour
2017-08-27 17:36 ` [Buildroot] [PATCH 2/7] " Romain Naour
2017-08-27 17:36 ` Romain Naour [this message]
2017-08-30 20:49   ` [Buildroot] [PATCH 3/7] package/mesa3d: fix build issue with glibc >= 2.26 Thomas Petazzoni
2017-08-30 20:57     ` Romain Naour
2017-08-27 17:36 ` [Buildroot] [PATCH 4/7] package/jsoncpp: fix build " Romain Naour
2017-08-27 17:36 ` [Buildroot] [PATCH 5/7] package/glibc: needs kernel headers >= 3.10 on powerpc64le Romain Naour
2017-08-27 17:36 ` [Buildroot] [PATCH 6/7] package/gcc: enable float128 on powerpc64le with glibc >= 2.26 toolchains Romain Naour
2017-08-30 20:51   ` Thomas Petazzoni
2017-08-30 21:07     ` Romain Naour
2017-08-27 17:36 ` [Buildroot] [PATCH 7/7] package/glibc: bump to 2.26 Romain Naour
2017-08-28  5:18 ` [Buildroot] [PATCH 0/7] glibc: " Bernd Kuhls
2017-08-28  7:59   ` Romain Naour
2017-09-02  9:56     ` Romain Naour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170827173606.13144-4-romain.naour@gmail.com \
    --to=romain.naour@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox