head	1.36;
access;
symbols
	perseant-exfatfs-base-20250801:1.36
	perseant-exfatfs-base-20240630:1.36
	perseant-exfatfs:1.36.0.16
	perseant-exfatfs-base:1.36
	cjep_sun2x:1.36.0.14
	cjep_sun2x-base:1.36
	cjep_staticlib_x-base1:1.36
	cjep_staticlib_x:1.36.0.12
	cjep_staticlib_x-base:1.36
	phil-wifi-20200421:1.36
	phil-wifi-20200411:1.36
	phil-wifi-20200406:1.36
	pgoyette-compat-merge-20190127:1.36
	pgoyette-compat-20190127:1.36
	pgoyette-compat-20190118:1.36
	pgoyette-compat-1226:1.36
	pgoyette-compat-1126:1.36
	pgoyette-compat-1020:1.36
	pgoyette-compat-0930:1.36
	pgoyette-compat-0906:1.36
	pgoyette-compat-0728:1.36
	pgoyette-compat-0625:1.36
	pgoyette-compat-0521:1.36
	pgoyette-compat-0502:1.36
	pgoyette-compat-0422:1.36
	pgoyette-compat-0415:1.36
	pgoyette-compat-0407:1.36
	pgoyette-compat-0330:1.36
	pgoyette-compat-0322:1.36
	pgoyette-compat-0315:1.36
	pgoyette-compat:1.36.0.10
	pgoyette-compat-base:1.36
	perseant-stdc-iso10646:1.36.0.8
	perseant-stdc-iso10646-base:1.36
	prg-localcount2-base3:1.36
	prg-localcount2-base2:1.36
	prg-localcount2-base1:1.36
	prg-localcount2:1.36.0.6
	prg-localcount2-base:1.36
	pgoyette-localcount-20170426:1.36
	bouyer-socketcan-base1:1.36
	pgoyette-localcount-20170320:1.36
	bouyer-socketcan:1.36.0.4
	bouyer-socketcan-base:1.36
	pgoyette-localcount-20170107:1.36
	pgoyette-localcount-20161104:1.36
	localcount-20160914:1.36
	pgoyette-localcount-20160806:1.36
	pgoyette-localcount-20160726:1.36
	pgoyette-localcount:1.36.0.2
	pgoyette-localcount-base:1.36
	netbsd-5-2-3-RELEASE:1.30.4.2
	netbsd-5-1-5-RELEASE:1.30
	netbsd-6-0-6-RELEASE:1.34
	netbsd-6-1-5-RELEASE:1.34
	yamt-pagecache-base9:1.36
	yamt-pagecache-tag8:1.34.2.1
	netbsd-6-1-4-RELEASE:1.34
	netbsd-6-0-5-RELEASE:1.34
	tls-earlyentropy:1.35.0.8
	tls-earlyentropy-base:1.36
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.35
	riastradh-drm2-base3:1.35
	netbsd-6-1-3-RELEASE:1.34
	netbsd-6-0-4-RELEASE:1.34
	netbsd-5-2-2-RELEASE:1.30.4.2
	netbsd-5-1-4-RELEASE:1.30
	netbsd-6-1-2-RELEASE:1.34
	netbsd-6-0-3-RELEASE:1.34
	netbsd-5-2-1-RELEASE:1.30.4.2
	netbsd-5-1-3-RELEASE:1.30
	netbsd-6-1-1-RELEASE:1.34
	riastradh-drm2-base2:1.35
	riastradh-drm2-base1:1.35
	riastradh-drm2:1.35.0.4
	riastradh-drm2-base:1.35
	netbsd-6-1:1.34.0.10
	netbsd-6-0-2-RELEASE:1.34
	netbsd-6-1-RELEASE:1.34
	netbsd-6-1-RC4:1.34
	netbsd-6-1-RC3:1.34
	agc-symver:1.35.0.6
	agc-symver-base:1.35
	netbsd-6-1-RC2:1.34
	netbsd-6-1-RC1:1.34
	yamt-pagecache-base8:1.35
	netbsd-5-2:1.30.4.2.0.2
	netbsd-6-0-1-RELEASE:1.34
	yamt-pagecache-base7:1.35
	netbsd-5-2-RELEASE:1.30.4.2
	netbsd-5-2-RC1:1.30.4.2
	matt-nb6-plus-nbase:1.34
	yamt-pagecache-base6:1.35
	netbsd-6-0:1.34.0.8
	netbsd-6-0-RELEASE:1.34
	netbsd-6-0-RC2:1.34
	tls-maxphys:1.35.0.2
	tls-maxphys-base:1.36
	matt-nb6-plus:1.34.0.6
	matt-nb6-plus-base:1.34
	netbsd-6-0-RC1:1.34
	yamt-pagecache-base5:1.34
	yamt-pagecache-base4:1.34
	netbsd-6:1.34.0.4
	netbsd-6-base:1.34
	netbsd-5-1-2-RELEASE:1.30
	netbsd-5-1-1-RELEASE:1.30
	yamt-pagecache-base3:1.34
	yamt-pagecache-base2:1.34
	yamt-pagecache:1.34.0.2
	yamt-pagecache-base:1.34
	cherry-xenmp:1.32.0.4
	cherry-xenmp-base:1.32
	bouyer-quota2-nbase:1.32
	bouyer-quota2:1.32.0.2
	bouyer-quota2-base:1.32
	matt-mips64-premerge-20101231:1.32
	matt-nb5-mips64-premerge-20101231:1.30.10.1
	matt-nb5-pq3:1.30.0.14
	matt-nb5-pq3-base:1.30
	netbsd-5-1:1.30.0.12
	netbsd-5-1-RELEASE:1.30
	netbsd-5-1-RC4:1.30
	matt-nb5-mips64-k15:1.30.10.1
	netbsd-5-1-RC3:1.30
	netbsd-5-1-RC2:1.30
	netbsd-5-1-RC1:1.30
	netbsd-5-0-2-RELEASE:1.30
	matt-nb5-mips64-premerge-20091211:1.30.10.1
	matt-premerge-20091211:1.32
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.30.10.1
	matt-nb4-mips64-k7-u2a-k9b:1.30.10.1
	matt-nb5-mips64-u1-k1-k5:1.30
	matt-nb5-mips64:1.30.0.10
	netbsd-5-0-1-RELEASE:1.30
	jym-xensuspend-nbase:1.31
	netbsd-5-0:1.30.0.8
	netbsd-5-0-RELEASE:1.30
	netbsd-5-0-RC4:1.30
	netbsd-5-0-RC3:1.30
	netbsd-5-0-RC2:1.30
	jym-xensuspend:1.30.0.6
	jym-xensuspend-base:1.31
	netbsd-5-0-RC1:1.30
	netbsd-5:1.30.0.4
	netbsd-5-base:1.30
	matt-mips64-base2:1.30
	matt-mips64:1.27.0.14
	netbsd-4-0-1-RELEASE:1.27
	wrstuden-revivesa-base-3:1.30
	wrstuden-revivesa-base-2:1.30
	wrstuden-fixsa-newbase:1.27
	wrstuden-revivesa-base-1:1.28
	yamt-pf42-base4:1.28
	yamt-pf42-base3:1.28
	hpcarm-cleanup-nbase:1.28
	yamt-pf42-baseX:1.28
	yamt-pf42-base2:1.28
	wrstuden-revivesa:1.28.0.8
	wrstuden-revivesa-base:1.28
	yamt-pf42:1.28.0.6
	yamt-pf42-base:1.28
	keiichi-mipv6:1.28.0.4
	keiichi-mipv6-base:1.28
	matt-armv6-nbase:1.28
	matt-armv6-prevmlocking:1.27
	wrstuden-fixsa-base-1:1.27
	netbsd-4-0:1.27.0.12
	netbsd-4-0-RELEASE:1.27
	cube-autoconf:1.28.0.2
	cube-autoconf-base:1.28
	netbsd-4-0-RC5:1.27
	netbsd-4-0-RC4:1.27
	netbsd-4-0-RC3:1.27
	netbsd-4-0-RC2:1.27
	netbsd-4-0-RC1:1.27
	matt-armv6:1.27.0.10
	matt-armv6-base:1.28
	matt-mips64-base:1.27
	hpcarm-cleanup:1.27.0.8
	hpcarm-cleanup-base:1.28
	netbsd-3-1-1-RELEASE:1.25
	netbsd-3-0-3-RELEASE:1.25
	wrstuden-fixsa:1.27.0.6
	wrstuden-fixsa-base:1.27
	abandoned-netbsd-4-base:1.27
	abandoned-netbsd-4:1.27.0.2
	netbsd-3-1:1.25.0.6
	netbsd-3-1-RELEASE:1.25
	netbsd-3-0-2-RELEASE:1.25
	netbsd-3-1-RC4:1.25
	netbsd-3-1-RC3:1.25
	netbsd-3-1-RC2:1.25
	netbsd-3-1-RC1:1.25
	netbsd-4:1.27.0.4
	netbsd-4-base:1.27
	netbsd-3-0-1-RELEASE:1.25
	netbsd-3-0:1.25.0.4
	netbsd-3-0-RELEASE:1.25
	netbsd-3-0-RC6:1.25
	netbsd-3-0-RC5:1.25
	netbsd-3-0-RC4:1.25
	netbsd-3-0-RC3:1.25
	netbsd-3-0-RC2:1.25
	netbsd-3-0-RC1:1.25
	netbsd-2-0-3-RELEASE:1.24
	netbsd-2-1:1.24.0.6
	netbsd-2-1-RELEASE:1.24
	netbsd-2-1-RC6:1.24
	netbsd-2-1-RC5:1.24
	netbsd-2-1-RC4:1.24
	netbsd-2-1-RC3:1.24
	netbsd-2-1-RC2:1.24
	netbsd-2-1-RC1:1.24
	netbsd-2-0-2-RELEASE:1.24
	netbsd-3:1.25.0.2
	netbsd-3-base:1.25
	netbsd-2-0-1-RELEASE:1.24
	netbsd-2:1.24.0.4
	netbsd-2-base:1.24
	netbsd-2-0-RELEASE:1.24
	netbsd-2-0-RC5:1.24
	netbsd-2-0-RC4:1.24
	netbsd-2-0-RC3:1.24
	netbsd-2-0-RC2:1.24
	netbsd-2-0-RC1:1.24
	netbsd-2-0:1.24.0.2
	netbsd-2-0-base:1.24
	netbsd-1-6-PATCH002-RELEASE:1.16
	netbsd-1-6-PATCH002:1.16
	netbsd-1-6-PATCH002-RC4:1.16
	netbsd-1-6-PATCH002-RC3:1.16
	netbsd-1-6-PATCH002-RC2:1.16
	netbsd-1-6-PATCH002-RC1:1.16
	netbsd-1-6-PATCH001:1.16
	netbsd-1-6-PATCH001-RELEASE:1.16
	netbsd-1-6-PATCH001-RC3:1.16
	netbsd-1-6-PATCH001-RC2:1.16
	netbsd-1-6-PATCH001-RC1:1.16
	fvdl_fs64_base:1.20
	netbsd-1-6-RELEASE:1.16
	netbsd-1-6-RC3:1.16
	netbsd-1-6-RC2:1.16
	netbsd-1-6-RC1:1.16
	netbsd-1-6:1.16.0.2
	netbsd-1-6-base:1.16
	netbsd-1-5-PATCH003:1.5.4.1
	netbsd-1-5-PATCH002:1.5
	netbsd-1-5-PATCH001:1.5
	netbsd-1-5-RELEASE:1.5
	netbsd-1-5-BETA2:1.5
	netbsd-1-5-BETA:1.5
	netbsd-1-4-PATCH003:1.1.2.2
	netbsd-1-5-ALPHA2:1.5
	netbsd-1-5:1.5.0.4
	netbsd-1-5-base:1.5
	minoura-xpg4dl:1.5.0.2
	minoura-xpg4dl-base:1.5
	netbsd-1-4-PATCH002:1.1.2.2
	wrstuden-devbsize-19991221:1.3
	wrstuden-devbsize:1.3.0.4
	wrstuden-devbsize-base:1.3
	comdex-fall-1999:1.3.0.2
	comdex-fall-1999-base:1.3
	netbsd-1-4-PATCH001:1.1.2.2
	netbsd-1-4-RELEASE:1.1.2.2
	netbsd-1-4:1.1.0.2
	netbsd-1-4-base:1.1;
