binutils - Various GNU compilers, assemblers, linkers, debuggers, etc. ChangeLog

HOWTO


# binutils 2.42
# =============
# Slackware 14.0: binutils 2.22.52.0.2
# Slackware 14.1: binutils 2.23.52.0.1
# Slackware 14.2: binutils 2.26
# Slackware 15.0: binutils 2.37
#
# Always check 'patches' for updates
# https://ftp.slackware.com/pub/slackware/slackware64-15.0/patches/

# In the past there have been two slightly different home pages for
# binutils, but as I write this, they're the same:
# https://www.gnu.org/software/binutils/
# https://www.sourceware.org/binutils/

# I pass --disable-nls to configure below because I'm in the US and only
# read/write English (well).  If this is not the case for you, leave that
# off below.

# GNU Binutils 2.42 release
# Documentation for binutils 2.42
# The GNU Binutils Wiki

# Beta releases used to be available from kernel.org, but no longer are.
# There are snapshots available at sourceware.org:
# https://sourceware.org/pub/binutils/snapshots/
# and different branches available via the Git repository:
# https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git

# If you have trouble with the download URL(s) below, try here:
# https://ftp.gnu.org/gnu/binutils
# ftp://ftp.gnu.org/gnu/binutils
# https://sourceware.org/pub/binutils/releases/

# Prerequisites:
# Bison
# m4
# flex
# texinfo
# itself (you need as, ranlib, etc. to build this)
# Java

# Get the tarball
cd
test -f installed/binutils-2.42.tar.xz &&
mv installed/binutils-2.42.tar.xz .
test ! -f binutils-2.42.tar.xz &&
wget http://ftpmirror.gnu.org/binutils/binutils-2.42.tar.xz

# Verify tarball w/ sha256sum:
# (this comes from the mailing list announcement)
echo "f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a8\
00  binutils-2.42.tar.xz" | sha256sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F > /dev/null 2>&1 ||
  gpg --recv-keys 3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F ) &&
wget -nc http://ftpmirror.gnu.org/binutils/binutils-2.42.tar.xz.sig &&
  gpg --verify binutils-2.42.tar.xz.sig && rm binutils-2.42.tar.xz.sig

# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "binutils-*" -exec rm -r {} \;
tar xJvf ~/binutils-2.42.tar.xz
cd binutils-2.42
test $UID = 0 && chown -R root:root .

# Verify the extracted files with sha256sum, if it outputs nothing, then
# they're all OK:
sha256sum -c sha256.sum | egrep -v ": OK$"

# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --sysconfdir=/etc --prefix=/usr --infodir=/usr/info \
--libdir=/usr/lib64 --mandir=/usr/man --disable-nls

# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --sysconfdir=/etc --prefix=/usr --infodir=/usr/info \
--mandir=/usr/man --disable-nls

# Build
make

# Become root to install it
su

# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg binutils

# Copy newly compiled binaries in place so we can use them to install this
cp binutils/strip-new /usr/bin/strip
binutils/strip-new /usr/bin/strip
install -s binutils/ar binutils/ranlib binutils/strings /usr/bin/
install -s gas/as-new /usr/bin/as
install -s ld/ld-new /usr/bin/ld

# Install it
make install
ldconfig

# Make sure everything is owned by your non-root user (or root if you're
# doing this as root) so you'll be able to remove the source directory
# later.
chown -R $(logname) .
chmod -R u+rw .

# Become yourself again
exit

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/binutils-*.tar.*
mv binutils-2.42.tar.xz installed/


# You can't really, if you want to be able to build and install software,
# but if you ever want to uninstall binutils, this should do it:
# (there is no 'make uninstall' target)
cd
su
rm -f /etc/gprofng.rc
( cd /usr/bin
  rm -f addr2line ar as c++filt elfedit gp-archive gp-collect-app \
   gp-display-src gp-display-html gp-display-text gprof gprofng ld \
   ld.bfd nm objcopy objdump ranlib readelf size strings strip )
( cd /usr/include
  rm -f ansidecl.h bfd.h bfdlink.h collectorAPI.h ctf-api.h ctf.h \
   diagnostics.h dis-asm.h libcollector.h libfcollector.h plugin-api.h \
   sframe-api.h sframe.h symcat.h )
( cd /usr/info
  rm -f as.info bdf.info binutils.info ctf-spec.info gprof.info \
   gprofng.info ld.info ldint.info sframe-spec.info )
( cd /usr/lib64
  rm -f libbfd.* libctf-nobfd.* libctf.* libgprofng.* libopcodes.* \
   libsframe.* )
test -d /usr/lib64/bfd-plugins && rm -r /usr/lib64/bfd-plugins
test -d /usr/lib64/gprofng && rm -r /usr/lib64/gprofng
( cd /usr/man/man1
  rm -f addr2line.1 ar.1 as.1 c++filt.1 dlltool.1 elfedit.1 gp-archive.1 \
   gp-collect-app.1 gp-display-html.1 gp-display-src.1 gp-display-text.1 \
   gprof.1 gprofng.1 ld.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 \
   size.1 strings.1 strip.1 windmc.1 windres.1 )
( cd /usr/x86_64-pc-linux-gnu/bin
  rm -f ar as ld ld.bfd nm objcopy objdump ranlib readelf strip )
test -d /usr/x86_64-pc-linux-gnu/lib/ldscripts &&
rm -f /usr/x86_64-pc-linux-gnu/lib/ldscripts
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "binutils-*" -exec rm -r {} \;
rm -f ~/installed/binutils-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2024-02-01 11:33pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]