From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105775 invoked by alias); 19 Sep 2017 14:27:05 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 105726 invoked by uid 89); 19 Sep 2017 14:27:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=Including, HTo:U*chh, H*Ad:U*chh, Hx-languages-length:1397 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Sep 2017 14:27:03 +0000 Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 13A88302BB21; Tue, 19 Sep 2017 16:27:02 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 03CA4422D6FE; Tue, 19 Sep 2017 16:27:01 +0200 (CEST) Message-ID: <1505831221.16945.50.camel@klomp.org> Subject: Re: Compile elfutils with Clang From: Mark Wielaard To: Dmitry Golovin , chh@google.com, elfutils-devel@sourceware.org Date: Tue, 19 Sep 2017 14:27:00 -0000 In-Reply-To: <507611504954373@web45o.yandex.ru> References: <507611504954373@web45o.yandex.ru> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2017-q3/txt/msg00117.txt.bz2 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=3Dgnu99 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=20 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