head	1.18;
access;
symbols
	netbsd-11-0-RC4:1.18
	netbsd-11-0-RC3:1.18
	netbsd-11-0-RC2:1.18
	netbsd-11-0-RC1:1.18
	perseant-exfatfs-base-20250801:1.18
	netbsd-11:1.18.0.2
	netbsd-11-base:1.18
	netbsd-10-1-RELEASE:1.13
	perseant-exfatfs-base-20240630:1.17
	perseant-exfatfs:1.17.0.2
	perseant-exfatfs-base:1.17
	netbsd-8-3-RELEASE:1.7
	netbsd-9-4-RELEASE:1.9
	netbsd-10-0-RELEASE:1.13
	netbsd-10-0-RC6:1.13
	netbsd-10-0-RC5:1.13
	netbsd-10-0-RC4:1.13
	netbsd-10-0-RC3:1.13
	netbsd-10-0-RC2:1.13
	netbsd-10-0-RC1:1.13
	netbsd-10:1.13.0.2
	netbsd-10-base:1.13
	netbsd-9-3-RELEASE:1.9
	cjep_sun2x-base1:1.12
	cjep_sun2x:1.12.0.4
	cjep_sun2x-base:1.12
	cjep_staticlib_x-base1:1.12
	netbsd-9-2-RELEASE:1.9
	cjep_staticlib_x:1.12.0.2
	cjep_staticlib_x-base:1.12
	netbsd-9-1-RELEASE:1.9
	phil-wifi-20200421:1.9
	phil-wifi-20200411:1.9
	is-mlppp:1.9.0.4
	is-mlppp-base:1.9
	phil-wifi-20200406:1.9
	netbsd-8-2-RELEASE:1.7
	netbsd-9-0-RELEASE:1.9
	netbsd-9-0-RC2:1.9
	netbsd-9-0-RC1:1.9
	phil-wifi-20191119:1.9
	netbsd-9:1.9.0.2
	netbsd-9-base:1.9
	phil-wifi-20190609:1.9
	netbsd-8-1-RELEASE:1.7
	netbsd-8-1-RC1:1.7
	pgoyette-compat-merge-20190127:1.7.14.1
	pgoyette-compat-20190127:1.9
	pgoyette-compat-20190118:1.9
	pgoyette-compat-1226:1.9
	pgoyette-compat-1126:1.9
	pgoyette-compat-1020:1.9
	pgoyette-compat-0930:1.9
	pgoyette-compat-0906:1.9
	netbsd-7-2-RELEASE:1.5
	pgoyette-compat-0728:1.9
	netbsd-8-0-RELEASE:1.7
	phil-wifi:1.7.0.16
	phil-wifi-base:1.7
	pgoyette-compat-0625:1.7
	netbsd-8-0-RC2:1.7
	pgoyette-compat-0521:1.7
	pgoyette-compat-0502:1.7
	pgoyette-compat-0422:1.7
	netbsd-8-0-RC1:1.7
	pgoyette-compat-0415:1.7
	pgoyette-compat-0407:1.7
	pgoyette-compat-0330:1.7
	pgoyette-compat-0322:1.7
	pgoyette-compat-0315:1.7
	netbsd-7-1-2-RELEASE:1.5
	pgoyette-compat:1.7.0.14
	pgoyette-compat-base:1.7
	netbsd-7-1-1-RELEASE:1.5
	matt-nb8-mediatek:1.7.0.12
	matt-nb8-mediatek-base:1.7
	perseant-stdc-iso10646:1.7.0.10
	perseant-stdc-iso10646-base:1.7
	netbsd-8:1.7.0.8
	netbsd-8-base:1.7
	prg-localcount2-base3:1.7
	prg-localcount2-base2:1.7
	prg-localcount2-base1:1.7
	prg-localcount2:1.7.0.6
	prg-localcount2-base:1.7
	pgoyette-localcount-20170426:1.7
	bouyer-socketcan-base1:1.7
	pgoyette-localcount-20170320:1.7
	netbsd-7-1:1.5.0.10
	netbsd-7-1-RELEASE:1.5
	netbsd-7-1-RC2:1.5
	netbsd-7-nhusb-base-20170116:1.5
	bouyer-socketcan:1.7.0.4
	bouyer-socketcan-base:1.7
	pgoyette-localcount-20170107:1.7
	netbsd-7-1-RC1:1.5
	pgoyette-localcount-20161104:1.7
	netbsd-7-0-2-RELEASE:1.5
	localcount-20160914:1.7
	netbsd-7-nhusb:1.5.0.8
	netbsd-7-nhusb-base:1.5
	pgoyette-localcount-20160806:1.7
	pgoyette-localcount-20160726:1.7
	pgoyette-localcount:1.7.0.2
	pgoyette-localcount-base:1.7
	netbsd-7-0-1-RELEASE:1.5
	netbsd-7-0:1.5.0.6
	netbsd-7-0-RELEASE:1.5
	netbsd-7-0-RC3:1.5
	netbsd-7-0-RC2:1.5
	netbsd-7-0-RC1:1.5
	netbsd-6-0-6-RELEASE:1.2
	netbsd-6-1-5-RELEASE:1.2
	netbsd-7:1.5.0.4
	netbsd-7-base:1.5
	yamt-pagecache-base9:1.5
	yamt-pagecache-tag8:1.2
	netbsd-6-1-4-RELEASE:1.2
	netbsd-6-0-5-RELEASE:1.2
	tls-earlyentropy:1.5.0.2
	tls-earlyentropy-base:1.5
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.5
	riastradh-drm2-base3:1.5
	netbsd-6-1-3-RELEASE:1.2
	netbsd-6-0-4-RELEASE:1.2
	netbsd-6-1-2-RELEASE:1.2
	netbsd-6-0-3-RELEASE:1.2
	netbsd-6-1-1-RELEASE:1.2
	riastradh-drm2-base2:1.2
	riastradh-drm2-base1:1.2
	riastradh-drm2:1.2.0.12
	riastradh-drm2-base:1.2
	netbsd-6-1:1.2.0.16
	netbsd-6-0-2-RELEASE:1.2
	netbsd-6-1-RELEASE:1.2
	netbsd-6-1-RC4:1.2
	netbsd-6-1-RC3:1.2
	agc-symver:1.2.0.14
	agc-symver-base:1.2
	netbsd-6-1-RC2:1.2
	netbsd-6-1-RC1:1.2
	yamt-pagecache-base8:1.2
	netbsd-6-0-1-RELEASE:1.2
	yamt-pagecache-base7:1.2
	matt-nb6-plus-nbase:1.2
	yamt-pagecache-base6:1.2
	netbsd-6-0:1.2.0.10
	netbsd-6-0-RELEASE:1.2
	netbsd-6-0-RC2:1.2
	tls-maxphys:1.2.0.8
	tls-maxphys-base:1.5
	matt-nb6-plus:1.2.0.6
	matt-nb6-plus-base:1.2
	netbsd-6-0-RC1:1.2
	yamt-pagecache-base5:1.2
	yamt-pagecache-base4:1.2
	netbsd-6:1.2.0.4
	netbsd-6-base:1.2
	yamt-pagecache-base3:1.2
	yamt-pagecache-base2:1.2
	yamt-pagecache:1.2.0.2
	yamt-pagecache-base:1.2;
