X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81FA53858C30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1707736394; bh=ZNA98kFUImFcIufdiiW34xhEatOWjfNEDRj8c3t8/gg=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=V2a1XO+iDhK7VTzbfuhj4wmN+4yloHtXXDaw0sF0Unva1oXDfwRBC24KnvGfEBFTq IDqvjYGGYj7IwNzX14HR3cyPG51y6P7dOSbCxucITIUSqO71R7lUVmnmLsDvn1gpcu fHlj0YgxqETCAqqJCflslX64rETDwqZpwsfBkB+M= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 679713858D32 Date: Mon, 12 Feb 2024 12:12:20 +0100 To: Christian Franke Subject: Re: Cygwin build from source is broken since binutils-2.42-1 Message-ID: Mail-Followup-To: Christian Franke , cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen , cygwin AT cygwin DOT com Content-Type: text/plain; charset="utf-8" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 41CBDGVJ020466 On Feb 12 11:10, Christian Franke via Cygwin wrote: > This is not a binutils regression: A build from cygwin 3.5.0-1 src package > or current newlib-cygwin git main (bfb68a9) with new binutils-2.42-1 fails > with: > > " > In file included from ../../../../winsup/utils/dumper.cc:23: > /usr/include/bfd.h:2748:1: error: expected initializer before > ‘ATTRIBUTE_WARN_UNUSED_RESULT’ > " > > Downgrading to binutils 2.41-3 fixes the problem. > > A diff of /usr/include/bsd.h shows that ATTRIBUTE_WARN_UNUSED_RESULT is a > new addition in 2.42-1. This requires /usr/include/ansidecl.h. It is > included by /usr/include/bsd.h but this has no effect because Cygwin source > tree provides its own ansidecl.h which lacks ATTRIBUTE_WARN_UNUSED_RESULT: > > $ g++ ....MANY_OPTIONS... -E ../../../../winsup/utils/dumper.cc > ... > # 1 "../../../../winsup/utils/dumper.cc" > ... > # 1 "../../../../winsup/../include/ansidecl.h" 1  <== #define _ANSIDECL_H > ... > # 1 "/usr/include/bfd.h" 1 3 4 > ... > # 1 "/usr/include/ansidecl.h" 1 3 4  <== #ifndef _ANSIDECL_H Did you try to copy over include/ansidecl.h from binutils master to newlib-cygwin's include/ansidecl.h? It looks like this does the trick, together with changing dumper.cc, because of: winsup/utils/dumper.cc:145:48: error: ‘PTR’ has not been declared 145 | print_section_name (bfd* abfd, asection* sect, PTR obj) | ^~~ Changing this to "void*" fixes the build for binutils 2.40 on Linux. Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple