public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Dmitry Golovin <dima@golovin.in>,
	chh@google.com, 	elfutils-devel@sourceware.org
Subject: Re: Compile elfutils with Clang
Date: Tue, 19 Sep 2017 14:27:00 -0000	[thread overview]
Message-ID: <1505831221.16945.50.camel@klomp.org> (raw)
In-Reply-To: <507611504954373@web45o.yandex.ru>

Hi Dmitry,

On Sat, 2017-09-09 at 13:52 +0300, Dmitry Golovin wrote:
> I've been trying to compile elfutils with clang for a while now and
> I'm wondering maybe someone else is also working on it?
> I found some useful patches written by Chih-Hung Hsieh, but they seem
> to be written over 2 years ago and not maintained.
> Is there a fork or a branch of elfutils that can be compiled with
> clang?

The problem with clang is that it claims to implement -std=gnu99 but
doesn't really. We now have a configure check to make sure the features
used in the code base are actually supported by the compiler. So as
soon as clang gets the needed features it should just work.

Various people have worked on supporting clang as compiler, but it is a
lot of work and nobody succeeded doing it without making the code much 
harder to maintain. But in general elfutils patches to clean up the
code and support alternative compilers (or linkers, libc, kernels,
etc.) are accepted and integrated as long as they improve the code base
and don't make it hard to maintain. But the first target of elfutils is
a normal GNU/Linux system.

You might want to look at the mailinglist archives to find various
attempts. Including a discussion of replacing nested functions with
blocks. Which wasn't accepted because nobody seemed to believe it
actually improved the code.

Cheers,

Mark

      parent reply	other threads:[~2017-09-19 14:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-09 10:53 Dmitry Golovin
     [not found] ` <CAEk9T_1jS-JmN6Ef+5ncsGodgK4oT7FwAu9C5PZCgoPJFPhcNg@mail.gmail.com>
2017-09-12 13:09   ` Dmitry Golovin
2017-09-12 14:32     ` Ulf Hermann
2017-09-12 15:25       ` Dmitry Golovin
2017-09-19 14:27 ` Mark Wielaard [this message]

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=1505831221.16945.50.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=chh@google.com \
    --cc=dima@golovin.in \
    --cc=elfutils-devel@sourceware.org \
    /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).