locks; strict;
comment	@# @;


1.36
date	2014.04.22.13.23.36;	author joerg;	state dead;
branches;
next	1.35;
commitid	7sgUKhI1rNcsiGxx;

1.35
date	2012.08.04.14.59.05;	author matt;	state Exp;
branches
	1.35.2.1
	1.35.8.1;
next	1.34;

1.34
date	2011.06.30.20.09.15;	author wiz;	state Exp;
branches
	1.34.2.1;
next	1.33;

1.33
date	2011.06.20.06.52.36;	author mrg;	state Exp;
branches;
next	1.32;

1.32
date	2009.12.13.08.52.38;	author mrg;	state Exp;
branches
	1.32.4.1;
next	1.31;

1.31
date	2009.02.18.15.21.52;	author christos;	state Exp;
branches;
next	1.30;

1.30
date	2008.08.29.00.02.22;	author gmcgarry;	state Exp;
branches
	1.30.4.1
	1.30.6.1
	1.30.10.1;
next	1.29;

1.29
date	2008.07.21.15.34.58;	author lukem;	state Exp;
branches;
next	1.28;

1.28
date	2007.12.01.11.06.36;	author yamt;	state Exp;
branches
	1.28.8.1;
next	1.27;

1.27
date	2006.06.02.22.16.18;	author mrg;	state Exp;
branches
	1.27.10.1;
