This is the mail archive of the
mailing list for the GCC project.
Fwd: Re: [PATCH]. Fix HAVE_SYS_SDT_H for cross-compilation
- From: Christian Bruel <christian dot bruel at st dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 30 Aug 2013 15:22:53 +0200
- Subject: Fwd: Re: [PATCH]. Fix HAVE_SYS_SDT_H for cross-compilation
- Authentication-results: sourceware.org; auth=none
- References: <52209AA8 dot 1080607 at st dot com>
(resent plain text, sorry)
A documentation comment on the proposed patch.
The issue occurred while building the target libgcc using the cross-gcc,
while cross-building a target-gcc
../../../../libgcc/unwind-dw2.c:42:21: fatal error: sys/sdt.h: No such
file or directory
indeed, auto-host.h had
/* Define if your target C library provides sys/sdt.h */
#define HAVE_SYS_SDT_H 1
configure:26872: checking sys/sdt.h in the target C library
configure:26881: result: yes
(which is false)
So to cross build a target library |
--with-build-sysroot=|dir looks appropriate to specify the alternative
host root path.
--with-sysroot looks not appropriate because it changes the search paths
(that should still be /usr/include on the target tree).
So, consequently, the --with-build-sysroot documentation sentence
"This option is only useful when you are already using --with-sysroot."
looks incorrect to me as we seem to have here a use of
--with-build-sysroot without --with-sysroot.
Not sure if it's clear, but I'm wondering why this restriction in the
documentation ? Could we amend it ?
On 08/29/2013 10:36 AM, Christian Bruel wrote:
> 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:
> 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 ?