Skip to contentSkip to conversation

bitbake.conf: Define TC_CXX_RUNTIME

PATCH In review Khem Raj 2 participants 3 messages Sep 9, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v3 1/1 bitbake.conf: Define TC_CXX_RUNTIME

This variable is used to denote the C/C++ compiler runtime to use. Right now there are few alternatives out of the core which could use this variable to define this property, the values it can take are 'gnu' for gcc runtime. 'llvm' for using compiler-rt+libc++ and 'android' to use android runtime. Default settings is to use gnu which is current silent default also.

---
v2: Document the variable
v3: Rename to TC_CXX_RUNTIME

 documentation/ref-manual/variables.rst | 6 ++++++
 meta/conf/bitbake.conf                 | 1 +
 2 files changed, 7 insertions(+)
documentation/ref-manual/variables.rst +6 -0
index cf817e9540..2d28c3d2f7 100644
@@ -7973,6 +7973,12 @@ system and gives an overview of their function and contents.
       toolchain. You can use ``meta-sourcery`` as a template for adding
       support for other external toolchains.
 
+   :term:`TC_CXX_RUNTIME`
+      Specifies the C/C++ STL and runtime variant to use during
+      the build process. Default value is 'gnu'
+
+      You can select "gnu", "llvm", or "android".
+
    :term:`TEMPLATECONF`
       Specifies the directory used by the build system to find templates
       from which to build the ``bblayers.conf`` and ``local.conf`` files.
meta/conf/bitbake.conf +1 -0
index 52a36d788b..62cdd9aa9c 100644
@@ -389,6 +389,7 @@ FILESYSTEM_PERMS_TABLES ?= "${@'files/fs-perms.txt' if oe.types.boolean(d.getVar
 
 TCMODE ??= "default"
 TCLIBC ??= "glibc"
+TC_CXX_RUNTIME ??= "gnu"
 TMPDIR ?= "${TOPDIR}/tmp"
 
 CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + str(d.getVar('MACHINE'))][bool(d.getVar('MACHINE'))]}${@['', '/' + str(d.getVar('SDKMACHINE'))][bool(d.getVar('SDKMACHINE'))]}"
Signature · 1 line
2.37.3
#1 lore raw
Quoted 7 lines · Khem Raj

This variable is used to denote the C/C++ compiler runtime to use. Right now there are few alternatives out of the core which could use this variable to define this property, the values it can take are 'gnu' for gcc runtime. 'llvm' for using compiler-rt+libc++ and 'android' to use android runtime. Default settings is to use gnu which is current silent default also.

Seems like you made a conscious decision to refer to the gcc runtime library as "gnu" instead of "gcc". What was the reasoning? Using "gcc" would seem to be clearer unless it clashes with some gcc upstream naming convention.

Quoted 50 lines

---
v2: Document the variable
v3: Rename to TC_CXX_RUNTIME

 documentation/ref-manual/variables.rst | 6 ++++++
 meta/conf/bitbake.conf                 | 1 +
 2 files changed, 7 insertions(+)
documentation/ref-manual/variables.rst +6 -0
index cf817e9540..2d28c3d2f7 100644
@@ -7973,6 +7973,12 @@ system and gives an overview of their function and contents.
       toolchain. You can use ``meta-sourcery`` as a template for adding
       support for other external toolchains.
 
+   :term:`TC_CXX_RUNTIME`
+      Specifies the C/C++ STL and runtime variant to use during
+      the build process. Default value is 'gnu'
+
+      You can select "gnu", "llvm", or "android".
+
    :term:`TEMPLATECONF`
       Specifies the directory used by the build system to find templates
       from which to build the ``bblayers.conf`` and ``local.conf`` files.
meta/conf/bitbake.conf +1 -1
index 52a36d788b..62cdd9aa9c 100644
@@ -389,6 +389,7 @@ FILESYSTEM_PERMS_TABLES ?= "${@'files/fs-perms.txt' if oe.types.boolean(d.getVar
 
 TCMODE ??= "default"
 TCLIBC ??= "glibc"
