From dc670b2621045da744f1408dcf64f3f9a6108fe0 Mon Sep 17 00:00:00 2001 From: Xiaofeng Meng Date: Wed, 3 Dec 2025 09:57:18 +0100 Subject: [PATCH] quickjs: added fPIC flag --- quickjs/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quickjs/Makefile b/quickjs/Makefile index fd9afd4de..d5388785d 100644 --- a/quickjs/Makefile +++ b/quickjs/Makefile @@ -35,6 +35,10 @@ MAKE_FLAGS = \ EXTRA_LIBS="-latomic" \ CROSS_PREFIX="$(TARGET_CROSS)" +# Ensure the static library is built with position independent code so it can +# be linked into shared objects. +TARGET_CFLAGS += -fPIC + define Build/Compile # The upstream Makefile uses the same CFLAGS for host and target builds, # which breaks cross-compilation. We work around this by first building