This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: Re: [PATCH]. Fix HAVE_SYS_SDT_H for cross-compilation


(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

because:

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.
but
--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  ?

Cheers

Christian

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:
>>> 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
>
>





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]