From: Jakub Jelinek <jakub@redhat.com>
To: Rainer Orth <ro@cebitec.uni-bielefeld.de>
Cc: gcc-patches@gcc.gnu.org, Ian Lance Taylor <iant@google.com>
Subject: Re: [PATCH] libbacktrace: Avoid GNU ld --compress-debug-sections=zlib-gabi
Date: Tue, 23 Apr 2024 16:18:49 +0200 [thread overview]
Message-ID: <ZifDSX6IqE8j0l6N@tucnak> (raw)
In-Reply-To: <yddbk605g4s.fsf@CeBiTec.Uni-Bielefeld.DE>
On Tue, Apr 23, 2024 at 04:05:07PM +0200, Rainer Orth wrote:
> I noticed that libbacktrace make check FAILs on Solaris with the native
> ld already when building the tests:
>
> libtool: link: /var/gcc/regression/master/11.4-gcc/build/./gcc/xgcc -B/var/gcc/r
> egression/master/11.4-gcc/build/./gcc/ -B/vol/gcc/sparc-sun-solaris2.11/bin/ -B/
> vol/gcc/sparc-sun-solaris2.11/lib/ -isystem /vol/gcc/sparc-sun-solaris2.11/inclu
> de -isystem /vol/gcc/sparc-sun-solaris2.11/sys-include -fchecking=1 -funwind-tab
> les -frandom-seed=ctesta_alloc -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmi
> ssing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -
> Werror -g -g -O2 -Wl,--compress-debug-sections=zlib-gabi -o ctesta_alloc ctesta_
> alloc-btest.o ctesta_alloc-testlib.o ./.libs/libbacktrace_alloc.a
> ld: fatal: unrecognized '--compress-debug-sections' cmp-type: zlib-gabi
> collect2: error: ld returned 1 exit status
> make[1]: *** [Makefile:1379: ctesta_alloc] Error 1
>
> Solaris ld only supports --compress-debug-sections=zlib, while GNU ld
> allows zlib-gabi as an alias for zlib. gold is the same, it seems,
> while lld doesn't support zlib-gabi at all.
>
> Therefore the patch uses zlib instead.
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?
Jakub
next prev parent reply other threads:[~2024-04-23 14:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 14:05 Rainer Orth
2024-04-23 14:18 ` Jakub Jelinek [this message]
2024-04-23 14:24 ` Jakub Jelinek
2024-04-23 17:04 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZifDSX6IqE8j0l6N@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=iant@google.com \
--cc=ro@cebitec.uni-bielefeld.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).