From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130135 invoked by alias); 9 Aug 2018 03:43:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 130126 invoked by uid 89); 9 Aug 2018 03:43:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=lp64 X-HELO: mail-wm0-f66.google.com Received: from mail-wm0-f66.google.com (HELO mail-wm0-f66.google.com) (74.125.82.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Aug 2018 03:43:23 +0000 Received: by mail-wm0-f66.google.com with SMTP id s12-v6so4873260wmc.0 for ; Wed, 08 Aug 2018 20:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HRolXFzyJG1Np0z+zQXocOuzFpb0Pu5ZldncYfNFcxg=; b=cEUb/EZiDdJR6Cv+XvAH4jbTbzntVHKE9MCpwXpEEby1xsneF/eYBzKT2lxFq7B4cj Bjh0uWNAhxNZTKpvwBbGdH92Ptm9WgS93+lEHQMUtUIBvbdGLbirMJv4rc03fIZ25rko gubMlEjgywWUkbVcYeLgJXUJOcEYDCSO6ch/nTGw1VzuKyND2i9Lt/FpMH5m7A/qcWyu tGFkKz8oMfu8ow4oYHgiZGUtMTWdFMPKwVIB7ptNLcuJq8q6LW13wLz/u9VyvOPg9KLW 1P2USDs/NeySJBliM+bS/0vH0xeBdvXjcHB6hjoP6sCaQeftmCn9hBIfRhWbpu4GYFVL v7HA== MIME-Version: 1.0 Received: by 2002:adf:e44b:0:0:0:0:0 with HTTP; Wed, 8 Aug 2018 20:43:20 -0700 (PDT) In-Reply-To: <83600kp8pc.fsf@gnu.org> References: <878t5gjv94.fsf@tromey.com> <83600kp8pc.fsf@gnu.org> From: Jim Wilson Date: Thu, 09 Aug 2018 03:43:00 -0000 Message-ID: Subject: Re: [PATCH 5/5] RISC-V: Add configure support riscv*-linux*. To: Eli Zaretskii Cc: Tom Tromey , Palmer Dabbelt , gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-08/txt/msg00203.txt.bz2 On Wed, Aug 8, 2018 at 7:36 PM, Eli Zaretskii wrote: >> From: Tom Tromey >> Cc: tom@tromey.com, Jim Wilson , gdb-patches@sourceware.org >> Date: Wed, 08 Aug 2018 17:25:59 -0600 >> >> My main concern is really whether --disable-64-bit-bfd still works. >> I don't know if people still use this, but as long as it exists it seems >> like it should continue to work. If RISC-V works in this setup, then it >> is totally fine by me for gdb to follow, assuming it works as well. >> >> Maybe to really test it has to be a 32 bit build with >> --disable-64-bit-bfd and --enable-targets=all. > > Btw, can you or someone else explain what exactly does > "--enable-64-bit-bfd" do and what practical effects should it have on > GDB? I frequently wonder whether I want that switch when building > GDB, and I still don't know the answer. Since I'm looking at this at the moment... BFD will automatically enable 64-bit support if you configure on a host with 64-bit support, or configure for a target with 64-bit support. It will also enable 64-bit support if you use --enable-64-bit-bfd. 64-bit support means you can use 64-bit integer types such as long long on a 32-bit host or long on a 64-bit LP64 host. If 64-bit support is enabled, and your compiler doesn't support it, then you get a configure error. If you use --disable-64-bit-bfd, then bfd will disallow use of 64-bit integer types. If you configure for a 64-bit target, you will get a configure error. As a practical matter, I think --enable/disable-64-bit-bfd doesn't really do anything useful unless you are configuring with --enable-targets=all. In this case, 64-bit targets will be enabled by default, and will fail to build on a 32-bit host with a compiler that doesn't support long long. You can work around that problem by using --disable-64-bit-bfd which will get you all of the 32-bit targets, and none of the 64-bit targets, which will allow the build to complete. Of course, nowadays, finding a 32-bit compiler without long long support would be hard, so this option combination is unlikely to be useful to anyone. I've been looking at the riscv{32,64} bfd support. Since configuring for riscv32 enables riscv64 support also, and riscv64 requires 64-bit support, this means that there is no riscv bfd support at all when using --disable-64-bit-bfd --enable-targets=all. It looks like the gdb riscv support is broken even without my patch, as we can't build a riscv32-elf gdb if we don't have bfd. I've got a build running to see if I can force a build failure. Jim