All of lore.kernel.org
 help / color / mirror / Atom feed
From: Armin Kuster <akuster808@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [langdale 40/41] perfetto: pass TUNE_CCARGS to use machine tune
Date: Wed, 25 Jan 2023 08:31:22 -0500	[thread overview]
Message-ID: <84ba7671136d02a7d86b23be49bf8a57ac42d378.1674653280.git.akuster808@gmail.com> (raw)
In-Reply-To: <cover.1674653280.git.akuster808@gmail.com>

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 --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
-- 
2.25.1



  parent reply	other threads:[~2023-01-25 13:32 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 13:30 [langdale 00/41] Patch review Armin Kuster
2023-01-25 13:30 ` [langdale 01/41] blueman: add RDEPEND on python3-fcntl Armin Kuster
2023-01-25 13:30 ` [langdale 02/41] nss: fix SRC_URI Armin Kuster
2023-01-25 13:30 ` [langdale 03/41] xfce4-verve-plugin: fix do_configure faiure about missing libpcre Armin Kuster
2023-01-25 13:30 ` [langdale 04/41] gnome-text-editor: Add missing libpcre build time depenedency Armin Kuster
2023-01-25 13:30 ` [langdale 05/41] ettercap: Add missing dependency on libpcre Armin Kuster
2023-01-25 13:30 ` [langdale 06/41] ntfs-3g-ntfsprogs: Upgrade 2022.5.17 to 2022.10.3 Armin Kuster
2023-01-25 13:30 ` [langdale 07/41] freeradius: fix multilib systemd service start failure Armin Kuster
2023-01-25 13:30 ` [langdale 08/41] Nodejs - Upgrade to 16.18.1 Armin Kuster
2023-01-25 13:30 ` [langdale 09/41] protobuf: stage protoc binary to sysroot Armin Kuster
2023-01-25 13:30 ` [langdale 10/41] imapfilter: Upgrade to 2.7.6 Armin Kuster
2023-01-25 13:30 ` [langdale 11/41] ostree: fix selinux policy rebuild error on first deployment Armin Kuster
2023-01-25 13:30 ` [langdale 12/41] botan: upgrade 2.19.2 -> 2.19.3 Armin Kuster
2023-01-25 13:30 ` [langdale 13/41] audit: upgrade 3.0.8 -> 3.0.9 Armin Kuster
2023-01-25 13:30 ` [langdale 14/41] colord: upgrade 1.4.5 -> 1.4.6 Armin Kuster
2023-01-25 13:30 ` [langdale 15/41] aufs-util: Fix build with large file support enabled systems Armin Kuster
2023-01-25 13:30 ` [langdale 16/41] volume-key: Inherit python3targetconfig Armin Kuster
2023-01-25 13:30 ` [langdale 17/41] audit: " Armin Kuster
2023-01-25 13:31 ` [langdale 18/41] waf-samba.bbclass: point PYTHON_CONFIG to target python3-config Armin Kuster
2023-01-25 13:31 ` [langdale 19/41] fontforge: Inherit python3targetconfig Armin Kuster
2023-01-25 13:31 ` [langdale 20/41] smcroute: upgrade 2.5.5 -> 2.5.6 Armin Kuster
2023-01-25 13:31 ` [langdale 21/41] postfix: fix multilib conflict of sample-main.cf Armin Kuster
2023-01-25 13:31 ` [langdale 22/41] dool: Add patch to fix rebuild Armin Kuster
2023-01-25 13:31 ` [langdale 23/41] networkmanager: fix dhcpcd PACKAGECONFIG Armin Kuster
2023-01-25 13:31 ` [langdale 24/41] networkmanager: install config files into correct place Armin Kuster
2023-01-25 13:31 ` [langdale 25/41] nss: Add missing CVE product Armin Kuster
2023-01-25 13:31 ` [langdale 26/41] nss: Whitelist CVEs related to libnssdbm Armin Kuster
2023-01-25 13:31 ` [langdale 27/41] zsh: Fix CVE-2021-45444 Armin Kuster
2023-01-25 13:31 ` [langdale 28/41] fwupd: Fix CVE-2022-3287 Armin Kuster
2023-01-25 13:31 ` [langdale 29/41] redis: 7.0.5 -> 7.0.7 Armin Kuster
2023-01-25 13:31 ` [langdale 30/41] redis: 6.2.7 -> 6.2.8 Armin Kuster
2023-01-25 13:31 ` [langdale 31/41] redis: Upgrade to 7.0.8 Armin Kuster
2023-01-25 13:31 ` [langdale 32/41] redis: Upgrade to 6.2.9 Armin Kuster
2023-01-25 13:31 ` [langdale 33/41] kernel_add_regdb: Change the task order Armin Kuster
2023-01-25 13:31 ` [langdale 34/41] Revert "waf-samba.bbclass: point PYTHON_CONFIG to target python3-config" Armin Kuster
2023-01-25 16:37   ` [oe] " Khem Raj
2023-01-25 13:31 ` [langdale 35/41] networkmanager: fix /etc/resolv.conf handling Armin Kuster
2023-01-25 13:31 ` [langdale 36/41] fluidsynth: update SRC_URI to remove non-existing 2.2.x branch Armin Kuster
2023-01-25 13:31 ` [langdale 37/41] openwsman: upgrade 2.7.1 -> 2.7.2 Armin Kuster
2023-01-25 13:31 ` [langdale 38/41] sshpass: Use SPDX identified string for GPLv2 Armin Kuster
2023-01-25 13:31 ` [langdale 39/41] strongswan: upgrade 5.9.8 -> 5.9.9 Armin Kuster
2023-01-25 13:31 ` Armin Kuster [this message]
2023-01-25 13:31 ` [langdale 41/41] perfetto: Do not pass TUNE_CCARGS to native/host compiler Armin Kuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84ba7671136d02a7d86b23be49bf8a57ac42d378.1674653280.git.akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.