mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-07-09 04:58:42 +08:00
By default all libraries and applications that can be dynamically linked
will be dynamically linked. You can override this behaviour by setting
the `COOKBOOK_PREFER_STATIC` environment variable. Note that if you
perviously did not use this flag, it might (most likely will) require a
complete userland sysroot recompilation.
It will look like this:
```bash
$ make clean
$ COOKBOOK_PREFER_STATIC=yes make image
```
For testing, the following will also work:
```bash
$ COOKBOOK_PREFER_STATIC=yes make cr.{PACKAGE_NAME} # obviously replace
# PACKAGE_NAME with
# the name of a package :)
```
Signed-off-by: Anhad Singh <andypython@protonmail.com>
41 lines
1.1 KiB
TOML
41 lines
1.1 KiB
TOML
[source]
|
|
tar = "https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz"
|
|
blake3 = "820b3b9fd3e2181bfb95475f01e9a3451e6d751e4f8c98ebcdcca1d8aa720f7f"
|
|
patches = [
|
|
"01_redox.patch"
|
|
]
|
|
script = """
|
|
DYNAMIC_INIT
|
|
cp ${COOKBOOK_HOST_SYSROOT}/share/aclocal/libtool.m4 ./m4/
|
|
cp ${COOKBOOK_HOST_SYSROOT}/share/aclocal/libtool.m4 ./libcharset/m4/
|
|
cp -fp ${COOKBOOK_HOST_SYSROOT}/share/libtool/build-aux/ltmain.sh ./build-aux/
|
|
cp -fp ${COOKBOOK_HOST_SYSROOT}/share/libtool/build-aux/ltmain.sh ./libcharset/build-aux/
|
|
cp ${COOKBOOK_HOST_SYSROOT}/share/aclocal/ltversion.m4 ./m4/
|
|
cp ${COOKBOOK_HOST_SYSROOT}/share/aclocal/ltversion.m4 ./libcharset/m4/
|
|
|
|
autotools_recursive_regenerate -I$(realpath ./m4) -I$(realpath ./srcm4)
|
|
"""
|
|
|
|
[build]
|
|
template = "custom"
|
|
script = """
|
|
DYNAMIC_INIT
|
|
COOKBOOK_CONFIGURE_FLAGS=(
|
|
--host="${GNU_TARGET}"
|
|
--prefix=""
|
|
ac_cv_have_decl_program_invocation_name=no
|
|
)
|
|
if [[ -n "$COOKBOOK_PREFER_STATIC" ]]; then
|
|
COOKBOOK_CONFIGURE_FLAGS+=(
|
|
--enable-static
|
|
--disable-shared
|
|
)
|
|
else
|
|
COOKBOOK_CONFIGURE_FLAGS+=(
|
|
--enable-shared
|
|
--enable-static
|
|
)
|
|
fi
|
|
cookbook_configure
|
|
"""
|