All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] Revert "package/coremark-pro: add dependency on threads"
@ 2021-01-18 20:38 Fabrice Fontaine
  2021-01-18 20:38 ` [Buildroot] [PATCH 2/3] package/coremark-pro: fix build without threads Fabrice Fontaine
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2021-01-18 20:38 UTC (permalink / raw)
  To: buildroot

This reverts commit 6627cea610ee11cbc02649c9b12cbe0b2b8e83b6.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/coremark-pro/Config.in | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/package/coremark-pro/Config.in b/package/coremark-pro/Config.in
index b0bf16f66f..dd6821056c 100644
--- a/package/coremark-pro/Config.in
+++ b/package/coremark-pro/Config.in
@@ -1,13 +1,8 @@
 config BR2_PACKAGE_COREMARK_PRO
 	bool "coremark-pro"
 	depends on BR2_USE_MMU # perl uses fork()
-	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_PERL
 	help
 	  CoreMark-PRO is a comprehensive, advanced processor benchmark.
 
 	  https://www.eembc.org/coremark-pro/
-
-comment "coremark-pro needs a toolchain w/ threads"
-	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
-- 
2.29.2

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

* [Buildroot] [PATCH 2/3] package/coremark-pro: fix build without threads
  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
  2021-01-19  6:32   ` 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
  2 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2021-01-18 20:38 UTC (permalink / raw)
  To: buildroot

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

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

* [Buildroot] [PATCH 3/3] package/coremark-pro: fix build with uclibc-ng
  2021-01-18 20:38 [Buildroot] [PATCH 1/3] Revert "package/coremark-pro: add dependency on threads" Fabrice Fontaine
  2021-01-18 20:38 ` [Buildroot] [PATCH 2/3] package/coremark-pro: fix build without threads Fabrice Fontaine
@ 2021-01-18 20:38 ` Fabrice Fontaine
  2021-01-18 21:12 ` [Buildroot] [PATCH 1/3] Revert "package/coremark-pro: add dependency on threads" Thomas Petazzoni
  2 siblings, 0 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2021-01-18 20:38 UTC (permalink / raw)
  To: buildroot

Fix the following linking error with uClibc-ng:

/nvme/rc-buildroot-test/scripts/instance-1/output-1/host/bin/arc-buildroot-linux-uclibc-gcc  -o/nvme/rc-buildroot-test/scripts/instance-1/output-1/build/coremark-pro-1.1.2743/builds/linux/gcc/bin/cjpeg-rose7-preset cjpeg-rose7-preset.o /nvme/rc-buildroot-test/scripts/instance-1/output-1/build/coremark-pro-1.1.2743/builds/linux/gcc/obj/bench/consumer_v2/cjpeg/*.o  /nvme/rc-buildroot-test/scripts/instance-1/output-1/build/coremark-pro-1.1.2743/builds/linux/gcc/obj/mith.a -lm -lpthread  -lrt
/nvme/rc-buildroot-test/scripts/instance-1/output-1/host/lib/gcc/arc-buildroot-linux-uclibc/10.2.0/../../../../arc-buildroot-linux-uclibc/bin/ld: /nvme/rc-buildroot-test/scripts/instance-1/output-1/host/lib/gcc/arc-buildroot-linux-uclibc/10.2.0/libgcc.a(unwind-dw2-fde-dip.o): in function `_Unwind_Find_FDE':
/nvme/rc-buildroot-test/scripts/instance-1/output-1/build/host-gcc-final-arc-2020.09-release/build/arc-buildroot-linux-uclibc/libgcc/../../../libgcc/unwind-dw2-fde-dip.c:469: undefined reference to `dl_iterate_phdr'
/nvme/rc-buildroot-test/scripts/instance-1/output-1/host/lib/gcc/arc-buildroot-linux-uclibc/10.2.0/../../../../arc-buildroot-linux-uclibc/bin/ld: /nvme/rc-buildroot-test/scripts/instance-1/output-1/build/host-gcc-final-arc-2020.09-release/build/arc-buildroot-linux-uclibc/libgcc/../../../libgcc/unwind-dw2-fde-dip.c:469: undefined reference to `dl_iterate_phdr'
/nvme/rc-buildroot-test/scripts/instance-1/output-1/host/lib/gcc/arc-buildroot-linux-uclibc/10.2.0/../../../../arc-buildroot-linux-uclibc/bin/ld: GOT and PLT relocations cannot be fixed with a non dynamic linker
/nvme/rc-buildroot-test/scripts/instance-1/output-1/host/lib/gcc/arc-buildroot-linux-uclibc/10.2.0/../../../../arc-buildroot-linux-uclibc/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
/nvme/rc-buildroot-test/scripts/instance-1/output-1/build/coremark-pro-1.1.2743/workloads/cjpeg-rose7-preset//Makefile:65: recipe for target '/nvme/rc-buildroot-test/scripts/instance-1/output-1/build/coremark-pro-1.1.2743/builds/linux/gcc/bin/cjpeg-rose7-preset' failed