+TC_CXX_RUNTIME ??= "gnu"
 TMPDIR ?= "${TOPDIR}/tmp"
 
 CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + str(d.getVar('MACHINE'))][bool(d.getVar('MACHINE'))]}${@['', '/' + str(d.getVar('SDKMACHINE'))][bool(d.getVar('SDKMACHINE'))]}"
--

2.37.3

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

author
#2 lore raw
Quoted 9 lines · Andre McCurdy
Quoted 7 lines · Khem Raj

This variable is used to denote the C/C++ compiler runtime to use. Right now there are few alternatives out of the core which could use this variable to define this property, the values it can take are 'gnu' for gcc runtime. 'llvm' for using compiler-rt+libc++ and 'android' to use android runtime. Default settings is to use gnu which is current silent default also.

Quoted 4 lines

Seems like you made a conscious decision to refer to the gcc runtime library as "gnu" instead of "gcc". What was the reasoning? Using "gcc" would seem to be clearer unless it clashes with some gcc upstream naming convention.

Good question. Historically to avoid confusion with recipe with same name when llvm was not a recipe and runtime in clang world is outside the compiler

Quoted 60 lines

Review

Quoted 11 lines

---
v2: Document the variable
v3: Rename to TC_CXX_RUNTIME

 documentation/ref-manual/variables.rst | 6 ++++++
 meta/conf/bitbake.conf                 | 1 +
 2 files changed, 7 insertions(+)
(quoted diff) +0 -0

b/documentation/ref-manual/variables.rst

documentation/ref-manual/variables.rst system and gives an overview of their function

Quoted 4 lines

index cf817e9540..2d28c3d2f7 100644

documentation/ref-manual/variables.rst +0 -0
@@ -7973,6 +7973,12 @@ system and gives an overview of their function

and contents.

documentation/ref-manual/variables.rst system and gives an overview of their function and contents.

Quoted 12 lines
documentation/ref-manual/variables.rst +6 -0
       toolchain. You can use ``meta-sourcery`` as a template for adding
       support for other external toolchains.
 
+   :term:`TC_CXX_RUNTIME`
+      Specifies the C/C++ STL and runtime variant to use during
+      the build process. Default value is 'gnu'
+
+      You can select "gnu", "llvm", or "android".
+
    :term:`TEMPLATECONF`
       Specifies the directory used by the build system to find templates
       from which to build the ``bblayers.conf`` and ``local.conf``

files.

meta/conf/bitbake.conf FILESYSTEM_PERMS_TABLES ?= "${@'files/fs-perms.txt'

Quoted 5 lines
meta/conf/bitbake.conf +0 -0
index 52a36d788b..62cdd9aa9c 100644
@@ -389,6 +389,7 @@ FILESYSTEM_PERMS_TABLES ?= "${@'files/fs-perms.txt'

if oe.types.boolean(d.getVar

meta/conf/bitbake.conf FILESYSTEM_PERMS_TABLES ?= "${@'files/fs-perms.txt' if oe.types.boolean(d.getVar

Quoted 7 lines
meta/conf/bitbake.conf +1 -0
 TCMODE ??= "default"
 TCLIBC ??= "glibc"
+TC_CXX_RUNTIME ??= "gnu"
 TMPDIR ?= "${TOPDIR}/tmp"
 
 CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' +

str(d.getVar('MACHINE'))][bool(d.getVar('MACHINE'))]}${@['', '/' + str(d.getVar('SDKMACHINE'))][bool(d.getVar('SDKMACHINE'))]}"

Quoted 7 lines
meta/conf/bitbake.conf +0 -1
--

2.37.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#170499):

https://lists.openembedded.org/g/openembedded-core/message/170499

Quoted 3 lines

Mute This Topic: https://lists.openembedded.org/mt/93577585/3619030
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [

[email protected]]

Quoted 2 lines

-=-=-=-=-=-=-=-=-=-=-=-