This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]. Fix HAVE_SYS_SDT_H for cross-compilation
- From: Christian Bruel <christian dot bruel at st dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "antonb at au1 dot ibm dot com" <antonb at au1 dot ibm dot com>
- Date: Thu, 29 Aug 2013 10:36:53 +0200
- Subject: Re: [PATCH]. Fix HAVE_SYS_SDT_H for cross-compilation
- Authentication-results: sourceware.org; auth=none
- References: <1377182388 dot 17827 dot 4 dot camel at oc8801110288 dot ibm dot com> <20130822174700 dot GE1814 at tucnak dot redhat dot com>
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
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