head	1.13;
access;
symbols
	netbsd-11-0-RC4:1.10
	netbsd-11-0-RC3:1.10
	netbsd-11-0-RC2:1.10
	netbsd-11-0-RC1:1.10
	perseant-exfatfs-base-20250801:1.10
	netbsd-11:1.10.0.4
	netbsd-11-base:1.10
	netbsd-10-1-RELEASE:1.9
	perseant-exfatfs-base-20240630:1.10
	perseant-exfatfs:1.10.0.2
	perseant-exfatfs-base:1.10
	netbsd-8-3-RELEASE:1.8
	netbsd-9-4-RELEASE:1.8
	netbsd-10-0-RELEASE:1.9
	netbsd-10-0-RC6:1.9
	netbsd-10-0-RC5:1.9
	netbsd-10-0-RC4:1.9
	netbsd-10-0-RC3:1.9
	netbsd-10-0-RC2:1.9
	netbsd-10-0-RC1:1.9
	netbsd-10:1.9.0.8
	netbsd-10-base:1.9
	netbsd-9-3-RELEASE:1.8
	cjep_sun2x-base1:1.9
	cjep_sun2x:1.9.0.6
	cjep_sun2x-base:1.9
	cjep_staticlib_x-base1:1.9
	netbsd-9-2-RELEASE:1.8
	cjep_staticlib_x:1.9.0.4
	cjep_staticlib_x-base:1.9
	netbsd-9-1-RELEASE:1.8
	phil-wifi-20200421:1.9
	phil-wifi-20200411:1.9
	is-mlppp:1.9.0.2
	is-mlppp-base:1.9
	phil-wifi-20200406:1.9
	netbsd-8-2-RELEASE:1.8
	netbsd-9-0-RELEASE:1.8
	netbsd-9-0-RC2:1.8
	netbsd-9-0-RC1:1.8
	phil-wifi-20191119:1.9
	netbsd-9:1.8.0.18
	netbsd-9-base:1.8
	phil-wifi-20190609:1.8
	netbsd-8-1-RELEASE:1.8
	netbsd-8-1-RC1:1.8
	pgoyette-compat-merge-20190127:1.8
	pgoyette-compat-20190127:1.8
	pgoyette-compat-20190118:1.8
	pgoyette-compat-1226:1.8
	pgoyette-compat-1126:1.8
	pgoyette-compat-1020:1.8
	pgoyette-compat-0930:1.8
	pgoyette-compat-0906:1.8
	netbsd-7-2-RELEASE:1.7
	pgoyette-compat-0728:1.8
	netbsd-8-0-RELEASE:1.8
	phil-wifi:1.8.0.16
	phil-wifi-base:1.8
	pgoyette-compat-0625:1.8
	netbsd-8-0-RC2:1.8
	pgoyette-compat-0521:1.8
	pgoyette-compat-0502:1.8
	pgoyette-compat-0422:1.8
	netbsd-8-0-RC1:1.8
	pgoyette-compat-0415:1.8
	pgoyette-compat-0407:1.8
	pgoyette-compat-0330:1.8
	pgoyette-compat-0322:1.8
	pgoyette-compat-0315:1.8
	netbsd-7-1-2-RELEASE:1.7
	pgoyette-compat:1.8.0.14
	pgoyette-compat-base:1.8
	netbsd-7-1-1-RELEASE:1.7
	matt-nb8-mediatek:1.8.0.12
	matt-nb8-mediatek-base:1.8
	perseant-stdc-iso10646:1.8.0.10
	perseant-stdc-iso10646-base:1.8
	netbsd-8:1.8.0.8
	netbsd-8-base:1.8
	prg-localcount2-base3:1.8
	prg-localcount2-base2:1.8
	prg-localcount2-base1:1.8
	prg-localcount2:1.8.0.6
	prg-localcount2-base:1.8
	pgoyette-localcount-20170426:1.8
	bouyer-socketcan-base1:1.8
	pgoyette-localcount-20170320:1.8
	netbsd-7-1:1.7.0.8
	netbsd-7-1-RELEASE:1.7
	netbsd-7-1-RC2:1.7
	netbsd-7-nhusb-base-20170116:1.7
	bouyer-socketcan:1.8.0.4
	bouyer-socketcan-base:1.8
	pgoyette-localcount-20170107:1.8
	netbsd-7-1-RC1:1.7
	pgoyette-localcount-20161104:1.8
	netbsd-7-0-2-RELEASE:1.7
	localcount-20160914:1.8
	netbsd-7-nhusb:1.7.0.6
	netbsd-7-nhusb-base:1.7
	pgoyette-localcount-20160806:1.8
	pgoyette-localcount-20160726:1.8
	pgoyette-localcount:1.8.0.2
	pgoyette-localcount-base:1.8
	netbsd-7-0-1-RELEASE:1.7
	netbsd-7-0:1.7.0.4
	netbsd-7-0-RELEASE:1.7
	gcc-4-8-5-pre-gcc-old-import:1.7
	netbsd-7-0-RC3:1.7
	netbsd-7-0-RC2:1.7
	netbsd-7-0-RC1:1.7
	netbsd-6-0-6-RELEASE:1.3
	netbsd-6-1-5-RELEASE:1.3
	netbsd-7:1.7.0.2
	netbsd-7-base:1.7
	yamt-pagecache-base9:1.6
	yamt-pagecache-tag8:1.3
	netbsd-6-1-4-RELEASE:1.3
	netbsd-6-0-5-RELEASE:1.3
	tls-earlyentropy:1.6.0.2
	tls-earlyentropy-base:1.7
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.6
	riastradh-drm2-base3:1.6
	imported-to-gcc-old-20140227-0107:1.5
	netbsd-6-1-3-RELEASE:1.3
	netbsd-6-0-4-RELEASE:1.3
	netbsd-6-1-2-RELEASE:1.3
	netbsd-6-0-3-RELEASE:1.3
	netbsd-6-1-1-RELEASE:1.3
	riastradh-drm2-base2:1.3
	riastradh-drm2-base1:1.3
	riastradh-drm2:1.3.0.12
	riastradh-drm2-base:1.3
	netbsd-6-1:1.3.0.16
	netbsd-6-0-2-RELEASE:1.3
	netbsd-6-1-RELEASE:1.3
	netbsd-6-1-RC4:1.3
	netbsd-6-1-RC3:1.3
	agc-symver:1.3.0.14
	agc-symver-base:1.3
	netbsd-6-1-RC2:1.3
	netbsd-6-1-RC1:1.3
	yamt-pagecache-base8:1.3
	netbsd-6-0-1-RELEASE:1.3
	yamt-pagecache-base7:1.3
	matt-nb6-plus-nbase:1.3
	yamt-pagecache-base6:1.3
	netbsd-6-0:1.3.0.10
	netbsd-6-0-RELEASE:1.3
	netbsd-6-0-RC2:1.3
	tls-maxphys:1.3.0.8
	tls-maxphys-base:1.7
	matt-nb6-plus:1.3.0.6
	matt-nb6-plus-base:1.3
	netbsd-6-0-RC1:1.3
	yamt-pagecache-base5:1.3
	yamt-pagecache-base4:1.3
	netbsd-6:1.3.0.4
	netbsd-6-base:1.3
	yamt-pagecache-base3:1.3
	yamt-pagecache-base2:1.3
	yamt-pagecache:1.3.0.2
	yamt-pagecache-base:1.3;
