Skip to contentSkip to conversation

gnuchess: fix license

PATCH New Fabrice Fontaine 3 participants 9 messages Jan 10, 2019 – Jan 24, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 gnuchess: fix license

gnuchess is licensed under GPL-3.0+ not GPL-2.0+, also add hash for license file

---
 package/gnuchess/gnuchess.hash | 1 +
 package/gnuchess/gnuchess.mk   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
package/gnuchess/gnuchess.hash +1 -0
index 064a845eda..e0a1c4c418 100644
@@ -1,2 +1,3 @@
 # sha256 locally computed
 sha256 3c425c0264f253fc5cc2ba969abe667d77703c728770bd4b23c456cbe5e082ef  gnuchess-6.2.4.tar.gz
+sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING
package/gnuchess/gnuchess.mk +1 -1
index 1465ab0a00..0abdab5ba5 100644
@@ -6,7 +6,7 @@
 
 GNUCHESS_VERSION = 6.2.4
 GNUCHESS_SITE = $(BR2_GNU_MIRROR)/chess
-GNUCHESS_LICENSE = GPL-2.0+
+GNUCHESS_LICENSE = GPL-3.0+
 GNUCHESS_LICENSE_FILES = COPYING
 
 GNUCHESS_DEPENDENCIES = host-flex flex
Signature · 1 line
2.14.1
#1 lore raw

PATCH 2/3 gnuchess: disable -O2 and -O3 for ARM cortex-M cpus

When building with -O2 (or -O3), link fails on:

/home/rclinux/rc-buildroot-test/scripts/instance-0/output/host/bin/arm-linux-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wl,-elf2flt -static -Wl,-elf2flt -static -Wl,-elf2flt -static -o gnuchess main.o components.o frontend/libfrontend.a adapter/libadapter.a engine/libengine.a -lreadline -lncurses
ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context
ERROR: reloc type R_ARM_THM_MOVT_ABS unsupported in this context
ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context
ERROR: reloc type R_ARM_THM_MOVT_ABS unsupported in this context
ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context
ERROR: reloc type R_ARM_THM_MOVT_ABS unsupported in this context
ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context

To fix this, replace -O2 or -O3 by -Os

Fixes:
- http://autobuild.buildroot.org/results/7918757b255ed41609609d2083c2d8904ff3136e

---
 package/gnuchess/gnuchess.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/gnuchess/gnuchess.mk +7 -0
index 0abdab5ba5..b2fbcff864 100644
@@ -13,4 +13,11 @@ GNUCHESS_DEPENDENCIES = host-flex flex
 GNUCHESS_DEPENDENCIES += $(if $(BR2_PACKAGE_READLINE),readline) \
 	$(TARGET_NLS_DEPENDENCIES)
 
+# Workaround a build issue with -O2 or -03 for ARM Cortex-M cpus
+ifeq ($(BR2_ARM_CPU_ARMV7M):$(BR2_OPTIMIZE_2)$(BR2_OPTIMIZE_3),y:y)
+GNUCHESS_CONF_ENV += \
+	CFLAGS="$(TARGET_CFLAGS) -Os" \
+	CXXFLAGS="$(TARGET_CXXFLAGS) -Os"
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.14.1
#2 lore raw

PATCH 2/3 gnuchess: disable -O2 and -O3 for ARM cortex-M cpus

Hello,

Quoted 10 lines · Fabrice Fontaine

When building with -O2 (or -O3), link fails on:

/home/rclinux/rc-buildroot-test/scripts/instance-0/output/host/bin/arm-linux-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wl,-elf2flt -static -Wl,-elf2flt -static -Wl,-elf2flt -static -o gnuchess main.o components.o frontend/libfrontend.a adapter/libadapter.a engine/libengine.a -lreadline -lncurses
ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context
ERROR: reloc type R_ARM_THM_MOVT_ABS unsupported in this context
ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context
ERROR: reloc type R_ARM_THM_MOVT_ABS unsupported in this context
ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context
ERROR: reloc type R_ARM_THM_MOVT_ABS unsupported in this context
ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context

Interesting. In commit
https://git.buildroot.net/buildroot/commit/?id=49f574237983ae2e69e4a4c43df7be98902a63be,
we are doing exactly the opposite: when -Os is used, we pass -O2.

Romain reported the issue at
https://sourceware.org/bugzilla/show_bug.cgi?id=20552, and as you can see, we got a tremendous amount of feedback from the binutils developers :-)

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 2/3 gnuchess: disable -O2 and -O3 for ARM cortex-M cpus

Dear Thomas,

Le jeu. 10 janv. 2019 ? 20:59, Thomas Petazzoni
<[email protected]> a ?crit :

Quoted 15 lines

Hello,

