From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8937 invoked by alias); 4 Sep 2019 15:49:53 -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 8824 invoked by uid 48); 4 Sep 2019 15:49:41 -0000 From: "mark at klomp dot org" To: elfutils-devel@sourceware.org Subject: [Bug general/24964] elfutils fails to configure/build on CC=clang: configure: error: gcc with GNU99 support required Date: Wed, 04 Sep 2019 15:49:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: general X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2019-q3/txt/msg00174.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24964 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at klomp dot org --- Comment #1 from Mark Wielaard --- (In reply to Sergei Trofimovich from comment #0) > People use clang more and more as their default C compiler and rediscover > that elfutils does not build against clang. Downstream bug reports: > https://bugzilla.redhat.com/show_bug.cgi?id=3D1211357 > https://bugs.gentoo.org/685688 >=20 > elfutils fails on latest git tree and recent releases: >=20 > $ ./configure CC=3Dclang CXX=3Dclang++ > ... > checking for gcc with GNU99 support... no > configure: error: gcc with GNU99 support required The configure check is correct. It was added because clang claims to support -std=3Dgnu99 but doesn't really do that. So otherwise you would get (obscur= e) compile failures. Really this is a clang bug, it simply has to implement the various GNU extensions it claims to support. See the comment in the configure.ac file that explain what is being checked: # We use -std=3Dgnu99 but have explicit checks for some language constructs # and GNU extensions since some compilers claim GNU99 support, but don't # really support all language extensions. In particular we need # Mixed Declarations and Code # https://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html # Nested Functions # https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html # Arrays of Variable Length # https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html > Posting here some past iterations of the patches: > https://sourceware.org/ml/elfutils-devel/imported/msg02830.html yes, there were about 20 patches, that tried to rework code to work around clang deficiencies. Those have been accepted and incorporated. But more work would be needed. Patches welcome. --=20 You are receiving this mail because: You are on the CC list for the bug.