From 46251ced0fc88782cb4eeadaff33b3927d013d24 Mon Sep 17 00:00:00 2001 From: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com> Date: Mon, 29 Apr 2024 12:39:19 -0700 Subject: [PATCH] fix: sysroot build libraries with position independent code (#174) This was affecting mainly the static Fortran linking, which required -fpic or -fPIC to work. --- sysroot/configure.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysroot/configure.sh b/sysroot/configure.sh index 4520380..2f50382 100755 --- a/sysroot/configure.sh +++ b/sysroot/configure.sh @@ -24,6 +24,7 @@ args=() if [[ "${ARCH}" == "aarch64" ]]; then readonly target="aarch64-linux" args+=( + --with-pic --build=x86_64-linux-gnu --target="${target}" ) @@ -39,6 +40,7 @@ if [[ "${ARCH}" == "aarch64" ]]; then elif [[ "${ARCH}" == "armv7" ]]; then readonly target="arm-linux-gnueabihf" args+=( + --with-pic --build=x86_64-linux-gnu --target="${target}" --with-arch=armv7-a @@ -58,6 +60,7 @@ elif [[ "${ARCH}" == "armv7" ]]; then elif [[ "${ARCH}" == "x86_64" ]]; then readonly target="x86_64-linux" args+=( + --with-pic --build=x86_64-linux-gnu --host="${target}" --target="${target}"