History log of /src/tools/binutils/Makefile
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.42 24-Sep-2025 rillig

revert binutils: build using GNU make instead of BSD make

The change broke the MIPS builds, with error messages like:
> CC itbl-parse.o
> cc: error: itbl-parse.c: No such file or directory


# 1.41 24-Sep-2025 rillig

binutils: build using GNU make instead of BSD make

The binutils makefiles use expressions of the form $(filter-out ...),
which are only available in GNU make.

Switching to GNU make reduces the diff to upstream.


# 1.40 08-Sep-2025 christos

use the same hack as in gcc to clean if the binutils version changed.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
# 1.39 04-Jul-2024 christos

Disable zstd for now (used for compressing debugging symbols). It brings
in /usr/pkg/lib which has bad side effects (if for example libiberty is
installed it picks it twice).


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
# 1.38 25-Nov-2023 rin

branches: 1.38.2;
tools/binutils: Add support to mknative for binutils.old


# 1.37 18-Jan-2023 christos

Disable enabling executable stack when the gnu stack note is missing.
Merge common configure arguments.


# 1.36 31-Dec-2022 mrg

fix the binutils build with read-only source trees

don't play with m68k-parse.c in tools/binutils/Makefile but disable
the rules that rebuild it so we always use the upstream version,
using the standard "NetBSD_DISABLED" method.

this was necessary to build on linux in 2014 (which may or may not
still ne necessary), but it also avoids triggering rebuild rules
based upon the timestamps on .y vs .c.

tested with amiga, amd64, and i386 "build.sh tools" builds.


# 1.35 25-Dec-2022 christos

Handle both places where m68k-parse can be found (for 2.34 and 2.39)


# 1.34 24-Dec-2022 christos

Adjust for binutils-2.39


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.33 18-Sep-2021 christos

Patch the build script and toolchain to allow passing through
HOST_CPPFLAGS, HOST_CXXFLAGS, but not LIBRARY_PATH because it breaks
the build. These variables are necessary to support building NetBSD
from a GNU Guix or NixOS host, where /usr/include, /lib, and all
but /bin/sh do not exist. In many cases, support for HOST_CPPFLAGS
was incomplete. From Ryan Sundberg


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.32 07-May-2021 christos

enable initfini-array since all platforms support it.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.31 04-Apr-2020 christos

put the binutils include before /usr/include to get the right md5.h


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE is-mlppp-base netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.30 27-Dec-2018 christos

explicitly disable initfini-array; we don't have it yet.


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126
# 1.29 07-Nov-2018 christos

Adjust for 2.31.1


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502
# 1.28 01-May-2018 christos

branches: 1.28.2;
Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host


# 1.27 01-May-2018 christos

PR/53238: Robert Elz: Disable MKREPRO in tools; the host compiler might
not support the necessary options. This is done thusly:

1. Set MKREPRO=no in Makefile.host. This handles all the Makefiles that
use it and don't include bsd.own.mk.
2. Create Makefile.inc and set MKREPRO=no in it. Change the Makefiles that
include bsd.own.mk, to include bsd.init.mk which includes Makefile.inc
first. This will also allow us to control other tools options from a
single location if we need to.

XXX: pullup-8


Revision tags: pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.26 11-Oct-2016 mrg

branches: 1.26.6; 1.26.12;
pass -L in LDFLAGS. clang complains about it to stderr, and configure
checks for headers fail if there are unexpected stderr.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.25 26-Jan-2016 christos

branches: 1.25.2;
use EXTERNAL_BINUTILS_SUBDIR


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.24 15-Feb-2014 tsutsui

No need to specify ${.OBJDIR} for target files.

It rather fails if MKHOSTOBJ=yes.


# 1.23 29-Jan-2014 joerg

For the tools build, always use the Bison-created m68 asm parser.
Fixes build on Linux, where the glibc guards trip up the
"must-be-included-first" check in config.h.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
# 1.22 15-Apr-2012 mrg

branches: 1.22.2;
force set ac_cv_mkdir_path to our install -d program.
fixes the remaining issues with 'sourcesets' and 'tools'.


Revision tags: netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 31-Oct-2011 mrg

branches: 1.21.2; 1.21.4;
obsolete now useless (and wrongly set to "219" :-) HAVE_BINUTILS.
switch the sense of the gdb and gcc tests to list the platforms not
switched to gcc 4.5 or gdb 7, which is now:

GCC 4.1:
.if ${MACHINE_ARCH} == "alpha" || \
${MACHINE_CPU} == "arm" || \
${MACHINE_CPU} == "m68k" || \
${MACHINE_CPU} == "vax"

GDB 6:
.if ${MACHINE_ARCH} == "alpha" || \
${MACHINE_ARCH} == "hppa" || \
${MACHINE_CPU} == "mips" || \
${MACHINE_CPU} == "sh3" || \
${MACHINE_ARCH} == "vax"

let's go, people! (-:


# 1.20 04-Aug-2011 mrg

add --disable-werror. GCC 4.6 doesn't like some of the code here and
rather than patching code to fix it (and one case isn't trivially fixable)
simply turn off -Werror by default here. should fix PR#45140.


Revision tags: cherry-xenmp-base
# 1.19 24-Mar-2011 joerg

Enable support for --sysroot in binutils and gcc.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.18 20-Nov-2009 skrll

Pull in fixes from binutils_2_19 branch.

Bump version and re-run mknative to pick up.


# 1.17 14-Oct-2009 skrll

Only brand newer binutils.


# 1.16 12-Oct-2009 skrll

Better branding from mrg


# 1.15 10-Oct-2009 snj

Adjust bug report URL to reflect htdocs changes.


# 1.14 10-Oct-2009 skrll

Add some NetBSD branding to binutils.


# 1.13 18-Aug-2009 skrll

Build binutils 2.19.1 if HAVE_BINUTILS is 219


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.12 19-Nov-2007 uebayasi

target:
cmd1 && cmd2 && cmd3

| | |
v v v

target:
cmd1
cmd2
cmd3

This makes the script (cmd1 && cmd2 && cmd3) slightly easier to debug. No
functional change expected.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-mips64-base wrstuden-fixsa-base netbsd-4-base
# 1.11 27-Aug-2006 simonb

branches: 1.11.8;
Allow for building a crosstools version of gprof.
Disabled by default, can be enabled with MKCROSSGPROF=yes.


Revision tags: abandoned-netbsd-4-base
# 1.10 02-Feb-2006 skrll

Adapt native-binutils to new binutils.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.9 14-Jan-2005 skrll

Revert previous.

We need to fix vax a different way as the move of -B${DESTDIR}/usr/lib/
to CFLAGS filters into the defs.mk files.


# 1.8 12-Dec-2004 mrg

for mknative, move -B from CC to CFLAGS, fixes vax configs


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.7 04-Dec-2003 mrg

move libaries back to gnu/lib


# 1.6 04-Dec-2003 mrg

build lib{opcodes,bfd,iberty} back in gnu/lib instead of gnu/usr.bin/binutils
as they are needed earlier than when gnu/usr.bin/binutils is built when
"make -j" is used.


# 1.5 01-Dec-2003 mrg

fix a bug in previous:
don't pass -L${DESTDIR}/usr/lib twice, pass it once with -L${DESTDIR}/lib.


# 1.4 27-Nov-2003 mrg

all `tooldir/nbmake-$ARCH native-binutils' support, to regenerate binutils
configury files for the integrated toolchain.


# 1.3 26-Oct-2003 lukem

Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.


# 1.2 26-Oct-2003 cl

add gdb53 as a host tool for use as a crossgdb
replaces gdb50 from toolchain on archs which use gcc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative