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