next	1.26;

1.26
date	2006.05.13.01.40.34;	author mrg;	state Exp;
branches;
next	1.25;

1.25
date	2004.08.28.00.18.38;	author thorpej;	state Exp;
branches;
next	1.24;

1.24
date	2003.11.11.11.32.39;	author dsl;	state Exp;
branches;
next	1.23;

1.23
date	2003.03.19.16.54.25;	author ross;	state Exp;
branches;
next	1.22;

1.22
date	2003.03.19.04.31.41;	author ross;	state Exp;
branches;
next	1.21;

1.21
date	2003.03.18.19.11.57;	author christos;	state Exp;
branches;
next	1.20;

1.20
date	2002.11.26.19.27.09;	author thorpej;	state Exp;
branches;
next	1.19;

1.19
date	2002.11.22.06.44.58;	author thorpej;	state Exp;
branches;
next	1.18;

1.18
date	2002.08.19.09.41.27;	author lukem;	state Exp;
branches;
next	1.17;

1.17
date	2002.06.06.19.17.01;	author fvdl;	state Exp;
branches;
next	1.16;

1.16
date	2002.05.05.00.45.31;	author thorpej;	state Exp;
branches;
next	1.15;

1.15
date	2002.05.05.00.34.00;	author thorpej;	state Exp;
branches;
next	1.14;

1.14
date	2002.01.13.19.59.26;	author thorpej;	state Exp;
branches;
next	1.13;

1.13
date	2001.12.31.00.40.11;	author thorpej;	state Exp;
branches;
next	1.12;

1.12
date	2001.12.31.00.11.13;	author thorpej;	state Exp;
branches;
next	1.11;

1.11
date	2001.12.30.23.45.00;	author thorpej;	state Exp;
branches;
next	1.10;

1.10
date	2001.11.05.15.11.40;	author lukem;	state Exp;
branches;
next	1.9;

1.9
date	2001.08.03.14.26.13;	author thorpej;	state Exp;
branches;
next	1.8;

1.8
date	2001.08.03.05.54.43;	author thorpej;	state Exp;
branches;
next	1.7;

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

