From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65448 invoked by alias); 27 Apr 2016 19:06:38 -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 65416 invoked by uid 89); 27 Apr 2016 19:06:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=junior, Hx-languages-length:1931 X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 27 Apr 2016 19:06:28 +0000 Received: from EUSAAHC001.ericsson.se (Unknown_Domain [147.117.188.75]) by usplmg20.ericsson.net (Symantec Mail Security) with SMTP id 72.A3.09012.67601275; Wed, 27 Apr 2016 20:35:34 +0200 (CEST) Received: from elxa4wqvvz1 (147.117.188.8) by smtps-am.internal.ericsson.com (147.117.188.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 27 Apr 2016 15:06:24 -0400 References: <571898CF.6060906@redhat.com> <877ffqr89o.fsf@sergiodj.net> User-agent: mu4e 0.9.17; emacs 24.4.1 From: Antoine Tremblay To: Sergio Durigan Junior CC: Pedro Alves , "gdb@sourceware.org" Subject: Re: 32-bit buildbot builders broken [Re: Your commit 'Build GDB as a C++ program by default' broke GDB] In-Reply-To: <877ffqr89o.fsf@sergiodj.net> Date: Wed, 27 Apr 2016 19:06:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00052.txt.bz2 Sergio Durigan Junior writes: > 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. I was looking at http://gdb-build.sergiodj.net/builders/Fedora-x86_64-m32/builds/3499/steps/configure%20gdb/logs/stdio And it seems it builds in 64 bit, there's no --host=i386... or -m32 ? Thanks, Antoine