This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Mingw64 and Cygwin: header and libs layout


On Mar 13 09:51, Christopher Faylor wrote:
> On Tue, Mar 13, 2012 at 02:36:21PM +0100, Corinna Vinschen wrote:
> >Hi Kai,
> >
> >On Mar 13 14:25, Kai Tietz wrote:
> >> Hi Corinna,
> >> 
> >> I suggest the approach to install for cygwin the platform-headers to a
> >> shared place.  I suggest that mingw-w64 adds to configure for headers
> >> and crt an option, which installs platform-headers/libraries to
> >> '/usr/shared/psdk_windows' location.  Means under this path are the
> >> folders lib/lib64/include containing only the platform-parts.
> >
> >That sounds like an excellent idea to me!
> >
> >> For the cygwin-based mingw-w64 cross-compiler we need to add here by
> >> spec (for headers in gcc and for libs in binutils or gcc).  IMHO this
> >> should be a special configuration option for gcc (and binutils), which
> >> adds the required parts to spec-files.
> >
> >IMHO we should keep the "w32api" scheme.  The reason is that this
> >requires no changes at all to the gcc specs file.  Rather, the Cygwin
> >gcc package would simply create matching symlinks:
> >
> >  ln -s /usr/share/windows_psdk/include /usr/include/w32api
> >  ln -s /usr/share/windows_psdk/lib     /usr/lib/w32api
> >  ln -s /usr/share/windows_psdk/lib64   /usr/lib64/w32api
> 
> I think it's pretty unusual to install libraries and headers in
> /usr/share, particularly in the case of libraries.  gcc/linux has
> conventions for this type of thing.  I broke them when I installed
> headers and libraries in /usr/include/w32api.  I don't think we should
> stray further by putting things in /usr/share.

Well, you have two choices, basically:

- Either keep the files in /usr/{include,lib,lib64}/w32api, which requires
  to duplicate the files as it is done today,

- or keep only one copy of the files in well-known places and create
  the various w32api's as symlinks to these well-known places.

My stance is that we should give up the unnecessary duplication of the
files.  Then the question is just, where to install the shared platform
files so that they are accessible from all affected compilers, the Cygwin
GCCs as well as the Mingw64 GCCs.  IMO /usr/share is the right place
for everything which is shared between multiple packages.  And if all
compilers use symlinks, it doesn't really matter where the shared files
are.  If /usr/share turns out to be not quite right, you can easily
move them around and just fix the symlinks.

> Could Dave Korn weigh in on this?

Yes, that would be helpful, probably.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]