* gdbserver - manually modify Makefile @ 2015-08-13 20:50 Ran Shalit 2015-08-13 20:53 ` Orlando Arias 2015-08-13 21:58 ` Pedro Alves 0 siblings, 2 replies; 5+ messages in thread From: Ran Shalit @ 2015-08-13 20:50 UTC (permalink / raw) To: gdb Hello, I've cross compile gdbserver according to wiki in: https://sourceware.org/gdb/wiki/BuildingCrossGDBandGDBserver ubuntu@ubuntu-laptop:~/gdb-7.9.1/gdb/gdbserver$ sudo ./configure --host=powerpc-buildroot-linux-gnu --disable-werror But on doing : make I've noticed that it uses the host gcc instead of the cross-compiler gcc. Only after manually modifying the Makefie with CC = powerpc-buildroot-linux-gnu-gcc instead of CC = gcc It was cross compiling as expected. Can anyone help me understand what was wrong doing in the above steps? Since this didn't work as expected I'm afraid that maybe the gdb as I compiled might also required some manually modifications which I am not aware of. These are the steps for gdb build: ubuntu@ubuntu-laptop:~/gdb-7.9.1/$ sudo ./configure --target=powerpc-buildroot-linux-gnu --disable-werror Thank you for your assistance, Ran ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdbserver - manually modify Makefile 2015-08-13 20:50 gdbserver - manually modify Makefile Ran Shalit @ 2015-08-13 20:53 ` Orlando Arias 2015-08-13 21:58 ` Pedro Alves 1 sibling, 0 replies; 5+ messages in thread From: Orlando Arias @ 2015-08-13 20:53 UTC (permalink / raw) To: gdb [-- Attachment #1: Type: text/plain, Size: 1255 bytes --] Greetings, I believe this is happening because you need to supply a --target parameter to gdbserver as well. ./configure --host=powerpc-buildroot-linux-gnu \ --target=powerpc-buildroot-linux-gnu \ --disable-werror Cheers, Orlando. On 08/13/2015 04:50 PM, Ran Shalit wrote: > Hello, > > I've cross compile gdbserver according to wiki in: > https://sourceware.org/gdb/wiki/BuildingCrossGDBandGDBserver > ubuntu@ubuntu-laptop:~/gdb-7.9.1/gdb/gdbserver$ sudo ./configure > --host=powerpc-buildroot-linux-gnu --disable-werror > > But on doing : > make > I've noticed that it uses the host gcc instead of the cross-compiler gcc. > Only after manually modifying the Makefie with > CC = powerpc-buildroot-linux-gnu-gcc > instead of > CC = gcc > It was cross compiling as expected. > > Can anyone help me understand what was wrong doing in the above steps? > > Since this didn't work as expected I'm afraid that maybe the gdb as I > compiled might also required some manually modifications which I am > not aware of. > These are the steps for gdb build: > ubuntu@ubuntu-laptop:~/gdb-7.9.1/$ sudo ./configure > --target=powerpc-buildroot-linux-gnu --disable-werror > > Thank you for your assistance, > Ran > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdbserver - manually modify Makefile 2015-08-13 20:50 gdbserver - manually modify Makefile Ran Shalit 2015-08-13 20:53 ` Orlando Arias @ 2015-08-13 21:58 ` Pedro Alves 2015-08-13 22:26 ` Ran Shalit 1 sibling, 1 reply; 5+ messages in thread From: Pedro Alves @ 2015-08-13 21:58 UTC (permalink / raw) To: Ran Shalit, gdb On 08/13/2015 09:50 PM, Ran Shalit wrote: > Hello, > > I've cross compile gdbserver according to wiki in: > https://sourceware.org/gdb/wiki/BuildingCrossGDBandGDBserver > ubuntu@ubuntu-laptop:~/gdb-7.9.1/gdb/gdbserver$ sudo ./configure > --host=powerpc-buildroot-linux-gnu --disable-werror You should not need sudo, nor --disable-werror. > > But on doing : > make > I've noticed that it uses the host gcc instead of the cross-compiler gcc. > Only after manually modifying the Makefie with > CC = powerpc-buildroot-linux-gnu-gcc > instead of > CC = gcc > It was cross compiling as expected. > Open the config.log file in the build directory, and look for something that looks like this: configure:2558: checking for powerpc-buildroot-linux-gnu-gcc The following lines should look something like this: configure:2574: found /path/to/whatever/bin/powerpc-buildroot-linux-gnu-gcc configure:2585: result: powerpc-buildroot-linux-gnu-gcc configure:2854: checking for C compiler version configure:2863: powerpc-buildroot-linux-gnu-gcc --version >&5 But in your case, "result" is probably "gcc". If configure doesn't find $host-gcc, then it'll default to "gcc". Most likely, you don't have powerpc-buildroot-linux-gnu-gcc in the PATH. Make sure it is in the PATH, and that you can execute it (e.g., try $ powerpc-buildroot-linux-gnu-gcc -v), and start over. Let me know how it went. Thanks, Pedro Alves ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdbserver - manually modify Makefile 2015-08-13 21:58 ` Pedro Alves @ 2015-08-13 22:26 ` Ran Shalit 2015-08-14 8:57 ` Pedro Alves 0 siblings, 1 reply; 5+ messages in thread From: Ran Shalit @ 2015-08-13 22:26 UTC (permalink / raw) To: Pedro Alves; +Cc: gdb On Fri, Aug 14, 2015 at 12:58 AM, Pedro Alves <palves@redhat.com> wrote: > On 08/13/2015 09:50 PM, Ran Shalit wrote: >> Hello, >> >> I've cross compile gdbserver according to wiki in: >> https://sourceware.org/gdb/wiki/BuildingCrossGDBandGDBserver >> ubuntu@ubuntu-laptop:~/gdb-7.9.1/gdb/gdbserver$ sudo ./configure >> --host=powerpc-buildroot-linux-gnu --disable-werror > > You should not need sudo, nor --disable-werror. > >> >> But on doing : >> make >> I've noticed that it uses the host gcc instead of the cross-compiler gcc. >> Only after manually modifying the Makefie with >> CC = powerpc-buildroot-linux-gnu-gcc >> instead of >> CC = gcc >> It was cross compiling as expected. >> > > Open the config.log file in the build directory, and look for something > that looks like this: > > configure:2558: checking for powerpc-buildroot-linux-gnu-gcc > > The following lines should look something like this: > > configure:2574: found /path/to/whatever/bin/powerpc-buildroot-linux-gnu-gcc > configure:2585: result: powerpc-buildroot-linux-gnu-gcc > configure:2854: checking for C compiler version > configure:2863: powerpc-buildroot-linux-gnu-gcc --version >&5 > > But in your case, "result" is probably "gcc". If configure doesn't > find $host-gcc, then it'll default to "gcc". Most likely, you don't > have powerpc-buildroot-linux-gnu-gcc in the PATH. Make sure > it is in the PATH, and that you can execute it (e.g., try > $ powerpc-buildroot-linux-gnu-gcc -v), and start over. > > Let me know how it went. > > Thanks, > Pedro Alves > Hi Pedro, Thanks for the feedback. You were correct about the PATH, that solved the issue ! But I still need the --disable-werror, otherwise it stops build on warning (treated as error). Regards, Ran ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdbserver - manually modify Makefile 2015-08-13 22:26 ` Ran Shalit @ 2015-08-14 8:57 ` Pedro Alves 0 siblings, 0 replies; 5+ messages in thread From: Pedro Alves @ 2015-08-14 8:57 UTC (permalink / raw) To: Ran Shalit; +Cc: gdb On 08/13/2015 11:26 PM, Ran Shalit wrote: > Thanks for the feedback. > You were correct about the PATH, that solved the issue ! Great, thanks for closing the loop. > > But I still need the --disable-werror, otherwise it stops build on > warning (treated as error). OK. I had assumed from "gdb-7.9.1" that you were building a release: -Werror is disabled in release tarballs. Thanks, Pedro Alves ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-08-14 8:57 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-08-13 20:50 gdbserver - manually modify Makefile Ran Shalit 2015-08-13 20:53 ` Orlando Arias 2015-08-13 21:58 ` Pedro Alves 2015-08-13 22:26 ` Ran Shalit 2015-08-14 8:57 ` Pedro Alves
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).