diff mbox series

[langdale,40/41] perfetto: pass TUNE_CCARGS to use machine tune

Message ID 84ba7671136d02a7d86b23be49bf8a57ac42d378.1674653280.git.akuster808@gmail.com
State New
Headers show
Series [langdale,01/41] blueman: add RDEPEND on python3-fcntl | expand

Commit Message

akuster808 Jan. 25, 2023, 1:31 p.m. UTC
From: Markus Volk <f_l_k@t-online.de>

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>
 meta-oe/recipes-devtools/perfetto/perfetto.bb | 25 ++++++-------------
 1 file changed, 7 insertions(+), 18 deletions(-)
diff mbox series


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
-    # 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\""
     cmd="tools/gn gen --args=$ARGS ${B}"
@@ -100,7 +90,6 @@  do_configure () {
     # Eliminate a few incompatible build flags
-    REPLACES=$REPLACES";s/-mfpu=neon//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_CLANG="${BUILD_CC} ${FLOAT_ABI}"
-        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}"
         cd gcc_like_host