live-bootstrap/steps/improve/musl_target.sh
Eduardo Sánchez Muñoz aa755b44fa Use i686-unknown-linux-musl target instead of i386-unknown-linux-musl
The Linux kernel is already built with CONFIG_M686=y, which suggests that the bootstrap is not supported on anything older thant i686. So, use i686 on userspace too. Some software, such as gettext, cmake or elfutils, has trouble building for i386 due to missing atomic intrinsics.

For example, building gettext 0.26 would fail with:

```
/usr/lib/i386-unknown-linux-musl/gcc/i386-unknown-linux-musl/13.3.0/../../../../../i386-unknown-linux-musl/bin/ld: /build/gettext-0.26_1/gettext-0.26/build/gettext-tools/gnulib-lib/.libs/libgettextlib.so: undefined reference to `__atomic_compare_exchange_4'
```
2025-08-18 15:35:09 +02:00

11 lines
294 B
Bash
Executable file

#!/bin/sh
# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
sed -i "/^LIBDIR/d" /steps/env
TARGET=i686-unknown-linux-musl
LIBDIR=${PREFIX}/lib/${TARGET}
echo "LIBDIR=${LIBDIR}" >> /steps/env
echo "TARGET=${TARGET}" >> /steps/env