www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/10/02/06:16:49

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: Re: egcs-1.1b
2 Oct 1998 06:16:49 -0700 :
Message-ID: <19981002085228.B12119.cygnus.cygwin32.developers@cygnus.com>
References: <36149FCA DOT 1A608F4D AT cityweb DOT de>
Mime-Version: 1.0
To: Corinna Vinschen <corinna DOT vinschen AT cityweb DOT de>,
cygwin32-developers AT cygnus DOT com

On Fri, Oct 02, 1998 at 11:41:30AM +0200, Corinna Vinschen wrote:
>Could someone explain the following behaviour of the
>g++ compiler in egcs-1.1b?
>
>I have compiled it with egcs-1.0.2.
>
>E.g. the line
>    static const int NO_COPY cygwin_dll_version_major
>= 			                             CYGWIN_DLL_VERSION_MAJOR;
>
>from winsup/dcrt0.cc where NO_COPY is
>
>    #define NO_COPY __attribute__((section(".data_cygwin_nocopy")))
>
>compiled with
>
>gcc -c -fno-rtti -fno-exceptions -Wall -Wunused  -I./include -I.
>-I../libstdc++/stl -I../libio -I../libio -I../newlib/libc/sys/cygwin32
>-I../newlib/libc/include -I./config/i386 -nostdinc++ -o dcrt0.o dcrt0.cc
>
>results in:
>
>dcrt0.cc:37: int const cygwin_dll_version_major causes a section type
>conflict
>make: *** [dcrt0.o] Error 1
>
>Erasing `const' works, but I don't understand, what happens.
>Is it a bug or am I too dull or what?

Yow.  It sounds like constants are being put in their own section
now.  Since fork doesn't know about this section, it won't be
copied anyway so you can safely remove the NO_COPY attribute.

Maybe Mumit can comment on this "theory".

-- 
cgf AT cygnus DOT com
http://www.cygnus.com/

- Raw text -


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