From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30847 invoked by alias); 29 Aug 2013 08:37:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 30838 invoked by uid 89); 29 Aug 2013 08:37:13 -0000 Received: from eu1sys200aog105.obsmtp.com (HELO eu1sys200aog105.obsmtp.com) (207.126.144.119) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) SMTP; Thu, 29 Aug 2013 08:37:13 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RDNS_NONE autolearn=no version=3.3.2 X-HELO: eu1sys200aog105.obsmtp.com Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob105.postini.com ([207.126.147.11]) with SMTP ID DSNKUh8IJ9QVoZmhyoRyxym+yM/qjcUoDvSR@postini.com; Thu, 29 Aug 2013 08:37:10 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 241FCA1; Thu, 29 Aug 2013 08:36:43 +0000 (GMT) Received: from Webmail-eu.st.com (safex1hubcas6.st.com [10.75.90.73]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D82AA46D2; Thu, 29 Aug 2013 08:36:10 +0000 (GMT) Received: from [164.129.122.166] (164.129.122.166) by webmail-eu.st.com (10.75.90.13) with Microsoft SMTP Server (TLS) id 8.3.297.1; Thu, 29 Aug 2013 10:36:53 +0200 Message-ID: <521F0825.5050008@st.com> Date: Thu, 29 Aug 2013 08:38:00 -0000 From: Christian Bruel User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Jakub Jelinek Cc: Bill Schmidt , "gcc-patches@gcc.gnu.org" , "antonb@au1.ibm.com" Subject: Re: [PATCH]. Fix HAVE_SYS_SDT_H for cross-compilation References: <1377182388.17827.4.camel@oc8801110288.ibm.com> <20130822174700.GE1814@tucnak.redhat.com> In-Reply-To: <20130822174700.GE1814@tucnak.redhat.com> Content-Type: multipart/mixed; boundary="------------020105080504030601090707" X-SW-Source: 2013-08/txt/msg01749.txt.bz2 --------------020105080504030601090707 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Content-length: 974 Hello Bill and Jakub On 08/22/2013 07:47 PM, Jakub Jelinek wrote: > On Thu, Aug 22, 2013 at 09:39:48AM -0500, Bill Schmidt wrote: >> Hi Christian and Jakub, >> >> I'm curious whether there was ever any resolution for: >> http://gcc.gnu.org/ml/gcc-patches/2012-12/msg01124.html. > Sorry for not having sent a follow up for this. The problem is that configure was checking for cross features in the host root dir instead of the cross root dir. This SDT failure was only the visible part of the problem while building a Canadian Cross linux hosted GCC, as we could as well silently test for different cross/target runtime features :-). I fixed this problem by fixing the usage of with_build_sysroot while checking system features with target_header_dir when host != build. Checked for legacy issue with various bare or hosted SH4 compilers in various environments (linux, mingwn, cygwin) Comments ? does this is seems reasonable to push to trunk ? Cheers Christian --------------020105080504030601090707 Content-Type: text/x-patch; name="build-sysroot.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="build-sysroot.patch" Content-length: 1202 2012-12-21 Christian Bruel * configure.ac: Set target_header_dir for with-build-sysroot. * configure: Regenerate. Index: gcc/configure =================================================================== --- gcc/configure (revision 202068) +++ gcc/configure (working copy) @@ -27011,6 +27011,8 @@ if test x$host != x$target || test "x$TARGET_SYSTE else target_header_dir="${with_sysroot}${native_system_header_dir}" fi +elif test x$host != x$build && test "x$with_build_sysroot" != "x"; then + target_header_dir="${with_build_sysroot}${native_system_header_dir}" else target_header_dir=${native_system_header_dir} fi Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 202068) +++ gcc/configure.ac (working copy) @@ -4822,6 +4822,8 @@ if test x$host != x$target || test "x$TARGET_SYSTE else target_header_dir="${with_sysroot}${native_system_header_dir}" fi +elif test x$host != x$build && test "x$with_build_sysroot" != "x"; then + target_header_dir="${with_build_sysroot}${native_system_header_dir}" else target_header_dir=${native_system_header_dir} fi --------------020105080504030601090707--