Since uClibc-ng 1.0.18 a circular dependency between libc and libgcc
exist, when static linking is used. It can be resolved by the compiler
when -static is correctly passed in the linking step.

So use TARGET_LDFLAGS to pass LDFLAGS

Fixes:
 - http://autobuild.buildroot.org/results/ca86624b09fed961d2b9086fee8b2029845746ea

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

diff --git a/package/coremark-pro/coremark-pro.mk b/package/coremark-pro/coremark-pro.mk
index f69279d5cd..515b8eafbd 100644
--- a/package/coremark-pro/coremark-pro.mk
+++ b/package/coremark-pro/coremark-pro.mk
@@ -10,7 +10,7 @@ COREMARK_PRO_LICENSE = Apache-2.0
 COREMARK_PRO_LICENSE_FILES = LICENSE.md
 COREMARK_PRO_DEPENDENCIES = perl
 
-COREMARK_PRO_LDFLAGS = -lm
+COREMARK_PRO_LDFLAGS = $(TARGET_LDFLAGS) -lm
 
 ifeq ($(BR2_ENDIAN),"BIG")
 COREMARK_PRO_DEFINES += \
-- 
2.29.2

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

* [Buildroot] [PATCH 1/3] Revert "package/coremark-pro: add dependency on threads"
  2021-01-18 20:38 [Buildroot] [PATCH 1/3] Revert "package/coremark-pro: add dependency on threads" Fabrice Fontaine
  2021-01-18 20:38 ` [Buildroot] [PATCH 2/3] package/coremark-pro: fix build without threads Fabrice Fontaine
  2021-01-18 20:38 ` [Buildroot] [PATCH 3/3] package/coremark-pro: fix build with uclibc-ng Fabrice Fontaine
@ 2021-01-18 21:12 ` Thomas Petazzoni
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2021-01-18 21:12 UTC (permalink / raw)
  To: buildroot

On Mon, 18 Jan 2021 21:38:40 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> This reverts commit 6627cea610ee11cbc02649c9b12cbe0b2b8e83b6.
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/coremark-pro/Config.in | 5 -----
>  1 file changed, 5 deletions(-)

Series applied. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 2/3] package/coremark-pro: fix build without threads
  2021-01-18 20:38 ` [Buildroot] [PATCH 2/3] package/coremark-pro: fix build without threads Fabrice Fontaine
@ 2021-01-19  6:32   ` Chris Packham
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Packham @ 2021-01-19  6:32 UTC (permalink / raw)
  To: buildroot

On Tue, 19 Jan 2021, 9:39 AM Fabrice Fontaine, <fontaine.fabrice@gmail.com>
wrote:

> 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=
> --
>

Thanks. I did find USE_NATIVE_PTHREAD when I looked at the original failure
but I couldn't figure out how to inject it into the build.

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210119/3e4d9905/attachment.html>

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

end of thread, other threads:[~2021-01-19  6:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 20:38 [Buildroot] [PATCH 1/3] Revert "package/coremark-pro: add dependency on threads" Fabrice Fontaine
2021-01-18 20:38 ` [Buildroot] [PATCH 2/3] package/coremark-pro: fix build without threads Fabrice Fontaine
2021-01-19  6:32   ` 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

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.