locks; strict;
comment	@# @;


1.18
date	2024.08.27.17.07.07;	author christos;	state Exp;
branches;
next	1.17;
commitid	iTMpb5UIkvcW1unF;

1.17
date	2023.08.11.18.25.27;	author christos;	state Exp;
branches
	1.17.2.1;
next	1.16;
commitid	dhq9IyJ49pNeKoAE;

1.16
date	2023.08.11.17.46.01;	author christos;	state Exp;
branches;
next	1.15;
commitid	pcMBIvwyZyrGwoAE;

1.15
date	2023.08.09.21.09.07;	author christos;	state Exp;
branches;
next	1.14;
commitid	zBGNzSfrLxkiI9AE;

1.14
date	2023.05.08.20.56.19;	author skrll;	state Exp;
branches;
next	1.13;
commitid	PGIKAcMOP0TXCcoE;

1.13
date	2022.12.14.18.59.03;	author skrll;	state Exp;
branches;
next	1.12;
commitid	Vh30xLS8yRl1Ey5E;

1.12
date	2020.12.07.08.24.09;	author rin;	state Exp;
branches;
next	1.11;
commitid	BE0IPsaonT10PMyC;

1.11
date	2020.12.05.21.27.06;	author christos;	state Exp;
branches;
next	1.10;
commitid	kdQCn5u7eq0zdByC;

