From 1a421866df009aa6c06fb860891a85ae92c32a72 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Thu, 31 Oct 2019 12:42:36 +0900 Subject: [PATCH] packaging: Add -fPIC flag to perf build cflags Current Tizen build environment requires -fPIC with relocation and without the flag, there is build error for perf like below: armv7l armv7l-tizen-linux-gnueabi/bin/ld: perf-in.o: relocation R_ARM_MOVW_ABS_NC against `__stack_chk_guard' can not be used when making a shared object; recompile with -fPIC aarch64 aarch64-tizen-linux-gnu/bin/ld: perf-in.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `__stack_chk_guard@@GLIBC_2.17' can not be used when making a shared object; recompile with -fPIC aarch64-tizen-linux-gnu/bin/ld: perf-in.o(.text+0x4): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `__stack_chk_guard@@GLIBC_2.17' Add -fPIC flag to perf build. Change-Id: Icca04801698c88180dfde493a3ef92e5c01612b5 Signed-off-by: Seung-Woo Kim --- packaging/linux-rpi3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/linux-rpi3.spec b/packaging/linux-rpi3.spec index ed7aae01c0be..71a40a51792e 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 %{?_smp_mflags} +make -s -C tools/perf EXTRA_CFLAGS=-fPIC %{?_smp_mflags} %install QA_SKIP_BUILD_ROOT="DO_NOT_WANT"; export QA_SKIP_BUILD_ROOT -- 2.34.1