Re: 32-bit buildbot builders broken [Re: Your commit 'Build GDB as a C++ program by default' broke GDB]
Sergio Durigan Junior <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thursday, April 21 2016, Pedro Alves wrote:
>> g++ -g -O2 -I. -I../../binutils-gdb/gdb -I../../binutils-gdb/gdb/common
>> -I../../binutils-gdb/gdb/config
> ...
>> -I../../binutils-gdb/gdb/../libdecnumber
>> -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1
>> -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall
>> -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function
>> -Wno-switch -Wno-char-subscripts -Wempty-body -Wno-sign-compare
>> -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -Werror -c -o
>> linux-thread-db.o -MT linux-thread-db.o -MMD -MP -MF
>> .deps/linux-thread-db.Tpo ../../binutils-gdb/gdb/linux-thread-db.c
>> In file included from ../../binutils-gdb/gdb/i386-linux-nat.c:25:0:
>> ../../binutils-gdb/gdb/i386-linux-nat.c: In function void fetch_regs(regcache*, int):
>> ../../binutils-gdb/gdb/i386-linux-nat.c:207:46: error: cast from elf_greg_t (*)[27] {aka long long unsigned int (*)[27]} to int loses precision [-fpermissive]
>> if (ptrace (PTRACE_GETREGS, tid, 0, (int) ®s) < 0)
>
>
> ... however this error is exactly what you get if you compile with a
> 64-bit compiler, and forget to pass -m32 to gcc/g++. IOW,
> it compiles i386-linux-nat.c as if for a 64-bit host, which fails.
>
> So I suspect the builder is using CC="gcc -m32", and now that a C++ compiler
> is involved, it needs to be updated to pass CXX="g++ -m32" as well.
Yeah, actually I was setting CFLAGS without setting CXXFLAGS for these
builders, so I fixed that now. Thanks for letting me know, and sorry
about that.
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/