From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98756 invoked by alias); 21 Apr 2016 20:56:19 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 98743 invoked by uid 89); 21 Apr 2016 20:56:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (176.31.208.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 21 Apr 2016 20:56:09 +0000 From: Sergio Durigan Junior To: Pedro Alves Cc: "gdb\@sourceware.org" Subject: Re: 32-bit buildbot builders broken [Re: Your commit 'Build GDB as a C++ program by default' broke GDB] References: <571898CF.6060906@redhat.com> X-URL: http://blog.sergiodj.net Date: Thu, 21 Apr 2016 20:56:00 -0000 In-Reply-To: <571898CF.6060906@redhat.com> (Pedro Alves's message of "Thu, 21 Apr 2016 10:09:35 +0100") Message-ID: <877ffqr89o.fsf@sergiodj.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00047.txt.bz2 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/