From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 86DF33854802; Thu, 7 Jan 2021 20:07:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86DF33854802 From: "mikpelinux at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/98590] New: [11 regression] Bootstrap failure with Ada on Cygwin since switch to C++11 Date: Thu, 07 Jan 2021 20:07:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mikpelinux at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2021 20:07:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98590 Bug ID: 98590 Summary: [11 regression] Bootstrap failure with Ada on Cygwin since switch to C++11 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: mikpelinux at gmail dot com Target Milestone: --- Attempting to bootstrap gcc-11-20210103 with Ada on x86_64-pc-cygwin fails with: g++ -std=3Dc++11 -fno-PIE -c -DIN_GCC_FRONTEND -g -DIN_GCC -fno-excep= tions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-stri= ngs -Wcast-qual -Wno-error=3Dformat-diag -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -Iada -I/tmp/gcc-11-20210103/= gcc -I/tmp/gcc-11-20210103/gcc/ada -I/tmp/gcc-11-20210103/gcc/../include -I/tmp/gcc-11-20210103/gcc/../libcpp/include -I/tmp/gcc-11-20210103/gcc/../libcody -I/home/mikpe/pkgs/cygwin-x86_64/gmp-6.2.1/include -I/home/mikpe/pkgs/cygwin-x86_64/mpfr-4.1.0/include -I/home/mikpe/pkgs/cygwin-x86_64/mpc-1.2.1/include=20 -I/tmp/gcc-11-20210103/gcc/../libdecnumber -I/tmp/gcc-11-20210103/gcc/../libdecnumber/bid -I../libdecnumber -I/tmp/gcc-11-20210103/gcc/../libbacktrace -o ada/cstreams.o -MT ada/cstreams.o -MMD -MP -MF ada/.deps/cstreams.TPo /tmp/gcc-11-20210103/gcc/ada/cstreams.c In file included from /tmp/gcc-11-20210103/gcc/ada/cstreams.c:59: /tmp/gcc-11-20210103/gcc/ada/cstreams.c: In function 'int __gnat_fileno(FILE*)': /tmp/gcc-11-20210103/gcc/system.h:122:26: error: 'fileno_unlocked' was not declared in this scope; did you mean 'fopen_unlocked'? 122 | # define fileno(Stream) fileno_unlocked (Stream) | ^~~~~~~~~~~~~~~ /tmp/gcc-11-20210103/gcc/ada/cstreams.c:117:12: note: in expansion of macro 'fileno' 117 | return (fileno (stream)); | ^~~~~~ make[3]: *** [Makefile:1131: ada/cstreams.o] Error 1 make[3]: Leaving directory '/tmp/objdir/gcc' make[2]: *** [Makefile:4778: all-stage1-gcc] Error 2 make[2]: Leaving directory '/tmp/objdir' make[1]: *** [Makefile:22181: stage1-bubble] Error 2 make[1]: Leaving directory '/tmp/objdir' make: *** [Makefile:22518: bootstrap] Error 2 GCC 7/8/9/10 all bootstrap fine with Ada (if a pending patch for PR94918 is applied). A git bisect identified that this error started when GCC 11 switc= hed to requiring C++11 during bootstrap: # first bad commit: [5329b59a2e13dabbe2038af0fe2e3cf5fc7f98ed] bootstrap: Update requirement to C++11. Cygwin's only declares fileno_unlocked() if _GNU_SOURCE or simila= r is defined. With g++ -std=3Dc++11 or gcc -std=3Dc11 the function is _not_ decl= ared, but if the -std=3D option is omitted or changed to a GNU dialect then the function is declared. For some reason however the configure checks for fileno_unlocked all succee= ded: > fgrep fileno_unlocked build.log checking for fileno_unlocked... yes checking whether fileno_unlocked is declared... yes checking for fileno_unlocked... yes checking whether fileno_unlocked is declared... yes checking for fileno_unlocked... yes checking whether fileno_unlocked is declared... yes checking for fileno_unlocked... yes checking whether fileno_unlocked is declared... yes and left the generated config.h and auto-host.h files declaring it: > grep -F -r HAVE_FILENO_UNLOCKED --include=3D"*.h" . ./build-x86_64-pc-cygwin/fixincludes/config.h:#define HAVE_FILENO_UNLOCKED 1 ./build-x86_64-pc-cygwin/libcpp/config.h:#define HAVE_FILENO_UNLOCKED 1 ./gcc/auto-host.h:#define HAVE_FILENO_UNLOCKED 1 ./libcpp/config.h:#define HAVE_FILENO_UNLOCKED 1 Seems there's a discrepancy between the configure tests and what GCC proper does, leading to a reference to an undefined symbol.=