This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


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

Re: [PATCH] Enable download and build of expat when cross-static gdb is requested


Daniel,

On 2013-06-06 16:40 -0700, Daniel Price spake thusly:
> # HG changeset patch
> # User Daniel Price <daniel.price@gmail.com>
> # Date 1370561887 25200
> # Node ID 24f301216ef944e8d40350845d117a6da5eecdae
> # Parent  2685dfa9de14fbe356ba76cb201bf5c039cf6860
> Enable download and build of expat when cross-static gdb is requested
> 
> Signed-off-by: Daniel Price <daniel.price@gmail.com>
> 
> diff -r 2685dfa9de14 -r 24f301216ef9 scripts/build/debug/300-gdb.sh
> --- a/scripts/build/debug/300-gdb.sh	Thu May 23 17:51:15 2013 +0200
> +++ b/scripts/build/debug/300-gdb.sh	Thu Jun 06 16:38:07 2013 -0700
> @@ -16,6 +16,9 @@
>  
>      if [ "${CT_GDB_CROSS}" = y ]; then
>          need_gdb_src=y
> +        if [ "${CT_GDB_CROSS_STATIC}" = "y" ]; then
> +            need_expat_src=y
> +        fi
>      fi
>  
>      if [ "${CT_GDB_GDBSERVER}" = "y" ]; then
> @@ -123,8 +126,21 @@
>          cd "${CT_BUILD_DIR}/build-gdb-cross"
>  
>          cross_extra_config=("${extra_config[@]}")
> +
> +        if [ "${CT_GDB_CROSS_STATIC}" = "y" ]; then
> +            # Build libexpat
> +            CT_DoLog EXTRA "Building static cross expat"
> +            CT_mkdir_pushd "${CT_BUILD_DIR}/build-expat-cross-${CT_TARGET}"
> +            do_gdb_expat_backend host=""               \

As already pointed out, this should be host="${CT_HOST}".

You could have seen it since it shall be the same host as for the gdb
that is built a few lines below, no? ;-)

> +                prefix="${CT_BUILD_DIR}/static-cross" \
> +                cflags=""                              \
> +                ldflags=""
> +            CT_Popd
> +            cross_extra_config+=("--with-libexpat-prefix=${CT_BUILD_DIR}/static-cross")
> +        fi
>          cross_extra_config+=("--enable-expat")
>          cross_extra_config+=("--with-expat=yes")
> +
>          case "${CT_THREADS}" in
>              none)   cross_extra_config+=("--disable-threads");;
>              *)      cross_extra_config+=("--enable-threads");;

But in the end, I believe expat (and its development files) should be
already available for host.

For cross-toolchains, the host is your distro, so you should install the
development package (eg. libexpat1-dev on Debian, others may differ
slightly). For canadian-cross, it should be previously built by other
means.

I don't like adding more such dependencies, since they are easily
available on common distros (candian is a special case, which should be
handled appropriately, but if you are interested in canadian, you'd know
what to do anyway).

The fact that we have expat for the target is because we can't have a
pre-existing expat since we *are* actively building the toolchain. Also,
you will notice that we do *not* install expat in the sysroot. This is
on purpose, because it is purely an internal library that is built only
for our needs, and there's no reason to install it in the sysroot. It is
expressly *not* part of the "system" libraries (which come only from the
C library, and gcc's helper libs).

So, unles you can prove me there are *very* good reasons to include
this patch, I'll drop it, for the reasons explained above.

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


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