Quoted 10 lines · Fabrice Fontaine

When building with -O2 (or -O3), link fails on:

/home/rclinux/rc-buildroot-test/scripts/instance-0/output/host/bin/arm-linux-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wl,-elf2flt -static -Wl,-elf2flt -static -Wl,-elf2flt -static -o gnuchess main.o components.o frontend/libfrontend.a adapter/libadapter.a engine/libengine.a -lreadline -lncurses
ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context
ERROR: reloc type R_ARM_THM_MOVT_ABS unsupported in this context
ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context
ERROR: reloc type R_ARM_THM_MOVT_ABS unsupported in this context
ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context
ERROR: reloc type R_ARM_THM_MOVT_ABS unsupported in this context
ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context

Quoted 8 lines

Interesting. In commit
https://git.buildroot.net/buildroot/commit/?id=49f574237983ae2e69e4a4c43df7be98902a63be,
we are doing exactly the opposite: when -Os is used, we pass -O2.

Romain reported the issue at
https://sourceware.org/bugzilla/show_bug.cgi?id=20552, and as you can see, we got a tremendous amount of feedback from the binutils developers :-)

After fixing sunxi-cedarx, I found a better solution for gnuchess, passing -fPIC in addition to -O2 fix the build failure. I'll send a v2.

Quoted 6 lines

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

Best Regards,

Fabrice

#4 lore raw

PATCH 3/3 gnuchess: bump to version 6.2.5

In reply to Fabrice Fontaine
---
 package/gnuchess/gnuchess.hash | 2 +-
 package/gnuchess/gnuchess.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/gnuchess/gnuchess.hash +1 -1
index e0a1c4c418..9342fc3eb7 100644
@@ -1,3 +1,3 @@
 # sha256 locally computed
-sha256 3c425c0264f253fc5cc2ba969abe667d77703c728770bd4b23c456cbe5e082ef  gnuchess-6.2.4.tar.gz
+sha256 9a99e963355706cab32099d140b698eda9de164ebce40a5420b1b9772dd04802  gnuchess-6.2.5.tar.gz
 sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING
package/gnuchess/gnuchess.mk +1 -1
index b2fbcff864..0c8c3b836c 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-GNUCHESS_VERSION = 6.2.4
+GNUCHESS_VERSION = 6.2.5
 GNUCHESS_SITE = $(BR2_GNU_MIRROR)/chess
 GNUCHESS_LICENSE = GPL-3.0+
 GNUCHESS_LICENSE_FILES = COPYING
Signature · 1 line
2.14.1
#5 lore raw

PATCH 3/3 gnuchess: bump to version 6.2.5

Hello,

Quoted 5 lines · Fabrice Fontaine
---
 package/gnuchess/gnuchess.hash | 2 +-
 package/gnuchess/gnuchess.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

I'm still waiting on some feedback on PATCH 2/3 to decide what to do with it.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 1/3 gnuchess: fix license

In reply to Fabrice Fontaine

Hello,

Quoted 8 lines · Fabrice Fontaine

gnuchess is licensed under GPL-3.0+ not GPL-2.0+, also add hash for license file

---
 package/gnuchess/gnuchess.hash | 1 +
 package/gnuchess/gnuchess.mk   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Applied to master, thanks.

Peter: I checked, and the gnuchess version in 2018.02.x is also under GPL-3.0+, so the patch should be backported to 2018.02.x.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH 1/3 gnuchess: fix license

Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hello,

Quoted 8 lines · Fabrice Fontaine

gnuchess is licensed under GPL-3.0+ not GPL-2.0+, also add hash for license file

---
package/gnuchess/gnuchess.hash | 1 +
package/gnuchess/gnuchess.mk | 2 +-

2 files changed, 2 insertions(+), 1 deletion(-)
Quoted 4 lines

Applied to master, thanks.

Peter: I checked, and the gnuchess version in 2018.02.x is also under GPL-3.0+, so the patch should be backported to 2018.02.x.

Ok, thanks for the heads up!

Signature · 1 line
Bye, Peter Korsgaard
#8 lore raw

PATCH 1/3 gnuchess: fix license

In reply to Thomas Petazzoni
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hello,

Quoted 8 lines · Fabrice Fontaine

gnuchess is licensed under GPL-3.0+ not GPL-2.0+, also add hash for license file

---
package/gnuchess/gnuchess.hash | 1 +
package/gnuchess/gnuchess.mk | 2 +-

2 files changed, 2 insertions(+), 1 deletion(-)
Quoted 4 lines

Applied to master, thanks.

Peter: I checked, and the gnuchess version in 2018.02.x is also under GPL-3.0+, so the patch should be backported to 2018.02.x.

Committed to 2018.02.x and 2018.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard