[Toybox] "landley" in binaries

Rob Landley rob at landley.net
Wed Jan 28 14:21:38 PST 2026


On 1/26/26 13:00, enh wrote:
> i assume you've already come across
> `-fdebug-prefix-map=/proc/self/cwd=`

I had not!

> and there's some reason you can't
> inject that into your toolchain builds?

In theory I can just throw a "cd /proc/self/cwd" into 
scripts/mcm-buildall.sh...

I'm trying to get away from that and use a cross linux from scratch 
style toolchain build (they added support for gcc 15.1 but did NOT add 
support for musl-1.2, but my city got invaded by the SS recently, which 
has been a bit of a drain on available spoons. ELC is here in 
minneapolis in may assuming there still is one by then, and the talk 
proposal deadline's the 8th. Trying to scrape up the enthusiasm to do a 
couple proposals...)

> this is what we use in Android
> builds, primarily as a build hermeticity/OTA diff reduction strategy:
> https://source.android.com/docs/core/ota/reduce_size#build_directory

I'm all for it.

Alas, trying the naieve cd /proc/self/cwd thing didn't work because both 
/proc/self and the cwd under it change dynamically and thus subprocesses 
got really confused. It works with /proc/$$/cwd but alas that's not a 
stable path between builds. (Less bad than gnu/dammit leaking an 
arbitrary build directory into the resulting binaries because gnu, but 
still...)

Trying to feed the above build flag into five nested package builds 
(gcc, binutils, gmp, mpc, and mpfr) sounds unpleasant even before you 
get to the "and we recursively call ourselves in subdirectories" 
shenanigans of autoconf and gmake, but lemme see what I can do. (I can 
grep for "landley" in the resulting binaries is a good check, I guess...)

Thanks for the heads up,

Rob


More information about the Toybox mailing list