public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Evgeny Vereshchagin <evvers@ya.ru>
Cc: elfutils-devel@sourceware.org
Subject: Re: [PATCH] build: allow turning off --no-undefined and -z,defs
Date: Sat, 04 Dec 2021 14:03:39 +0100	[thread overview]
Message-ID: <87czmcv7x0.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20211203053705.969283-1-evvers@ya.ru> (Evgeny Vereshchagin's message of "Fri, 3 Dec 2021 05:37:05 +0000")

* Evgeny Vereshchagin:

> ASan, UBSan and MSan provided by clang aren't compatible with --no-undefined and -z,defs:
> https://clang.llvm.org/docs/AddressSanitizer.html#usage
> https://github.com/google/sanitizers/issues/380
> so to build elfutils with clang with the sanitizers it should be possible
> to turn them off.
>
> Without this patch something like
>
> sed -i 's/^\(ZDEFS_LDFLAGS=\).*/\1/' configure.ac
> find -name Makefile.am | xargs sed -i 's/,--no-undefined//'
>
> should be used to make elfutils compile.
>
> The patch was tested in https://github.com/evverx/elfutils/pull/24 by
> compiling elfutils with both gcc and clang with and without ASan/UBsan
> and running `make check && make distcheck`. --no-undefined and -z,defs
> are still passed by default as expected.

Why isn't this a bug in the compiler driver?  Nowadays, GCC passes
-lasan if -fsanitize=address is used.  I think that's quite reasonable.

Thanks,
Florian


  reply	other threads:[~2021-12-04 13:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03  5:37 Evgeny Vereshchagin
2021-12-04 13:03 ` Florian Weimer [this message]
2021-12-03 14:17   ` [PATCH v2] " Evgeny Vereshchagin
2021-12-04 20:26     ` Mark Wielaard
2021-12-03 18:02       ` [PATCH v3] " Evgeny Vereshchagin
2021-12-05 15:50         ` Mark Wielaard
2021-12-05 16:52           ` Evgeny Vereshchagin
2021-12-08 15:29             ` Mark Wielaard
2021-12-08 19:15               ` Evgeny Vereshchagin

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=87czmcv7x0.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=evvers@ya.ru \
    /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).