!49 [sync] PR-47: fix loongarch64 build error.
From: @openeuler-sync-bot Reviewed-by: @liqingqing_1229 Signed-off-by: @liqingqing_1229
This commit is contained in:
commit
d9488bf44f
53
fix-loongarch64-build-failed.patch
Normal file
53
fix-loongarch64-build-failed.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
From 1f9b13b0c08e0682fab3fbb962b504c2b85dc845 Mon Sep 17 00:00:00 2001
|
||||||
|
From: yangchenguang <yangchenguang@kylinsec.com.cn>
|
||||||
|
Date: Mon, 15 May 2023 11:14:21 +0800
|
||||||
|
Subject: [PATCH] fix loongarch64 build failed
|
||||||
|
|
||||||
|
Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
|
||||||
|
---
|
||||||
|
src/base/linux_syscall_support.h | 5 +++++
|
||||||
|
src/base/linuxthreads.cc | 4 ++++
|
||||||
|
2 files changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h
|
||||||
|
index b807b11..a1afd87 100644
|
||||||
|
--- a/src/base/linux_syscall_support.h
|
||||||
|
+++ b/src/base/linux_syscall_support.h
|
||||||
|
@@ -2773,6 +2773,7 @@ LSS_RETURN(int, __res);
|
||||||
|
LSS_INLINE _syscall3(int, fcntl, int, f,
|
||||||
|
int, c, long, a)
|
||||||
|
#endif
|
||||||
|
+#ifndef __loongarch__
|
||||||
|
#if defined(__aarch64__) && defined (__ILP32__)
|
||||||
|
/* aarch64_ilp32 uses fstat64 for sys_fstat() */
|
||||||
|
LSS_INLINE _syscall2_long(int, fstat, fstat64, int, f,
|
||||||
|
@@ -2780,6 +2781,10 @@ LSS_RETURN(int, __res);
|
||||||
|
#else
|
||||||
|
LSS_INLINE _syscall2(int, fstat, int, f,
|
||||||
|
struct kernel_stat*, b)
|
||||||
|
+#endif
|
||||||
|
+#else
|
||||||
|
+ LSS_INLINE _syscall2(int, statx, int, f,
|
||||||
|
+ struct kernel_stat*, b)
|
||||||
|
#endif
|
||||||
|
LSS_INLINE _syscall6(int, futex, int*, a,
|
||||||
|
int, o, int, v,
|
||||||
|
diff --git a/src/base/linuxthreads.cc b/src/base/linuxthreads.cc
|
||||||
|
index c28b1a9..2eb2816 100644
|
||||||
|
--- a/src/base/linuxthreads.cc
|
||||||
|
+++ b/src/base/linuxthreads.cc
|
||||||
|
@@ -350,7 +350,11 @@ static void ListerThread(struct ListerParams *args) {
|
||||||
|
continue;
|
||||||
|
goto failure;
|
||||||
|
}
|
||||||
|
+#ifndef __loongarch__
|
||||||
|
if (sys_fstat(proc, &proc_sb) < 0)
|
||||||
|
+#else
|
||||||
|
+ if (sys_statx(proc, &proc_sb) < 0)
|
||||||
|
+#endif
|
||||||
|
goto failure;
|
||||||
|
|
||||||
|
/* Since we are suspending threads, we cannot call any libc
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,12 +1,13 @@
|
|||||||
Name: gperftools
|
Name: gperftools
|
||||||
Version: 2.10
|
Version: 2.10
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: high-performance malloc and performance analysis tools
|
Summary: high-performance malloc and performance analysis tools
|
||||||
|
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
URL: https://github.com/gperftools/gperftools
|
URL: https://github.com/gperftools/gperftools
|
||||||
Source0: https://github.com/gperftools/gperftools/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/gperftools/gperftools/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||||
Patch1: gperftools-generic-dynamic-tls.patch
|
Patch1: gperftools-generic-dynamic-tls.patch
|
||||||
|
Patch2: fix-loongarch64-build-failed.patch
|
||||||
|
|
||||||
Patch9000: issue-1122-fix-bus-error-on-aarch64.patch
|
Patch9000: issue-1122-fix-bus-error-on-aarch64.patch
|
||||||
Patch9001: skip-arm-in-stacktrace_unittest.patch
|
Patch9001: skip-arm-in-stacktrace_unittest.patch
|
||||||
@ -73,6 +74,9 @@ CXXFLAGS=`echo $RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-local-typedefs -D
|
|||||||
%configure \
|
%configure \
|
||||||
%ifarch s390x aarch64
|
%ifarch s390x aarch64
|
||||||
--disable-general-dynamic-tls \
|
--disable-general-dynamic-tls \
|
||||||
|
%endif
|
||||||
|
%ifarch sw_64
|
||||||
|
--disable-cpu-profiler \
|
||||||
%endif
|
%endif
|
||||||
--disable-dynamic-sized-delete-support \
|
--disable-dynamic-sized-delete-support \
|
||||||
|
|
||||||
@ -92,17 +96,21 @@ LD_LIBRARY_PATH=./.libs make check
|
|||||||
#nothing to do
|
#nothing to do
|
||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
|
%ifnarch sw_64
|
||||||
%{_libdir}/libprofiler.so.*
|
%{_libdir}/libprofiler.so.*
|
||||||
|
%endif
|
||||||
%{_libdir}/libtcmalloc*.so.*
|
%{_libdir}/libtcmalloc*.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_includedir}/google/*.h
|
%{_includedir}/google/*.h
|
||||||
%{_includedir}/gperftools/*.h
|
%{_includedir}/gperftools/*.h
|
||||||
|
%ifnarch sw_64
|
||||||
%{_libdir}/libprofiler.so
|
%{_libdir}/libprofiler.so
|
||||||
|
%{_libdir}/libprofiler.*a
|
||||||
|
%endif
|
||||||
%{_libdir}/libtcmalloc*.so
|
%{_libdir}/libtcmalloc*.so
|
||||||
%{_libdir}/pkgconfig/*.pc
|
%{_libdir}/pkgconfig/*.pc
|
||||||
%{_docdir}/%{name}/*
|
%{_docdir}/%{name}/*
|
||||||
%{_libdir}/libprofiler.*a
|
|
||||||
%{_libdir}/libtcmalloc*.*a
|
%{_libdir}/libtcmalloc*.*a
|
||||||
|
|
||||||
%files -n pprof
|
%files -n pprof
|
||||||
@ -110,6 +118,9 @@ LD_LIBRARY_PATH=./.libs make check
|
|||||||
%{_mandir}/man1/*.1.gz
|
%{_mandir}/man1/*.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 15 2023 yangchenguang <yangchenguang@kylinsec.com.cn> - 2.10-2
|
||||||
|
- fix loongarch64 build error and sw_64 build error
|
||||||
|
|
||||||
* Thu Nov 10 2022 Liu Zixian <liuzixian4@huawei.com> - 2.10-1
|
* Thu Nov 10 2022 Liu Zixian <liuzixian4@huawei.com> - 2.10-1
|
||||||
- Update to 2.10
|
- Update to 2.10
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user