All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] jemalloc: fix sparc64 build
@ 2016-07-14 21:11 Eric Le Bihan
  2016-07-15  7:52 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Le Bihan @ 2016-07-14 21:11 UTC (permalink / raw)
  To: buildroot

GCC 4.9.3 for sparc64 defines __sparc_v9__, not __sparc64__ nor
__sparcv9 (as reported by `gcc -dM -E - < /dev/null | egrep 'sparc|arch'`).

This prevents LG_QUANTUM from being properly defined. Adding this new
value solves the issue.

Fixes:

  http://autobuild.buildroot.net/results/95d/95df560b13be7abbce6aeeb3ed0f0814d597bd08/

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
 ...001-Fix-LG_QUANTUM-definition-for-sparc64.patch | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/jemalloc/0001-Fix-LG_QUANTUM-definition-for-sparc64.patch

diff --git a/package/jemalloc/0001-Fix-LG_QUANTUM-definition-for-sparc64.patch b/package/jemalloc/0001-Fix-LG_QUANTUM-definition-for-sparc64.patch
new file mode 100644
index 0000000..ef5b857
--- /dev/null
+++ b/package/jemalloc/0001-Fix-LG_QUANTUM-definition-for-sparc64.patch
@@ -0,0 +1,30 @@
+From b3211bd6363ee6884c8db64008dc325a9c711bfb Mon Sep 17 00:00:00 2001
+From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
+Date: Thu, 14 Jul 2016 22:44:01 +0200
+Subject: [PATCH] Fix LG_QUANTUM definition for sparc64
+
+GCC 4.9.3 cross-compiled for sparc64 defines __sparc_v9__, not
+__sparc64__ nor __sparcv9. This prevents LG_QUANTUM from being defined
+properly. Adding this new value to the check solves the issue.
+
+Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
+---
+ include/jemalloc/internal/jemalloc_internal.h.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in
+index 51bf897..ece15b2 100644
+--- a/include/jemalloc/internal/jemalloc_internal.h.in
++++ b/include/jemalloc/internal/jemalloc_internal.h.in
+@@ -234,7 +234,7 @@ typedef unsigned szind_t;
+ #  ifdef __alpha__
+ #    define LG_QUANTUM		4
+ #  endif
+-#  if (defined(__sparc64__) || defined(__sparcv9))
++#  if (defined(__sparc64__) || defined(__sparcv9) || defined(__sparc_v9__))
+ #    define LG_QUANTUM		4
+ #  endif
+ #  if (defined(__amd64__) || defined(__x86_64__) || defined(_M_X64))
+-- 
+2.4.11
+
-- 
2.4.11

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] jemalloc: fix sparc64 build
  2016-07-14 21:11 [Buildroot] [PATCH] jemalloc: fix sparc64 build Eric Le Bihan
@ 2016-07-15  7:52 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-07-15  7:52 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 14 Jul 2016 23:11:59 +0200, Eric Le Bihan wrote:
> GCC 4.9.3 for sparc64 defines __sparc_v9__, not __sparc64__ nor
> __sparcv9 (as reported by `gcc -dM -E - < /dev/null | egrep 'sparc|arch'`).
> 
> This prevents LG_QUANTUM from being properly defined. Adding this new
> value solves the issue.
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/95d/95df560b13be7abbce6aeeb3ed0f0814d597bd08/
> 
> Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> ---
>  ...001-Fix-LG_QUANTUM-definition-for-sparc64.patch | 30 ++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>  create mode 100644 package/jemalloc/0001-Fix-LG_QUANTUM-definition-for-sparc64.patch

Applied to master, thanks. Please submit the patch upstream to the
jemalloc project. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-15  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14 21:11 [Buildroot] [PATCH] jemalloc: fix sparc64 build Eric Le Bihan
2016-07-15  7:52 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.