tcf-agent: Add $@ to RANLIB
PATCH v4 1/3 tcf-agent: Add $@ to RANLIB
tcf-agent calls RANLIB ( if defined ) after calling AR to create the archive [1], when RANLIB is set to gcc-ranlib this goes unnoticed, since calling gcc-ranlib without any arguments silenlty does nothing and exits with return code 0, however, calling binutils ranlib or llvm-ranlib does demand library name as commandline option and since it is not there it exits with code 1
aarch64-poky-linux-musl-llvm-ranlib
OVERVIEW: LLVM ranlib
Generate an index for archives
USAGE: aarch64-poky-linux-musl-llvm-ranlib archive...
OPTIONS:
-h --help - Display available options
-V --version - Display the version of this program
-D - Use zero for timestamps and uids/gids (default)
-U - Use actual timestamps and uids/gids
-X{32|64|32_64|any} - Specify which archive symbol tables should begenerated if they do not already exist (AIX OS only) aarch64-poky-linux-musl-llvm-ranlib: error: an archive name must be specified
make: *** [Makefile:53: obj/GNU/Linux/a64/Debug/libtcf.a] Error 1
When we add $@, to RANLIB then it becomes the make variable, $@ - An automatic Makefile variable that expands to the target name (the file being built)
so the makefile target now rightly adds the .a filename to RANLIB call.
Sent a patch upstream to add RANLIB for linux [2]
[1] https://gitlab.eclipse.org/eclipse/tcf/tcf.agent/-/blob/master/agent/Makefile?ref_type=heads#L53
[2] https://gitlab.eclipse.org/eclipse/tcf/tcf.agent/-/merge_requests/7
--- meta/recipes-devtools/tcf-agent/tcf-agent_git.bb | 6 ++++++ 1 file changed, 6 insertions(+)
meta/recipes-devtools/tcf-agent/tcf-agent_git.bb +6 -0
@@ -51,6 +51,12 @@ CFLAGS:append:riscv64 = " ${LCL_STOP_SERVICES}" CFLAGS:append:riscv32 = " ${LCL_STOP_SERVICES}" CFLAGS:append:loongarch64 = " ${LCL_STOP_SERVICES}" +# This works with gcc-ranlib wrapper only because it exists without error if nothing +# is passed as argument but binutils ranlib and llvm ranlib do not and expect an input +# passing $@ ensures that Makefile default target which is the archive name in tcf makefiles +# is passed to RANLIB, ensures that whichever ranlib is used, the behavior is identical +RANLIB:append = " $@" + do_install() { oe_runmake install INSTALLROOT=${D} install -d ${D}${sysconfdir}/init.d/
PATCH v4 2/3 pixmap: Add openmp to dependencies with clang compiler
pixman's meson detects openmp support and if it finds it in runtime then enables it, this happens for gcc via gcc-runtime, however for clang, it does not. In some cases e.g. mips it enables it during configure only to find that clang can not find the libomp during linking. Therefore, add the dependency on openmp when using clang compiler. This ensures consistent behaviour across architectures.
Disable internal assembler on mips since it can not handle the inline assembly
--- meta/recipes-graphics/xorg-lib/pixman_0.46.0.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-graphics/xorg-lib/pixman_0.46.0.bb +3 -0
@@ -6,6 +6,7 @@ including trapezoids, triangles, and rectangles." HOMEPAGE = "http://www.pixman.org" SECTION = "x11/libs" DEPENDS = "zlib" +DEPENDS:append:toolchain-clang = " openmp" SRC_URI = "https://www.cairographics.org/releases/${BP}.tar.gz" SRC_URI[sha256sum] = "02d9ff7b8458ef61731c3d355f854bbf461fd0a4d3563c51f1c1c7b00638050d"
@@ -38,6 +39,8 @@ EXTRA_OEMESON:append:armv7ve = "${@bb.utils.contains("TUNE_FEATURES","neon",""," EXTRA_OEMESON:append:class-native = " -Dopenmp=disabled" +CFLAGS:append:toolchain-clang:mipsarch = " -fno-integrated-as" + BBCLASSEXTEND = "native nativesdk" CVE_STATUS[CVE-2023-37769] = "not-applicable-config: stress-test is an uninstalled test"
PATCH v4 3/3 vte: Pin to use GCC
In reply to Khem RajFixes Qemu usermode crashes during GI data generation for armv7ve when using clang
--- meta/recipes-support/vte/vte_0.78.2.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta/recipes-support/vte/vte_0.78.2.bb +4 -0
@@ -26,6 +26,10 @@ SRC_URI[archive.sha256sum] = "35d7bcde07356846b4a12881c8e016705b70a9004a9082285e ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" +# qemu usermode crashes when using clang as system compiler but works with gcc +# see https://patchwork.yoctoproject.org/project/oe-core/patch/[email protected]/ +TOOLCHAIN = "gcc" + EXTRA_OEMESON += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=true', '-Dvapi=false', d)}" EXTRA_OEMESON:append = " ${@bb.utils.contains('GI_DATA_ENABLED', 'False', '-Ddocs=false', '', d)}"
Re: [PATCH v4 3/3] vte: Pin to use GCC
I did realize that this is not working, because the problem is in the libraries in sysroot perhaps which are linking to the program and are built using clang
so just limiting TOOLCHAIN for this recipe is not enough
Quoted 24 lines · Khem Raj
Fixes Qemu usermode crashes during GI data generation for armv7ve when using clang
Signed-off-by Khem Raj <[email protected]>--- meta/recipes-support/vte/vte_0.78.2.bb | 4 ++++ 1 file changed, 4 insertions(+)meta/recipes-support/vte/vte_0.78.2.bb +4
-0@@ -26,6 +26,10 @@ SRC_URI[archive.sha256sum] = "35d7bcde07356846b4a12881c8e016705b70a9004a9082285e ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" +# qemu usermode crashes when using clang as system compiler but works with gcc +# see https://patchwork.yoctoproject.org/project/oe-core/patch/[email protected]/ +TOOLCHAIN = "gcc" + EXTRA_OEMESON += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=true', '-Dvapi=false', d)}" EXTRA_OEMESON:append = " ${@bb.utils.contains('GI_DATA_ENABLED', 'False', '-Ddocs=false', '', d)}"