feat(cookbook): auxiliary dynamic linking functions

Signed-off-by: Anhad Singh <andypython@protonmail.com>
This commit is contained in:
Anhad Singh 2024-12-02 23:30:51 +11:00
parent 1cbf60d426
commit 584a94fb24
No known key found for this signature in database
GPG Key ID: 80E0357347554B89

View File

@ -610,6 +610,28 @@ function cookbook_configure {
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}"
"${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}"
}
function DYNAMIC_INIT {
echo "WARN: Program is being compiled dynamically."
COOKBOOK_CONFIGURE_FLAGS=(
--host="${GNU_TARGET}"
--prefix=""
--enable-shared
--disable-static
)
# TODO: check paths for spaces
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib"
autotools_recursive_regenerate() {
for f in $(find . -name configure.ac -o -name configure.in -type f | sort); do
echo "* autotools regenerate in '$(dirname $f)'..."
( cd "$(dirname "$f")" && autoreconf -fvi "$@" -I${COOKBOOK_HOST_SYSROOT}/share/aclocal )
done
}
}
"#;
let post_script = r#"# Common post script