delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2002/03/21/13:51:41

Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm
Sender: cygwin-apps-owner AT cygwin DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT cygwin DOT com>
List-Help: <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs>
Mail-Followup-To: cygwin-apps AT cygwin DOT com
Delivered-To: mailing list cygwin-apps AT cygwin DOT com
Message-ID: <20020321185114.33672.qmail@web14501.mail.yahoo.com>
Date: Fri, 22 Mar 2002 05:51:14 +1100 (EST)
From: =?iso-8859-1?q?Danny=20Smith?= <danny_r_smith_2001 AT yahoo DOT co DOT nz>
Subject: Re: [MinGW-dvlpr] Re: -fnative-structure revisited.
To: cygwin-apps AT cygwin DOT com, mingw-dvlpr <mingw-dvlpr AT lists DOT sourceforge DOT net>
In-Reply-To: <20020321162649.GJ8437@redhat.com>
MIME-Version: 1.0

 --- Christopher Faylor <cgf AT redhat DOT com> wrote: > On Thu, Mar 21, 2002 at
06:36:33PM +1100, Danny Smith wrote:
> >I just stumbled across this is gcc 3.1 changelog:
> >
> >2002-02-05  Alexandre Oliva  <aoliva AT redhat DOT com>
> >
> >	* target.h (struct gcc_target): Added ms_bitfield_layout_p.
> >	* target-def.h (TARGET_MS_BITFIELD_LAYOUT_P): New.  Added to...
> >	(TARGET_INITIALIZER): this.
> >	* doc/tm.texi (TARGET_MS_BITFIELD_LAYOUT_P): Document.
> >	(BITFIELD_NBYTES_LIMITED): Markup fix.
> >	* tree.h (default_ms_bitfield_layout_p): Declare.
> >	(record_layout_info): Added prev_field.
> >	* tree.c (default_ms_bitfield_layout_p): New fn.
> >	* c-decl.c (finish_struct): Disregard EMPTY_FIELD_BOUNDARY and
> >	PCC_BITFIELD_TYPE_MATTERS for MS bit-field layout.
> >	* stor-layout.c: Include target.h.
> >	(start_record_layout): Initialize prev_field.
> >	(place_field): Handle MS bit-field layout, and disregard
> >	EMPTY_FIELD_BOUNDARY, BITFIELD_NBYTES_LIMITED and
> >	PCC_BITFIELD_TYPE_MATTERS in this case.  Update prev_field.
> >	* Makefile.in (stor-layout.o): Adjust dependencies.
> >
> >
> >Essentially, it provides a hook to do what Donn Terry's -fnative-struct 
> >patch did.  Has anyone tested this yet on cygwin or mingw?  AFAICT, the
> >only target to use a non-default version of this hook is sh (see
> >config/sh/sh.c) 
> 
> Does this mean that the layout defaults to MS automatically?

No, the default target callback, default_ms_bitfield_layout_p() returns
false, which means don't  use ms rules.  What we need to do is define a new
function  native_ms_bitfield_layout_p that returns true whenever a target
switch is set and define:
#undef TARGET_MS_BITFIELD_LAYOUT_P
#define TARGET_MS_BITFIELD_LAYOUT_P native_ms_bitfield_layout_p

I think this has to go in i386.c where the target hook  struct gcc_target
targetm is initialised.

One problem with target switches is that were running out of masks.

Strange that this got into gcc as part of of a large new-port patch, after
Donn's patch languished for so long. 


> 
> FWIW, I'm using a recent compiler from sourceware and it builds cygwin
> just fine.
> 

Great. I've had problems recently (since about 15 Mar) with duplicate
.globl labels in some of my dllimport testcases.  I'm in middle of
bootstrap now. 

Danny 


http://movies.yahoo.com.au - Yahoo! Movies
- Vote for your nominees in our online Oscars pool.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019