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 6/6/13 4:40 PM, "Daniel Price" <daniel.price@gmail.com> wrote:

># 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}"

(See note after the next note)

>+            do_gdb_expat_backend host=""               \

Shouldn't host="${CT_TARGET}" ?

>+                prefix="${CT_BUILD_DIR}/static-cross" \

Since this build of expat is the same build as what is built for the
native gdb, we should save some time and set the prefix to
"${CT_BUILD_DIR}/static-target" and pushd to
"${CT_BUILD_DIR}/build-ncurses-target-${CT_TARGET}".
Then during native, in the same code section, before building expat, we
could just check to see if it exists there and skip or build if it isn't.
Just an idea ;) (cross-gdb builds before native-gdb, if you are building
both)

>+                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");;
>
>--
>For unsubscribe information see http://sourceware.org/lists.html#faq

I've started working on breaking out ncurses and expat from the debug/gdb
script, but I feel that these changes should be incorporated before they
are broken out.

if [ x"$my_suggestions" == x"valid" ]; then
    echo "Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>"
fi

-Bryan



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