From e8c2a2ec1f6642a4d3c93a0df4fefc12fd02a513 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Thu, 26 Dec 2024 16:00:35 +0900 Subject: [PATCH] packaging: Add more BuildRequires to build perf Some packages are existing on tizen repo. To remove Warning message, add the BuildRequires and -fPIC options to build perf tool. [ 941s] Makefile.config:914: Missing python setuptools, the python binding won't be built, please install python3-setuptools or equivalent [ 942s] Makefile.config:994: No libllvm 13+ found, slower source file resolution, please install llvm-devel/llvm-dev [ 942s] Makefile.config:1040: No libzstd found, disables trace compression, please install libzstd-dev[el] and/or set LIBZSTD_DIR [ 858s] /usr/lib64/gcc/aarch64-tizen-linux-gnu/14.2.0/../../../../aarch64-tizen-linux-gnu/bin/ld: /home/abuild/rpmbuild/BUILD/linux-amlogic-6.12/tools/perf/libsubcmd/libsubcmd.a(libsubcmd-in.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `cmdname_compare' which may bind externally can not be used when making a shared object; recompile with -fPIC [ 858s] /home/abuild/rpmbuild/BUILD/linux-amlogic-6.12/tools/perf/libsubcmd/libsubcmd.a(libsubcmd-in.o): in function `load_command_list': [ 858s] /home/abuild/rpmbuild/BUILD/linux-amlogic-6.12/tools/lib/subcmd/help.c:225:(.text+0x1034): dangerous relocation: unsupported relocation [ 858s] /usr/lib64/gcc/aarch64-tizen-linux-gnu/14.2.0/../../../../aarch64-tizen-linux-gnu/bin/ld: /home/abuild/rpmbuild/BUILD/linux-amlogic-6.12/tools/perf/libsubcmd/libsubcmd.a(libsubcmd-in.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `cmdname_compare' which may bind externally can not be used when making a shared object; recompile with -fPIC Change-Id: I18cd1f65b3acee2a9ef87d602a495837c3e85e8c Signed-off-by: Jaehoon Chung --- packaging/linux-amlogic.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packaging/linux-amlogic.spec b/packaging/linux-amlogic.spec index aadf4887d41c..a9ae5c4d2a79 100644 --- a/packaging/linux-amlogic.spec +++ b/packaging/linux-amlogic.spec @@ -38,6 +38,9 @@ BuildRequires: xz-devel BuildRequires: binutils-devel BuildRequires: rsync BuildRequires: python3-devel +BuildRequires: llvm-devel +BuildRequires: python3-setuptools +BuildRequires: libzstd-devel %description The Linux Kernel, the operating system core itself @@ -195,7 +198,7 @@ done # Install perf install -d %{buildroot}/usr -WERROR=0 make -s -C tools/perf EXTRA_CFLAGS="-fPIE -rdynamic" DESTDIR=%{buildroot}/usr install NO_LIBTRACEEVENT=1 +WERROR=0 make -s -C tools/perf EXTRA_CFLAGS="-fPIE -fPIC -rdynamic" DESTDIR=%{buildroot}/usr install NO_LIBTRACEEVENT=1 rm -rf %{buildroot}/usr/etc rm -rf %{buildroot}/usr/lib/debug rm -rf %{buildroot}/usr/lib/perf -- 2.34.1