head	1.43;
access;
symbols
	netbsd-11-0-RC4:1.39.2.1
	netbsd-11-0-RC3:1.39.2.1
	netbsd-11-0-RC2:1.39
	netbsd-11-0-RC1:1.39
	perseant-exfatfs-base-20250801:1.39
	netbsd-11:1.39.0.2
	netbsd-11-base:1.39
	netbsd-10-1-RELEASE:1.33
	perseant-exfatfs-base-20240630:1.38
	perseant-exfatfs:1.38.0.2
	perseant-exfatfs-base:1.38
	netbsd-8-3-RELEASE:1.26.6.1
	netbsd-9-4-RELEASE:1.30
	netbsd-10-0-RELEASE:1.33
	netbsd-10-0-RC6:1.33
	netbsd-10-0-RC5:1.33
	netbsd-10-0-RC4:1.33
	netbsd-10-0-RC3:1.33
	netbsd-10-0-RC2:1.33
	netbsd-10-0-RC1:1.33
	netbsd-10:1.33.0.2
	netbsd-10-base:1.33
	netbsd-9-3-RELEASE:1.30
	cjep_sun2x-base1:1.32
	cjep_sun2x:1.32.0.4
	cjep_sun2x-base:1.32
	cjep_staticlib_x-base1:1.32
	netbsd-9-2-RELEASE:1.30
	cjep_staticlib_x:1.32.0.2
	cjep_staticlib_x-base:1.32
	netbsd-9-1-RELEASE:1.30
	phil-wifi-20200421:1.31
	phil-wifi-20200411:1.31
	is-mlppp:1.30.0.4
	is-mlppp-base:1.30
	phil-wifi-20200406:1.31
	netbsd-8-2-RELEASE:1.26.6.1
	netbsd-9-0-RELEASE:1.30
	netbsd-9-0-RC2:1.30
	netbsd-9-0-RC1:1.30
	phil-wifi-20191119:1.30
	netbsd-9:1.30.0.2
	netbsd-9-base:1.30
	phil-wifi-20190609:1.30
	netbsd-8-1-RELEASE:1.26.6.1
	netbsd-8-1-RC1:1.26.6.1
	pgoyette-compat-merge-20190127:1.26.12.3
	pgoyette-compat-20190127:1.30
	pgoyette-compat-20190118:1.30
	pgoyette-compat-1226:1.29
	pgoyette-compat-1126:1.29
	pgoyette-compat-1020:1.28
	pgoyette-compat-0930:1.28
	pgoyette-compat-0906:1.28
	netbsd-7-2-RELEASE:1.24
	pgoyette-compat-0728:1.28
	netbsd-8-0-RELEASE:1.26.6.1
	phil-wifi:1.28.0.2
	phil-wifi-base:1.28
	pgoyette-compat-0625:1.28
	netbsd-8-0-RC2:1.26.6.1
	pgoyette-compat-0521:1.28
	pgoyette-compat-0502:1.28
	pgoyette-compat-0422:1.26
	netbsd-8-0-RC1:1.26
	pgoyette-compat-0415:1.26
	pgoyette-compat-0407:1.26
	pgoyette-compat-0330:1.26
	pgoyette-compat-0322:1.26
	pgoyette-compat-0315:1.26
	netbsd-7-1-2-RELEASE:1.24
	pgoyette-compat:1.26.0.12
	pgoyette-compat-base:1.26
	netbsd-7-1-1-RELEASE:1.24
	matt-nb8-mediatek:1.26.0.10
	matt-nb8-mediatek-base:1.26
	perseant-stdc-iso10646:1.26.0.8
	perseant-stdc-iso10646-base:1.26
	netbsd-8:1.26.0.6
	netbsd-8-base:1.26
	prg-localcount2-base3:1.26
	prg-localcount2-base2:1.26
	prg-localcount2-base1:1.26
	prg-localcount2:1.26.0.4
	prg-localcount2-base:1.26
	pgoyette-localcount-20170426:1.26
	bouyer-socketcan-base1:1.26
	pgoyette-localcount-20170320:1.26
	netbsd-7-1:1.24.0.10
	netbsd-7-1-RELEASE:1.24
	netbsd-7-1-RC2:1.24
	netbsd-7-nhusb-base-20170116:1.24
	bouyer-socketcan:1.26.0.2
	bouyer-socketcan-base:1.26
	pgoyette-localcount-20170107:1.26
	netbsd-7-1-RC1:1.24
	pgoyette-localcount-20161104:1.26
	netbsd-7-0-2-RELEASE:1.24
	localcount-20160914:1.25
	netbsd-7-nhusb:1.24.0.8
	netbsd-7-nhusb-base:1.24
	pgoyette-localcount-20160806:1.25
	pgoyette-localcount-20160726:1.25
	pgoyette-localcount:1.25.0.2
	pgoyette-localcount-base:1.25
	netbsd-7-0-1-RELEASE:1.24
	netbsd-7-0:1.24.0.6
	netbsd-7-0-RELEASE:1.24
	netbsd-7-0-RC3:1.24
	netbsd-7-0-RC2:1.24
	netbsd-7-0-RC1:1.24
	netbsd-5-2-3-RELEASE:1.12
	netbsd-5-1-5-RELEASE:1.12
	netbsd-6-0-6-RELEASE:1.21.4.1
	netbsd-6-1-5-RELEASE:1.21.4.1
	netbsd-7:1.24.0.4
	netbsd-7-base:1.24
	yamt-pagecache-base9:1.24
	yamt-pagecache-tag8:1.21.2.1
	netbsd-6-1-4-RELEASE:1.21.4.1
	netbsd-6-0-5-RELEASE:1.21.4.1
	tls-earlyentropy:1.24.0.2
	tls-earlyentropy-base:1.24
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.24
	riastradh-drm2-base3:1.24
	netbsd-6-1-3-RELEASE:1.21.4.1
	netbsd-6-0-4-RELEASE:1.21.4.1
	netbsd-5-2-2-RELEASE:1.12
	netbsd-5-1-4-RELEASE:1.12
	netbsd-6-1-2-RELEASE:1.21.4.1
	netbsd-6-0-3-RELEASE:1.21.4.1
	netbsd-5-2-1-RELEASE:1.12
	netbsd-5-1-3-RELEASE:1.12
	netbsd-6-1-1-RELEASE:1.21.4.1
	riastradh-drm2-base2:1.22
	riastradh-drm2-base1:1.22
	riastradh-drm2:1.22.0.4
	riastradh-drm2-base:1.22
	netbsd-6-1:1.21.4.1.0.6
	netbsd-6-0-2-RELEASE:1.21.4.1
	netbsd-6-1-RELEASE:1.21.4.1
	netbsd-6-1-RC4:1.21.4.1
	netbsd-6-1-RC3:1.21.4.1
	agc-symver:1.22.0.6
	agc-symver-base:1.22
	netbsd-6-1-RC2:1.21.4.1
	netbsd-6-1-RC1:1.21.4.1
	yamt-pagecache-base8:1.22
	netbsd-5-2:1.12.0.24
	netbsd-6-0-1-RELEASE:1.21.4.1
	yamt-pagecache-base7:1.22
	netbsd-5-2-RELEASE:1.12
	netbsd-5-2-RC1:1.12
	matt-nb6-plus-nbase:1.21.4.1
	yamt-pagecache-base6:1.22
	netbsd-6-0:1.21.4.1.0.4
	netbsd-6-0-RELEASE:1.21.4.1
	netbsd-6-0-RC2:1.21.4.1
	tls-maxphys:1.22.0.2
	tls-maxphys-base:1.24
	matt-nb6-plus:1.21.4.1.0.2
	matt-nb6-plus-base:1.21.4.1
	netbsd-6-0-RC1:1.21.4.1
	yamt-pagecache-base5:1.22
	yamt-pagecache-base4:1.22
	netbsd-6:1.21.0.4
	netbsd-6-base:1.21
	netbsd-5-1-2-RELEASE:1.12
	netbsd-5-1-1-RELEASE:1.12
	yamt-pagecache-base3:1.21
	yamt-pagecache-base2:1.21
	yamt-pagecache:1.21.0.2
	yamt-pagecache-base:1.21
	cherry-xenmp:1.19.0.2
	cherry-xenmp-base:1.19
	bouyer-quota2-nbase:1.18
	bouyer-quota2:1.18.0.2
	bouyer-quota2-base:1.18
	matt-mips64-premerge-20101231:1.18
	matt-nb5-mips64-premerge-20101231:1.12
	matt-nb5-pq3:1.12.0.22
	matt-nb5-pq3-base:1.12
	netbsd-5-1:1.12.0.20
	netbsd-5-1-RELEASE:1.12
	netbsd-5-1-RC4:1.12
	matt-nb5-mips64-k15:1.12
	netbsd-5-1-RC3:1.12
	netbsd-5-1-RC2:1.12
	netbsd-5-1-RC1:1.12
	netbsd-5-0-2-RELEASE:1.12
	matt-nb5-mips64-premerge-20091211:1.12
	matt-premerge-20091211:1.18
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.12
	matt-nb4-mips64-k7-u2a-k9b:1.12
	matt-nb5-mips64-u1-k1-k5:1.12
	matt-nb5-mips64:1.12.0.18
	netbsd-5-0-1-RELEASE:1.12
	jym-xensuspend-nbase:1.12
	netbsd-5-0:1.12.0.16
	netbsd-5-0-RELEASE:1.12
	netbsd-5-0-RC4:1.12
	netbsd-5-0-RC3:1.12
	netbsd-5-0-RC2:1.12
	jym-xensuspend:1.12.0.14
	jym-xensuspend-base:1.12
	netbsd-5-0-RC1:1.12
	netbsd-5:1.12.0.12
	netbsd-5-base:1.12
	matt-mips64-base2:1.12
	matt-mips64:1.11.0.12
	mjf-devfs2:1.12.0.10
	mjf-devfs2-base:1.12
	netbsd-4-0-1-RELEASE:1.11
	wrstuden-revivesa-base-3:1.12
	wrstuden-revivesa-base-2:1.12
	wrstuden-fixsa-newbase:1.11
	wrstuden-revivesa-base-1:1.12
	yamt-pf42-base4:1.12
	yamt-pf42-base3:1.12
	hpcarm-cleanup-nbase:1.12
	yamt-pf42-baseX:1.12
	yamt-pf42-base2:1.12
	wrstuden-revivesa:1.12.0.8
	wrstuden-revivesa-base:1.12
	yamt-pf42:1.12.0.6
	yamt-pf42-base:1.12
	keiichi-mipv6-nbase:1.12
	keiichi-mipv6:1.12.0.4
	keiichi-mipv6-base:1.12
	matt-armv6-nbase:1.12
	matt-armv6-prevmlocking:1.11
	wrstuden-fixsa-base-1:1.11
	netbsd-4-0:1.11.0.10
	netbsd-4-0-RELEASE:1.11
	cube-autoconf:1.12.0.2
	cube-autoconf-base:1.12
	netbsd-4-0-RC5:1.11
	netbsd-4-0-RC4:1.11
	netbsd-4-0-RC3:1.11
	netbsd-4-0-RC2:1.11
	netbsd-4-0-RC1:1.11
	matt-armv6:1.11.0.8
	matt-armv6-base:1.12
	matt-mips64-base:1.11
	hpcarm-cleanup:1.11.0.6
	hpcarm-cleanup-base:1.12
	netbsd-3-1-1-RELEASE:1.9
	netbsd-3-0-3-RELEASE:1.9
	wrstuden-fixsa:1.11.0.4
	wrstuden-fixsa-base:1.11
	abandoned-netbsd-4-base:1.10
	abandoned-netbsd-4:1.10.0.2
	netbsd-3-1:1.9.0.6
	netbsd-3-1-RELEASE:1.9
	netbsd-3-0-2-RELEASE:1.9
	netbsd-3-1-RC4:1.9
	netbsd-3-1-RC3:1.9
	netbsd-3-1-RC2:1.9
	netbsd-3-1-RC1:1.9
	netbsd-4:1.11.0.2
	netbsd-4-base:1.11
	netbsd-3-0-1-RELEASE:1.9
	netbsd-3-0:1.9.0.4
	netbsd-3-0-RELEASE:1.9
	netbsd-3-0-RC6:1.9
	netbsd-3-0-RC5:1.9
	netbsd-3-0-RC4:1.9
	netbsd-3-0-RC3:1.9
	netbsd-3-0-RC2:1.9
	netbsd-3-0-RC1:1.9
	netbsd-2-0-3-RELEASE:1.7
	netbsd-2-1:1.7.0.6
	netbsd-2-1-RELEASE:1.7
	netbsd-2-1-RC6:1.7
	netbsd-2-1-RC5:1.7
	netbsd-2-1-RC4:1.7
	netbsd-2-1-RC3:1.7
	netbsd-2-1-RC2:1.7
	netbsd-2-1-RC1:1.7
	netbsd-2-0-2-RELEASE:1.7
	netbsd-3:1.9.0.2
	netbsd-3-base:1.9
	netbsd-2-0-1-RELEASE:1.7
	netbsd-2:1.7.0.4
	netbsd-2-base:1.7
	netbsd-2-0-RELEASE:1.7
	netbsd-2-0-RC5:1.7
	netbsd-2-0-RC4:1.7
	netbsd-2-0-RC3:1.7
	netbsd-2-0-RC2:1.7
	netbsd-2-0-RC1:1.7
	netbsd-2-0:1.7.0.2
	netbsd-2-0-base:1.7;
