Skip to contentSkip to conversation

riscv: Add tunes for rv64 without compressed instructions

PATCH In review Khem Raj 3 participants 9 messages Apr 14, 2022 RISC-V

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/6 riscv: Add tunes for rv64 without compressed instructions

---
 meta/conf/machine/include/riscv/arch-riscv.inc | 2 ++
 meta/conf/machine/include/riscv/tune-riscv.inc | 8 ++++++++
 2 files changed, 10 insertions(+)
meta/conf/machine/include/riscv/arch-riscv.inc +2 -0
index e5611a12a66..230a266563a 100644
@@ -7,6 +7,8 @@ TUNE_PKGARCH = "${TUNE_PKGARCH:tune-${DEFAULTTUNE}}"
 TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv64nf', ' -mabi=lp64', ' ', d)}"
 TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv32nf', ' -mabi=ilp32', ' ', d)}"
 
+TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv64nc', ' -march=rv64imafd', ' ', d)}"
+
 # Fix: ld: unrecognized option '--hash-style=sysv'
 LINKER_HASH_STYLE:libc-newlib = ""
 # Fix: ld: unrecognized option '--hash-style=gnu'
meta/conf/machine/include/riscv/tune-riscv.inc +8 -0
index cc2896f277b..659801496c9 100644
@@ -6,6 +6,8 @@ TUNEVALID[riscv32] = "Enable 32-bit RISC-V optimizations"
 TUNEVALID[riscv64nf] = "Enable 64-bit RISC-V optimizations no floating point"
 TUNEVALID[riscv32nf] = "Enable 32-bit RISC-V optimizations no floating point"
 
+TUNEVALID[riscv64nc] = "Enable 64-bit RISC-V optimizations without compressed instructions"
+
 TUNEVALID[bigendian] = "Big endian mode"
 
 AVAILTUNES += "riscv64 riscv32 riscv64nf riscv32nf"
@@ -31,3 +33,9 @@ TUNE_FEATURES:tune-riscv32nf = "${TUNE_FEATURES:tune-riscv32} riscv32nf"
 TUNE_ARCH:tune-riscv32nf = "riscv32"
 TUNE_PKGARCH:tune-riscv32nf = "riscv32nf"
 PACKAGE_EXTRA_ARCHS:tune-riscv32nf = "riscv32nf"
+
+# no compressed
+TUNE_FEATURES:tune-riscv64nc = "${TUNE_FEATURES:tune-riscv64} riscv64nc"
+TUNE_ARCH:tune-riscv64nc = "riscv64"
+TUNE_PKGARCH:tune-riscv64nc = "riscv64nc"
+PACKAGE_EXTRA_ARCHS:tune-riscv64nc = "riscv64nc"
Signature · 1 line
2.35.2
author
#1 lore raw

PATCH 2/6 mdadm: Drop clang specific cflags

This option is no longer needed

---
 meta/recipes-extended/mdadm/mdadm_4.2.bb | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-extended/mdadm/mdadm_4.2.bb +0 -2
index 1c2fc8c37a7..19035caaec9 100644
@@ -35,8 +35,6 @@ DEPENDS = "udev"
 SYSTEMD_SERVICE:${PN} = "mdmonitor.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
-CFLAGS:append:toolchain-clang = " -Wno-error=address-of-packed-member"
-
 # PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
 # prevents 64-bit userland from seeing this definition, instead defaulting
 # to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
Signature · 1 line
2.35.2
author
#2 lore raw

PATCH 3/6 harfbuzz: Upgrade to 4.2.0

In reply to Khem Raj

Changes in this release [1] [2]

[1] https://github.com/harfbuzz/harfbuzz/releases/tag/4.1.0
[2] https://github.com/harfbuzz/harfbuzz/releases/tag/4.2.0

---
 .../harfbuzz/{harfbuzz_4.0.1.bb => harfbuzz_4.2.0.bb}           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-graphics/harfbuzz/{harfbuzz_4.0.1.bb => harfbuzz_4.2.0.bb} (95%)
