[PATCH] debug/gdb: include expat for gdb-cross

Michael Powell mwpowellhtx@gmail.com
Sun Mar 3 15:53:00 GMT 2013


I am confused. Speaking as a crosstool / cross-gdb end-user, what does
this mean wanting to deploy code to and consequently debug code on
target?

On Sun, Mar 3, 2013 at 8:58 AM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Trevor, All,
>
> On Sunday 03 March 2013 Trevor Woerner wrote:
>> On Sun, Mar 3, 2013 at 9:02 AM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>> > This is wrong:
>> >   - 'do_expat' is used to detect whether the expat lib shall be downloaded
>> >     and extracted;
>> >   - 'do_expat' is then mis-used:
>> >     - it is never used to build expat for the host, but is used to decide
>> >       whether to enable/disable expat in the cross-gdb
>> >     - it is used to decide whether to build expat for the target, but is
>> >       always set when the native-gdb is selected, so the check is pointless.
>>
>> So if I understand you correctly, the only thing the build needs to
>> determine is if expat needs to be included in the sysroot?
>
> Sorta. Crosstool-NG only builds a static version of libexpat, and never
> installs it in the sysroot (ditto ncurses).
>
> So, we only need to know whether we need to build expat (ncurses) for the
> target, and point gdb's configure to the place we installed it.
>
> The reason for not installing expat/ncurses in the sysroot is that the
> libs are not part of the toolchain. They are only used for internal
> components, and should not be exposed in the sysroot, in case the user
> wants another version, or different compile flags, or a patched version.
>
> This is purely internal to crosstool-NG.
>
>> > What should be done is:
>> >   - rename 'do_expat' to 'need_expat' (ditto for 'do_ncurses')
>> >   - use 'need_expat' only to decide whether to download/extract libexpat
>> >   - cross-gdb: always enable expat support
>> >   - native-gdb: ditto
>>
>> In other words, if the build doesn't interfere with gdb's ./configure,
>> gdb's ./configure will naturally look for and link in the host's
>> expat?
>
> Almost, as we still need to tell the native-gdb's ./configure where to
> find our internally built target expat/ncurses.
>
> But for the cross-gdb, it should automatically find the host's libs,
> indeed, so you still need to install the devel packages on your host.
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list