locks; strict;
comment	@# @;


1.43
date	2026.03.07.19.06.51;	author christos;	state Exp;
branches;
next	1.42;
commitid	cqhLwXR4z6COM4xG;

1.42
date	2025.09.24.14.23.01;	author rillig;	state Exp;
branches;
next	1.41;
commitid	wjp4cKJ1opAauYbG;

1.41
date	2025.09.24.04.43.01;	author rillig;	state Exp;
branches;
next	1.40;
commitid	pErnq3X9zR82hVbG;

1.40
date	2025.09.08.21.42.32;	author christos;	state Exp;
branches;
next	1.39;
commitid	iJx8mDCZlIgarX9G;

1.39
date	2024.07.04.01.19.44;	author christos;	state Exp;
branches
	1.39.2.1;
next	1.38;
commitid	cMXn11bzkwdswsgF;

1.38
date	2023.11.25.12.11.27;	author rin;	state Exp;
branches
	1.38.2.1;
next	1.37;
commitid	wzEkuu99IRQrgZNE;

1.37
date	2023.01.18.12.52.55;	author christos;	state Exp;
branches;
next	1.36;
commitid	YN4UNmgz3qExu1aE;

1.36
date	2022.12.31.05.44.25;	author mrg;	state Exp;
branches;
next	1.35;
commitid	PoqNllVUuzBtHF7E;

