mirror of
https://github.com/glfs-book/glfs.git
synced 2026-01-14 00:49:06 +00:00
170 lines
4.7 KiB
XML
170 lines
4.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
|
|
<!ENTITY mingw-w64-gcc-static-download
|
|
"&gnu-http;/gcc/gcc-&mingw-w64-gcc-version;/gcc-&mingw-w64-gcc-version;.tar.xz">
|
|
]>
|
|
|
|
<sect1 id="mingw-w64-gcc-static" xreflabel="Static MinGW-w64-GCC-&mingw-w64-gcc-version;">
|
|
<?dbhtml filename="mingw-w64-gcc-static.html"?>
|
|
|
|
<title>Static MinGW-w64-GCC-&mingw-w64-gcc-version;</title>
|
|
|
|
<indexterm zone="mingw-w64-gcc-static">
|
|
<primary sortas="a-mingw-w64-gcc-static">mingw-w64-gcc-static</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to Static MinGW-w64-GCC</title>
|
|
|
|
<para>
|
|
MinGW-w64-GCC provides
|
|
GCC compilers for MinGW-w64,
|
|
allowing users and applications to compile code targeting
|
|
Windows. This will be done in steps to avoid the need for
|
|
already present binaries. This is the static build, which
|
|
will have limited support but will be able to compile software
|
|
better for the MinGW-w64 targets.
|
|
</para>
|
|
|
|
&long-build-time;
|
|
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Download: <ulink url="&mingw-w64-gcc-static-download;"/>
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">Static MinGW-w64-GCC Dependencies</bridgehead>
|
|
|
|
<para role="required">
|
|
<xref linkend="mingw-w64-binutils"/> and
|
|
<xref linkend="mingw-w64-headers"/>
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of Static MinGW-w64-GCC</title>
|
|
|
|
<!--
|
|
<para>
|
|
Ensure compatibility with glibc-2.42 or later:
|
|
</para>
|
|
|
|
<screen><userinput remap="pre">sed -i '/struct_termio_sz/d' \
|
|
libsanitizer/sanitizer_common/*</userinput></screen>
|
|
-->
|
|
|
|
<sect3>
|
|
<title>x86_64 Installation of Static MinGW-w64-GCC</title>
|
|
|
|
<para>
|
|
Install x86_64 Static MinGW-w64-GCC by
|
|
running the following commands:
|
|
</para>
|
|
|
|
<screen><userinput>mkdir build-x86_64-mingw-w64-static &&
|
|
cd build-x86_64-mingw-w64-static &&
|
|
|
|
../configure --prefix=/usr \
|
|
--target=x86_64-w64-mingw32 \
|
|
--disable-shared \
|
|
--disable-multilib \
|
|
--disable-threads \
|
|
--enable-languages=c,c++ &&
|
|
|
|
make all-gcc</userinput></screen>
|
|
|
|
<para>
|
|
Now, as the &root; user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>make install-gcc && cd ..</userinput></screen>
|
|
|
|
</sect3>
|
|
|
|
<sect3>
|
|
<title>i686 Installation of Static MinGW-w64-GCC</title>
|
|
|
|
<para>
|
|
Install i686 Static MinGW-w64-GCC by running
|
|
the following commands:
|
|
</para>
|
|
|
|
<screen><userinput>mkdir build-i686-mingw-w64-static &&
|
|
cd build-i686-mingw-w64-static &&
|
|
|
|
../configure --prefix=/usr \
|
|
--target=i686-w64-mingw32 \
|
|
--disable-shared \
|
|
--disable-multilib \
|
|
--disable-threads \
|
|
--enable-languages=c,c++ &&
|
|
|
|
make all-gcc</userinput></screen>
|
|
|
|
<para>
|
|
Now, as the &root; user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>make install-gcc</userinput></screen>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
&options-subconfigure;
|
|
|
|
<para>
|
|
<command>mkdir build; cd build</command>: The
|
|
GCC documentation recommends
|
|
building the package in a dedicated build directory.
|
|
</para>
|
|
|
|
<para>
|
|
<parameter>--disable-shared</parameter>: This option disables building
|
|
shared libraries. They will be built later.
|
|
</para>
|
|
|
|
<para>
|
|
<parameter>--disable-multilib</parameter>: This option ensures
|
|
that files are created for the specific architecture of your computer.
|
|
</para>
|
|
|
|
<para>
|
|
<parameter>--disable-threads</parameter>: This option disables
|
|
thread support due to building errors in GCC. This support will be
|
|
built in later.
|
|
</para>
|
|
|
|
<para>
|
|
<parameter>--enable-languages=c,c++</parameter>:
|
|
This command builds support for C and C++. Refer to <ulink
|
|
url="&blfs-svn;/general/gcc.html"/>
|
|
to find what other languages are supported.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
<para>
|
|
There are no binaries specific to this package besides the format
|
|
the compilers are targeting, and thus are prefixed with the architecture
|
|
triplet, such as <command>x86_64-w64-mingw32-gcc</command>. For in-depth
|
|
descriptions, read <ulink
|
|
url="&lfs-root;/chapter08/gcc.html#contents-gcc"/>.
|
|
</para>
|
|
</sect2>
|
|
|
|
</sect1>
|