Revert "package/coremark-pro: add dependency on threads"
PATCH 1/3 Revert "package/coremark-pro: add dependency on threads"
This reverts commit 6627cea610ee11cbc02649c9b12cbe0b2b8e83b6.
--- package/coremark-pro/Config.in | 5 ----- 1 file changed, 5 deletions(-)
package/coremark-pro/Config.in +0 -5
@@ -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
Signature · 1 line
2.29.2
PATCH 2/3 package/coremark-pro: fix build without threads
--- package/coremark-pro/coremark-pro.mk | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-)
package/coremark-pro/coremark-pro.mk +21 -2
@@ -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=
Signature · 1 line
2.29.2
PATCH 2/3 package/coremark-pro: fix build without threads
Quoted 38 lines · Fabrice Fontaine,
Signed-off-by Fabrice Fontaine <[email protected]>--- package/coremark-pro/coremark-pro.mk | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-)package/coremark-pro/ renamed from package/coremark-pro/coremark-pro.mk +0
-0coremark-pro.mk
indexfdcfda33e8..f69279d5cd100644package/coremark-pro/coremark-pro.mk +2
-1@@ -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=1EE_LITTLE_ENDIAN=0'
package/coremark-pro/coremark-pro.mk +14
-1+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=0EE_LITTLE_ENDIAN=1'
package/coremark-pro/coremark-pro.mk +1
-0+COREMARK_PRO_DEFINES += \
package/coremark-pro/coremark-pro.mk COREMARK_PRO_LICENSE = Apache-2.0
Quoted 10 lines
package/coremark-pro/coremark-pro.mk +4
-1+ 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.
Quoted 1 line
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210119/3e4d9905/attachment.html>
PATCH 3/3 package/coremark-pro: fix build with uclibc-ng
In reply to Fabrice FontaineFix 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
--- package/coremark-pro/coremark-pro.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/coremark-pro/coremark-pro.mk +1 -1
@@ -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 += \
Signature · 1 line
2.29.2
PATCH 1/3 Revert "package/coremark-pro: add dependency on threads"
In reply to Fabrice FontaineQuoted 6 lines · On Mon, 18 Jan 2021 21:38:40 +0100 Fabrice Fontaine…
This reverts commit
6627cea610ee11cbc02649c9b12cbe0b2b8e83b6.Signed-off-by Fabrice Fontaine <[email protected]>--- package/coremark-pro/Config.in | 5 ----- 1 file changed, 5 deletions(-)
Series applied. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com