1.10
date	2020.09.17.02.17.51;	author christos;	state Exp;
branches;
next	1.9;
commitid	8Rois6BWWssEoloC;

1.9
date	2018.07.11.14.51.34;	author christos;	state Exp;
branches;
next	1.8;
commitid	9LTf6BcFXiPBfJJA;

1.8
date	2018.07.11.13.44.04;	author christos;	state Exp;
branches;
next	1.7;
commitid	mjAJBRGLZeVtSIJA;

1.7
date	2015.08.21.08.19.28;	author tron;	state Exp;
branches
	1.7.14.1
	1.7.16.1;
next	1.6;
commitid	icpKSqK2asoAZ6yy;

1.6
date	2015.08.16.09.51.58;	author christos;	state Exp;
branches;
next	1.5;
commitid	zCk9yWM1FZVgFtxy;

1.5
date	2014.01.20.10.49.33;	author apb;	state Exp;
branches;
next	1.4;
commitid	1DtINuLZSheBoQlx;

1.4
date	2013.08.13.19.29.45;	author drochner;	state Exp;
branches;
next	1.3;
commitid	LhI72CM0TM3dqk1x;

1.3
date	2013.08.04.23.41.43;	author matt;	state Exp;
branches;
next	1.2;
commitid	uZgukXfHn9tb6c0x;

1.2
date	2011.10.02.18.16.06;	author christos;	state Exp;
branches
	1.2.2.1
	1.2.8.1;
next	1.1;

1.1
date	2011.09.26.03.02.44;	author christos;	state Exp;
branches;
next	;

1.17.2.1
date	2025.08.02.05.32.59;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.7.14.1
date	2018.07.28.04.37.19;	author pgoyette;	state Exp;
branches;
next	;
commitid	1UP1xAIUxv1ZgRLA;

1.7.16.1
date	2019.06.10.22.00.20;	author christos;	state Exp;
branches;
next	;
commitid	jtc8rnCzWiEEHGqB;

1.2.2.1
date	2014.05.22.16.01.15;	author yamt;	state Exp;
branches;
next	;
commitid	SRuOnF9k1i4dcyBx;

1.2.8.1
date	2014.08.19.23.59.26;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;


desc
@@


1.18
log
@regen and make things compile (all builds except ppc sim)
@
text
@#	$NetBSD: Makefile,v 1.17 2023/08/11 18:25:27 christos Exp $

.include <bsd.own.mk>
.include "../Makefile.inc"

LIBISPRIVATE=	yes

LIB=		bfd

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

GCPPFLAGS=	${G_archdefs} ${G_DEFS} ${G_INCLUDES} ${G_TDEFAULTS}
CPPFLAGS+=	-I${.CURDIR}/arch/${GDB_MACHINE_ARCH} -I${DIST}/include -I. \
		-I${DIST}/bfd ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*} \
		-DDEBUGDIR=\"/usr/libdata/debug\" -DBINDIR=\"${BINDIR}\" \
		-DLIBDIR=\"/usr/libexec\"

GSRCS=		${G_libbfd_la_OBJECTS:libbfd.lo=lib_bfd.lo} \
		${G_libbfd_la_DEPENDENCIES:M*.lo}
SRCS=		${GSRCS:.lo=.c}

DPSRCS+=	elf32-target.h elf64-target.h targmatch.h \
		elf32-aarch64.c elf64-aarch64.c \
		elf32-ia64.c elf64-ia64.c \
		elf32-riscv.c elf64-riscv.c \
		peigen.c pex64igen.c
CLEANFILES+=	elf32-target.h elf64-target.h targmatch.h \
		elf32-aarch64.c elf64-aarch64.c \
		elf32-ia64.c elf64-ia64.c \
		elf32-riscv.c elf64-riscv.c \
		peigen.c pex64igen.c

.PATH: ${DIST}/bfd

.include <bsd.lib.mk>

