On Tue, Apr 23, 2024 at 04:18:49PM +0200, Jakub Jelinek wrote:
> Then you have two tests (ctestg and ctesta) doing exactly the same thing,
> that can't be right.
> I guess it might be fine to use zlib when it is an alias to zlib-gabi,
> but zlib-gnu shouldn't be replaced.
> 
> I must say I don't really understand the patch though, because configury
> checks
> AC_CACHE_CHECK([whether --compress-debug-sections is supported],
> [libgo_cv_ld_compress],
> [LDFLAGS_hold=$LDFLAGS
> LDFLAGS="$LDFLAGS -Wl,--compress-debug-sections=zlib-gnu"
> AC_LINK_IFELSE([AC_LANG_PROGRAM(,)],
> [libgo_cv_ld_compress=yes],
> [libgo_cv_ld_compress=no])
> LDFLAGS=$LDFLAGS_hold])
> AM_CONDITIONAL(HAVE_COMPRESSED_DEBUG, test "$libgo_cv_ld_compress" = yes)
> 
> So, if Solaris doesn't support --compress-debug-sections=zlib-gnu, it
> shouldn't be tested.  Or does it support zlib-gnu and zlib?

What we could do is drop the HAVE_COMPRESSED_DEBUG stuff altogether, and
instead similarly how we have HAVE_COMPRESSED_DEBUG_ZSTD have
HAVE_COMPRESSED_DEBUG_{ZLIB,ZLIB_GABI,ZLIB_GNU} and for each of those
if linker supports them test with that corresponding flag.

        Jakub

Reply via email to