This is the mail archive of the
mailing list for the elfutils project.
Re: Compile elfutils with Clang
- From: Mark Wielaard <mark at klomp dot org>
- To: Dmitry Golovin <dima at golovin dot in>, chh at google dot com, elfutils-devel at sourceware dot org
- Date: Tue, 19 Sep 2017 16:27:01 +0200
- Subject: Re: Compile elfutils with Clang
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org>
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
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.