All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/3] package/coremark-pro: fix build without threads
Date: Mon, 18 Jan 2021 21:38:41 +0100	[thread overview]
Message-ID: <20210118203842.657013-2-fontaine.fabrice@gmail.com> (raw)
In-Reply-To: <20210118203842.657013-1-fontaine.fabrice@gmail.com>

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/coremark-pro/coremark-pro.mk | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/package/coremark-pro/coremark-pro.mk b/package/coremark-pro/coremark-pro.mk
index fdcfda33e8..f69279d5cd 100644
--- a/package/coremark-pro/coremark-pro.mk
+++ b/package/coremark-pro/coremark-pro.mk
@@ -10,13 +10,32 @@ COREMARK_PRO_LICENSE = Apache-2.0
 COREMARK_PRO_LICENSE_FILES = LICENSE.md
 COREMARK_PRO_DEPENDENCIES = perl
 
+COREMARK_PRO_LDFLAGS = -lm
+
 ifeq ($(BR2_ENDIAN),"BIG")
-COREMARK_PRO_MAKE_OPTS += PLATFORM_DEFINES='EE_BIG_ENDIAN=1 EE_LITTLE_ENDIAN=0'
+COREMARK_PRO_DEFINES += \
+	EE_BIG_ENDIAN=1 \
+	EE_LITTLE_ENDIAN=0
+else
+COREMARK_PRO_DEFINES += \
+	EE_BIG_ENDIAN=0 \
+	EE_LITTLE_ENDIAN=1
+endif
+
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+COREMARK_PRO_DEFINES += \
+	USE_NATIVE_PTHREAD=1 \
+	USE_SINGLE_CONTEXT=0
+COREMARK_PRO_LDFLAGS += -lpthread
 else
-COREMARK_PRO_MAKE_OPTS += PLATFORM_DEFINES='EE_BIG_ENDIAN=0 EE_LITTLE_ENDIAN=1'
+COREMARK_PRO_DEFINES += \
+	USE_NATIVE_PTHREAD=0 \
+	USE_SINGLE_CONTEXT=1
 endif
 
 COREMARK_PRO_MAKE_OPTS += \
+	LINKER_LAST="$(COREMARK_PRO_LDFLAGS)" \
+	PLATFORM_DEFINES="$(COREMARK_PRO_DEFINES)" \
 	TARGET=linux$(if $(BR2_ARCH_IS_64),64) \
 	EXE=
 
-- 
2.29.2

  reply	other threads:[~2021-01-18 20:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18 20:38 [Buildroot] [PATCH 1/3] Revert "package/coremark-pro: add dependency on threads" Fabrice Fontaine
2021-01-18 20:38 ` Fabrice Fontaine [this message]
2021-01-19  6:32   ` [Buildroot] [PATCH 2/3] package/coremark-pro: fix build without threads Chris Packham
2021-01-18 20:38 ` [Buildroot] [PATCH 3/3] package/coremark-pro: fix build with uclibc-ng Fabrice Fontaine
2021-01-18 21:12 ` [Buildroot] [PATCH 1/3] Revert "package/coremark-pro: add dependency on threads" Thomas Petazzoni

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=20210118203842.657013-2-fontaine.fabrice@gmail.com \
    --to=fontaine.fabrice@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 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.