MinGW-w64-Binutils-2.46

#### Gaming Linux® From Scratch - Version 13.0

### Chapter 20. The MinGW-w64 Toolchain

- Prev

  MinGW-w64-headers-13.0.0

- Next

  Static MinGW-w64-GCC-15.2.0

- Up
- Home

# MinGW-w64-Binutils-2.46

## Introduction to MinGW-w64-Binutils

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.

### Note

This may take a while to build. Feel free to do something else while this is building.

- Download: https://sourceware.org/pub/binutils/releases/binutils-with-gold-2.46.tar.xz

## Installation of MinGW-w64-Binutils

### x86_64 MinGW-w64-Binutils

Install x86_64 MinGW-w64-Binutils by running the following commands:

    mkdir build-x86_64 &&
    cd    build-x86_64 &&

    ../configure --prefix=/usr                                \
                 --target=x86_64-w64-mingw32                  \
                 --infodir=/usr/share/info/x86_64-w64-mingw32 \
                 --disable-nls                                \
                 --disable-werror                             \
                 --with-gold=no &&

    make

Now, as the `root` user:

    make   DESTDIR=$PWD/DESTDIR install          &&
    rm -v  DESTDIR/usr/lib/bfd-plugins/libdep.so &&
    cp -Rv DESTDIR/usr/* /usr                    &&
    rm -rf DESTDIR                               &&
    cd ..

### i686 MinGW-w64-Binutils

Install i686 MinGW-w64-Binutils by running the following commands:

    mkdir build-i686 &&
    cd    build-i686 &&

    ../configure --prefix=/usr                              \
                 --target=i686-w64-mingw32                  \
                 --infodir=/usr/share/info/i686-w64-mingw32 \
                 --disable-nls                              \
                 --disable-werror                           \
                 --with-gold=no &&

    make

Now, as the `root` user:

    make   DESTDIR=$PWD/DESTDIR install          &&
    rm -v  DESTDIR/usr/lib/bfd-plugins/libdep.so &&
    cp -Rv DESTDIR/usr/* /usr                    &&
    rm -rf DESTDIR

## Command Explanations

### Note

Run ../configure --help for a full list of options.

`--disable-nls`: This option disables NLS support, disabling output diagnostics in languages other than American English. Omit `--disable-nls` and invoke `--enable-nls` to enable NLS support.

`--disable-werror`: This option makes it so warnings won't be considered errors.

`--with-gold=no`: This option disables building gold, which is now considered deathware by many. The tarball used for the installation includes gold due to versioning issues, so this option helps counteract that.

`--target=*`: This option builds files for the architecture passed to it.

rm -v DESTDIR/usr/lib/bfd-plugins/libdep.so: This command removes an library that conflicts with the original library provided by the original compilation of Binutils.

## Contents

Installed Programs: {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 (MinGW-w64 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)
Installed Libraries: None
Installed Directories: /usr/{i686,x86_64}-w64-mingw32/bin, /usr/{i686,x86_64}-w64-mingw32/lib/ldscripts, and /usr/share/info/{i686,x86_64}-w64-mingw32

Only binutils specific to MinGW-w64 will be explained. For the rest, see Binutils.

### Short Descriptions

{i686,x86_64}-w64-mingw32-dllwrap | ancient tool for generating PE style DLLs
{i686,x86_64}-w64-mingw32-windmc | generates Windows message resources
{i686,x86_64}-w64-mingw32-windres | manipulates Windows resources
dlltool | creates files needed to build and use DLLs

- Prev

  MinGW-w64-headers-13.0.0

- Next

  Static MinGW-w64-GCC-15.2.0

- Up
- Home