1.6
date	2001.05.17.21.17.02;	author fredette;	state Exp;
branches;
next	1.5;

1.5
date	2000.04.02.15.35.47;	author minoura;	state Exp;
branches
	1.5.4.1;
next	1.4;

1.4
date	2000.01.22.19.37.58;	author mycroft;	state Exp;
branches;
next	1.3;

1.3
date	99.04.03.16.39.31;	author simonb;	state Exp;
branches;
next	1.2;

1.2
date	99.04.02.12.09.44;	author tsubai;	state Exp;
branches;
next	1.1;

1.1
date	99.03.20.00.32.40;	author thorpej;	state Exp;
branches
	1.1.2.1;
next	;

1.35.2.1
date	2014.08.20.00.02.07;	author tls;	state dead;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.35.8.1
date	2014.08.10.06.51.43;	author tls;	state dead;
branches;
next	;
commitid	tT5AROYUxuLUAMLx;

1.34.2.1
date	2012.10.30.18.58.37;	author yamt;	state Exp;
branches;
next	1.34.2.2;

1.34.2.2
date	2014.05.22.11.36.45;	author yamt;	state dead;
branches;
next	;
commitid	HJV5p3BoaVY5KwBx;

1.32.4.1
date	2011.06.23.14.18.34;	author cherry;	state Exp;
branches;
next	;

1.30.4.1
date	2011.01.06.05.20.23;	author riz;	state Exp;
branches;
next	1.30.4.2;

1.30.4.2
date	2011.01.09.11.34.18;	author martin;	state Exp;
branches;
next	;

1.30.6.1
date	2009.05.13.19.18.19;	author jym;	state Exp;
branches;
next	;

1.30.10.1
date	2009.09.01.23.09.14;	author matt;	state Exp;
branches;
next	1.30.10.2;

1.30.10.2
date	2014.01.11.00.23.41;	author matt;	state Exp;
branches;
next	;
commitid	PbxyDAPK7HHceDkx;

1.28.8.1
date	2008.09.18.04.39.19;	author wrstuden;	state Exp;
branches;
next	;

1.27.10.1
date	2008.01.09.01.33.48;	author matt;	state Exp;
branches;
next	;

1.5.4.1
date	2001.12.09.17.09.37;	author he;	state Exp;
branches;
next	;

1.1.2.1
date	99.04.03.22.35.00;	author simonb;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	99.04.04.07.28.05;	author tsubai;	state Exp;
branches;
next	;


desc
@@


1.36
log
@Retire USE_COMPILERCRTSTUFF=yes.
@
text
@#	$NetBSD: Makefile.inc,v 1.35 2012/08/04 14:59:05 matt Exp $

.if !defined(ELFSIZE)
ELFSIZE=32
.endif

.include "../../Makefile.inc"

CPPFLAGS+=	-DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=${ELFSIZE}
CPPFLAGS+=	-I${NETBSDSRCDIR}/libexec/ld.elf_so
CPPFLAGS+=	-I${.CURDIR}/../common_elf
CPPFLAGS+=	-I${NETBSDSRCDIR}/lib/libc/dlfcn
CPPFLAGS+=	-DDWARF2_EH
CPPFLAGS+=	-DJCR
CPPFLAGS+=	-DDSO_HANDLE

.if defined(HAVE_GCC)
COPTS+=		-fno-unit-at-a-time
.endif

.include <bsd.own.mk>

.PATH:		${.CURDIR}/../common_elf

SRCS+=		crt0.c crti.c crtn.c
OBJS+=		crt0.o gcrt0.o crti.o crtn.o
.if ${MKPIC} != "no"
COPTS+=		-fPIC
.endif

realall: ${OBJS}

crt0.o: crt0.c
	${_MKTARGET_COMPILE}
	${COMPILE.c} -DCRT0 ${.IMPSRC} -o ${.TARGET}.o
	${LD} -x -r -o ${.TARGET} ${.TARGET}.o
	rm -f ${.TARGET}.o
.if ${MKSTRIPIDENT} != "no"
	${OBJCOPY} -R .ident ${.TARGET}
.endif