locks; strict;
comment	@# @;


1.13
date	2026.01.20.20.27.26;	author christos;	state Exp;
branches;
next	1.12;
commitid	TTZgk21odmejIarG;

1.12
date	2025.09.18.03.15.38;	author mrg;	state Exp;
branches;
next	1.11;
commitid	1i8ribYLiJJyZ8bG;

1.11
date	2025.09.18.02.51.27;	author mrg;	state Exp;
branches;
next	1.10;
commitid	hfiLTlWDtN59R8bG;

1.10
date	2023.06.03.09.09.07;	author lukem;	state Exp;
branches;
next	1.9;
commitid	aBaIRnuykonRStrE;

1.9
date	2019.10.13.07.28.08;	author mrg;	state Exp;
branches;
next	1.8;
commitid	vRNwN94v7NgB2GGB;

1.8
date	2016.04.20.17.18.52;	author christos;	state Exp;
branches
	1.8.16.1;
next	1.7;
commitid	TdORkuSMnJRmao3z;

1.7
date	2014.06.01.19.51.01;	author mrg;	state Exp;
branches;
next	1.6;
commitid	BOTK7lyw6Na69RCx;

1.6
date	2014.03.01.10.00.40;	author mrg;	state Exp;
branches
	1.6.2.1;
next	1.5;
commitid	ls1VzPCZSNtqQYqx;