COPTS+=         -Wno-stack-protector

${OBJS} ${SOBJS}: elf32-target.h elf64-target.h
targets.o targets.pico: targmatch.h Makefile

targmatch.h: config.bfd targmatch.sed
	${_MKTARGET_CREATE}
	${TOOL_SED} -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} >$@@

elf32-target.h: elfxx-target.h
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/NN/32/g < $> > $@@

elf64-target.h: elfxx-target.h
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/NN/64/g < $> > $@@

elf64-aarch64.c: elfnn-aarch64.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/NN/64/g < $> > $@@

elf32-aarch64.c: elfnn-aarch64.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/NN/32/g < $> > $@@

elf32-ia64.c: elfnn-ia64.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/NN/32/g < $> > $@@

elf64-ia64.c: elfnn-ia64.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/NN/64/g < $> > $@@

elf32-riscv.c: elfnn-riscv.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/NN/32/g < $> > $@@

elf64-riscv.c: elfnn-riscv.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/NN/64/g < $> > $@@

peigen.c: peXXigen.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/XX/pe/g < $> > $@@

pepigen.c: peXXigen.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/XX/pep/g < $> > $@@

pex64igen.c: peXXigen.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/XX/pex64/g < $> > $@@

pe-aarch64igen.c: peXXigen.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/XX/peAArch64/g < $> > $@@

pe-riscv64igen.c: peXXigen.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/XX/peRiscV64/g < $> > $@@
@


1.17
log
@fix ia64
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.16 2023/08/11 17:46:01 christos Exp $
d93 4
@


1.17.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.18 2024/08/27 17:07:07 christos Exp $
a92 4

pe-riscv64igen.c: peXXigen.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/XX/peRiscV64/g < $> > $@@
@


1.16
log
@Add powerpc/ia64
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.15 2023/08/09 21:09:07 christos Exp $
d62 1
a62 1
elf32-ia64.c: elfxx-ia64.c
d66 1
a66 1
elf64-ia64.c: elfxx-ia64.c
@


1.15
log
@make aarch64 compile (untested my box is dead)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.14 2023/05/08 20:56:19 skrll Exp $
d82 4
@


1.14
log
@RISC-V mknative and build support.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.13 2022/12/14 18:59:03 skrll Exp $
d85 4
@


1.13
log
@Sprinkle some sorting. NFCI.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.12 2020/12/07 08:24:09 rin Exp $
d25 1
d30 1
d70 8
@


1.12
log
@Add elf32-aarch64.c to DPSRCS and CLEANFILES.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11 2020/12/05 21:27:06 christos Exp $
d23 2
a24 1
		elf32-ia64.c elf64-ia64.c elf64-aarch64.c elf32-aarch64.c \
d27 2
a28 1
		elf32-ia64.c elf64-ia64.c elf64-aarch64.c elf32-aarch64.c \
d52 8
a67 8
elf64-aarch64.c: elfnn-aarch64.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/NN/64/g < $> > $@@

elf32-aarch64.c: elfnn-aarch64.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/NN/32/g < $> > $@@

@


1.11
log
@fix and rege aarch64
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10 2020/09/17 02:17:51 christos Exp $
d23 1
a23 1
		elf32-ia64.c elf64-ia64.c elf64-aarch64.c \
d26 1
a26 1
		elf32-ia64.c elf64-ia64.c elf64-aarch64.c \
@


1.10
log
@regen for x86_64 and start fixing the Makefiles (does not link yet)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2018/07/11 14:51:34 christos Exp $
d62 4
@


1.9
log
@it is not xx but nn that we want. also add missing dependencies.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2018/07/11 13:44:04 christos Exp $
d15 2
a16 1
		-DDEBUGDIR=\"/usr/libdata/debug\" -DBINDIR=\"${BINDIR}\"
@


1.8
log
@Add another elfxx conversion.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2015/08/21 08:19:28 tron Exp $
d22 2
a23 1
		elf32-ia64.c elf64-ia64.c peigen.c pex64igen.c
d25 2
a26 1
		elf32-ia64.c elf64-ia64.c peigen.c pex64igen.c
d57 1
a57 1
elf64-aarch64.c: elfxx-aarch64.c
@


