unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help regarding specifics: mingw-w64 cross compilation with posix thread model
@ 2019-09-10 16:20 Carl Dong
  0 siblings, 0 replies; only message in thread
From: Carl Dong @ 2019-09-10 16:20 UTC (permalink / raw)
  To: Guix-devel

Hi all,

I've been working on our windows cross-compilation support, and realized that
the version of mingw-w64 we compile does not have posix threading enabled. This
means that any package using C++11 threading support will not be able to
compile.

Thankfully mingw-w64 provides a pthreads library called winpthreads. A
technicality to be aware of here is that winpthreads requires mingw-w64 itself
to compile. I've hacked this together but have some concerns w/re specifics.

One of my concerns is what the default should be. Should we stick with win32
being the default thread model? Or go with posix? Another is how we expose this
to the user/developer. Do we define a non-standard triple?
--target=x86_64-w64-mingw32-win32?

Side note: I wish we could come up with a more generic (cross)toolchain
specification of sorts at least for gnu builds. My current hack that
accomplishes this can be found here:
https://github.com/bitcoin/bitcoin/blob/1985c4efda56b48f6f9c04f39d69268ee8f0b40a/contrib/guix/manifest.scm#L52

For some context, in debian, installing gcc-mingw-w64-x86-64 installs
x86_64-w64-mingw32-gcc which has the win32 thread model. Also installed are
x86_64-w64-mingw32-gcc-posix and x86_64-w64-mingw32-gcc-win32, with their
suffixes matching their thread model.

Cheers,
Carl Dong
accounts@carldong.me
"I fight for the users"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-10 16:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 16:20 Help regarding specifics: mingw-w64 cross compilation with posix thread model Carl Dong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).