This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.2 by this push:
     new 151738a6d77 branch-4.2: [fix](build) Upgrade gperftools to fix macOS 
ARM64 BE linking #69231 (#69317)
151738a6d77 is described below

commit 151738a6d77fe66956ef2b7f91c0f7e14a8e986c
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Oct 21 10:02:08 2026 +0800

    branch-4.2: [fix](build) Upgrade gperftools to fix macOS ARM64 BE linking 
#69231 (#69317)
    
    Cherry-picked from #69231
    
    Co-authored-by: zy-kkk <[email protected]>
---
 thirdparty/build-thirdparty.sh | 11 ++++++++---
 thirdparty/vars.sh             |  8 ++++----
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index a5e209a0aed..710c2b68dba 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -622,9 +622,14 @@ build_gperftools() {
         ./autogen.sh
     fi
 
-    CPPFLAGS="-I${TP_INCLUDE_DIR}" \
-        LDFLAGS="-L${TP_LIB_DIR}" \
-        LD_LIBRARY_PATH="${TP_LIB_DIR}" \
+    local cppflags="-I${TP_INCLUDE_DIR}"
+    if [[ "${KERNEL}" == "Linux" && "$(uname -m)" == "aarch64" ]]; then
+        # --enable-frame-pointers only selects the FP unwinder on x86 in 
2.18.1.
+        # Keep ARM64 SIGPROF callbacks out of libgcc and its loader locks.
+        cppflags+=" -DTCMALLOC_DONT_PREFER_LIBUNWIND=1"
+    fi
+
+    CPPFLAGS="${cppflags}" \
         LDFLAGS="-L${TP_LIB_DIR}" \
         LD_LIBRARY_PATH="${TP_LIB_DIR}" \
         ./configure --prefix="${TP_INSTALL_DIR}/gperftools" --disable-shared 
--enable-static --disable-libunwind --with-pic --enable-frame-pointers
diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh
index 39310f0a576..55083e0983e 100644
--- a/thirdparty/vars.sh
+++ b/thirdparty/vars.sh
@@ -105,10 +105,10 @@ SNAPPY_SOURCE=snappy-1.1.10
 SNAPPY_MD5SUM="70153395ebe6d72febe2cf2e40026a44"
 
 # gperftools
-GPERFTOOLS_DOWNLOAD="https://github.com/gperftools/gperftools/releases/download/gperftools-2.10/gperftools-2.10.tar.gz";
-GPERFTOOLS_NAME=gperftools-2.10.tar.gz
-GPERFTOOLS_SOURCE=gperftools-2.10
-GPERFTOOLS_MD5SUM="62bf6c76ba855ed580de5e139bd2a483"
+GPERFTOOLS_DOWNLOAD="https://github.com/gperftools/gperftools/releases/download/gperftools-2.18.1/gperftools-2.18.1.tar.gz";
+GPERFTOOLS_NAME=gperftools-2.18.1.tar.gz
+GPERFTOOLS_SOURCE=gperftools-2.18.1
+GPERFTOOLS_MD5SUM="129c01f6f5297f0482b33d431b5ec555"
 
 # zlib
 
ZLIB_DOWNLOAD="https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz";


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to