[Clfs-dev] Could not compile dropbear 2022.83 on i486-linux-musl
Michele Bucca
michele.bucca at gmail.com
Thu Oct 30 04:28:11 PDT 2025
Il giorno mer 21 ago 2024 alle ore 08:57 William Harrington
<kb0iic at berzerkula.org> ha scritto:
>
> On Tue, 20 Aug 2024 17:17:12 +0000 (UTC)
> Alexander Jacocks <jjacocks at mac.com> wrote:
>
> > On Sun Mar 24 17:06:55 PDT 2024 Michele Bucca <michele.bucca at gmail.com > wrote: > Ok, it seems that if the i486-linux-musl toolchain is built you can't > use -fstack-protector-all > https://github.com/GregorR/musl-cross/issues/45 > > So we have two solutions to build dropbear: > 1. We patch GCC by applying this: > https://git.alpinelinux.org/aports/tree/main/gcc/0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch > > 2. We disable stack protections by prepending CFLAGS="$CFLAGS > -fno-stack-protector" to configure > > Which one is better? IMO, the first. Unless it adds a ton of overhead, might as well. - Alex (I'm new here, as well)
>
> Does version 2024.85 have the same issue with musl?
>
In the end I've solved the issue by taking a look at alpine's
repository. Looking at the dropbear and musl's
APKBUILD file.
The build proces of dropbear is pretty normal, but if we take a look
at musl's APKBUILD we can see this:
> # provide minimal libssp_nonshared.a so we don't need libssp from gcc
> ${CROSS_COMPILE}cc $CFLAGS -c "$srcdir"/__stack_chk_fail_local.c -o __stack_chk_fail_local.o
> ${CROSS_COMPILE}ar r libssp_nonshared.a __stack_chk_fail_local.o
I've added these command to my new version of the book. It's still in
its early stage:
https://michele13.github.io/clfs-sphinx/latest/cross-tools/common/libc.html#installation-of-libssp-nonshared-a
Michele Bucca
More information about the Clfs-dev
mailing list