On Thu, Apr 04, 2024 at 07:50:40PM +0000, Thorsten Glaser wrote:
> Szabolcs Nagy dixit:
> 
> >the next culprit is gcc (each target can have their own
> 
> gcc-13_13.2.0-23
> 
> >static pie specs) or the way you invoked gcc (not visible
> 
> As I wrote earlier, though with more flags. Dropping all the -D…
> and -W… and -I… and other irrelevant ones:
> 
> musl-gcc -Os -g -fPIE -fno-lto -fno-asynchronous-unwind-tables
>     -fno-strict-aliasing -fstack-protector-strong -fwrapv -c …
> musl-gcc -Os -g -fPIE -fno-lto -fno-asynchronous-unwind-tables
>     -fno-strict-aliasing -fstack-protector-strong -fwrapv
>     -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -static -static-pie
>     -fno-lto -o mksh  *.o
> 
> Same for both. You can see the full log by activating the
> [64]Installed and [71]Installed links respectively on
> https://buildd.debian.org/status/package.php?p=mksh and
> skipping to 'compilation of mksh in static-musl' to get to
> the beginning of the configure phase for that.
> 
> >are you sure static pie works on these targets?
> 
> No ;-) That’s why I reported this issue. I had just
> enabled it for the musl builds, as the security people
> like that more than normal static.

I seem to recall the musl-gcc wrapper does not handle static-pie
right. A real cross toolchain should. If there's an easy fix for the
wrapper I'd be happy to merge it.

Rich

Reply via email to