From ef61d801e04a689bc27a50846d0d3ab5a2758045 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Fri, 1 Nov 2019 10:17:15 +0900 Subject: [PATCH] packaging: replace -fPIC to -fPIE for perf executable Build issue for perf is from linking perf executable, so pie flag is suitabler than pic flag. Replace -fPIC to -fPIE for perf executable and add the flag to missed perf install part. Change-Id: I0911dc2b3ffc54724927846f5e081da9d7335c39 Suggested-by: Dongkyun Son Signed-off-by: Seung-Woo Kim --- packaging/linux-rpi3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/linux-rpi3.spec b/packaging/linux-rpi3.spec index 71a40a51792e..a103e18b3a4c 100644 --- a/packaging/linux-rpi3.spec +++ b/packaging/linux-rpi3.spec @@ -97,7 +97,7 @@ make modules %{?_smp_mflags} # 1-5. Build perf make -s -C tools/lib/traceevent %{?_smp_mflags} -make -s -C tools/perf EXTRA_CFLAGS=-fPIC %{?_smp_mflags} +make -s -C tools/perf EXTRA_CFLAGS="-fPIE -rdynamic" %{?_smp_mflags} %install QA_SKIP_BUILD_ROOT="DO_NOT_WANT"; export QA_SKIP_BUILD_ROOT @@ -131,7 +131,7 @@ install -m 644 rpi3/boot/fixup*.dat %{buildroot}/boot/ # 2-5. Install perf install -d %{buildroot}/usr -make -s -C tools/perf DESTDIR=%{buildroot}/usr install +make -s -C tools/perf EXTRA_CFLAGS="-fPIE -rdynamic" DESTDIR=%{buildroot}/usr install rm -rf %{buildroot}/usr/etc rm -rf %{buildroot}/usr/lib/debug rm -rf %{buildroot}/usr/share -- 2.34.1