https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017
--- Comment #59 from cqwrteur <unlvsur at live dot com> --- (In reply to Jakub Jelinek from comment #57) > 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="$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}" != "x${host}" ; then > if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then > # We already found the complete path > ac_dir=`dirname $RAW_CXX_FOR_TARGET` > { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in > $ac_dir" >&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. So is this just an issue to libstdc++'s configure script only? Why the autotool fails to find header files?