1.35
date	2022.12.25.17.25.22;	author christos;	state Exp;
branches;
next	1.34;
commitid	4ZvQsLJiEYrULX6E;

1.34
date	2022.12.24.20.17.46;	author christos;	state Exp;
branches;
next	1.33;
commitid	dEXC7X9BcKg6LQ6E;

1.33
date	2021.09.18.01.47.10;	author christos;	state Exp;
branches;
next	1.32;
commitid	NKw39S32w03lsn9D;

1.32
date	2021.05.07.23.00.04;	author christos;	state Exp;
branches;
next	1.31;
commitid	ZCrdQtuJfTCuOgSC;

1.31
date	2020.04.04.00.47.30;	author christos;	state Exp;
branches;
next	1.30;
commitid	G8IsG0neZ5eve03C;

1.30
date	2018.12.27.16.26.52;	author christos;	state Exp;
branches;
next	1.29;
commitid	GOevKWvNeCiwls5B;

1.29
date	2018.11.07.01.14.19;	author christos;	state Exp;
branches;
next	1.28;
commitid	1eDxoS5hwQm8UWYA;

1.28
date	2018.05.01.19.59.46;	author christos;	state Exp;
branches
	1.28.2.1;
next	1.27;
commitid	10Ge8dYtIFEjeDAA;

1.27
date	2018.05.01.00.04.34;	author christos;	state Exp;
branches;
next	1.26;
commitid	uQDEVvoGZCAoBwAA;

1.26
date	2016.10.11.03.57.00;	author mrg;	state Exp;
branches
	1.26.6.1
	1.26.12.1;
next	1.25;
commitid	0qJX9Yheg5Bd8Gpz;

1.25
date	2016.01.26.17.47.57;	author christos;	state Exp;
branches
	1.25.2.1;
next	1.24;
commitid	gc5vl4w82mVM3tSy;

1.24
date	2014.02.15.13.34.28;	author tsutsui;	state Exp;
branches;
next	1.23;
commitid	lO5886HE6hlftcpx;

1.23
date	2014.01.29.23.35.13;	author joerg;	state Exp;
branches;
next	1.22;
commitid	qAxxErbnmSqzl4nx;

1.22
date	2012.04.15.08.37.32;	author mrg;	state Exp;
branches
	1.22.2.1;
next	1.21;

1.21
date	2011.10.31.08.14.44;	author mrg;	state Exp;
branches
	1.21.2.1
	1.21.4.1;
next	1.20;

1.20
date	2011.08.04.02.38.41;	author mrg;	state Exp;
branches;
next	1.19;

1.19
date	2011.03.24.13.33.42;	author joerg;	state Exp;
branches;
next	1.18;

