package/flatbuffers: build position independent code

The upcoming tensorflow-lite package requires flatbuffers to be
built with position independent code.

Fixes:
/home/buildroot/buildroot/output/per-package/tensorflow-lite/host/bin/../lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: /home/buildroot/buildroot/output/per-package/tensorflow-lite/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libflatbuffers.a(util.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZN11flatbuffers11CharToUpperEc' which may bind externally can not be used when making a shared object; recompile with -fPIC

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
James Hilliard 2023-01-27 07:10:46 -07:00 committed by Yann E. MORIN
parent e9fb89785b
commit 730e50f520

View File

@ -14,6 +14,7 @@ FLATBUFFERS_DEPENDENCIES = host-flatbuffers
FLATBUFFERS_CONF_OPTS += \
-DCMAKE_CXX_FLAGS="-std=c++11" \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DFLATBUFFERS_BUILD_TESTS=OFF \
-DFLATBUFFERS_FLATC_EXECUTABLE=$(HOST_DIR)/bin/flatc