meta/recipes-graphics/harfbuzz/harfbuzz_4.2.0.bb renamed from meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb +1 -1
similarity index 95%
rename from meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
rename to meta/recipes-graphics/harfbuzz/harfbuzz_4.2.0.bb
index bf77a5e56c5..44d42e6904b 100644
@@ -12,7 +12,7 @@ UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
 UPSTREAM_CHECK_REGEX = "harfbuzz-(?P<pver>\d+(\.\d+)+).tar"
 
 SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz"
-SRC_URI[sha256sum] = "98f68777272db6cd7a3d5152bac75083cd52a26176d87bc04c8b3929d33bce49"
+SRC_URI[sha256sum] = "f2200f177768bdc21445aa09703326f3bbe8114ac083d081fe1a79d305c7ae73"
 
 inherit meson pkgconfig lib_package gtk-doc gobject-introspection
 
Signature · 1 line
2.35.2
author
#3 lore raw

PATCH 4/6 pango: Upgrade to 1.50.6

In reply to Khem Raj

Changes in this release [1]

[1] https://github.com/GNOME/pango/commit/37a427018c92a2bc679ef104097e07a619609c9c

---
 .../recipes-graphics/pango/{pango_1.50.4.bb => pango_1.50.6.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-graphics/pango/{pango_1.50.4.bb => pango_1.50.6.bb} (94%)
meta/recipes-graphics/pango/pango_1.50.6.bb renamed from meta/recipes-graphics/pango/pango_1.50.4.bb +1 -1
similarity index 94%
rename from meta/recipes-graphics/pango/pango_1.50.4.bb
rename to meta/recipes-graphics/pango/pango_1.50.6.bb
index 0ea621bf670..b1b9054234d 100644
@@ -20,7 +20,7 @@ GIR_MESON_DISABLE_FLAG = "disabled"
 
 SRC_URI += "file://run-ptest"
 
-SRC_URI[archive.sha256sum] = "f4ad63e87dc2b145300542a4fb004d07a9f91b34152fae0ddbe50ecdd851c162"
+SRC_URI[archive.sha256sum] = "a998bcf36881c3ac20495d40bceb304f4eaa9175bd2967c85656434cbdafe86a"
 
 DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz fribidi"
 
Signature · 1 line
2.35.2
author
#4 lore raw

PATCH 5/6 pango: Drop using additional cflags with clang

In reply to Khem Raj

This is no longer needed

---
 meta/recipes-graphics/pango/pango_1.50.6.bb | 4 ----
 1 file changed, 4 deletions(-)
meta/recipes-graphics/pango/pango_1.50.6.bb +0 -4
index b1b9054234d..cd04801db10 100644
@@ -37,10 +37,6 @@ do_configure:prepend() {
     chmod +x ${S}/tests/*.py
 }
 
-do_configure:prepend:toolchain-clang() {
-    sed -i -e "/Werror=implicit-fallthrough/d" ${S}/meson.build
-}
-
 LEAD_SONAME = "libpango-1.0*"
 
 FILES:${PN} = "${bindir}/* ${libdir}/libpango*${SOLIBS}"
Signature · 1 line
2.35.2
author
#5 lore raw

PATCH 6/6 pango: Skip test-layout ptest

In reply to Khem Raj

This has intermittent behavior, is sensitive to harfbuzz version

---
 .../0001-Skip-running-test-layout-test.patch  | 45 +++++++++++++++++++
 meta/recipes-graphics/pango/pango_1.50.6.bb   |  4 +-
 2 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/pango/pango/0001-Skip-running-test-layout-test.patch
meta/recipes-graphics/pango/pango/0001-Skip-running-test-layout-test.patch new file +45 -0
new file mode 100644
index 00000000000..c391e158d28
@@ -0,0 +1,45 @@
+From b9bfe3a79f165682a6db3d7ee1928365e93b1ccf Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 13 Apr 2022 19:39:29 -0700
+Subject: [PATCH] Skip running test-layout test
+
+This fails intermittently, it varies based on what version of harfbuzz
+is installed and if it does not match with what pango CI tests then we
+get random failures in this test. This has been disabled in other
+distros [1] too
+
+We want to drop this on next upgrade and see if this test passes if not
+then keep it disabled
+
+Fixes
+
+Running test: pango/test-layout.test
+1..36
+ok 1 /layout/letterspacing.layout
+ok 2 /layout/valid-7.layout
+not ok 3 /layout/valid-14.layout
+Bail out!
+FAIL: pango/test-layout.test (Child process killed by signal 6)
+
+[1] https://github.com/archlinux/svntogit-packages/commit/3f883e7ff8071adad23b6bcc0ba4b995aff10d52
+
+Upstream-Status: Inappropriate [Distro specific]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ tests/test-layout.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test-layout.c b/tests/test-layout.c
+index 1139e4f..b47a066 100644
+--- a/tests/test-layout.c
++++ b/tests/test-layout.c
+@@ -222,5 +222,5 @@ main (int argc, char *argv[])
+     }
+   g_dir_close (dir);
+ 
+-  return g_test_run ();
++  return 77;
+ }
+-- 
+2.35.2
+
meta/recipes-graphics/pango/pango_1.50.6.bb +3 -1
index cd04801db10..93e16534641 100644
@@ -18,7 +18,9 @@ inherit gnomebase gi-docgen ptest-gnome upstream-version-is-even gobject-introsp
 GIR_MESON_ENABLE_FLAG = "enabled"
 GIR_MESON_DISABLE_FLAG = "disabled"
 
-SRC_URI += "file://run-ptest"
+SRC_URI += "file://run-ptest \
+            file://0001-Skip-running-test-layout-test.patch \
+"
 
 SRC_URI[archive.sha256sum] = "a998bcf36881c3ac20495d40bceb304f4eaa9175bd2967c85656434cbdafe86a"
 
Signature · 1 line
2.35.2
#6 lore raw

Re: [OE-core] [PATCH 6/6] pango: Skip test-layout ptest

Please do file an upstream bug and include a link to it.

Alex

Quoted 98 lines · Khem Raj

This has intermittent behavior, is sensitive to harfbuzz version

---
 .../0001-Skip-running-test-layout-test.patch  | 45 +++++++++++++++++++
 meta/recipes-graphics/pango/pango_1.50.6.bb   |  4 +-
 2 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644

meta/recipes-graphics/pango/pango/0001-Skip-running-test-layout-test.patch

diff --git a/meta/recipes-graphics/pango/pango/0001-Skip-running-test-layout-test.patch b/meta/recipes-graphics/pango/pango/0001-Skip-running-test-layout-test.patch new file mode 100644
index 00000000000..c391e158d28
--- /dev/null
+++
b/meta/recipes-graphics/pango/pango/0001-Skip-running-test-layout-test.patch

meta/recipes-graphics/pango/pango/0001-Skip-running-test-layout-test.patch new file +24 -0
@@ -0,0 +1,45 @@
+From b9bfe3a79f165682a6db3d7ee1928365e93b1ccf Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 13 Apr 2022 19:39:29 -0700
+Subject: [PATCH] Skip running test-layout test
+
+This fails intermittently, it varies based on what version of harfbuzz
+is installed and if it does not match with what pango CI tests then we
+get random failures in this test. This has been disabled in other
+distros [1] too
+
+We want to drop this on next upgrade and see if this test passes if not
+then keep it disabled
+
+Fixes
+
+Running test: pango/test-layout.test
+1..36
+ok 1 /layout/letterspacing.layout
+ok 2 /layout/valid-7.layout
+not ok 3 /layout/valid-14.layout
+Bail out!
+FAIL: pango/test-layout.test (Child process killed by signal 6)
+
+[1]

https://github.com/archlinux/svntogit-packages/commit/3f883e7ff8071adad23b6bcc0ba4b995aff10d52

meta/recipes-graphics/pango/pango/0001-Skip-running-test-layout-test.patch new file +21 -0
+
+Upstream-Status: Inappropriate [Distro specific]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ tests/test-layout.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test-layout.c b/tests/test-layout.c
+index 1139e4f..b47a066 100644
+--- a/tests/test-layout.c
++++ b/tests/test-layout.c
+@@ -222,5 +222,5 @@ main (int argc, char *argv[])
+     }
+   g_dir_close (dir);
+
+-  return g_test_run ();
++  return 77;
+ }
+--
+2.35.2
+
meta/recipes-graphics/pango/pango_1.50.6.bb +0 -0
index cd04801db10..93e16534641 100644
@@ -18,7 +18,9 @@ inherit gnomebase gi-docgen ptest-gnome

upstream-version-is-even gobject-introsp
GIR_MESON_ENABLE_FLAG = "enabled"
GIR_MESON_DISABLE_FLAG = "disabled"

meta/recipes-graphics/pango/pango_1.50.6.bb +3 -1
-SRC_URI += "file://run-ptest"
+SRC_URI += "file://run-ptest \
+            file://0001-Skip-running-test-layout-test.patch \
+"
 
 SRC_URI[archive.sha256sum] =

"a998bcf36881c3ac20495d40bceb304f4eaa9175bd2967c85656434cbdafe86a"

--
2.35.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#164383):
https://lists.openembedded.org/g/openembedded-core/message/164383
Mute This Topic: https://lists.openembedded.org/mt/90456793/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#7 lore raw
In reply to Khem Raj
Quoted 12 lines · Khem Raj
---
 meta/conf/machine/include/riscv/arch-riscv.inc | 2 ++
 meta/conf/machine/include/riscv/tune-riscv.inc | 8 ++++++++
 2 files changed, 10 insertions(+)
meta/conf/machine/include/riscv/arch-riscv.inc +0 -0
index e5611a12a66..230a266563a 100644

meta/conf/machine/include/riscv/arch-riscv.inc TUNE_PKGARCH = "${TUNE_PKGARCH:tune-${DEFAULTTUNE}}" · line 10

Quoted 4 lines
meta/conf/machine/include/riscv/arch-riscv.inc +1 -0
@@ -7,6 +7,8 @@ TUNE_PKGARCH = "${TUNE_PKGARCH:tune-${DEFAULTTUNE}}"
 TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv64nf', ' -mabi=lp64', ' ', d)}"
 TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv32nf', ' -mabi=ilp32', ' ', d)}"
 
+TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv64nc', ' -march=rv64imafd', ' ', d)}"

I thought Linux expected compressed instruction support, is there actual hardware that doesn't have compressed instructions?

Alistair

Quoted 39 lines
meta/conf/machine/include/riscv/arch-riscv.inc +1 -0
+
 # Fix: ld: unrecognized option '--hash-style=sysv'
 LINKER_HASH_STYLE:libc-newlib = ""
 # Fix: ld: unrecognized option '--hash-style=gnu'
meta/conf/machine/include/riscv/tune-riscv.inc +8 -1
index cc2896f277b..659801496c9 100644
@@ -6,6 +6,8 @@ TUNEVALID[riscv32] = "Enable 32-bit RISC-V optimizations"
 TUNEVALID[riscv64nf] = "Enable 64-bit RISC-V optimizations no floating point"
 TUNEVALID[riscv32nf] = "Enable 32-bit RISC-V optimizations no floating point"
 
+TUNEVALID[riscv64nc] = "Enable 64-bit RISC-V optimizations without compressed instructions"
+
 TUNEVALID[bigendian] = "Big endian mode"
 
 AVAILTUNES += "riscv64 riscv32 riscv64nf riscv32nf"
@@ -31,3 +33,9 @@ TUNE_FEATURES:tune-riscv32nf = "${TUNE_FEATURES:tune-riscv32} riscv32nf"
 TUNE_ARCH:tune-riscv32nf = "riscv32"
 TUNE_PKGARCH:tune-riscv32nf = "riscv32nf"
 PACKAGE_EXTRA_ARCHS:tune-riscv32nf = "riscv32nf"
+
+# no compressed
+TUNE_FEATURES:tune-riscv64nc = "${TUNE_FEATURES:tune-riscv64} riscv64nc"
+TUNE_ARCH:tune-riscv64nc = "riscv64"
+TUNE_PKGARCH:tune-riscv64nc = "riscv64nc"
+PACKAGE_EXTRA_ARCHS:tune-riscv64nc = "riscv64nc"
--

2.35.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#164378): https://lists.openembedded.org/g/openembedded-core/message/164378
Mute This Topic: https://lists.openembedded.org/mt/90456787/3619028
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#8 lore raw
Quoted 16 lines · Alistair Francis
Quoted 15 lines · Khem Raj
---
  meta/conf/machine/include/riscv/arch-riscv.inc | 2 ++
  meta/conf/machine/include/riscv/tune-riscv.inc | 8 ++++++++
  2 files changed, 10 insertions(+)
meta/conf/machine/include/riscv/arch-riscv.inc +0 -0
index e5611a12a66..230a266563a 100644
@@ -7,6 +7,8 @@ TUNE_PKGARCH = "${TUNE_PKGARCH:tune-${DEFAULTTUNE}}"
  TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv64nf', ' -mabi=lp64', ' ', d)}"
  TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv32nf', ' -mabi=ilp32', ' ', d)}"
 
Quoted 4 lines

meta/conf/machine/include/riscv/arch-riscv.inc TUNE_PKGARCH = "${TUNE_PKGARCH:tune-${DEFAULTTUNE}}" · line 10

Quoted 1 line
meta/conf/machine/include/riscv/arch-riscv.inc +1 -0
+TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv64nc', ' -march=rv64imafd', ' ', d)}"

I thought Linux expected compressed instruction support, is there actual hardware that doesn't have compressed instructions?

CDAC in India is designing bunch of cores without C instruction support.

Quoted 42 lines

Alistair

Quoted 39 lines
meta/conf/machine/include/riscv/arch-riscv.inc +1 -0
+
  # Fix: ld: unrecognized option '--hash-style=sysv'
  LINKER_HASH_STYLE:libc-newlib = ""
  # Fix: ld: unrecognized option '--hash-style=gnu'
meta/conf/machine/include/riscv/tune-riscv.inc +8 -1
index cc2896f277b..659801496c9 100644
@@ -6,6 +6,8 @@ TUNEVALID[riscv32] = "Enable 32-bit RISC-V optimizations"
  TUNEVALID[riscv64nf] = "Enable 64-bit RISC-V optimizations no floating point"
  TUNEVALID[riscv32nf] = "Enable 32-bit RISC-V optimizations no floating point"
 
+TUNEVALID[riscv64nc] = "Enable 64-bit RISC-V optimizations without compressed instructions"
+
  TUNEVALID[bigendian] = "Big endian mode"
 
  AVAILTUNES += "riscv64 riscv32 riscv64nf riscv32nf"
@@ -31,3 +33,9 @@ TUNE_FEATURES:tune-riscv32nf = "${TUNE_FEATURES:tune-riscv32} riscv32nf"
  TUNE_ARCH:tune-riscv32nf = "riscv32"
  TUNE_PKGARCH:tune-riscv32nf = "riscv32nf"
  PACKAGE_EXTRA_ARCHS:tune-riscv32nf = "riscv32nf"
+
+# no compressed
+TUNE_FEATURES:tune-riscv64nc = "${TUNE_FEATURES:tune-riscv64} riscv64nc"
+TUNE_ARCH:tune-riscv64nc = "riscv64"
+TUNE_PKGARCH:tune-riscv64nc = "riscv64nc"
+PACKAGE_EXTRA_ARCHS:tune-riscv64nc = "riscv64nc"
--

2.35.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#164378): https://lists.openembedded.org/g/openembedded-core/message/164378
Mute This Topic: https://lists.openembedded.org/mt/90456787/3619028
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-