1.18
date	2009.11.20.22.51.29;	author skrll;	state Exp;
branches;
next	1.17;

1.17
date	2009.10.14.07.30.47;	author skrll;	state Exp;
branches;
next	1.16;

1.16
date	2009.10.12.08.00.41;	author skrll;	state Exp;
branches;
next	1.15;

1.15
date	2009.10.10.14.46.02;	author snj;	state Exp;
branches;
next	1.14;

1.14
date	2009.10.10.10.21.22;	author skrll;	state Exp;
branches;
next	1.13;

1.13
date	2009.08.18.15.08.51;	author skrll;	state Exp;
branches;
next	1.12;

1.12
date	2007.11.19.05.54.03;	author uebayasi;	state Exp;
branches;
next	1.11;

1.11
date	2006.08.27.07.04.00;	author simonb;	state Exp;
branches
	1.11.8.1;
next	1.10;

1.10
date	2006.02.02.22.03.54;	author skrll;	state Exp;
branches;
next	1.9;

1.9
date	2005.01.14.07.46.56;	author skrll;	state Exp;
branches;
next	1.8;

1.8
date	2004.12.12.12.42.35;	author mrg;	state Exp;
branches;
next	1.7;

1.7
date	2003.12.04.14.38.00;	author mrg;	state Exp;
branches;
next	1.6;

1.6
date	2003.12.04.09.29.36;	author mrg;	state Exp;
branches;
next	1.5;

1.5
date	2003.12.01.09.37.09;	author mrg;	state Exp;
branches;
next	1.4;

1.4
date	2003.11.27.10.12.02;	author mrg;	state Exp;
branches;
next	1.3;

1.3
date	2003.10.26.07.25.38;	author lukem;	state Exp;
branches;
next	1.2;

1.2
date	2003.10.26.01.06.27;	author cl;	state Exp;
branches;
next	1.1;

1.1
date	2003.07.25.16.26.52;	author mrg;	state Exp;
branches;
next	;

1.39.2.1
date	2026.03.08.10.56.27;	author martin;	state Exp;
branches;
next	;
commitid	AyLyPFHBhPMT2axG;

1.38.2.1
date	2025.08.02.05.58.22;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.28.2.1
date	2019.06.10.22.10.13;	author christos;	state Exp;
branches;
next	1.28.2.2;
commitid	jtc8rnCzWiEEHGqB;

1.28.2.2
date	2020.04.08.14.09.13;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;

1.26.6.1
date	2018.05.05.19.25.56;	author martin;	state Exp;
branches;
next	;
commitid	tsBirYemJEclV8BA;

1.26.12.1
date	2018.05.02.07.20.25;	author pgoyette;	state Exp;
branches;
next	1.26.12.2;
commitid	o3kRuNRzl9360HAA;

1.26.12.2
date	2018.11.26.01.52.53;	author pgoyette;	state Exp;
branches;
next	1.26.12.3;
commitid	Zj4q5SspGdKXto1B;

1.26.12.3
date	2019.01.18.08.51.01;	author pgoyette;	state Exp;
branches;
next	;
commitid	Lmlzg3OVT2cd6f8B;

1.25.2.1
date	2016.11.04.14.49.24;	author pgoyette;	state Exp;
branches;
next	;
commitid	2m1JRwYmpwPkOOsz;

1.22.2.1
date	2014.08.20.00.04.53;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.21.2.1
date	2012.04.17.00.09.27;	author yamt;	state Exp;
branches;
next	1.21.2.2;

1.21.2.2
date	2014.05.22.11.42.30;	author yamt;	state Exp;
branches;
next	;
commitid	kBu7extK0Pp6MwBx;

1.21.4.1
date	2012.05.07.03.08.35;	author riz;	state Exp;
branches
	1.21.4.1.2.1;
next	;

1.21.4.1.2.1
date	2012.11.20.18.54.42;	author matt;	state Exp;
branches;
next	1.21.4.1.2.2;

1.21.4.1.2.2
date	2012.11.20.23.14.28;	author matt;	state Exp;
branches;
next	;

1.11.8.1
date	2008.01.09.01.59.58;	author matt;	state Exp;
branches;
next	;


desc
@@


1.43
log
@PR/60063: Eirik Øverby: binutils fails to build if system has elftools
installed, because there is no elfutils/debuginfod.h.
@
text
@#	$NetBSD: Makefile,v 1.42 2025/09/24 14:23:01 rillig Exp $

.include <bsd.hostinit.mk>

MODULE=		binutils

GNUHOSTDIST=	${.CURDIR}/../../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/dist

BRANDING?=	\
	--with-pkgversion="NetBSD Binutils nb1" \
	--with-bugurl="http://www.NetBSD.org/support/send-pr.html" \
	--with-lib-path="=/usr/lib" --with-sysroot

BASE_CONFIGURE_ARGS= \
	--target=${MACHINE_GNU_PLATFORM} \
	--enable-initfini-array=yes \
	--enable-default-execstack=no \
	--with-debuginfod=no \
	${BRANDING}

CONFIGURE_ARGS=	--disable-nls --disable-werror \
		--with-zstd=no \
		--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
		${BASE_CONFIGURE_ARGS}

MAKE_ARGS=	MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}

ALL_TARGET=	all-binutils all-gas all-ld
INSTALL_TARGET=	install-binutils install-gas install-ld
.if ${MKCROSSGPROF:Uno} != "no"
ALL_TARGET+=	all-gprof
INSTALL_TARGET+=install-gprof
.endif

.include "${.CURDIR}/../Makefile.gnuhost"

CCADDFLAGS=	-I${GNUHOSTDIST}/include  -I${DESTDIR}/usr/include
CCADDFLAGS+=	-B${DESTDIR}/usr/lib/
CCADDFLAGS+=	${HOST_CPPFLAGS}
LDADDFLAGS=	-L${DESTDIR}/lib -L${DESTDIR}/usr/lib

