Files
RedBear-OS/local/recipes/dev/binutils-native/recipe.toml
T
vasilito 5e5251cc95 binutils-native: drop the gcc13 dependency
gcc13 was still being built despite gcc-native/rust-native being
deferred, and it failed the whole build: binutils-native pulled it
transitively. It is the same dependency pattern already removed from
gcc-native -- what the recipe actually needs is a cross compiler, and
that comes from the prefix toolchain on PATH
(x86_64-unknown-redox-gcc, now 16.1.0), not from a cooked gcc13 package.

Keeping it meant building GCC 13 with GCC 16, which does not work: the
host link fails with the libstdc++ 128-bit float helpers unresolved
(__eqtf2/__getf2/__gttf2/__letf2/__unordtf2 against
/usr/lib/gcc/x86_64-pc-linux-gnu/16/libstdc++.so), a host/target libgcc
leak, and beyond that GCC 16 ICEs on GCC 13's libsupc++. See
local/docs/NATIVE-TOOLCHAIN-WORKSTREAM.md.

binutils-native cooks clean without it.
2026-08-03 19:56:36 +03:00

62 lines
2.0 KiB
TOML

# Native GNU Binutils 2.43.1 for Red Bear OS
# Produces binutils that RUN on x86_64-unknown-redox and TARGET x86_64-unknown-redox.
# Built via cross-compilation from host using the existing cross-compiler in prefix/.
[source]
same_as = "../../../../recipes/dev/binutils-gdb"
[build]
template = "custom"
dependencies = [
# gcc13 dropped: it drags the GCC 13 cross compiler into the graph, which
# no longer builds (GCC 16 ICEs compiling GCC 13's libsupc++ -- see
# local/docs/NATIVE-TOOLCHAIN-WORKSTREAM.md) and which nothing here needs.
# The cross compiler comes from the prefix toolchain on PATH,
# x86_64-unknown-redox-gcc, now 16.1.0. Same change already made to
# gcc-native.
"gnu-binutils",
"libgmp",
"libmpfr",
]
script = """
DYNAMIC_INIT
# Use the cross-compiler to produce native redox binaries
export CC="${GNU_TARGET}-gcc"
export CXX="${GNU_TARGET}-g++"
export AR="${GNU_TARGET}-ar"
export RANLIB="${GNU_TARGET}-ranlib"
# Configure for native compilation
COOKBOOK_CONFIGURE_FLAGS+=(
--host="${GNU_TARGET}"
--target="${GNU_TARGET}"
--prefix=/usr
--with-sysroot="${COOKBOOK_SYSROOT}"
--enable-default-hash-style=gnu
--disable-werror
--disable-nls
--disable-multilib
--disable-gdb
--disable-gdbserver
--disable-sim
)
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" all-binutils all-gas all-ld
"${COOKBOOK_MAKE}" install-binutils install-gas install-ld DESTDIR="${COOKBOOK_STAGE}"
# Native binutils don't need the target prefix - provide unprefixed links
for tool in ar as ld nm objcopy objdump ranlib readelf size strings strip; do
if [ -f "${COOKBOOK_STAGE}/usr/bin/${GNU_TARGET}-${tool}" ]; then
ln -sf "${GNU_TARGET}-${tool}" "${COOKBOOK_STAGE}/usr/bin/${tool}"
fi
done
# Remove libtool archives
rm -f "${COOKBOOK_STAGE}"/usr/lib/*.la
"""
[package]
description = "Native GNU Binutils 2.43.1 for Red Bear OS (runs on redox, targets redox)"