From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31374 invoked by alias); 20 Apr 2002 02:13:09 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31363 invoked from network); 20 Apr 2002 02:13:06 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 20 Apr 2002 02:13:06 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id D149D3D1A; Fri, 19 Apr 2002 22:13:05 -0400 (EDT) Message-ID: <3CC0CEB1.9080106@cygnus.com> Date: Fri, 19 Apr 2002 19:13:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: msnyder@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [RFA] Sparc/Linux fixes part 1 References: <20020419.144600.97361868.davem@redhat.com> <3CC0C38C.237D5798@redhat.com> <20020419.184709.103241554.davem@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00662.txt.bz2 > From: Michael Snyder > Date: Fri, 19 Apr 2002 18:25:32 -0700 > > "David S. Miller" wrote: > > 32-bit Sparc under Linux does not have a 16-byte long double, > > this causes testsuite failures. Fix this by providing a > > SPARC_TARGET_LONG_DOUBLE_BYTES the OS specific target headers > > can override. > > The idea is sound, but the implementation is not very > multi-arch-ish. Is there a runtime way to do this, > rather than by using a macro? The whole purpose of > multi-arch is that these decisions get made at runtime. > > Some more commentary, just to be absolutely clear... > > Note that this is an OS-specific setting, and the current > multi-arch code does not lend itself to anything other > than cpu target gdbarch inits. sizeof(long double) is a property of the ABI not the OS. > If GDB provided a framework whereby I could install an os-specific > gdbarch_init, I'd be more than happy to implement this in the > holy-grail-multi-arch way you want me to. > > Look, I'll stick around long after this change is installed so > when the facility is there, I will convert this long double > stuff to use it and the macros will basically disappear from the > sparc headers. :-) The value of long double can be set at run time by examining information provided by the BFD. ARM does this for the ABI, MIPS this for almost everything. enjoy, Andrew