# Force avoiding possibly non-executable install-sh.
CONFIGURE_ENV+= ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d"

NEWCONFIGDIR?=	${.CURDIR}/../..
.if ${EXTERNAL_BINUTILS_SUBDIR} == "binutils.old"
MKNATIVE=	${.CURDIR}/mknative-binutils.old
.endif
MKNATIVE?=	${.CURDIR}/mknative-binutils

native-binutils: .native/.configure_done
	@@echo 'Extracting GNU binutils configury for a native toolchain.'
	MAKE=${MAKE:Q} ${HOST_SH} ${MKNATIVE} binutils \
		${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}

.native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
	mkdir .native 2>/dev/null || true
	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
		(cd .native && ${CONFIGURE_ENV:NC*:NLD*} \
			CC_FOR_BUILD=${HOST_CC:Q} \
			CC=${CC:Q}' '${CCADDFLAGS:Q} \
			CXX=${CXX:Q}' '${CCADDFLAGS:Q} \
			CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
			CFLAGS= CPPFLAGS= CXXFLAGS= \
			LDFLAGS=${LDADDFLAGS:Q} \
			MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
			XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
			LIBS=-lintl \
			ac_cv_prog_cc_cross=yes \
			ac_cv_func_strcoll_works=yes \
			${HOST_SH} ${GNUHOSTDIST}/configure \
			--build=`${GNUHOSTDIST}/config.guess` \
			--host=${MACHINE_GNU_PLATFORM} \
			${BASE_CONFIGURE_ARGS} \
		)
	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
		(cd .native && ${MAKE} configure-host)
	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
		(cd .native/bfd && ${MAKE} bfd.h bfdver.h)
	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
		(cd .native/ld && ${MAKE} ldemul-list.h)
	@@touch $@@

CLEANFILES+=	PREV_BINUTILS

.if !defined(PREV_BINUTILS)
.  if exists(PREV_BINUTILS)
PREV_BINUTILS!=	cat PREV_BINUTILS
.  else
PREV_BINUTILS=
.  endif
.endif

CLEANFILES+=	PREV_BINUTILS

# Include the local NetBSD BINUTILS version so that bumps to it trigger rebuilds.
NETBSD_BINUTILS_VERSION_NOSPACE=nb1	# just to keep it the same with gcc

realall realdepend: .MAKE
.if !empty(PREV_BINUTILS) && "${PREV_BINUTILS}" != "${EXTERNAL_BINUTILS_SUBDIR}-${HAVE_BINUTILS}-${NETBSD_BINUTILS_VERSION_NOSPACE}"
	@@echo "*** WARNING: BINUTILS has changed version?"
	@@echo "*** PREV_BINUTILS '${PREV_BINUTILS}'"
	@@echo "*** NETBSD_BINUTILS_VERSION_NOSPACE '${NETBSD_BINUTILS_VERSION_NOSPACE}'"
	@@echo "***     !=  EXTERNAL_BINUTILS_SUBDIR-HAVE_BINUTILS-NETBSD_BINUTILS_VERSION_NOSPACE:"
	@@echo "***     !=  '${EXTERNAL_BINUTILS_SUBDIR}-${HAVE_BINUTILS}-${NETBSD_BINUTILS_VERSION_NOSPACE}'"
	@@echo "*** Cleaning mis-matched tools/binutils"
	rm -f PREV_BINUTILS
	(cd ${.CURDIR} && ${MAKE} cleandir)
.endif
	echo ${EXTERNAL_BINUTILS_SUBDIR}-${HAVE_BINUTILS}-${NETBSD_BINUTILS_VERSION_NOSPACE} >PREV_BINUTILS

clean: clean.native
clean.native:
	-rm -r -f .native

@


1.42
log
@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
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.40 2025/09/08 21:42:32 christos Exp $
d18 1
@


1.41
log
@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.
@
text
@d34 1
a34 1
.include "${.CURDIR}/../Makefile.gmakehost"
d52 1
a52 1
	MAKE=${MAKE_PROGRAM:Q} ${HOST_SH} ${MKNATIVE} binutils \
@


1.40
log
@use the same hack as in gcc to clean if the binutils version changed.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.39 2024/07/04 01:19:44 christos Exp $
d34 1
a34 1
.include "${.CURDIR}/../Makefile.gnuhost"
d52 1
a52 1
	MAKE=${MAKE:Q} ${HOST_SH} ${MKNATIVE} binutils \
@


1.39
log
@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).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.38 2023/11/25 12:11:27 rin Exp $
d83 28
d114 1
@