# dependent on crt0.o to pick up header dependencies
gcrt0.o: ${.CURDIR}/crt0.c crt0.o
	${_MKTARGET_COMPILE}
	${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
	${LD} -x -r -o ${.TARGET} ${.TARGET}.o
	rm -f ${.TARGET}.o
.if ${MKSTRIPIDENT} != "no"
	${OBJCOPY} -R .ident ${.TARGET}
.endif

crti.o: crti.c
	${_MKTARGET_COMPILE}
	${COMPILE.c} -DCRTI ${.IMPSRC} -o ${.TARGET}.o
	${LD} -X -r -o ${.TARGET} ${.TARGET}.o
	rm -f ${.TARGET}.o
.if ${MKSTRIPIDENT} != "no"
	${OBJCOPY} -R .ident ${.TARGET}
.endif

crtn.o: crtn.c
	${_MKTARGET_COMPILE}
	${COMPILE.c} -DCRTN ${.IMPSRC} -o ${.TARGET}.o
	${LD} -X -r -o ${.TARGET} ${.TARGET}.o
	rm -f ${.TARGET}.o
.if ${MKSTRIPIDENT} != "no"
	${OBJCOPY} -R .ident ${.TARGET}
.endif

FILES=${OBJS}
FILESDIR=${LIBDIR}
CLEANFILES=${OBJS}

.include <bsd.prog.mk>
@


1.35
log
@Use COPTS instead of CFLAGS
When compiling crti.c and crtn.c, add -DCRTI and -DCRTN, respectively.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.34 2011/06/30 20:09:15 wiz Exp $
@


1.35.2.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.35 2012/08/04 14:59:05 matt Exp $
@


1.35.8.1
log
@Rebase.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.35 2012/08/04 14:59:05 matt Exp $
@


1.34
log
@dependant -> dependent
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.33 2011/06/20 06:52:36 mrg Exp $
d18 1
a18 1
CFLAGS+=	-fno-unit-at-a-time
d54 1
a54 1
	${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
d63 1
a63 1
	${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
@


1.34.2.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.34 2011/06/30 20:09:15 wiz Exp $
d18 1
a18 1
COPTS+=		-fno-unit-at-a-time
d54 1
a54 1
	${COMPILE.c} -DCRTI ${.IMPSRC} -o ${.TARGET}.o
d63 1
a63 1
	${COMPILE.c} -DCRTN ${.IMPSRC} -o ${.TARGET}.o
@


1.34.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.inc,v 1.34.2.1 2012/10/30 18:58:37 yamt Exp $
@


1.33
log
@remove all the code that supported HAVE_GCC=3.  mostly from chuq.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.32 2009/12/13 08:52:38 mrg Exp $
d42 1
a42 1
# dependant on crt0.o to pick up header dependencies
@


1.32
log
@move the include for <bsd.own.mk> down a little.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.31 2009/02/18 15:21:52 christos Exp $
d17 1
a17 1
.if defined(HAVE_GCC) && ${HAVE_GCC} > 3
@


1.32.4.1
log
@Catchup with rmind-uvmplock merge.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.33 2011/06/20 06:52:36 mrg Exp $
d17 1
a17 1
.if defined(HAVE_GCC)
@


1.31
log
@strip .ident, if MKSTRIPIDENT. From Adam Ciarci
@
text
@d1 1
a1 3
#	$NetBSD: Makefile.inc,v 1.30 2008/08/29 00:02:22 gmcgarry Exp $

.include <bsd.own.mk>
d21 2
@


1.30
log
@Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.29 2008/07/21 15:34:58 lukem Exp $
d38 3
d48 3
d57 3
d66 3
@


1.30.4.1
log
@Apply patch (requested by mrg in ticket #1499):

src/compat version 2.  this allows building any number of alternate
library / program target ABIs.  rather than duplicating the list of
subdirs and Makefiles to build, it re-traverses the necessary ones.
details:
- add support for MAKEDIRTARGETENV to share/mk
- renames LD32DIR to MLIBDIR
- fixes library builds for some subdirs (more was built than needed)
- fixes /bin & /sbin apps in compat mode
- reduces complexity in src/compat and the rest of the tree
- updates ldd netbsd32 support
@
text
@d1 3
a3 1
#	$NetBSD: Makefile.inc,v 1.30 2008/08/29 00:02:22 gmcgarry Exp $
a22 2
.include <bsd.own.mk>

@


1.30.4.2
log
@Apply additional patch to fix mips fallout from #1499, requested by mrg
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.30.4.1 2011/01/06 05:20:23 riz Exp $
a16 2
.include <bsd.own.mk>

d21 2
@


1.30.10.1
log
@use ${OBJCOPY} instead of ${LD} -r
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.30 2008/08/29 00:02:22 gmcgarry Exp $
d35 3
a37 2
	${COMPILE.c} -DCRT0 ${.IMPSRC} -o ${.TARGET}
	${OBJCOPY} -x ${.TARGET}
d42 3
a44 2
	${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
	${OBJCOPY} -x ${.TARGET}
d48 3
a50 2
	${COMPILE.c} ${.IMPSRC} -o ${.TARGET}
	${OBJCOPY} -X ${.TARGET}
d54 3
a56 2
	${COMPILE.c} ${.IMPSRC} -o ${.TARGET}
	${OBJCOPY} -X ${.TARGET}
@


1.30.10.2
log
@Make sure $a/$t/$d are preserved for ARM BE.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.30.10.1 2009/09/01 23:09:14 matt Exp $
d36 1
a36 1
	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
d42 1
a42 1
	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
d47 1
a47 1
	${OBJCOPY} ${OBJCOPYLIBFLAGS} -X ${.TARGET}
d52 1
a52 1
	${OBJCOPY} ${OBJCOPYLIBFLAGS} -X ${.TARGET}
@


1.30.6.1
log
@Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.31 2009/02/18 15:21:52 christos Exp $
a37 3
.if ${MKSTRIPIDENT} != "no"
	${OBJCOPY} -R .ident ${.TARGET}
.endif
a44 3
.if ${MKSTRIPIDENT} != "no"
	${OBJCOPY} -R .ident ${.TARGET}
.endif
a50 3
.if ${MKSTRIPIDENT} != "no"
	${OBJCOPY} -R .ident ${.TARGET}
.endif
a56 3
.if ${MKSTRIPIDENT} != "no"
	${OBJCOPY} -R .ident ${.TARGET}
.endif
@


1.29
log
@Enable MAKEVERBOSE support.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.28 2007/12/01 11:06:36 yamt Exp $
d19 1
a19 1
.if ${HAVE_GCC} > 3
@


1.28
log
@CLEANFILES=${OBJS}
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.27 2006/06/02 22:16:18 mrg Exp $
d34 4
a37 4
	@@echo "${COMPILE.c} -DCRT0 ${.IMPSRC} -o ${.TARGET}"
	@@${COMPILE.c} -DCRT0 ${.IMPSRC} -o ${.TARGET}.o
	@@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
	@@rm -f ${.TARGET}.o
d41 4
a44 4
	@@echo "${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}"
	@@${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
	@@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
	@@rm -f ${.TARGET}.o
d47 4
a50 4
	@@echo "${COMPILE.c} ${.IMPSRC} -o ${.TARGET}"
	@@${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
	@@${LD} -X -r -o ${.TARGET} ${.TARGET}.o
	@@rm -f ${.TARGET}.o
d53 4
a56 4
	@@echo "${COMPILE.c} ${.IMPSRC} -o ${.TARGET}"
	@@${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
	@@${LD} -X -r -o ${.TARGET} ${.TARGET}.o
	@@rm -f ${.TARGET}.o
@


1.28.8.1
log
@Sync with wrstuden-revivesa-base-2.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.28 2007/12/01 11:06:36 yamt Exp $
d19 1
a19 1
.if defined(HAVE_GCC) && ${HAVE_GCC} > 3
d34 4
a37 4
	${_MKTARGET_COMPILE}
	${COMPILE.c} -DCRT0 ${.IMPSRC} -o ${.TARGET}.o
	${LD} -x -r -o ${.TARGET} ${.TARGET}.o
	rm -f ${.TARGET}.o
d41 4
a44 4
	${_MKTARGET_COMPILE}
	${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
	${LD} -x -r -o ${.TARGET} ${.TARGET}.o
	rm -f ${.TARGET}.o
d47 4
a50 4
	${_MKTARGET_COMPILE}
	${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
	${LD} -X -r -o ${.TARGET} ${.TARGET}.o
	rm -f ${.TARGET}.o
d53 4
a56 4
	${_MKTARGET_COMPILE}
	${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
	${LD} -X -r -o ${.TARGET} ${.TARGET}.o
	rm -f ${.TARGET}.o
@


1.27
log
@remove support for building (with) GCC 2.95.  also:
- always install <stdbool.h>
- don't generate a fake one for vax / gettext.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.26 2006/05/13 01:40:34 mrg Exp $
d60 1
@


1.27.10.1
log
@sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD$
a59 1
CLEANFILES=${OBJS}
@


1.26
log
@with GCC4 we *need* to pass -fno-unit-at-a-time otherwise GCC
reorders things breaking _init() and _fini().

for i386, the {init,fini}_fallthru() functions were being output
_before_ the _init()/ _fini(), and instead of falling through to
the rest of the .init/.fini section, it would fall through to
_init()/_fini() again, and again, and again, until the stack was
exhausted.

now i386 works, but i have not checked that this works for
sparc64 as well.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.25 2004/08/28 00:18:38 thorpej Exp $
a30 12
# We supply crtbegin / crtend *ONLY* if using the old in-tree GCC 2.95.3!
# In all other cases (including use of an external toolchain), these will
# be provided by that toolchain's run-time support.
.if ${USE_TOOLS_TOOLCHAIN} == "yes" && !defined(EXTERNAL_TOOLCHAIN)
SRCS+=		crtbegin.c crtend.c
OBJS+=		crtbegin.o crtend.o
.if ${MKPIC} != "no"
SRCS+=		crtbeginS.c crtendS.c
OBJS+=		crtbeginS.o crtendS.o
.endif
.endif

a57 26
.if ${USE_TOOLS_TOOLCHAIN} == "yes" && !defined(EXTERNAL_TOOLCHAIN)
crtbegin.o: crtbegin.c
	@@echo "${COMPILE.c} ${.IMPSRC} -o ${.TARGET}"
	@@${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
	@@${LD} -X -r -o ${.TARGET} ${.TARGET}.o
	@@rm -f ${.TARGET}.o

crtbeginS.o: crtbeginS.c
	@@echo "${COMPILE.c} -DSHARED ${.IMPSRC} -o ${.TARGET}"
	@@${COMPILE.c} -DSHARED ${.IMPSRC} -o ${.TARGET}.o
	@@${LD} -X -r -o ${.TARGET} ${.TARGET}.o
	@@rm -f ${.TARGET}.o

crtend.o: crtend.c
	@@echo "${COMPILE.c} ${.IMPSRC} -o ${.TARGET}"
	@@${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
	@@${LD} -X -r -o ${.TARGET} ${.TARGET}.o
	@@rm -f ${.TARGET}.o

crtendS.o: crtendS.c
	@@echo "${COMPILE.c} -DSHARED ${.IMPSRC} -o ${.TARGET}"
	@@${COMPILE.c} -DSHARED ${.IMPSRC} -o ${.TARGET}.o
	@@${LD} -X -r -o ${.TARGET} ${.TARGET}.o
	@@rm -f ${.TARGET}.o
.endif	# USE_TOOLS_TOOLCHAIN == "yes" && ! EXTERNAL_TOOLCHAIN

@


1.25
log
@Switch to using GCC's supplied crtbegin / crtend files.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.24 2003/11/11 11:32:39 dsl Exp $
d19 4
@


1.24
log
@Make gcrt0.o depend on crt0.o so that it picks up the dependencies from .depend.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.23 2003/03/19 16:54:25 ross Exp $
d27 4
a30 3
# If using an external toolchain, we expect crtbegin/crtend to be
# supplied by that toolchain's run-time support.
.if !defined(EXTERNAL_TOOLCHAIN)
d66 1
a66 1
.if !defined(EXTERNAL_TOOLCHAIN)
d90 1
a90 1
.endif	# ! EXTERNAL_TOOLCHAIN
@


1.23
log
@crt{begin,end}S.o must now depend on the new crt{begin,end}S.c wrappers
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.22 2003/03/19 04:31:41 ross Exp $
d46 2
a47 1
gcrt0.o: ${.CURDIR}/crt0.c
@


1.22
log
@* remove .ALLSRC, which doesn't work with the new dependency tree
  replaced mostly with .IMPSRC, so add .c wrappers for variant .o names

* any machine with a shared crt0.c that also uses common_elf (I didn't see
  any) will now need a reachover wrapper in .CURDIR a la crtbeginS.c

this should fix the build breakage
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.21 2003/03/18 19:11:57 christos Exp $
d71 1
a71 1
crtbeginS.o: crtbegin.c
d83 1
a83 1
crtendS.o: crtend.c
@


1.21
log
@Add appropriate SRCS lines so that we actually create dependencies. I've
been running with a crt0.o from last year!
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.20 2002/11/26 19:27:09 thorpej Exp $
d33 1
d41 2
a42 2
	@@echo "${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}.o
d46 3
a48 3
gcrt0.o: crt0.c
	@@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
d53 2
a54 2
	@@echo "${COMPILE.c} ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
d59 2
a60 2
	@@echo "${COMPILE.c} ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
d66 2
a67 2
	@@echo "${COMPILE.c} ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
d72 2
a73 2
	@@echo "${COMPILE.c} -DSHARED ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} -DSHARED ${.ALLSRC} -o ${.TARGET}.o
d78 2
a79 2
	@@echo "${COMPILE.c} ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
d84 2
a85 2
	@@echo "${COMPILE.c} -DSHARED ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} -DSHARED ${.ALLSRC} -o ${.TARGET}.o
@


1.20
log
@If EXTERNAL_TOOLCHAIN is defined, don't build crtbegin/crtend.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.19 2002/11/22 06:44:58 thorpej Exp $
d21 1
d30 1
@


1.19
log
@Split crtbegin/crtend into crti/crtbegin/crtend/crtn.  NetBSD-specific
things like the .note.netbsd.ident section are provided by crti/crtn.
crti/crtn also provide the _init() and _fini() routines.

crtbegin/crtend now only provide support for ctors/dtors.  This paves
the way to using the "crtstuff" provided with GCC (when we upgrade to
GCC 3.3), which provides, among other things, much better C++/Java
exception handling.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.18 2002/08/19 09:41:27 lukem Exp $
d21 9
a29 1
OBJS+=		crt0.o gcrt0.o crti.o crtbegin.o crtend.o crtn.o
d32 1
a32 1
COPTS+=		-fPIC
d49 1
a49 1
crtbegin.o: crtbegin.c
d55 3
a57 3
crtbeginS.o: crtbegin.c
	@@echo "${COMPILE.c} -DSHARED ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} -DSHARED ${.ALLSRC} -o ${.TARGET}.o
d61 2
a62 1
crtend.o: crtend.c
d68 1
a68 1
crtendS.o: crtend.c
d74 1
a74 1
crti.o: crti.c
d80 3
a82 3
crtn.o: crtn.c
	@@echo "${COMPILE.c} ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
d85 1
@


1.18
log
@Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path (etc).
(Reduces make output by ~ 20%)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.17 2002/06/06 19:17:01 fvdl Exp $
d21 1
a21 1
OBJS+=		crt0.o gcrt0.o crtbegin.o crtend.o
d62 12
@


1.17
log
@-x is too heavy-handed for removing symbols; newer versions of GNU ld
will completely delete empty local symbols with it. Use -X instead
for crt{begin,end}*.o, to keep init_fallthru hacks.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.16 2002/05/05 00:45:31 thorpej Exp $
d12 1
a12 1
CPPFLAGS+=	-I${.CURDIR}/../../../libexec/ld.elf_so
d14 1
a14 1
CPPFLAGS+=	-I${.CURDIR}/../../libc/dlfcn
@


1.16
log
@Deal better with platforms that don't yet support shared libraries:
* Only add -fPIC if MKPIC != no.
* Only build crtbeginS and crtendS if MKPIC != no.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.15 2002/05/05 00:34:00 thorpej Exp $
d44 1
a44 1
	@@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
d50 1
a50 1
	@@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
d56 1
a56 1
	@@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
d62 1
a62 1
	@@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@


1.15
log
@All ELF toolchains are of the "new toolchain" variety now, so no need
to conditionalize use of .hidden symbols anymore.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.14 2002/01/13 19:59:26 thorpej Exp $
d19 5
a23 1
.if !defined(MACHINE_ARCH) || ${MACHINE_ARCH} != "m68000"
a25 4

.PATH:		${.CURDIR}/../common_elf

OBJS+=		crt0.o gcrt0.o crtbegin.o crtbeginS.o crtend.o crtendS.o
@


1.14
log
@* Use += to assign OBJS so that machine-dependent Makefiles can
  add their own objects to the list.
* Garbage-collect an unneeded CLEANFILES assignment.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.13 2001/12/31 00:40:11 thorpej Exp $
a16 4

# XXX Temporary until all ELF ports use the new toolchain.  The old
# toolchain doesn't have support for "hidden" symbols.
.if defined(USE_NEW_TOOLCHAIN)
a17 1
.endif
@


1.13
log
@Add support for invoking GNU C++ local destructors in shared objects
via the __cxa_finalize() mechanism.

XXX Only enabled for new-toolchain platforms, as it requires the assembler
to support the .hidden pseudo-op.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.12 2001/12/31 00:11:13 thorpej Exp $
d30 1
a30 3
OBJS=		crt0.o gcrt0.o crtbegin.o crtbeginS.o crtend.o crtendS.o

CLEANFILES+=	core a.out
@


1.12
log
@Build separate crt{begin,end}.o and crt{begin,end}S.o files, rather
than linking them at install time.  Forthcoming changes require different
behavior for static vs. shared object versions of these files.
@
text
@d1 3
a3 1
#	$NetBSD: Makefile.inc,v 1.11 2001/12/30 23:45:00 thorpej Exp $
d17 6
@


1.11
log
@Add support for registering Java classes emitted by the Java compiler
(e.g. the Java compiler in GCC 3.x) into the ".jcr" section.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.10 2001/11/05 15:11:40 lukem Exp $
d22 1
a22 1
OBJS=		crt0.o gcrt0.o crtbegin.o crtend.o
d46 6
d58 6
a65 3

LINKS=	${LIBDIR}/crtbegin.o ${LIBDIR}/crtbeginS.o \
	${LIBDIR}/crtend.o ${LIBDIR}/crtendS.o
@


1.10
log
@pull in ../../Makefile.inc
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.9 2001/08/03 14:26:13 thorpej Exp $
d14 1
@


1.9
log
@Enable DWARF2 EH support.  Confirmed working w/ GCC 2.95.3 on sparc
and i386.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.8 2001/08/03 05:54:43 thorpej Exp $
d6 2
@


1.8
log
@Add support for DWARF2 frame unwinding/exception handling.  This
should be sufficient for GCC 2.95.3, and probably GCC 3.0 as well.

Not yet enabled by default; further testing required.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.7 2001/06/07 15:22:50 mrg Exp $
d11 1
a11 1
#CPPFLAGS+=	-DDWARF2_EH
@


1.7
log
@set FILESDIR to "${LIBDIR}", not hard coded /usr/lib.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.6 2001/05/17 21:17:02 fredette Exp $
d11 1
@


1.6
log
@Don't compile with -fPIC when MACHINE_ARCH is m68000.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.5 2000/04/02 15:35:47 minoura Exp $
d49 1
a49 1
FILESDIR=/usr/lib
@


1.5
log
@Move dl* function definitions to libc on ELF.
Based on the patch supplied by Takuya Shiozaki <tshiozak@@astec.co.jp>.
See http://mail-index.netbsd.org/tech-userlevel/2000/02/23/0000.html.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.4 2000/01/22 19:37:58 mycroft Exp $
d11 2
d14 1
@


1.5.4.1
log
@Pull up revisions 1.8-1.9 (via patch, requested by skrll):
  Add init/fini section support in crtbegin and crtend, and introduce
  support for DWARF2 exception handling.  Fixes PR#12865, PR#13488,
  PR#13489, and PR#13491.  Also fix ld.elf_so to deal appropriately.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.5 2000/04/02 15:35:47 minoura Exp $
a10 1
CPPFLAGS+=	-DDWARF2_EH
@


1.4
log
@Adjust for .mk file changes.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.3 1999/04/03 16:39:31 simonb Exp $
d10 1
@


1.3
log
@Instead of rolling our own "install" target, use FILES/FILESDIR and
LINKS to that things like "make install UPDATE=" work properly.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.2 1999/04/02 12:09:44 tsubai Exp $
d18 1
a18 1
all: ${OBJS}
@


1.2
log
@Fix typo. (COPT --> COPTS)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.1 1999/03/20 00:32:40 thorpej Exp $
d44 5
a48 6
install:
	${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
	    ${DESTDIR}/usr/lib
	rm -f ${DESTDIR}/usr/lib/crtbeginS.o ${DESTDIR}/usr/lib/crtendS.o
	ln ${DESTDIR}/usr/lib/crtbegin.o ${DESTDIR}/usr/lib/crtbeginS.o
	ln ${DESTDIR}/usr/lib/crtend.o ${DESTDIR}/usr/lib/crtendS.o
@


1.1
log
@Pull together common Makefile fragments for ELF crt0 files, and use it
across the board.
@
text
@d1 1
a1 1
#	$NetBSD$
d10 1
a10 1
COPT+=		-fPIC
@


1.1.2.1
log
@Pull up rev 1.3 from trunk.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.1 1999/03/20 00:32:40 thorpej Exp $
d44 6
a49 5
FILES=${OBJS}
FILESDIR=/usr/lib

LINKS=	${LIBDIR}/crtbegin.o ${LIBDIR}/crtbeginS.o \
	${LIBDIR}/crtend.o ${LIBDIR}/crtendS.o
@


1.1.2.2
log
@Pull up rev 1.2 from trunk.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.1.2.1 1999/04/03 22:35:00 simonb Exp $
d10 1
a10 1
COPTS+=		-fPIC
@
