This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to compile a static gdb-server?


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 ax-ipa.o tracepoint-ipa.o format-ipa.o utils-ipa.o
regcache-ipa.o remote-utils-ipa.o common-utils-ipa.o tdesc-ipa.o
print-utils-ipa.o rsp-low-ipa.o amd64-linux-ipa.o linux-amd64-ipa.o
-ldl -pthread
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6/crtbeginT.o: relocation
R_X86_64_32 against `__DTOR_END__' can not be used when making a
shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.6/crtbeginT.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libinproctrace.so] Error 1


How can I make it?

Thanks a lot.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]