1.39.2.1
log
@Pull up following revision(s) (requested by hgutch in ticket #207):

	tools/binutils/Makefile: revision 1.43

PR/60063: Eirik Øverby: binutils fails to build if system has elftools
installed, because there is no elfutils/debuginfod.h.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.39 2024/07/04 01:19:44 christos Exp $
a17 1
	--with-debuginfod=no \
@


1.38
log
@tools/binutils: Add support to mknative for binutils.old
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.37 2023/01/18 12:52:55 christos Exp $
d21 1
@


1.38.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.39 2024/07/04 01:19:44 christos Exp $
a20 1
		--with-zstd=no \
@


1.37
log
@Disable enabling executable stack when the gnu stack note is missing.
Merge common configure arguments.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.36 2022/12/31 05:44:25 mrg Exp $
d44 3
@


1.36
log
@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.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.35 2022/12/25 17:25:22 christos Exp $
d14 7
a20 1
CONFIGURE_ARGS=	--target=${MACHINE_GNU_PLATFORM} --disable-nls \
d22 1
a22 2
		--disable-werror --enable-initfini-array=yes \
		${BRANDING}
d69 1
a69 3
			--target=${MACHINE_GNU_PLATFORM} \
			--enable-initfini-array=yes \
			${BRANDING} \
@


1.35
log
@Handle both places where m68k-parse can be found (for 2.34 and 2.39)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.34 2022/12/24 20:17:46 christos Exp $
a18 15
.if exists(${GNUHOSTDIST}/gas/config/m68k-parse.c)
M68K_PARSE=${GNUHOSTDIST}/gas/config/m68k-parse.c
.elif exists(${GNUHOSTDIST}/gas/m68k-parse.c) 
M68K_PARSE=${GNUHOSTDIST}/gas/m68k-parse.c
.else
.error "Can't find m68k-parse.c
.endif

build/gas/m68k-parse.c: ${M68K_PARSE}
	@@mkdir build 2>/dev/null || true
	@@mkdir build/gas 2>/dev/null || true
	cat ${M68K_PARSE} > ${.TARGET}

.configure_done: build/gas/m68k-parse.c

@


1.34
log
@Adjust for binutils-2.39
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.33 2021/09/18 01:47:10 christos Exp $
d19 9
a27 1
build/gas/m68k-parse.c: ${GNUHOSTDIST}/gas/config/m68k-parse.c
d30 1
a30 1
	cat ${GNUHOSTDIST}/gas/config/m68k-parse.c > ${.TARGET}
@


1.33
log
@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
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.32 2021/05/07 23:00:04 christos Exp $
d19 1
a19 1
build/gas/m68k-parse.c: ${GNUHOSTDIST}/gas/m68k-parse.c
d22 1
a22 1
	cat ${GNUHOSTDIST}/gas/m68k-parse.c > ${.TARGET}
@


1.32
log
@enable initfini-array since all platforms support it.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.31 2020/04/04 00:47:30 christos Exp $
d39 1
@


1.31
log
@put the binutils include before /usr/include to get the right md5.h
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.30 2018/12/27 16:26:52 christos Exp $
d16 1
a16 1
		--disable-werror --disable-initfini-array \
d71 1
a71 1
			--disable-initfini-array \
@


1.30
log
@explicitly disable initfini-array; we don't have it yet.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.29 2018/11/07 01:14:19 christos Exp $
d37 2
a38 1
CCADDFLAGS=	-I${DESTDIR}/usr/include -B${DESTDIR}/usr/lib/
@


1.29
log
@Adjust for 2.31.1
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.28 2018/05/01 19:59:46 christos Exp $
d16 1
a16 1
		--disable-werror \
@


1.28
log
@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
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.27 2018/05/01 00:04:34 christos Exp $
d70 1
@


1.28.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.30 2018/12/27 16:26:52 christos Exp $
d16 1
a16 1
		--disable-werror --disable-initfini-array \
a69 1
			--disable-initfini-array \
@


1.28.2.2
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
#	$NetBSD$
d37 1
a37 2
CCADDFLAGS=	-I${GNUHOSTDIST}/include  -I${DESTDIR}/usr/include
CCADDFLAGS+=	-B${DESTDIR}/usr/lib/
@


1.27
log
@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
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.26 2016/10/11 03:57:00 mrg Exp $
d3 1
a3 1
.include <bsd.init.mk>
@


1.26
log
@pass -L in LDFLAGS.  clang complains about it to stderr, and configure
checks for headers fail if there are unexpected stderr.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.25 2016/01/26 17:47:57 christos Exp $
d3 1
a3 1
.include <bsd.own.mk>
@


1.26.6.1
log
@Pull up following revision(s) (requested by christos in ticket #796):

	tools/mdsetimage/Makefile: revision 1.15
	tools/compat/Makefile: revision 1.82
	tools/gdb/Makefile: revision 1.35
	tools/lorder/Makefile: revision 1.13
	tools/gcc/Makefile: revision 1.85
	tools/dtc/Makefile: revision 1.3
	tools/cvslatest/Makefile: revision 1.2
	tools/ctfmerge/Makefile: revision 1.8
	tools/libelf/Makefile: revision 1.9
	tools/libdwarf/Makefile: revision 1.8
	tools/ctfconvert/Makefile: revision 1.7
	tools/makekeys/Makefile: revision 1.2
	tools/gettext/Makefile: revision 1.7
	tools/binstall/Makefile: revision 1.12
	tools/libfdt/Makefile: revision 1.3
	tools/libctf/Makefile: revision 1.7
	tools/binutils/Makefile: revision 1.27
	tools/mandoc/Makefile: revision 1.11
	tools/Makefile.host: revision 1.32
	tools/dbsym/Makefile: revision 1.13
	tools/genassym/Makefile: revision 1.7
	tools/Makefile.inc: revision 1.14

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
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.26 2016/10/11 03:57:00 mrg Exp $
d3 1
a3 1
.include <bsd.init.mk>
@


1.26.12.1
log
@Synch with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.28 2018/05/01 19:59:46 christos Exp $
d3 1
a3 1
.include <bsd.hostinit.mk>
@


1.26.12.2
log
@Sync with HEAD, resolve a couple of conflicts
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.29 2018/11/07 01:14:19 christos Exp $
a69 1
			--disable-initfini-array \
@


1.26.12.3
log
@Synch with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.26.12.2 2018/11/26 01:52:53 pgoyette Exp $
d16 1
a16 1
		--disable-werror --disable-initfini-array \
@


1.25
log
@use EXTERNAL_BINUTILS_SUBDIR
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.24 2014/02/15 13:34:28 tsutsui Exp $
d37 2
a38 1
CCADDFLAGS=	-I${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
d59 2
a60 1
			CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
@


1.25.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.26 2016/10/11 03:57:00 mrg Exp $
d37 1
a37 2
CCADDFLAGS=	-I${DESTDIR}/usr/include -B${DESTDIR}/usr/lib/
LDADDFLAGS=	-L${DESTDIR}/lib -L${DESTDIR}/usr/lib
d58 1
a58 2
			CFLAGS= CPPFLAGS= CXXFLAGS= \
			LDFLAGS=${LDADDFLAGS:Q} \
@


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

It rather fails if MKHOSTOBJ=yes.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.23 2014/01/29 23:35:13 joerg Exp $
d7 1
a7 1
GNUHOSTDIST=	${.CURDIR}/../../external/gpl3/binutils/dist
@


1.23
log
@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.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.22 2012/04/15 08:37:32 mrg Exp $
d19 1
a19 1
${.OBJDIR}/build/gas/m68k-parse.c: ${GNUHOSTDIST}/gas/m68k-parse.c
d24 1
a24 1
.configure_done: ${.OBJDIR}/build/gas/m68k-parse.c
@


1.22
log
@force set ac_cv_mkdir_path to our install -d program.
fixes the remaining issues with 'sourcesets' and 'tools'.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.21 2011/10/31 08:14:44 mrg Exp $
d19 7
@


1.22.2.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD$
a18 7
build/gas/m68k-parse.c: ${GNUHOSTDIST}/gas/m68k-parse.c
	@@mkdir build 2>/dev/null || true
	@@mkdir build/gas 2>/dev/null || true
	cat ${GNUHOSTDIST}/gas/m68k-parse.c > ${.TARGET}

.configure_done: build/gas/m68k-parse.c

@


1.21
log
@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!  (-:
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.20 2011/08/04 02:38:41 mrg Exp $
d32 3
@


1.21.4.1
log
@Pull up following revision(s) (requested by mrg in ticket #207):
	tools/gmp/Makefile: revision 1.2
	tools/mpfr/Makefile: revision 1.2
	tools/file/Makefile: revision 1.7
	tools/binutils/Makefile: revision 1.22
	tools/mpc/Makefile: revision 1.2
force ac_cv_path_mkdir to be set to nbinstall -d.  this will avoid
gmp/configure from trying to use its install-sh for mkdir -p, and
should fix sourcesets created tarball builds.
force set ac_cv_mkdir_path to our install -d program.
fixes the remaining issues with 'sourcesets' and 'tools'.
@
text
@d1 1
a1 1
#	$NetBSD$
a31 3
# Force avoiding possibly non-executable install-sh.
CONFIGURE_ENV+= ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d"

@


1.21.4.1.2.1
log
@Support building GPL2 versions of binutils, dbsym, gdb, and mdsetimage
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.21.4.1 2012/05/07 03:08:35 riz Exp $
a6 1
.if $(HAVE_BINUTILS) == "219"
a12 3
.else
BRANDING?=	
.endif
@


1.21.4.1.2.2
log
@Make sure binutils is using sysroot regardless of version.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.21.4.1.2.1 2012/11/20 18:54:42 matt Exp $
a8 1
.endif
d14 3
@


1.21.2.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.21 2011/10/31 08:14:44 mrg Exp $
a31 3
# Force avoiding possibly non-executable install-sh.
CONFIGURE_ENV+= ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d"

@


1.21.2.2
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.21.2.1 2012/04/17 00:09:27 yamt Exp $
a18 7
build/gas/m68k-parse.c: ${GNUHOSTDIST}/gas/m68k-parse.c
	@@mkdir build 2>/dev/null || true
	@@mkdir build/gas 2>/dev/null || true
	cat ${GNUHOSTDIST}/gas/m68k-parse.c > ${.TARGET}

.configure_done: build/gas/m68k-parse.c

@


1.20
log
@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.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.19 2011/03/24 13:33:42 joerg Exp $
a6 1
.if $(HAVE_BINUTILS) == "219"
a12 3
.else
BRANDING?=	
.endif
@


1.19
log
@Enable support for --sysroot in binutils and gcc.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.18 2009/11/20 22:51:29 skrll Exp $
d20 1
@


1.18
log
@Pull in fixes from binutils_2_19 branch.

Bump version and re-run mknative to pick up.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.17 2009/10/14 07:30:47 skrll Exp $
d12 2
a13 1
	--with-bugurl="http://www.NetBSD.org/support/send-pr.html"
@


1.17
log
@Only brand newer binutils.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.16 2009/10/12 08:00:41 skrll Exp $
d11 1
a11 1
	--with-pkgversion="NetBSD Binutils" \
@


1.16
log
@Better branding from mrg
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.15 2009/10/10 14:46:02 snj Exp $
a8 1
.endif
d13 3
@


1.15
log
@Adjust bug report URL to reflect htdocs changes.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.14 2009/10/10 10:21:22 skrll Exp $
d12 1
a12 1
	--with-pkgversion="NetBSD" \
@


1.14
log
@Add some NetBSD branding to binutils.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.13 2009/08/18 15:08:51 skrll Exp $
d13 1
a13 1
	--with-bugurl="http://www.NetBSD.org/Misc/send-pr.html"
@


1.13
log
@Build binutils 2.19.1 if HAVE_BINUTILS is 219
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.12 2007/11/19 05:54:03 uebayasi Exp $
d11 4
d16 2
a17 1
		--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-,"
d57 3
a59 1
			--target=${MACHINE_GNU_PLATFORM})
@


1.12
log
@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.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11 2006/08/27 07:04:00 simonb Exp $
d7 4
@


1.11
log
@Allow for building a crosstools version of gprof.
Disabled by default, can be enabled with MKCROSSGPROF=yes.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10 2006/02/02 22:03:54 skrll Exp $
d48 6
a53 3
			--target=${MACHINE_GNU_PLATFORM}) && \
		(cd .native && ${MAKE} configure-host) && \
		(cd .native/bfd && ${MAKE} bfd.h bfdver.h) && \
@


1.11.8.1
log
@sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD$
d48 3
a50 6
			--target=${MACHINE_GNU_PLATFORM})
	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
		(cd .native && ${MAKE} configure-host)
	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
		(cd .native/bfd && ${MAKE} bfd.h bfdver.h)
	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
@


1.10
log
@Adapt native-binutils to new binutils.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2005/01/14 07:46:56 skrll Exp $
d14 4
@


1.9
log
@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.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2004/12/12 12:42:35 mrg Exp $
d46 2
a47 9
		(cd .native/bfd && ${MAKE} bfd.h) && \
		(cd .native/ld && ${MAKE} ldemul-list.h) && \
		(cd .native && \
			${MAKE} configure-target-libiberty \
			CC_FOR_TARGET=${CC:Q}' '${CCADDFLAGS:Q} \
			CXX_FOR_TARGET=${CXX:Q}' '${CCADDFLAGS:Q} \
			CPP=${CPP:Q}' '-I${DESTDIR}/usr/include) && \
		(cd .native/${MACHINE_GNU_PLATFORM}/libiberty && \
			${MAKE} needed-list)
@


1.8
log
@for mknative, move -B from CC to CFLAGS, fixes vax configs
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2003/12/04 14:38:00 mrg Exp $
d17 1
a17 1
CCADDFLAGS=	-I${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib
d35 1
a35 2
			CFLAGS=-B${DESTDIR}/usr/lib/ CPPFLAGS= CXXFLAGS= \
			LDFLAGS= \
@


1.7
log
@move libaries back to gnu/lib
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2003/12/04 09:29:36 mrg Exp $
d17 1
a17 1
CCADDFLAGS=	-I${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
d35 2
a36 1
			CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
@


1.6
log
@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.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2003/12/01 09:37:09 mrg Exp $
d24 1
a24 1
	@@MAKE=${MAKE:Q} ${HOST_SH} ${MKNATIVE} binutils \
d42 1
a42 1
			--build=`${.CURDIR}/../../gnu/dist/toolchain/config.guess` \
@


1.5
log
@fix a bug in previous:
don't pass -L${DESTDIR}/usr/lib twice, pass it once with -L${DESTDIR}/lib.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2003/11/27 10:12:02 mrg Exp $
a4 1
.if ${HAVE_BINUTILS214} == "yes"
a5 3
.else
MODULE=		toolchain
.endif
@


1.4
log
@all `tooldir/nbmake-$ARCH native-binutils' support, to regenerate binutils
configury files for the integrated toolchain.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2003/10/26 07:25:38 lukem Exp $
d21 1
a21 1
CCADDFLAGS=	-I${DESTDIR}/usr/include -L${DESTDIR}/usr/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
@


1.3
log
@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.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2003/10/26 01:06:27 cl Exp $
d5 3
a7 1
# XXX make this "binutils" when binutils moves to gnu/dist/binutils
d9 1
a10 3
FIND_ARGS=	\! \( -type d -name sim -prune \)

#CONFIGURE_ENV=	LANGUAGES="c c++ objc f77"
d14 1
a14 2
MAKE_ARGS=	MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} \
		LIBGCC= LIBGCC1= LIBGCC1_TEST= LIBGCC2= INSTALL_LIBGCC=
d21 1
a21 1
CCADDFLAGS=	-I${DESTDIR}/usr/include -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
d24 1
a24 10

bootstrap-libgcc: .configure_done
	@@echo 'Creating files needed for libgcc by a native bootstrap build.'
	@@MAKE=${MAKE:Q} ${HOST_SH} ${.CURDIR}/mknative libgcc \
		${.OBJDIR}/build ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}

native: .native/.configure_done
	@@echo 'Extracting GNU configury for a native toolchain.'
	@@MAKE=${MAKE:Q} ${HOST_SH}  ${.CURDIR}/mknative all \
		${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}
d28 1
a28 11
	@@MAKE=${MAKE:Q} ${HOST_SH}  ${.CURDIR}/mknative binutils \
		${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}

native-gcc: .native/.configure_done
	@@echo 'Extracting GNU GCC configury for a native toolchain.'
	@@MAKE=${MAKE:Q} ${HOST_SH}  ${.CURDIR}/mknative gcc \
		${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}

native-gdb: .native/.configure_done
	@@echo 'Extracting GNU GDB configury for a native toolchain.'
	@@MAKE=${MAKE:Q} ${HOST_SH}  ${.CURDIR}/mknative gdb \
d32 2
a33 2
	@@mkdir .native 2>/dev/null || true
	@@PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
a44 4
			gcc_cv_func_printf_ptr=yes \
			gdb_cv_printf_has_long_double=yes \
			gdb_cv_printf_has_long_long=yes \
			gdb_cv_scanf_has_long_double=yes \
d49 1
a50 1
		(cd .native/gcc && ${MAKE} tree-check.h HOST_CC=${HOST_CC:Q}) && \
d52 1
a52 1
		(cd .native && touch gcc/cc1obj gcc/cc1plus gcc/f771 && \
a53 3
			configure-target-libf2c configure-target-libobjc \
			configure-target-libio configure-target-libstdc++ \
			ALL_GCC_C= ALL_GCC_CXX= \
a56 2
		(cd .native/${MACHINE_GNU_PLATFORM}/libio && \
			${MAKE} _G_config.h)
@


1.2
log
@add gdb53 as a host tool for use as a crossgdb
replaces gdb50 from toolchain on archs which use gcc3
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2003/07/25 16:26:52 mrg Exp $
d28 1
a28 1
	@@MAKE=${MAKE:Q} sh ${.CURDIR}/mknative libgcc \
d33 1
a33 1
	@@MAKE=${MAKE:Q} sh  ${.CURDIR}/mknative all \
d38 1
a38 1
	@@MAKE=${MAKE:Q} sh  ${.CURDIR}/mknative binutils \
d43 1
a43 1
	@@MAKE=${MAKE:Q} sh  ${.CURDIR}/mknative gcc \
d48 1
a48 1
	@@MAKE=${MAKE:Q} sh  ${.CURDIR}/mknative gdb \
d69 1
a69 1
			sh ${GNUHOSTDIST}/configure \
@


1.1
log
@- 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
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.28 2003/07/18 16:18:28 lukem Exp $
a18 5

.if ${MKCROSSGDB:Uno} != "no"
ALL_TARGET+=	all-gdb
INSTALL_TARGET+=install-gdb
.endif
@