1.7
log
@Fix build with "USE_SSP=yes".
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2015/08/16 09:51:58 christos Exp $
d55 4
@


1.7.16.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2018/07/11 14:51:34 christos Exp $
d22 1
a22 2
		elf32-ia64.c elf64-ia64.c elf64-aarch64.c \
		peigen.c pex64igen.c
d24 1
a24 2
		elf32-ia64.c elf64-ia64.c elf64-aarch64.c \
		peigen.c pex64igen.c
a54 4
elf64-aarch64.c: elfnn-aarch64.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/NN/64/g < $> > $@@

@


1.7.14.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2018/07/11 14:51:34 christos Exp $
d22 1
a22 2
		elf32-ia64.c elf64-ia64.c elf64-aarch64.c \
		peigen.c pex64igen.c
d24 1
a24 2
		elf32-ia64.c elf64-ia64.c elf64-aarch64.c \
		peigen.c pex64igen.c
a54 4
elf64-aarch64.c: elfnn-aarch64.c
	${_MKTARGET_CREATE}
	${TOOL_SED} -e s/NN/64/g < $> > $@@

@


1.6
log
@fix glue for gdb-7.9.1
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2014/01/20 10:49:33 apb Exp $
d30 2
@


1.5
log
@Don't embed ${DESTDIR} in the -DDEBUGDIR=... value.
DEBUGDIR should refer to a directory on the running system,
not the staging area used during a build.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2013/08/13 19:29:45 drochner Exp $
d15 1
a15 1
		-DDEBUGDIR=\"/usr/libdata/debug\"
@


1.4
log
@add to CLEANFILES at some places, for generated files
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2013/08/04 23:41:43 matt Exp $
d15 1
a15 1
		-DDEBUGDIR=\"${DESTDIR}/usr/libdata/debug\"
@


1.3
log
@Use GDB_MACHINE_ARCH instead of MACHINE_ARCH.
GDB_MACHINE_ARCH is MACHINE_ARCH, except armv[467] is replaced with arm instead.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2011/10/02 18:16:06 christos Exp $
d22 1
a22 1
		elf32-ia64.c elf64-ia64.c
d24 1
a24 1
		elf32-ia64.c elf64-ia64.c
@


1.2
log
@enable thread debugging support.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2011/09/26 03:02:44 christos Exp $
d10 1
a10 1
.include "${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk"
d13 1
a13 1
CPPFLAGS+=	-I${.CURDIR}/arch/${MACHINE_ARCH} -I${DIST}/include -I. \
@


1.2.8.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD$
d10 1
a10 1
.include "${.CURDIR}/arch/${GDB_MACHINE_ARCH}/defs.mk"
d13 1
a13 1
CPPFLAGS+=	-I${.CURDIR}/arch/${GDB_MACHINE_ARCH} -I${DIST}/include -I. \
d15 1
a15 1
		-DDEBUGDIR=\"/usr/libdata/debug\"
d22 1
a22 1
		elf32-ia64.c elf64-ia64.c peigen.c pex64igen.c
d24 1
a24 1
		elf32-ia64.c elf64-ia64.c peigen.c pex64igen.c
@


1.2.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.2 2011/10/02 18:16:06 christos Exp $
d10 1
a10 1
.include "${.CURDIR}/arch/${GDB_MACHINE_ARCH}/defs.mk"
d13 1
a13 1
CPPFLAGS+=	-I${.CURDIR}/arch/${GDB_MACHINE_ARCH} -I${DIST}/include -I. \
d15 1
a15 1
		-DDEBUGDIR=\"/usr/libdata/debug\"
d22 1
a22 1
		elf32-ia64.c elf64-ia64.c peigen.c pex64igen.c
d24 1
a24 1
		elf32-ia64.c elf64-ia64.c peigen.c pex64igen.c
@


1.1
log
@Build glue for x86_64. This is working gdb for amd64 minus kernel stacktrace
support. It is disabled for now because it breaks user program traces.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2011/06/20 09:27:43 mrg Exp $
d53 3
a55 3
#peigen.c: peXXigen.c
#	${_MKTARGET_CREATE}
#	${TOOL_SED} -e s/XX/pe/g < $> > $@@
@

