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]

Fwd: cross-gdb with expat support


FYI, with the following two patches I build a working Microsoft
Windows cross compile toolchain including GDB.


diff -uNr x-tools_org/bin/lib/ct-ng.1.20.0/scripts/build/debug/300-gdb.sh
x-tools/bin/lib/ct-ng.1.20.0/scripts/build/debug/300-gdb.sh
--- x-tools_org/bin/lib/ct-ng.1.20.0/scripts/build/debug/300-gdb.sh
2015-04-09 13:16:16.000000000 +0200
+++ x-tools/bin/lib/ct-ng.1.20.0/scripts/build/debug/300-gdb.sh
2015-04-09 13:02:51.535477908 +0200
@@ -16,6 +16,9 @@

     if [ "${CT_GDB_CROSS}" = y ]; then
         need_gdb_src=y
+        if [ "${CT_TOOLCHAIN_TYPE}" = "canadian" ]; then
+        need_expat_src=y
+        fi
     fi

     if [ "${CT_GDB_GDBSERVER}" = "y" ]; then
@@ -130,6 +133,26 @@
         cd "${CT_BUILD_DIR}/build-gdb-cross"

         cross_extra_config=("${extra_config[@]}")
+
+
+       if [ "${CT_TOOLCHAIN_TYPE}" = "canadian" ]; then
+            # Build libexpat
+            CT_DoLog EXTRA "Building static cross expat"
+            CT_mkdir_pushd "${CT_WORK_DIR}/${CT_REAL_HOST}/build-expat-cross"
+
+            CT_DoExecLog CFG                                \
+        "${CT_SRC_DIR}/expat-2.1.0/configure"\
+                --host=${CT_HOST}                       \
+                --prefix="${CT_WORK_DIR}/${CT_REAL_HOST}/libexpat-cross"
+
+        CT_DoLog EXTRA "Building cross-expat"
+        CT_DoExecLog ALL make
+        CT_DoLog EXTRA "Install cross-expat"
+        CT_DoExecLog ALL make install
+            CT_Popd
+            cross_extra_config+=("--with-libexpat-prefix=${CT_WORK_DIR}/${CT_REAL_HOST}/libexpat-cross")
+        fi
+
         cross_extra_config+=("--enable-expat")
         cross_extra_config+=("--with-expat=yes")
         case "${CT_THREADS}" in


diff -r -u ../4.9.2/gcc/configure ./gcc/configure
--- 4.9.2/gcc/configure    2013-01-08 11:41:18.212779007 -0800
+++ 4.9.2/gcc/configure    2013-01-08 11:41:49.396779627 -0800
@@ -9252,7 +9252,7 @@
 else

 cat >>confdefs.h <<_ACEOF
-#define caddr_t char *
+//#define caddr_t char *
 _ACEOF

 fi






---------- Forwarded message ----------
From: Thomas T <thomasmailinglists9@gmail.com>
Date: 2015-04-03 8:49 GMT+02:00
Subject: cross-gdb with expat support
To: crossgcc@sourceware.org


Hi,

as a lot of others before I have a problem to compile a toolchain with
a cross-gdb. I try to build a toolchain for

[EXTRA]      build  = x86_64-unknown-linux-gnu
[EXTRA]      host   = x86_64-w64-mingw32
[EXTRA]      target = arm-none-linux-gnueabihf

The first problem I solved by myself. I removed the multiple
definitions of caddr_t.

But now I fail to build the static cross-gdb, with the well known
error "expat is missing or unusable". Crosstool-NG is the newest one
1.20, I also tried git/master. I already looked for a patch/ideas at
the mailing list, patchwork, google, tried several changes in
300-gdb.sh but didn't found a solution...

The build PC runs on Ubuntu 14.04. And, even I do not know if it is
required as the host is a WindowsPC I installed libexpat1-dev.

Is there currently a well known problem? Which additional infos shall
I provide, any ideas?

Best Regards
Thomas

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