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: Restart discussion: Where to put the SDK headers and libs when switching to Mingw64 SDK?


On Jul 10 19:29, JonY wrote:
> On 7/10/2012 16:10, Corinna Vinschen wrote:
> >> 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.
> > 
> > Here's another idea which requires to change GCC and the configury of all
> > packages accessing Windows functionality, but adds cleanliness:
> > 
> > - As I said in my previous mail, the only reason we must have access to
> >   libkernel32.a is the fact that the crtbegin.o file calls GetModuleHandle
> >   and GetProcAddress.
> > 
> >   So we can store the PSDK files whereever we want, but *drop* the
> >   /usr/include/w32api and /usr/lib/w32api paths from the default search
> >   paths of GCC.
> > [...]
> >   Applications using Windows functions would just have to add the new
> >   PSDK paths to their configury.
> > 
> > Anyway, that's just a side idea.  I'm curious what you think.
> > 
> > Obviously, even with this change we still have to agree on a path where
> > to store the PSDK headers.
> 
> Not sure about the technical details, Kai will have to answer that. Kai
> did mention about using interrupt call gates to get around kernel32.dll,
> not sure if it is even practical.

Calling the GetModuleHandle/GetProcAddress functions via Cygwin is
pretty simple.

> As for the install path, I think sharing headers will be a problem,
> since the mingw-w64 cross compiler will need the all CRT headers.

Well, the idea is that the mingw64 cross gcc adds another path to the
default include search path to its specs, just like the native Cygwin
gcc does.  That allows to keep the CRT and PSDK headers separated for
the Mingw64 cross compiler as well.

> Sharing libs between the cross compilers and Cygwin w32api/libxx should
> be fine though, with clever use of symlinks.


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]