Fix build error at 64bit env accepted/tizen/6.5/base/tool/20211027.121120 accepted/tizen/base/tool/20210104.040446 submit/tizen_6.5_base/20211026.180901 submit/tizen_6.5_base/20211027.183101 submit/tizen_6.5_base/20211027.201101 submit/tizen_base/20201228.003322 submit/tizen_base/20201229.214727 tizen_6.5.m2_release
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 24 Dec 2020 04:51:12 +0000 (13:51 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 28 Dec 2020 00:32:58 +0000 (09:32 +0900)
[   94s] /usr/lib64/gcc/aarch64-tizen-linux-gnu/9.2.0/../../../../aarch64-tizen-linux-gnu/bin/ld: lzmadec-xzdec.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `__stack_chk_guard@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC

Change-Id: I924eb664e6df6b92d3dde127740da577df91f849
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
packaging/xz.spec

index 8d9191a..f62584e 100644 (file)
@@ -65,8 +65,6 @@ cp %{SOURCE1001} .
 %{__patch} -p1 < %{SOURCE10}
 
 %build
-export CFLAGS="${CFLAGS} -fPIC"
-
 %if %{do_profiling}
 profiledir=$(mktemp -d)
 trap "rm -rf $profiledir" EXIT
@@ -76,13 +74,18 @@ export CFLAGS="%{optflags} %{cflags_profile_generate}=$profiledir"
 %if "%{asan}" == "1"
 export PTHREAD_LIBS=" -lpthread "
 %endif
+export CFLAGS+=" -fPIC"
 
 %configure --disable-static --with-pic --docdir=%{_docdir}/%{name}
 %__make %{?_smp_mflags}
+
 %if %{do_profiling}
 time %__make check
 %__make clean
+
 export CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir -Wno-coverage-mismatch"
+export CFLAGS+=" -fPIC"
+
 %configure --disable-static --with-pic --docdir=%{_docdir}/%{name}
 %__make %{?_smp_mflags}
 %endif