1.5
date	2014.02.26.09.54.33;	author mrg;	state Exp;
branches;
next	1.4;
commitid	tog8WsTJJZVqTAqx;

1.4
date	2013.08.22.00.16.54;	author matt;	state Exp;
branches;
next	1.3;
commitid	my4MtexPBiJJKn2x;

1.3
date	2011.08.09.12.58.55;	author joerg;	state Exp;
branches
	1.3.2.1
	1.3.8.1;
next	1.2;

1.2
date	2011.06.23.11.47.12;	author mrg;	state Exp;
branches;
next	1.1;

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

1.8.16.1
date	2020.04.13.07.59.07;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.6.2.1
date	2014.08.10.07.10.52;	author tls;	state Exp;
branches;
next	;
commitid	3hJZAsnr6L0lHMLx;

1.3.2.1
date	2014.05.22.16.53.24;	author yamt;	state Exp;
branches;
next	;
commitid	v7BzuaTHWIjEuyBx;

1.3.8.1
date	2014.08.19.23.56.47;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;


desc
@@


1.13
log
@disable lint for now; sha1.c uses x86 intrinsics now
@
text
@#	$NetBSD: Makefile,v 1.12 2025/09/18 03:15:38 mrg Exp $

NOLINT=yes	# XXX: too-many-errors
LIBISPRIVATE=	yes

.include <bsd.init.mk>

GCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/}

LIB=		iberty

.include "${.CURDIR}/defs.mk"

DIST=		${GCCDIST}
GNUHOSTDIST=	${DIST}

SRCS=		${G_REQUIRED_OFILES:Nalloca.o:.o=.c} ${G_EXTRA_OFILES:.o=.c} \
		${G_LIBOBJS:.o=.c}

CPPFLAGS+=	-DHAVE_CONFIG_H -I${.CURDIR}/arch/${GCC_MACHINE_ARCH} \
		-I${DIST}/include

COPTS.argv.c += -Wno-stack-protector
COPTS.cp-demangle.c += -Wno-stack-protector
COPTS.make-relative-prefix.c += -Wno-stack-protector
COPTS.regex.c += -Wno-stack-protector
COPTS += -Wno-missing-prototypes

CWARNFLAGS.clang+=	-Wno-unused-value

.PATH: ${DIST}/libiberty

COPTS.dyn-string.c+=	${CC_WNO_STRINGOP_TRUNCATION}

.include <bsd.lib.mk>
@


1.12
log
@fix merge botch from my other tree.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11 2025/09/18 02:51:27 mrg Exp $
d3 1
@


1.11
log
@mknative-gcc regen for GCC 14 and amd64/arm64*.

also, avoid alloca.c from libiberty always.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10 2023/06/03 09:09:07 lukem Exp $
d16 1
a16 1
SRCS=		${G_REQUIRED_OFILES:Salloca.o:.o=.c} ${G_EXTRA_OFILES:.o=.c} \
@


1.10
log
@bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2019/10/13 07:28:08 mrg Exp $
d16 2
a17 2
SRCS=		${G_REQUIRED_OFILES:.o=.c} ${G_EXTRA_OFILES:.o=.c} \
		${G_LIBOBJS:.o=.c} ${G_ALLOCA:.o=.c}
