From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36889 invoked by alias); 27 Apr 2016 19:54:52 -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 36876 invoked by uid 89); 27 Apr 2016 19:54:52 -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=hehe X-HELO: usplmg21.ericsson.net Received: from usplmg21.ericsson.net (HELO usplmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 27 Apr 2016 19:54:42 +0000 Received: from EUSAAHC005.ericsson.se (Unknown_Domain [147.117.188.87]) by usplmg21.ericsson.net (Symantec Mail Security) with SMTP id A3.64.03614.3D811275; Wed, 27 Apr 2016 21:53:55 +0200 (CEST) Received: from elxa4wqvvz1 (147.117.188.8) by smtps-am.internal.ericsson.com (147.117.188.87) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 27 Apr 2016 15:54:38 -0400 References: <571898CF.6060906@redhat.com> <877ffqr89o.fsf@sergiodj.net> <87potalu46.fsf@redhat.com> User-agent: mu4e 0.9.17; emacs 24.4.1 From: Antoine Tremblay To: Sergio Durigan Junior CC: Antoine Tremblay , 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: <87potalu46.fsf@redhat.com> Date: Wed, 27 Apr 2016 19:54:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00054.txt.bz2 Sergio Durigan Junior writes: > On Wednesday, April 27 2016, Antoine Tremblay wrote: > >> 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 ? > > Hey Antoine, > > Thanks for the message. So, as I said on IRC, the purpose of this > builder is to perform a 64-bit compilation of GDB (i.e., without -m32), > but run the testsuite on 32-bit mode (i.e., passing > --target_board=unix/-m32 to runtest). > > Maybe the builder's name is confusing, and I apologize for that. I > could try to add a better description of it on the page. > Hehe yes thanks for the clarification, I was actually looking at an example to build a 32bit gdb and I just clicked on the m32 tag... Guess I went too fast there. Thanks, Antoine