Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - unable to build gdb on Linux: (5 Items)
   
unable to build gdb on Linux  
Hi,
It build x86, but fails for ARM i haven't checked other targets as i am only interested in ARM.
Is this expected? if not any workarrounds ?

-----------snip-------------
                -o gdb gdb.o libgdb.a \
                   ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a  ../libiberty/libiberty.a     -
lncurses -lm  -lexpat ../libiberty/libiberty.a  
gcc -c -g -O2    -I. -I../../gdb -I../../gdb/config -DLOCALEDIR="\"/opt/QNXsdk/host/linux/x86/usr/share/locale\"" -
DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../../gdb/../readline/.. -I../bfd -I../../gdb/../bfd -I../../gdb/../
include   -DMI_OUT=1 -DTUI=1  -Wall  ../../gdb/tui/tui-main.c
rm -f gdbtui
gcc -g -O2       \
                -o gdbtui tui-main.o libgdb.a \
                   ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a  ../libiberty/libiberty.a     -
lncurses -lm  -lexpat ../libiberty/libiberty.a  
make[5]: Entering directory `/home/prem/tmp/tools/gdb/branches/gdb-6.6/linux-x86-o-ntox86/gdb'
make[6]: Entering directory `/home/prem/tmp/tools/gdb/branches/gdb-6.6/linux-x86-o-ntox86/gdb/doc'
make[6]: Nothing to be done for `all'.
make[6]: Leaving directory `/home/prem/tmp/tools/gdb/branches/gdb-6.6/linux-x86-o-ntox86/gdb/doc'
make[5]: Leaving directory `/home/prem/tmp/tools/gdb/branches/gdb-6.6/linux-x86-o-ntox86/gdb'
make[4]: Leaving directory `/home/prem/tmp/tools/gdb/branches/gdb-6.6/linux-x86-o-ntox86/gdb'
make[3]: Nothing to be done for `all-target'.
make[3]: Leaving directory `/home/prem/tmp/tools/gdb/branches/gdb-6.6/linux-x86-o-ntox86'
make[2]: Leaving directory `/home/prem/tmp/tools/gdb/branches/gdb-6.6/linux-x86-o-ntox86'
make[1]: Leaving directory `/home/prem/tmp/tools/gdb/branches/gdb-6.6/linux-x86-o-ntox86'
make -j 1 -Cnto-x86-o-ntoarm -fGNUmakefile   
make[1]: Entering directory `/home/prem/tmp/tools/gdb/branches/gdb-6.6/nto-x86-o-ntoarm'
/usr/local/work/qnx632/target/qnx6/usr/include/mk/build-cfg 
Can't cross-compile from 'linux' to 'nto' yet
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/prem/tmp/tools/gdb/branches/gdb-6.6/nto-x86-o-ntoarm'
make: *** [all] Error 2
----------------------------------------------
Re: unable to build gdb on Linux  
> Hi,
> It build x86, but fails for ARM i haven't checked other targets as i am only 
> interested in ARM.
> Is this expected? if not any workarrounds ?

Hi Prem,

If you just want to build all of the Linux hosted gdbs, then in your root gdb directory type 'make OSLIST=linux'. I 
think this is what you want to do.

But if you are trying to build on a Linux host Neutrino hosted gdbs, then you will have to modify your $QNX_TARGET/usr/
include/mk/build-cfg file.

Index: build-cfg
===================================================================
--- build-cfg   (revision 155057)
+++ build-cfg   (working copy)
@@ -156,6 +156,8 @@
 solaris-solaris)
        make_CC="gcc"
        ;;
+linux-nto)
+       make_CC="i386-pc-nto-qnx6.3.0-gcc"
 linux-linux)
         make_CC="gcc"
         ;;

Even if you make the following changes to your build file, you will be unable to go into the root gdb directory and type
 make with no parameters. You would have to type 'make OSLIST="nto linux" unless you have an existing linux-mingw 
toolchain.

Regards,

Ryan Mansfield
Re: unable to build gdb on Linux  
Sorry, I made a small typo in the last patch.

Index: build-cfg
===================================================================
--- build-cfg   (revision 155057)
+++ build-cfg   (working copy)
@@ -156,6 +156,9 @@
 solaris-solaris)
        make_CC="gcc"
        ;;
+linux-nto)
+       make_CC="i386-pc-nto-qnx6.3.0-gcc"
+        ;;
 linux-linux)
         make_CC="gcc"
         ;;


Regards,

Ryan Mansfield
Re: unable to build gdb on Linux  
Hi,
Thanks for the patch, I am compiling both GCC and GDB at the moment.

I'll post the results once it is done

/Prem
Re: unable to build gdb on Linux  
Bingo..
Now gdb is built, I am trying to build gcc now.
Can I make a native toolchain for amd64 by copying over linux-x86-o-ntoarm to linux-amd64-o-ntoarm. Though i dont expect
 to pass it for the first time I believe it should be possible.
I run a 64 bit linux at home and I see a tremondos increase in speed with 64bit applications. I'll give it a try in the 
evening.


/Prem