@


1.9
log
@introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2016/04/20 17:18:52 christos Exp $
d32 1
a32 1
COPTS.dyn-string.c+=	${GCC_NO_STRINGOP_TRUNCATION}
@


1.8
log
@WARNS=1
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2014/06/01 19:51:01 mrg Exp $
d32 2
@


1.8.16.1
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d1 1
a1 1
#	$NetBSD$
a31 2
COPTS.dyn-string.c+=	${GCC_NO_STRINGOP_TRUNCATION}

@


1.7
log
@port over 3 changes made here in the GCC 4.5 tree that we'll need
when GCC 4.8 becomes "gcc.old" eventually.

this tree still needs to be tested for more, but this should be the
bulk of the work.

----
Log Message:
prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
  because it arranges for ../Makefile.inc to be included earlier, and
  don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
  valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
    is kind of sketchy, it would be great if this was fixed.

----
Log Message:
oops, avoid re-setting DIST to something that might be wrong now.

----
Log Message:
fix another dated DIST.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2014/03/01 10:00:40 mrg Exp $
d22 5
a26 4
COPTS.argv.c = -Wno-stack-protector
COPTS.cp-demangle.c = -Wno-stack-protector
COPTS.make-relative-prefix.c = -Wno-stack-protector
COPTS.regex.c = -Wno-stack-protector
@


1.6
log
@merge GCC 4.8 build.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2011/08/09 12:58:55 joerg Exp $
d5 1
a5 1
.include <bsd.own.mk>
d13 1
a13 1
DIST=		${NETBSDSRCDIR}/external/gpl3/gcc/dist
@


1.6.2.1
log
@Rebase.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2014/06/01 19:51:01 mrg Exp $
d5 1
a5 1
.include <bsd.init.mk>
d13 1
a13 1
DIST=		${GCCDIST}
@


1.5
log
@prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
  because it arranges for ../Makefile.inc to be included earlier, and
  don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
  valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
    is kind of sketchy, it would be great if this was fixed.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2013/08/22 00:16:54 matt Exp $
d5 1
a5 1
.include <bsd.init.mk>
d13 1
a13 1
DIST=		${GCCDIST}
@


1.4
log
@Add MACHINE_ARCH's evbearmv5-e[bl] to work
Don't build _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 on earm and coldfire
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2011/08/09 12:58:55 joerg Exp $
d5 1
a5 1
.include <bsd.own.mk>
d13 1
a13 1
DIST=		${NETBSDSRCDIR}/external/gpl3/gcc/dist
@


1.3
log
@Disable -Wunused-value for clang, it triggers on the bcopy replacement.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2011/06/23 11:47:12 mrg Exp $
d7 2
d19 1
a19 1
CPPFLAGS+=	-DHAVE_CONFIG_H -I${.CURDIR}/arch/${MACHINE_ARCH} \
@


1.3.8.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD$
d5 1
a5 3
.include <bsd.init.mk>

GCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/}
d11 1
a11 1
DIST=		${GCCDIST}
d17 1
a17 1
CPPFLAGS+=	-DHAVE_CONFIG_H -I${.CURDIR}/arch/${GCC_MACHINE_ARCH} \
@


1.3.2.1
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.3 2011/08/09 12:58:55 joerg Exp $
a6 2
GCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/}

d17 1
a17 1
CPPFLAGS+=	-DHAVE_CONFIG_H -I${.CURDIR}/arch/${GCC_MACHINE_ARCH} \
@


1.2
log
@fix a bunch of paths to look in the right places for gcc 4.5.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2011/06/21 06:02:27 mrg Exp $
d25 2
@


1.1
log
@*sigh* move these files into the directories i meant for them to exist in.
start actually porting to gcc 4.5 in the process.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1.1.1 2011/06/21 02:48:27 mrg Exp $
d11 1
a11 1
DIST=		${NETBSDSRCDIR}/gnu/dist/gcc4
@

