Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: sergiodj+buildbot@sergiodj.net,
	"gdb@sourceware.org" <gdb@sourceware.org>,
	       Sergio Durigan Junior <sergiodj@redhat.com>
Subject: 32-bit buildbot builders broken [Re: Your commit 'Build GDB as a C++ program by default' broke GDB]
Date: Thu, 21 Apr 2016 09:09:00 -0000	[thread overview]
Message-ID: <571898CF.6060906@redhat.com> (raw)
In-Reply-To: <E1at1Am-0004GM-6R@kwanyin.sergiodj.net>

On 04/21/2016 12:04 AM, sergiodj+buildbot@sergiodj.net wrote:
> Hello there,
> 
> Your commit:
> 
> 	Build GDB as a C++ program by default
> 	a23585089d7ba710b238d3d1ab3d34320afa48d0
> 
> broke GDB.  Please fix it, or the GDB gods will get you.
> 


> Full Build URL:
> 	<http://gdb-build.sergiodj.net/builders/Fedora-i686/builds/3465>
> 

This is "Fedora-i686", a 32-bit builder.

> 
> 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) &regs) < 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.

Thanks,
Pedro Alves


       reply	other threads:[~2016-04-21  9:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1at1Am-0004GM-6R@kwanyin.sergiodj.net>
2016-04-21  9:09 ` Pedro Alves [this message]
2016-04-21 20:56   ` Sergio Durigan Junior
2016-04-27 19:06     ` Antoine Tremblay
2016-04-27 19:39       ` Sergio Durigan Junior
2016-04-27 19:54         ` Antoine Tremblay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=571898CF.6060906@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=sergiodj+buildbot@sergiodj.net \
    --cc=sergiodj@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox