mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-21 20:34:17 +08:00
48 lines
1.4 KiB
TOML
48 lines
1.4 KiB
TOML
[source]
|
|
tar = "https://gitlab.redox-os.org/redox-os/gcc/-/archive/redox-13.2.0/gcc-redox-13.2.0.tar.gz"
|
|
script = """
|
|
DYNAMIC_INIT
|
|
COOKBOOK_AUTORECONF=autoreconf2.69 autotools_recursive_regenerate -I"$(realpath ./config)"
|
|
cp -fpv "${COOKBOOK_HOST_SYSROOT}"/share/libtool/build-aux/{config.sub,config.guess,install-sh} libiberty/
|
|
"""
|
|
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"libgmp",
|
|
"libmpfr",
|
|
"mpc",
|
|
"zlib"
|
|
]
|
|
script = """
|
|
DYNAMIC_INIT
|
|
|
|
mkdir -p "${COOKBOOK_SYSROOT}/usr"
|
|
ln -sf "${COOKBOOK_SYSROOT}/include" "${COOKBOOK_SYSROOT}/usr/include"
|
|
ln -sf "${COOKBOOK_SYSROOT}/lib" "${COOKBOOK_SYSROOT}/usr/lib"
|
|
|
|
COOKBOOK_CONFIGURE_FLAGS+=(
|
|
--target="${GNU_TARGET}"
|
|
--with-sysroot=/
|
|
--with-build-sysroot="${COOKBOOK_SYSROOT}"
|
|
--enable-languages=c,c++,lto
|
|
--enable-initfini-array
|
|
--disable-multilib
|
|
--with-system-zlib
|
|
--enable-host-shared
|
|
--with-bugurl="https://gitlab.redox-os.org/redox-os/gcc/-/issues"
|
|
)
|
|
|
|
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
|
|
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" all-gcc all-target-libgcc all-target-libstdc++-v3
|
|
"${COOKBOOK_MAKE}" install-gcc install-target-libgcc install-target-libstdc++-v3 DESTDIR="${COOKBOOK_STAGE}"
|
|
ln -s "gcc" "${COOKBOOK_STAGE}/usr/bin/cc"
|
|
# Avoid conflict with libgcc & libstdcxx
|
|
rm -f "${COOKBOOK_STAGE}"/usr/lib/libgcc_s.so* "${COOKBOOK_STAGE}"/usr/lib/libstdc++.so*
|
|
"""
|
|
|
|
[package]
|
|
dependencies = [
|
|
"gnu-binutils"
|
|
]
|