Ricardo Wurmus <rek...@elephly.net> writes: > For binaries (like emacs) we’d still create shell wrappers where needed, > because it’s harder to do this natively.
You could link in a constructor function to replace a wrapper that just sets the environment, couldn't you? I've done that at times and it allows you to run gdb directly, for instance. How easy it is presumably depends on how the program is built, e.g. autoconf LIBS. If it's difficult to separate configure and build, you can use a dummy linker script at configure time.