[PATCH] Makeconfig: The hash character # confuses old make. Use _ as sed delimiter.

Florian Weimer fweimer@redhat.com
Mon Jul 21 18:40:02 GMT 2025


* Andreas K. Hüttel:

> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
> ---
> This is completely untested so far, but should be the ovious solution...
> Will give it a try as soon as I'm not on the train anymore.
> ---
>  Makeconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makeconfig b/Makeconfig
> index e29a2db058..ee8b90f8fc 100644
> --- a/Makeconfig
> +++ b/Makeconfig
> @@ -718,7 +718,7 @@ libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed
>  gnulib-arch =
>  gnulib = -lgcc $(gnulib-arch)
>  gnulib-tests := -lgcc $(libgcc_eh)
> -gnulib-extralibdir = $(shell $(CC) -print-file-name=libgcc_s.so$(libgcc_s.so-version) | sed 's#/[^/]*$$##')
> +gnulib-extralibdir = $(shell $(CC) -print-file-name=libgcc_s.so$(libgcc_s.so-version) | sed 's_/[^/]*$$__')
>  static-gnulib-arch =
>  # By default, elf/static-stubs.o, instead of -lgcc_eh, is used to
>  # statically link programs.  When --disable-shared is used, we use

I would still prefer

gnulib-extralibdir = $(shell dirname "`$(CC) -print-file-name=libgcc_s.so$(libgcc_s.so-version)`")

because it clarifies the intent.

Thanks,
Florian



More information about the Libc-alpha mailing list