2024-04-27 16:13:48 +08:00
|
|
|
<?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-binutils-download-http "https://sourceware.org/pub/binutils/releases/binutils-&binutils-version;.tar.xz">
|
|
|
|
<!ENTITY mingw-w64-binutils-download-ftp " ">
|
|
|
|
]>
|
|
|
|
|
|
|
|
<sect1 id="mingw-w64-binutils" xreflabel="MinGW-w64-binutils-&binutils-version;">
|
|
|
|
<?dbhtml filename="mingw-w64-binutils.html"?>
|
|
|
|
|
|
|
|
|
|
|
|
<title>MinGW-w64-binutils-&binutils-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="mingw-w64-binutils">
|
|
|
|
<primary sortas="a-mingw-w64-binutils">mingw-w64-binutils</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to MinGW-w64-binutils</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
MinGW-w64-binutils is a collection of software that can change
|
|
|
|
the state of Windows binaries or make them executable. These
|
|
|
|
binutils are specific to MinGW-w64, and using regular binutils
|
|
|
|
will not work for the proceeding packages.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
&lfs121_checked;
|
|
|
|
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download (HTTP): <ulink url="&mingw-w64-binutils-download-http;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download (FTP): <ulink url="&mingw-w64-binutils-download-ftp;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">MinGW-w64-binutils Dependencies</bridgehead>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
|
|
<para role="optional">
|
|
|
|
<xref linkend="mingw-w64-binary"/>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of MinGW-w64-binutils</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
First make sure libiberty does not get installed:
|
|
|
|
</para>
|
|
|
|
|
2024-05-11 01:03:57 +08:00
|
|
|
<screen><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
|
2024-04-27 16:13:48 +08:00
|
|
|
</userinput></screen>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Now you may proceed.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<sect3>
|
|
|
|
<title>x86_64 MinGW-w64-binutils</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Install x86_64 <application>MinGW-w64-binutils</application>
|
|
|
|
by running the following commands:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>mkdir build-x86_64 &&
|
|
|
|
cd build-x86_64
|
|
|
|
|
|
|
|
../configure --prefix=/usr \
|
|
|
|
--target=x86_64-w64-mingw32 \
|
|
|
|
--infodir=/usr/share/info/x86_64-w64-mingw32 \
|
|
|
|
--enable-lto \
|
|
|
|
--enable-plugins \
|
|
|
|
--enable-deterministic-archives \
|
|
|
|
--disable-multilib \
|
|
|
|
--disable-nls \
|
|
|
|
--disable-werror
|
|
|
|
|
|
|
|
make</userinput></screen>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>make install
|
|
|
|
rm -v /usr/lib/bfd-plugins/libdep.so
|
|
|
|
</userinput></screen>
|
|
|
|
|
|
|
|
</sect3>
|
|
|
|
|
|
|
|
<sect3>
|
|
|
|
<title>i686 MinGW-w64-binutils</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Install i686 <application>MinGW-w64-binutils</application>
|
|
|
|
by running the following commands:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>mkdir build-i686 &&
|
|
|
|
cd build-i686
|
|
|
|
|
|
|
|
../configure --prefix=/usr \
|
|
|
|
--target=i686-w64-mingw32 \
|
|
|
|
--infodir=/usr/share/info/i686-w64-mingw32 \
|
|
|
|
--enable-lto \
|
|
|
|
--enable-plugins \
|
|
|
|
--enable-deterministic-archives \
|
|
|
|
--disable-multilib \
|
|
|
|
--disable-nls \
|
|
|
|
--disable-werror
|
|
|
|
|
|
|
|
make</userinput></screen>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>make install
|
|
|
|
rm -v /usr/lib/bfd-plugins/libdep.so
|
|
|
|
</userinput></screen>
|
|
|
|
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<parameter>--enable-lto</parameter>: This option builds lto support.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<parameter>--enable-plugins</parameter>: This option enables
|
|
|
|
plugin support for the linker.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<parameter>--enable-deterministic-archives</parameter>: This option
|
|
|
|
enables building determinable archives by hardcoding filemodes,
|
|
|
|
timestamps, and file owners into the archive.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<parameter>--disable-multilib</parameter>: This option disables
|
|
|
|
multilib support in each architecture. It is not needed and doing
|
|
|
|
a <application>Wine</application> WoW64 build just uses the
|
|
|
|
binaries from each architecture. Do not set <parameter>
|
|
|
|
--enable-multilib</parameter> for any <application>MinGW-w64
|
|
|
|
</application> package or else problems will occur.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<parameter>--disable-nls</parameter>: This option disables
|
|
|
|
nls support, disabling output diagnostics in languages other than
|
|
|
|
American English. Omit <parameter>--disable-nls</parameter> and
|
|
|
|
invoke <parameter>--enable-nls</parameter> to enable nls support.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<parameter>--disable-werror</parameter>: This option makes it so
|
|
|
|
warnings won't be considered errors.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<parameter>--target=*</parameter>: This option builds files for
|
|
|
|
the architecture passed to it.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>rm -v /usr/lib/bfd-plugins/libdep.so</command>:
|
|
|
|
This command removes an unnecessary library.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Libraries</segtitle>
|
|
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
|
|
|
<seg>
|
|
|
|
{i686,x86_64}-w64-mingw32-addr2line,
|
|
|
|
{i686,x86_64}-w64-mingw32-c++filt,
|
|
|
|
{i686,x86_64}-w64-mingw32-dllwrap,
|
|
|
|
{i686,x86_64}-w64-mingw32-elfedit,
|
|
|
|
{i686,x86_64}-w64-mingw32-gprof,
|
|
|
|
{i686,x86_64}-w64-mingw32-size,
|
|
|
|
{i686,x86_64}-w64-mingw32-strings,
|
|
|
|
{i686,x86_64}-w64-mingw32-windmc,
|
|
|
|
{i686,x86_64}-w64-mingw32-windres,
|
|
|
|
ar, as, dlltool, ld, ld.bfd, nm, objcopy, ranlib,
|
|
|
|
readelf, and strip (<application>MinGW-w64</application>
|
|
|
|
specific binaries besides formatting include:
|
|
|
|
{i686,x86_64}-w64-mingw32-dllwrap,
|
|
|
|
{i686,x86_64}-w64-mingw32-windmc,
|
|
|
|
{i686,x86_64}-w64-mingw32-windres,
|
|
|
|
and dlltool)
|
|
|
|
</seg>
|
|
|
|
<seg>
|
|
|
|
None
|
|
|
|
</seg>
|
|
|
|
<seg>
|
|
|
|
/usr/{i686,x86_64}-w64-mingw32/bin,
|
|
|
|
/usr/{i686,x86_64}-w64-mingw32/lib/ldscripts, and
|
|
|
|
/usr/share/info/{i686,x86_64}-w64-mingw32
|
|
|
|
</seg>
|
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Only binutils specific to <application>MinGW-w64</application>
|
|
|
|
will be explained. For the rest, see
|
|
|
|
<ulink url="https://www.linuxfromscratch.org/~thomas/multilib/chapter08/binutils.html">
|
|
|
|
binutils-&binutils-version;</ulink>.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="dllwrap">
|
|
|
|
<term><command>{i686,x86_64}-w64-mingw32-dllwrap</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
ancient tool for generating PE style DLLs
|
|
|
|
</para>
|
|
|
|
<indexterm zone="mingw-w64-binutils dllwrap">
|
|
|
|
<primary sortas="b-dllwrap">dllwrap</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="windmc">
|
|
|
|
<term><command>{i686,x86_64}-w64-mingw32-windmc</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
generates Windows message resources
|
|
|
|
</para>
|
|
|
|
<indexterm zone="mingw-w64-binutils windmc">
|
|
|
|
<primary sortas="b-windmc">windmc</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="windres">
|
|
|
|
<term><command>{i686,x86_64}-w64-mingw32-windres</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
manipulates Windows resources
|
|
|
|
</para>
|
|
|
|
<indexterm zone="mingw-w64-binutils windres">
|
|
|
|
<primary sortas="b-windres">windres</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="dlltool">
|
|
|
|
<term><command>dlltool</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
creates files neededto build and use DLLs
|
|
|
|
</para>
|
|
|
|
<indexterm zone="mingw-w64-binutils dlltool">
|
|
|
|
<primary sortas="b-dlltool">dlltool</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|