Skip to content
Snippets Groups Projects
Commit 6290147d authored by Robert Drab's avatar Robert Drab
Browse files

gn.bbclass: Add extra toolchain tools


Some projects rely on additional tools, which are not used by the GN itself,
like readelf of strip being present in the GN toolchain definition and
therefore gn.bbclass should expose those as they are provided in the bitbake
build environment.

Signed-off-by: default avatarRobert Drab <robert.drab@huawei.com>
parent 473257ac
No related branches found
No related tags found
No related merge requests found
......@@ -169,17 +169,20 @@ def gn_toolchain(toolchain_args):
' cc = "${cc}"\n'
' cxx = "${cxx}"\n'
' ar = "${ar}"\n'
' asm = "${asm}"\n'
' ld = cxx # GN expects a compiler, not a linker.\n'
' nm = "${nm}"\n'
' readelf = "${readelf}"\n'
' toolchain_args = {\n'
' current_cpu = "${current_cpu}"\n'
' current_os = "linux"\n'
' is_clang = ${is_clang}\n'
' }\n'
' # TODO: In some projects not all of the above variables are used\n'
' # Marking all of those as "not_needed" to avoid errors\n'
' # This should be fixed in some smart way if feasible\n'
' # Below tools are not used by the GN, still some projects rely\n'
' # on those being present in the toolchain definition.\n'
' # Marking all of those as "not_needed" to avoid GN errors\n'
' nm = "${nm}"\n'
' readelf = "${readelf}"\n'
' ranlib = "${ranlib}"\n'
' strip = "${strip}"\n'
' not_needed("*")\n'
'}\n'
).substitute(toolchain_args)
......@@ -194,8 +197,11 @@ def gn_toolchain_native(d):
'cc': d.expand('${BUILD_CC}'),
'cxx': d.expand('${BUILD_CXX}'),
'ar': d.expand('${BUILD_AR}'),
'asm': d.expand('${BUILD_AS}'),
'nm': d.expand('${BUILD_NM}'),
'readelf': d.expand('${BUILD_PREFIX}readelf'),
'ranlib': d.expand('${BUILD_RANLIB}'),
'strip': d.expand('${BUILD_STRIP}'),
'is_clang': gn_bool(is_clang(d.expand('${BUILD_CC}')))
}
......@@ -211,8 +217,11 @@ def gn_toolchain_target(d):
'cc': d.expand('${CC}'),
'cxx': d.expand('${CXX}'),
'ar': d.expand('${AR}'),
'asm': d.expand('${AS}'),
'nm': d.expand('${NM}'),
'readelf': d.expand('${TARGET_PREFIX}readelf'),
'ranlib': d.expand('${RANLIB}'),
'strip': d.expand('${STRIP}'),
'is_clang': gn_bool(is_clang(d.expand('${CC}')))
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment