aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Volk <f_l_k@t-online.de>2022-12-03 08:43:24 +0100
committerArmin Kuster <akuster808@gmail.com>2023-01-23 10:15:10 -0500
commit84ba7671136d02a7d86b23be49bf8a57ac42d378 (patch)
treed4a2d85e82d74dc3857bc4fa460a607795e6f1cd
parentf9ea77c5ab4c922da97e19fc34d4af18ff5ba1a1 (diff)
downloadmeta-openembedded-84ba7671136d02a7d86b23be49bf8a57ac42d378.tar.gz
perfetto: pass TUNE_CCARGS to use machine tune
We already tried to pass -mfloat-abi=hard if the machine can use it, but since no floating-point-unit was defined it got stubbed out and the result was, that only arm targets configured for softfp were able to build perfetto. Simplify by passing ${TUNE_CCARGS} to ensure, we always use the features, the machine was configured for. Also, do not use sed to remove the hardcoded -mfpu=neon entry. If this really turns out to be problematic, we need to patch it out to avoid not having a floating-point-unit again. Signed-off-by: Markus Volk <f_l_k@t-online.de> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit c23bde86d0bcba3acc677bc4cd3240a8b3116921) [Fixes build failure] Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/perfetto/perfetto.bb25
1 files changed, 7 insertions, 18 deletions
diff --git a/meta-oe/recipes-devtools/perfetto/perfetto.bb b/meta-oe/recipes-devtools/perfetto/perfetto.bb
index 98e39f068d..86ab18cacf 100644
--- a/meta-oe/recipes-devtools/perfetto/perfetto.bb
+++ b/meta-oe/recipes-devtools/perfetto/perfetto.bb
@@ -70,24 +70,14 @@ do_configure () {
elif [ $arch = "aarch64" ]; then
arch="arm64"
fi
-
- # For ARM32 with hardware floating point using clang and musl, we need to
- # specify -mfloat-abi=hard to make the ABI settings of the linker and the
- # compiler match. The linker would use hardware float ABI. The compiler does
- # not. As a result we need to force the compiler to do so by adding
- # -mfloat-abi=hard to compilation flags.
- FLOAT_ABI=""
- if [[ "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'true', 'false', d)}" == "true" ]]; then
- FLOAT_ABI="-mfloat-abi=hard"
- fi
ARGS=$ARGS" target_os=\"linux\""
ARGS=$ARGS" target_cpu=\"$arch\""
- ARGS=$ARGS" target_cc=\"$CC_BIN ${FLOAT_ABI}\""
- ARGS=$ARGS" target_cxx=\"$CXX_BIN -std=c++11 ${FLOAT_ABI}\""
+ ARGS=$ARGS" target_cc=\"$CC_BIN ${TUNE_CCARGS}\""
+ ARGS=$ARGS" target_cxx=\"$CXX_BIN -std=c++11 ${TUNE_CCARGS}\""
ARGS=$ARGS" target_strip=\"$STRIP_BIN\"" #
ARGS=$ARGS" target_sysroot=\"${RECIPE_SYSROOT}\""
- ARGS=$ARGS" target_linker=\"$CC_BIN ${FLOAT_ABI} ${LDFLAGS}\""
+ ARGS=$ARGS" target_linker=\"$CC_BIN ${TUNE_CCARGS} ${LDFLAGS}\""
ARGS=$ARGS" target_ar=\"$AR\""
ARGS="'$ARGS'"
cmd="tools/gn gen --args=$ARGS ${B}"
@@ -100,7 +90,6 @@ do_configure () {
# Eliminate a few incompatible build flags
REPLACES="s/-Wl,--icf=all//g"
REPLACES=$REPLACES";s/-Werror//g"
- REPLACES=$REPLACES";s/-mfpu=neon//g"
REPLACES=$REPLACES";s/-fcolor-diagnostics//g"
REPLACES=$REPLACES";s/=format-security//g"
REPLACES=$REPLACES";s/-fdiagnostics-show-template-tree//g"
@@ -111,12 +100,12 @@ do_configure () {
# If using the clang toolchain: use the clang host-side binaries built by Bitbake
if [ "${TOOLCHAIN}" = "clang" ]; then
- BB_CLANGXX="${BUILD_CXX} ${BUILD_LDFLAGS} ${FLOAT_ABI}"
- BB_CLANG="${BUILD_CC} ${FLOAT_ABI}"
+ BB_CLANGXX="${BUILD_CXX} ${BUILD_LDFLAGS} ${TUNE_CCARGS}"
+ BB_CLANG="${BUILD_CC} ${TUNE_CCARGS}"
BB_LLVM_OBJCOPY="${RECIPE_SYSROOT_NATIVE}/usr/bin/llvm-objcopy"
- HOST_CLANGXX="${STAGING_DIR_NATIVE}/usr/bin/clang++ -stdlib=libc++ -rtlib=libgcc -unwindlib=libgcc ${FLOAT_ABI}"
- HOST_CLANG="${STAGING_DIR_NATIVE}/usr/bin/clang ${FLOAT_ABI}"
+ HOST_CLANGXX="${STAGING_DIR_NATIVE}/usr/bin/clang++ -stdlib=libc++ -rtlib=libgcc -unwindlib=libgcc ${TUNE_CCARGS}"
+ HOST_CLANG="${STAGING_DIR_NATIVE}/usr/bin/clang ${TUNE_CCARGS}"
HOST_LLVM_OBJCOPY="${STAGING_DIR_NATIVE}/usr/bin/llvm-objcopy"
cd gcc_like_host