Date: Sat, 7 Oct 2017 21:24:05 +0300 From: Guy Yur <guyyur@gmail.com> To: freebsd-arm <freebsd-arm@freebsd.org> Subject: armv7, building p7zip and -fPIC Message-ID: <CAC67Hz8kctZyTEW%2B0qQRVYLzPEK7cG9JXhw90fwHx84fnuwO0w@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi, Does armv7 need -fPIC when compiling? Building archivers/p7zip fails with: /usr/bin/ld: 7zEncode.o(.text+0x2d04): unresolvable R_ARM_MOVW_ABS_NC relocation against symbol `_ZTIi@@CXXABI_1.3' /usr/bin/ld: final link failed: Nonrepresentable section on output c++: error: linker command failed with exit code 1 (use -v to see invocation) *** [../../../../bin/7z.so] Error code 1 make[3]: stopped in /usr/wrkdir/usr/ports/archivers/p7zip/work/p7zip_16.02/CPP/7zip/Bundles/Format7zFree 1 error If I add "CFLAGS_armv7= -fPIC" in the port Makefile it builds fine. The port has -fPIC for aarch64, amd64, powerpc and sparc64. Is it a difference from armv6? When I previously built for armv6 it worked without the option. Thanks, Guy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAC67Hz8kctZyTEW%2B0qQRVYLzPEK7cG9JXhw90fwHx84fnuwO0w>