How to compile a static gdb-server?

Stan Shebs stanshebs@earthlink.net
Wed Jan 21 16:47:00 GMT 2015


On 1/20/15 9:39 PM, fei ding wrote:
> Hey guys:
> 
> I need to compile a static gdb-server, which LDFLAGS=-static in
> makefile, but it fails like this:
> 
> gcc -shared -fPIC -Wl,--no-undefined -g -O2     -I. -I. -I./../common
> -I./../regformats -I./.. -I./../../include -I./../gnulib/import
> -Ibuild-gnulib-gdbserver/import -Wall -Wdeclaration-after-statement
> -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Wempty-body
> -DGDBSERVER \
>     -static  -Wl,--dynamic-list=./proc-service.list -o
> libinproctrace.so [...]

I'd suggest adding --disable-inprocess-agent to the configure line; the
in-process agent library is wired up to be dynamically loaded, and is
only needed if you're doing fast tracepoints (ftrace command).

Stan



More information about the Gdb mailing list