From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4045 invoked by alias); 3 Jan 2011 14:46:14 -0000 Received: (qmail 4036 invoked by uid 22791); 3 Jan 2011 14:46:13 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Jan 2011 14:46:08 +0000 From: "ktietz at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/47145] [4.6 Regression] cross-compilation fails with "cannot check for file existence when cross compiling" X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ktietz at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 03 Jan 2011 14:46:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-01/txt/msg00140.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47145 --- Comment #4 from Kai Tietz 2011-01-03 14:46:05 UTC --- (In reply to comment #3) > The issue here is AC_CHECK_FILE, which is documented to not work for > cross-compiling scenario. By replacing this to test -f, it should working for > native and cross-compile. > The following patch should solve this. I can't regenerate at the moment the > configure for testing. I'll do it later this eveing at home. But maybe someone > else could check it before. > Sorry had a typo with semicolon ... Index: configure.ac =================================================================== --- configure.ac (revision 168422) +++ configure.ac (working copy) @@ -343,9 +343,12 @@ # Check for docbook AC_CHECK_PROG([XSLTPROC], xsltproc, yes, no) AC_CHECK_PROG([XMLLINT], xmllint, yes, no) -AC_CHECK_FILE([/usr/share/sgml/docbook/xsl-ns-stylesheets/VERSION], - [glibcxx_stylesheets=yes], [glibcxx_stylesheets=no]) +glibcxx_stylesheets=no; +if test -f /usr/share/sgml/docbook/xsl-ns-stylesheets/VERSION; then + glibcxx_stylesheets=yes; +fi + # Check for xml/html dependencies. AM_CONDITIONAL(BUILD_XML, test $ac_cv_prog_DOXYGEN = "yes" &&