Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.BSM.4.64L.2603112258370.15418@herc.mirbsd.org>
Date: Wed, 11 Mar 2026 23:01:16 +0000 (UTC)
From: Thorsten Glaser <tg@...bsd.de>
To: musl@...ts.openwall.com
Subject: Re: Path for deploying clang on glibc systems

Szabolcs Nagy dixit:

>i think for a toolchain (2) with wrapper script should work:
>
>exec path/ld.so path/$(basename "$0") "$@"
>
>has a tiny wrapper overhead and may need --path ldpath setting.
>issues: if the binary tries to self re-exec, argv[0] is the

In this case:

- build mksh statically linked against musl
- use 'exec -a "$0" path/ld.so path/"${0##*/}" "$@"'

(the "${0##*/}" obliviates the need for basename(1) and is
generally applicable)

A statically-linked mksh also has less overhead than #!/bin/sh ;)
runtime anyway.

bye,
//mirabilos
-- 
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.