public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christian Bruel <christian.bruel@st.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Bill Schmidt <wschmidt@linux.vnet.ibm.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	"antonb@au1.ibm.com" <antonb@au1.ibm.com>
Subject: Re: [PATCH]. Fix HAVE_SYS_SDT_H for cross-compilation
Date: Thu, 29 Aug 2013 08:38:00 -0000	[thread overview]
Message-ID: <521F0825.5050008@st.com> (raw)
In-Reply-To: <20130822174700.GE1814@tucnak.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 974 bytes --]

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



[-- Attachment #2: build-sysroot.patch --]
[-- Type: text/x-patch, Size: 1202 bytes --]

2012-12-21  Christian Bruel  <christian.bruel@st.com>

       * 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

  parent reply	other threads:[~2013-08-29  8:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22 14:40 Bill Schmidt
2013-08-22 17:51 ` Jakub Jelinek
2013-08-22 18:39   ` Bill Schmidt
2013-08-29  8:38   ` Christian Bruel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-12-18 14:42 Christian Bruel
2012-12-18 14:48 ` Jakub Jelinek
2012-12-18 15:00   ` Christian Bruel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=521F0825.5050008@st.com \
    --to=christian.bruel@st.com \
    --cc=antonb@au1.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=wschmidt@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).