This is the mail archive of the gdb-patches@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]

Re: gdbserver optimizer build failure


Pierre Muller wrote:
gdbserver build currently
fails on gcc16 (x86-64 machine running linux).

This is presumably the same problem as Doug reported a couple days ago:


http://sourceware.org/ml/gdb-patches/2010-06/msg00370.html

It doesn't happen to me, probably because it only kicks in on particular compiler / binutils combos. But could you please try Ian's suggested macro in http://sourceware.org/ml/gdb-patches/2010-06/msg00379.html ? It looks like it would do the right thing.

Stan


gcc -Wall -g -O2 -I. -I../../../src/gdb/gdbserver -I../../../src/gdb/gdbserve r/../common -I../../../src/gdb/gdbserver/../regformats -I../../../src/gdb/gdbser ver/../../include -Wl,--dynamic-list=../../../src/gdb/gdbserver/proc-service.li st -o gdbserver inferiors.o regcache.o remote-utils.o server.o signals.o target. o utils.o version.o mem-break.o hostio.o event-loop.o tracepoint.o xml-builtin.o amd64-linux.o amd64-avx-linux.o i386-linux.o i386-avx-linux.o i386-mmx-linux.o linux-low.o linux-x86-low.o i386-low.o i387-fp.o hostio-errno.o thread-db.o proc -service.o \ -ldl linux-x86-low.o: In function `i386_emit_void_call_2': /home/muller/gdb/build-norm/gdb/gdbserver/../../../src/gdb/gdbserver/linux-x 86-low.c:2426: undefined reference to `start_i386_void_call_2_a' /home/muller/gdb/build-norm/gdb/gdbserver/../../../src/gdb/gdbserver/linux-x 86-low.c:2426: undefined reference to `end_i386_void_call_2_a' /home/muller/gdb/build-norm/gdb/gdbserver/../../../src/gdb/gdbserver/linux-x 86-l

And so on...

If I do:
prompt$ rm linux-x86-low.o
prompt$ make CFLAGS="-g  --save-temps" linux-x86-low.o
gcc -c -Wall -g  --save-temps    -I. -I../../../src/gdb/gdbserver
-I../../../src
/gdb/gdbserver/../common -I../../../src/gdb/gdbserver/../regformats
-I../../../s
rc/gdb/gdbserver/../../include ../../../src/gdb/gdbserver/linux-x86-low.c
prompt$ make
rm -f gdbserver
gcc -Wall -g -O2    -I. -I../../../src/gdb/gdbserver
-I../../../src/gdb/gdbserve
r/../common -I../../../src/gdb/gdbserver/../regformats
-I../../../src/gdb/gdbser
ver/../../include
-Wl,--dynamic-list=../../../src/gdb/gdbserver/proc-service.li
st -o gdbserver inferiors.o regcache.o remote-utils.o server.o signals.o
target.
o utils.o version.o mem-break.o hostio.o event-loop.o tracepoint.o
xml-builtin.o
 amd64-linux.o amd64-avx-linux.o i386-linux.o i386-avx-linux.o
i386-mmx-linux.o
linux-low.o linux-x86-low.o i386-low.o i387-fp.o hostio-errno.o thread-db.o
proc
-service.o  \
          -ldl
gcc -c -Wall -g -O2    -I. -I../../../src/gdb/gdbserver
-I../../../src/gdb/gdbse
rver/../common -I../../../src/gdb/gdbserver/../regformats
-I../../../src/gdb/gdb
server/../../include ../../../src/gdb/gdbserver/gdbreplay.c
rm -f gdbreplay
gcc -Wall -g -O2    -I. -I../../../src/gdb/gdbserver
-I../../../src/gdb/gdbserve
r/../common -I../../../src/gdb/gdbserver/../regformats
-I../../../src/gdb/gdbser
ver/../../include
-Wl,--dynamic-list=../../../src/gdb/gdbserver/proc-service.li
st -o gdbreplay gdbreplay.o version.o \

gcc -c  -Wall -g -O2    -I. -I../../../src/gdb/gdbserver
-I../../../src/gdb/gdbs
erver/../common -I../../../src/gdb/gdbserver/../regformats
-I../../../src/gdb/gd
bserver/../../include -fPIC -DGDBSERVER -DIN_PROCESS_AGENT
-fvisibility=hidden .
./../../src/gdb/gdbserver/tracepoint.c -o tracepoint-ipa.o
gcc -c  -Wall -g -O2    -I. -I../../../src/gdb/gdbserver
-I../../../src/gdb/gdbs
erver/../common -I../../../src/gdb/gdbserver/../regformats
-I../../../src/gdb/gd
bserver/../../include -fPIC -DGDBSERVER -DIN_PROCESS_AGENT
-fvisibility=hidden .
./../../src/gdb/gdbserver/utils.c -o utils-ipa.o
gcc -c  -Wall -g -O2    -I. -I../../../src/gdb/gdbserver
-I../../../src/gdb/gdbs
erver/../common -I../../../src/gdb/gdbserver/../regformats
-I../../../src/gdb/gd
bserver/../../include -fPIC -DGDBSERVER -DIN_PROCESS_AGENT
-fvisibility=hidden .
./../../src/gdb/gdbserver/regcache.c -o regcache-ipa.o
gcc -c  -Wall -g -O2    -I. -I../../../src/gdb/gdbserver
-I../../../src/gdb/gdbs
erver/../common -I../../../src/gdb/gdbserver/../regformats
-I../../../src/gdb/gd
bserver/../../include -fPIC -DGDBSERVER -DIN_PROCESS_AGENT
-fvisibility=hidden a
md64-linux.c -o amd64-linux-ipa.o
gcc -c  -Wall -g -O2    -I. -I../../../src/gdb/gdbserver
-I../../../src/gdb/gdbs
erver/../common -I../../../src/gdb/gdbserver/../regformats
-I../../../src/gdb/gd
bserver/../../include -fPIC -DGDBSERVER -DIN_PROCESS_AGENT
-fvisibility=hidden .
./../../src/gdb/gdbserver/linux-amd64-ipa.c -o linux-amd64-ipa.o
rm -f libinproctrace.so
gcc -shared -fPIC -Wl,--no-undefined -Wall -g -O2    -I.
-I../../../src/gdb/gdbs
erver -I../../../src/gdb/gdbserver/../common
-I../../../src/gdb/gdbserver/../reg
formats -I../../../src/gdb/gdbserver/../../include \
         -Wl,--dynamic-list=../../../src/gdb/gdbserver/proc-service.list -o
libi
nproctrace.so tracepoint-ipa.o utils-ipa.o regcache-ipa.o amd64-linux-ipa.o
linu
x-amd64-ipa.o


The build completes successfully!



It seems that there is a problem with the macro EMIT_ASM which seems to be mistreated by the optimizer.

I have no clue how to solve this...

Pierre Muller
Pascal language support maintainer for GDB





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