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]

Restart discussion: Where to put the SDK headers and libs when switching to Mingw64 SDK?


Hi guys,


the last time we discussed this, I didn't see a final conclusion.  So
here we go again.

I made some effort to get Cygwin building with Mingw64.  This works
mostly now, apart from a couple of tools in the winsup/utils dir,
provided you use the Mingw64 headers and libs from the current Mingw64
SVN trunk.  This is just the starting point to switch to Mingw64
Platform SDK headers and libs to replace the old w32api headers and libs
to ease the pain at one point in the distant future when we provide a 64
bit Cygwin.

The problem is this.

In theory, a Cygwin application should not require to be linked against
System DLLs.  But that doesn't work.  The reason is that a gcc startup
file calls the functions GetModuleHandle and GetProcAddress.  So we
can't build a Cygwin executable which is not also linked against at
least kernel32.dll.  Additionally and maybe even more importantly, we
have a non-marginal number of projects which require Windows headers and
Windows libs to work.  Mintty, run, cygrunsrv, the X server, you name it.

That means we have to maintain the same easy access to Windows headers
and libs as today, otherwise all these projects will break.

Today the headers and libs from w32api are provided via a default search
patch /usr/include/w32api and /usr/lib/w32api.  While that might have
been a hack at one point, it's pretty much standard these days.

The question I'd like to discuss now is, how do we organize the access
to the Platform SDK headers and libs from the Mingw64 project, so that a
native Cygwin compiler has access to them?

Please note that I'm only talking about the PSDK stuff.  We don't need
access to the Mingw CRT headers and libs (with a minor number of
exceptions), so the Mingw CRT stuff should continue to be isolated in
the /usr/${cpu}-w64-mingw32/sys-root/mingw/{include,lib} paths.

There are two obvious choices:

- The Platform SDK headers and libs are directly installed into
  /usr/include/w32api, /usr/lib/w32api, and /usr/lib64/w32api, just
  as today.

- Alternatively, the PSDK stuff is installed into a shared directory
  which can be used not only by a Cygwin compiler, but also by the
  Mingw64 cross compilers.  Potential paths are

  - /usr/share/w32api/{include,lib/lib64}
  - /usr/share/psdk/{include,lib/lib64}
  - Some other path which I can't think of right now

  The package containing these files creates symlinks /usr/include/w32api,
  /usr/lib/w32api, and /usr/lib64/w32api in a postinstall script which
  point to the real locations.  Analog for the mingw64 cross compiler
  packages.

As for http://cygwin.com/acronyms/#SHTDI, I askd JonY on the mingw64 IRC
channel last week, and he would volunteer to provide the new package.

Ok, I think it's time to decide how we do it.  It would be nice if we
could get a final resolution in the next couple of days.


Thanks,
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]