MinGW-w64*: Enabled winpthreads.

Winpthreads has to be built after the main bulk of MinGW-w64, but can still be built before GCC. This means after the bulk build, the winpthread build can be done, which is great.
This commit is contained in:
Zeckmathederg 2024-10-26 10:07:47 -06:00
parent 210ffc2f8b
commit 041aaa290a
3 changed files with 53 additions and 14 deletions

View File

@ -42,6 +42,9 @@
<listitem>
<para>October 25th, 2024</para>
<itemizedlist>
<listitem>
<para>[Zeckmathederg] - MinGW-w64*: Enabled winpthreads.</para>
</listitem>
<listitem>
<para>[Zeckmathederg] - icu: Remove Clang note in 32-bit.</para>
</listitem>

View File

@ -88,6 +88,7 @@ cd build-x86_64-mingw-w64 &amp;&amp;
../configure \
--prefix=/usr \
--target=x86_64-w64-mingw32 \
--enable-threads=posix \
--enable-shared \
--disable-multilib \
--enable-languages=c,c++ &amp;&amp;
@ -144,6 +145,7 @@ cd build-i686-mingw-w64 &amp;&amp;
--prefix=/usr \
--target=i686-w64-mingw32 \
--enable-shared \
--enable-threads=posix \
--disable-multilib \
--enable-languages=c,c++ &amp;&amp;
@ -303,15 +305,13 @@ rm -v a.exe main.{c,cpp}</userinput></screen>
</para>
<para>
<parameter>--disable-multilib</parameter>: This option ensures
that files are created for the specific architecture of your computer.
<parameter>--enable-threads=posix</parameter>: This option enables
support for POSIX threads via the winpthreads library.
</para>
<para>
<parameter>--enable-threads=posix</parameter>: This option enables
support for POSIX threads via the winpthreads library. Invoke it if
you have built <xref linkend="mingw-w64"/> with <parameter>
--with-libraries=winpthreads</parameter>.
<parameter>--disable-multilib</parameter>: This option ensures
that files are created for the specific architecture of your computer.
</para>
<para>

View File

@ -80,6 +80,28 @@ make</userinput></screen>
<screen role="root"><userinput>make install</userinput></screen>
<para>
Now build the winpthreads library after installing the bulk of MinGW-w64
to prevent the build from linking against libraries that weren't
installed but now are (this library enables POSIX thread support):
</para>
<screen><userinput>cd .. &amp;&amp;
mkdir -v build-x86_64-winpthreads &amp;&amp;
cd build-x86_64-winpthreads &amp;&amp;
../mingw-w64-libraries/winpthreads/configure \
--prefix=/usr/x86_64-w64-mingw32 \
--host=x86_64-w64-mingw32 &amp;&amp;
make</userinput></screen>
<para>
Now install the winpthreads library as the &root; user:
</para>
<screen role="root"><userinput>make install</userinput></screen>
</sect3>
<sect3>
@ -105,6 +127,28 @@ make</userinput></screen>
<screen role="root"><userinput>make install</userinput></screen>
<para>
Now build the winpthreads library after installing the bulk of MinGW-w64
to prevent the build from linking against libraries that weren't
installed but now are (this library enables POSIX thread support):
</para>
<screen><userinput>cd .. &amp;&amp;
mkdir -v build-i686-winpthreads &amp;&amp;
cd build-i686-winpthreads &amp;&amp;
../mingw-w64-libraries/winpthreads/configure \
--prefix=/usr/i686-w64-mingw32 \
--host=i686-w64-mingw32 &amp;&amp;
make</userinput></screen>
<para>
Now install the winpthreads library as the &root; user:
</para>
<screen role="root"><userinput>make install</userinput></screen>
</sect3>
</sect2>
@ -123,14 +167,6 @@ make</userinput></screen>
the architecture passed to it.
</para>
<para>
<parameter>--with-libraries=winpthreads</parameter>: This option
builds the winpthreads library, which can enable posix threading.
Use it after you have built <xref linkend="mingw-w64-gcc"/> and
rebuild that package afterwards with <parameter>
--enable-threads=posix</parameter>.
</para>
<para>
<parameter>--enable-experimental</parameter>: This option enables
experimental features.