mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-04-21 13:57:16 +00:00

The project's static libraries are not compiled with the -fPIC compiler flag. This prevents dynamic libraries to link against those libraries. This commit adds a patch that sets the -fPIC compiler flag to the list of CFLAGS/CXXFLAGS. The project now generates position independant code for all of its outputs (i.e. not limited anymore to its shared libraries). Fixes: /home/gportay/src/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-amd-linux-gnu/6.2.0/../../../../x86_64-amd-linux-gnu/bin/ld: /home/gportay/src/buildroot/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libmemenv.a(memenv.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC /home/gportay/src/buildroot/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libmemenv.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status Signed-off-by: Gaël PORTAY <gael.portay@collabora.com> [Arnout: renumber patch] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> (cherry picked from commit 088f261dbb89bb48a918a3153f293b86708c8a58) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>