[PATCH v2] Makeconfig: The hash character # confuses old make, use $(dir instead of sed
Collin Funk
collin.funk1@gmail.com
Mon Jul 21 22:49:47 GMT 2025
Andreas K. Hüttel <dilfridge@gentoo.org> writes:
> Up to Make 4.2, # is treated as the start of a comment even in
> function invocations. This leads to a syntax error. Fixed in Make 4.3,
> but we still support versions back to 4.0 at the moment.
>
> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
> ---
> As suggested by Andreas Schwab. Untested by me so far, will poke it
> tomorrow in various environments.
> ---
> Makeconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makeconfig b/Makeconfig
> index e29a2db058..7102d922b2 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 = $(dir $(shell $(CC) -print-file-name=libgcc_s.so$(libgcc_s.so-version)))
> 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
Tested this version with Make 4.4.1 and Make 4.2 it it works as well.
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
Collin
More information about the Libc-alpha
mailing list