From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 57E683858421; Thu, 6 Jan 2022 16:55:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57E683858421 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/100017] [11/12 regression] error: 'fenv_t' has not been declared in '::' -- canadian compilation fails Date: Thu, 06 Jan 2022 16:55:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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, 06 Jan 2022 16:55:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100017 --- Comment #57 from Jakub Jelinek --- I don't see how the patch could be correct. Looking at RAW_CXX_FOR_TARGET in configure, I see: (starting with the line you're proposing to change): RAW_CXX_FOR_TARGET=3D"$CXX_FOR_TARGET" ... { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target = c++ for libstdc++" >&5 $as_echo_n "checking where to find the target c++ for libstdc++... " >&6; } if test "x${build}" !=3D "x${host}" ; then if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then # We already found the complete path ac_dir=3D`dirname $RAW_CXX_FOR_TARGET` { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_d= ir" >&5 $as_echo "pre-installed in $ac_dir" >&6; } else # Canadian cross, just use what we found { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5 $as_echo "pre-installed" >&6; } fi else So, if CXX_FOR_TARGET starts with /, e.g. /opt/gcc-11.1/bin/g++ , then the above will use dirname /opt/gcc-11.1/bin/g++ and set ac_dir to /opt/gcc-11.1/bin But with the proposed change, $RAW_CXX_FOR_TARGET will be /opt/gcc-11.1/bin= /g++ -nostdinc++ and dirname will fail miserably and not set ac_dir to anything: dirname /opt/gcc-11.1/bin/g++ -nostdinc++ dirname: invalid option -- 'n' Try 'dirname --help' for more information.=