Skip to contentSkip to conversation

suitesparse: do not use := to avoid parsing error

PATCH In review [email protected] 2 participants 2 messages Jun 17, 2025 – Jun 18, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 suitesparse: do not use := to avoid parsing error

From: Chen Qi <[email protected]>

There's really no need to use ":=", and it is now causing parsing error because CC is defined in base.bbclasss using:

  inherit_defer toolchain/${TOOLCHAIN}
---
 .../suitesparse/suitesparse_5.10.1.bb                | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb +6 -6
index 13e6fd066c..7b194790a3 100644
@@ -19,14 +19,14 @@ RPROVIDES:${PN} = "mongoose graphblas"
 # the command line. To get around this problem, set these variables to only the
 # program name and prepend the rest of the value onto the corresponding FLAGS
 # variable.
-CFLAGS:prepend := "${@" ".join(d.getVar('CC').split()[1:])} "
-export CC := "${@d.getVar('CC').split()[0]}"
+CFLAGS:prepend = "${@" ".join(d.getVar('CC').split()[1:])} "
+export CC = "${@d.getVar('CC').split()[0]}"
 
-CXXFLAGS:prepend := "${@" ".join(d.getVar('CXX').split()[1:])} "
-export CXX := "${@d.getVar('CXX').split()[0]}"
+CXXFLAGS:prepend = "${@" ".join(d.getVar('CXX').split()[1:])} "
+export CXX = "${@d.getVar('CXX').split()[0]}"
 
-LDFLAGS:prepend := "${@" ".join(d.getVar('LD').split()[1:])} "
-export LD := "${@d.getVar('LD').split()[0]}"
+LDFLAGS:prepend = "${@" ".join(d.getVar('LD').split()[1:])} "
+export LD = "${@d.getVar('LD').split()[0]}"
 
 export CMAKE_OPTIONS = " \
     -DCMAKE_INSTALL_PREFIX=${D}${prefix} \
Signature · 1 line
2.49.0
#1 lore raw
Quoted 7 lines · Chen Qi via lists.openembedded.org

From: Chen Qi <[email protected]>

There's really no need to use ":=", and it is now causing parsing error because CC is defined in base.bbclasss using:

  inherit_defer toolchain/${TOOLCHAIN}

Hello,

While it does fix the parsing issue, this patch do change the CC value used by the recipe:

$ bitbake-getvar CC -r suitesparse
# $CC [4 operations]
#   exported ast.py:67 [eval]
#     [export] "1"
#   exported
/home/yocon/Documents/projets/yocto/poky/meta-openembedded/meta-oe/recipes-devtools/suitesparse/
suitesparse_5.10.1.bb:23
#     [export] "1"
#   set
/home/yocon/Documents/projets/yocto/poky/meta-openembedded/meta-oe/recipes-devtools/suitesparse/
suitesparse_5.10.1.bb:23
#     "${@d.getVar('CC').split()[0]}"
#   set
/home/yocon/Documents/projets/yocto/poky/meta/classes/toolchain/gcc.bbclass:1
#     "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
# pre-expansion value:
#   "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
export CC="x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3
-mfpmath=sse -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security
--sysroot=/home/yocon/Documents/projets/yocto/poky/build-master/tmp/work/core2-64-poky-linux/suitesparse/5.10.1/recipe-sysroot"

^ the value from gcc.bbclass overwrite the value se from the recipe

Quoted 48 lines
---
 .../suitesparse/suitesparse_5.10.1.bb                | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb +0 -0
index 13e6fd066c..7b194790a3 100644
@@ -19,14 +19,14 @@ RPROVIDES:${PN} = "mongoose graphblas"
 # the command line. To get around this problem, set these variables to

only the

 # program name and prepend the rest of the value onto the corresponding
FLAGS
 # variable.
meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb +6 -7
-CFLAGS:prepend := "${@" ".join(d.getVar('CC').split()[1:])} "
-export CC := "${@d.getVar('CC').split()[0]}"
+CFLAGS:prepend = "${@" ".join(d.getVar('CC').split()[1:])} "
+export CC = "${@d.getVar('CC').split()[0]}"
 
-CXXFLAGS:prepend := "${@" ".join(d.getVar('CXX').split()[1:])} "
-export CXX := "${@d.getVar('CXX').split()[0]}"
+CXXFLAGS:prepend = "${@" ".join(d.getVar('CXX').split()[1:])} "
+export CXX = "${@d.getVar('CXX').split()[0]}"
 
-LDFLAGS:prepend := "${@" ".join(d.getVar('LD').split()[1:])} "
-export LD := "${@d.getVar('LD').split()[0]}"
+LDFLAGS:prepend = "${@" ".join(d.getVar('LD').split()[1:])} "
+export LD = "${@d.getVar('LD').split()[0]}"
 
 export CMAKE_OPTIONS = " \
     -DCMAKE_INSTALL_PREFIX=${D}${prefix} \
--

2.49.0

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

Signature · 2 lines
Yoann Congal
Smile ECS