head	1.10;
access;
symbols
	perseant-exfatfs-base-20250801:1.10
	perseant-exfatfs-base-20240630:1.10
	perseant-exfatfs:1.10.0.18
	perseant-exfatfs-base:1.10
	cjep_sun2x:1.10.0.16
	cjep_sun2x-base:1.10
	cjep_staticlib_x-base1:1.10
	cjep_staticlib_x:1.10.0.14
	cjep_staticlib_x-base:1.10
	phil-wifi-20200421:1.10
	phil-wifi-20200411:1.10
	phil-wifi-20200406:1.10
	pgoyette-compat-merge-20190127:1.10
	pgoyette-compat-20190127:1.10
	pgoyette-compat-20190118:1.10
	pgoyette-compat-1226:1.10
	pgoyette-compat-1126:1.10
	pgoyette-compat-1020:1.10
	pgoyette-compat-0930:1.10
	pgoyette-compat-0906:1.10
	pgoyette-compat-0728:1.10
	pgoyette-compat-0625:1.10
	pgoyette-compat-0521:1.10
	pgoyette-compat-0502:1.10
	pgoyette-compat-0422:1.10
	pgoyette-compat-0415:1.10
	pgoyette-compat-0407:1.10
	pgoyette-compat-0330:1.10
	pgoyette-compat-0322:1.10
	pgoyette-compat-0315:1.10
	pgoyette-compat:1.10.0.12
	pgoyette-compat-base:1.10
	perseant-stdc-iso10646:1.10.0.10
	perseant-stdc-iso10646-base:1.10
	prg-localcount2-base3:1.10
	prg-localcount2-base2:1.10
	prg-localcount2-base1:1.10
	prg-localcount2:1.10.0.8
	prg-localcount2-base:1.10
	pgoyette-localcount-20170426:1.10
	bouyer-socketcan-base1:1.10
	pgoyette-localcount-20170320:1.10
	bouyer-socketcan:1.10.0.6
	bouyer-socketcan-base:1.10
	pgoyette-localcount-20170107:1.10
	pgoyette-localcount-20161104:1.10
	localcount-20160914:1.10
	pgoyette-localcount-20160806:1.10
	pgoyette-localcount-20160726:1.10
	pgoyette-localcount:1.10.0.4
	pgoyette-localcount-base:1.10
	netbsd-5-2-3-RELEASE:1.6
	netbsd-5-1-5-RELEASE:1.6
	netbsd-6-0-6-RELEASE:1.8.4.1
	netbsd-6-1-5-RELEASE:1.8.4.1
	yamt-pagecache-base9:1.10
	yamt-pagecache-tag8:1.8.2.1
	netbsd-6-1-4-RELEASE:1.8.4.1
	netbsd-6-0-5-RELEASE:1.8.4.1
	tls-earlyentropy:1.10.0.2
	tls-earlyentropy-base:1.10
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.10
	riastradh-drm2-base3:1.10
	netbsd-6-1-3-RELEASE:1.8.4.1
	netbsd-6-0-4-RELEASE:1.8.4.1
	netbsd-5-2-2-RELEASE:1.6
	netbsd-5-1-4-RELEASE:1.6
	netbsd-6-1-2-RELEASE:1.8.4.1
	netbsd-6-0-3-RELEASE:1.8.4.1
	netbsd-5-2-1-RELEASE:1.6
	netbsd-5-1-3-RELEASE:1.6
	netbsd-6-1-1-RELEASE:1.8.4.1
	riastradh-drm2-base2:1.9
	riastradh-drm2-base1:1.9
	riastradh-drm2:1.9.0.4
	riastradh-drm2-base:1.9
	netbsd-6-1:1.8.4.1.0.6
	netbsd-6-0-2-RELEASE:1.8.4.1
	netbsd-6-1-RELEASE:1.8.4.1
	netbsd-6-1-RC4:1.8.4.1
	netbsd-6-1-RC3:1.8.4.1
	agc-symver:1.9.0.6
	agc-symver-base:1.9
	netbsd-6-1-RC2:1.8.4.1
	netbsd-6-1-RC1:1.8.4.1
	yamt-pagecache-base8:1.9
	netbsd-5-2:1.6.0.42
	netbsd-6-0-1-RELEASE:1.8.4.1
	yamt-pagecache-base7:1.9
	netbsd-5-2-RELEASE:1.6
	netbsd-5-2-RC1:1.6
	matt-nb6-plus-nbase:1.8.4.1
	yamt-pagecache-base6:1.9
	netbsd-6-0:1.8.4.1.0.4
	netbsd-6-0-RELEASE:1.8.4.1
	netbsd-6-0-RC2:1.8.4.1
	tls-maxphys:1.9.0.2
	tls-maxphys-base:1.10
	matt-nb6-plus:1.8.4.1.0.2
	matt-nb6-plus-base:1.8.4.1
	netbsd-6-0-RC1:1.8.4.1
	yamt-pagecache-base5:1.8
	yamt-pagecache-base4:1.8
	netbsd-6:1.8.0.4
	netbsd-6-base:1.8
	netbsd-5-1-2-RELEASE:1.6
	netbsd-5-1-1-RELEASE:1.6
	yamt-pagecache-base3:1.8
	yamt-pagecache-base2:1.8
	yamt-pagecache:1.8.0.2
	yamt-pagecache-base:1.8
	cherry-xenmp:1.6.0.40
	cherry-xenmp-base:1.6
	bouyer-quota2-nbase:1.6
	bouyer-quota2:1.6.0.38
	bouyer-quota2-base:1.6
	matt-mips64-premerge-20101231:1.6
	matt-nb5-mips64-premerge-20101231:1.6
	matt-nb5-pq3:1.6.0.36
	matt-nb5-pq3-base:1.6
	netbsd-5-1:1.6.0.34
	netbsd-5-1-RELEASE:1.6
	netbsd-5-1-RC4:1.6
	matt-nb5-mips64-k15:1.6
	netbsd-5-1-RC3:1.6
	netbsd-5-1-RC2:1.6
	netbsd-5-1-RC1:1.6
	netbsd-5-0-2-RELEASE:1.6
	matt-nb5-mips64-premerge-20091211:1.6
	matt-premerge-20091211:1.6
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.6
	matt-nb4-mips64-k7-u2a-k9b:1.6
	matt-nb5-mips64-u1-k1-k5:1.6
	matt-nb5-mips64:1.6.0.32
	netbsd-5-0-1-RELEASE:1.6
	jym-xensuspend-nbase:1.6
	netbsd-5-0:1.6.0.30
	netbsd-5-0-RELEASE:1.6
	netbsd-5-0-RC4:1.6
	netbsd-5-0-RC3:1.6
	netbsd-5-0-RC2:1.6
	jym-xensuspend:1.6.0.28
	jym-xensuspend-base:1.6
	netbsd-5-0-RC1:1.6
	netbsd-5:1.6.0.26
	netbsd-5-base:1.6
	matt-mips64-base2:1.6
	matt-mips64:1.6.0.24
	mjf-devfs2:1.6.0.22
	mjf-devfs2-base:1.6
	netbsd-4-0-1-RELEASE:1.6
	wrstuden-revivesa-base-3:1.6
	wrstuden-revivesa-base-2:1.6
	wrstuden-fixsa-newbase:1.6
	wrstuden-revivesa-base-1:1.6
	yamt-pf42-base4:1.6
	yamt-pf42-base3:1.6
	hpcarm-cleanup-nbase:1.6
	yamt-pf42-baseX:1.6
	yamt-pf42-base2:1.6
	wrstuden-revivesa:1.6.0.20
	wrstuden-revivesa-base:1.6
	yamt-pf42:1.6.0.18
	yamt-pf42-base:1.6
	keiichi-mipv6:1.6.0.16
	keiichi-mipv6-base:1.6
	matt-armv6-nbase:1.6
	matt-armv6-prevmlocking:1.6
	wrstuden-fixsa-base-1:1.6
	netbsd-4-0:1.6.0.14
	netbsd-4-0-RELEASE:1.6
	cube-autoconf:1.6.0.12
	cube-autoconf-base:1.6
	netbsd-4-0-RC5:1.6
	netbsd-4-0-RC4:1.6
	netbsd-4-0-RC3:1.6
	netbsd-4-0-RC2:1.6
	netbsd-4-0-RC1:1.6
	matt-armv6:1.6.0.10
	matt-armv6-base:1.6
	matt-mips64-base:1.6
	hpcarm-cleanup:1.6.0.8
	hpcarm-cleanup-base:1.6
	netbsd-3-1-1-RELEASE:1.5
	netbsd-3-0-3-RELEASE:1.5
	wrstuden-fixsa:1.6.0.6
	wrstuden-fixsa-base:1.6
	abandoned-netbsd-4-base:1.6
	abandoned-netbsd-4:1.6.0.2
	netbsd-3-1:1.5.0.14
	netbsd-3-1-RELEASE:1.5
	netbsd-3-0-2-RELEASE:1.5
	netbsd-3-1-RC4:1.5
	netbsd-3-1-RC3:1.5
	netbsd-3-1-RC2:1.5
	netbsd-3-1-RC1:1.5
	netbsd-4:1.6.0.4
	netbsd-4-base:1.6
	netbsd-3-0-1-RELEASE:1.5
	netbsd-3-0:1.5.0.12
	netbsd-3-0-RELEASE:1.5
	netbsd-3-0-RC6:1.5
	netbsd-3-0-RC5:1.5
	netbsd-3-0-RC4:1.5
	netbsd-3-0-RC3:1.5
	netbsd-3-0-RC2:1.5
	netbsd-3-0-RC1:1.5
	netbsd-2-0-3-RELEASE:1.5
	netbsd-2-1:1.5.0.10
	netbsd-2-1-RELEASE:1.5
	netbsd-2-1-RC6:1.5
	netbsd-2-1-RC5:1.5
	netbsd-2-1-RC4:1.5
	netbsd-2-1-RC3:1.5
	netbsd-2-1-RC2:1.5
	netbsd-2-1-RC1:1.5
	netbsd-2-0-2-RELEASE:1.5
	netbsd-3:1.5.0.8
	netbsd-3-base:1.5
	netbsd-2-0-1-RELEASE:1.5
	netbsd-2:1.5.0.6
	netbsd-2-base:1.5
	netbsd-2-0-RELEASE:1.5
	netbsd-2-0-RC5:1.5
	netbsd-2-0-RC4:1.5
	netbsd-2-0-RC3:1.5
	netbsd-2-0-RC2:1.5
	netbsd-2-0-RC1:1.5
	netbsd-2-0:1.5.0.4
	netbsd-2-0-base:1.5
	netbsd-1-6-PATCH002-RELEASE:1.5
	netbsd-1-6-PATCH002:1.5
	netbsd-1-6-PATCH002-RC4:1.5
	netbsd-1-6-PATCH002-RC3:1.5
	netbsd-1-6-PATCH002-RC2:1.5
	netbsd-1-6-PATCH002-RC1:1.5
	netbsd-1-6-PATCH001:1.5
	netbsd-1-6-PATCH001-RELEASE:1.5
	netbsd-1-6-PATCH001-RC3:1.5
	netbsd-1-6-PATCH001-RC2:1.5
	netbsd-1-6-PATCH001-RC1:1.5
	fvdl_fs64_base:1.5
	netbsd-1-6-RELEASE:1.5
	netbsd-1-6-RC3:1.5
	netbsd-1-6-RC2:1.5
	netbsd-1-6-RC1:1.5
	netbsd-1-6:1.5.0.2
	netbsd-1-6-base:1.5
	netbsd-1-5-PATCH003:1.4
	netbsd-1-5-PATCH002:1.4
	netbsd-1-5-PATCH001:1.4
	netbsd-1-5-RELEASE:1.4
	netbsd-1-5-BETA2:1.4
	netbsd-1-5-BETA:1.4
	netbsd-1-4-PATCH003:1.4
	netbsd-1-5-ALPHA2:1.4
	netbsd-1-5:1.4.0.10
	netbsd-1-5-base:1.4
	minoura-xpg4dl:1.4.0.8
	minoura-xpg4dl-base:1.4
	netbsd-1-4-PATCH002:1.4
	wrstuden-devbsize-19991221:1.4
	wrstuden-devbsize:1.4.0.6
	wrstuden-devbsize-base:1.4
	comdex-fall-1999:1.4.0.4
	comdex-fall-1999-base:1.4
	netbsd-1-4-PATCH001:1.4
	netbsd-1-4-RELEASE:1.4
	netbsd-1-4:1.4.0.2
	netbsd-1-4-base:1.4;
locks; strict;
comment	@# @;


1.10
date	2014.02.01.11.59.00;	author martin;	state dead;
branches;
next	1.9;
commitid	nOrP9ozArBVOoonx;

1.9
date	2012.08.10.16.37.31;	author martin;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	2011.07.16.23.07.50;	author mrg;	state Exp;
branches
	1.8.2.1
	1.8.4.1;
next	1.7;

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

1.6
date	2006.05.19.19.11.12;	author christos;	state Exp;
branches;
next	1.5;

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

1.4
date	99.03.20.00.32.41;	author thorpej;	state Exp;
branches;
next	1.3;

1.3
date	99.03.19.23.34.52;	author thorpej;	state Exp;
branches;
next	1.2;

1.2
date	99.03.19.23.16.27;	author thorpej;	state Exp;
branches;
next	1.1;

1.1
date	98.09.11.03.36.23;	author eeh;	state Exp;
branches;
next	;

1.9.2.1
date	2014.08.20.00.02.08;	author tls;	state dead;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.8.2.1
date	2012.10.30.18.58.37;	author yamt;	state Exp;
branches;
next	1.8.2.2;

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

1.8.4.1
date	2012.08.13.17.09.49;	author riz;	state Exp;
branches;
next	;


desc
@@


1.10
log
@sparc and sparc64 have moved to new world order, remove legacy files.
@
text
@#	$NetBSD: Makefile,v 1.9 2012/08/10 16:37:31 martin Exp $

CPPFLAGS+=	-I${.CURDIR}/../sparc_elf
CFLAGS+=	-fPIC

ELFSIZE=64

.include "${.CURDIR}/../common_elf/Makefile.inc"
@


1.9
log
@Slightly simplify and make position independend.
Part of fixing PR port-sparc64/46724.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2011/07/16 23:07:50 mrg Exp $
@


1.9.2.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2012/08/10 16:37:31 martin Exp $
@


1.8
log
@revert the previous.  it didn't help and wasn't the problem anyway.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2011/07/04 21:54:18 mrg Exp $
a2 1
#Uncomment the next line to enable the new .init fallthru
d4 1
@


1.8.2.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2011/07/16 23:07:50 mrg Exp $
d3 1
a4 1
CFLAGS+=	-fPIC
@


1.8.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.8.2.1 2012/10/30 18:58:37 yamt Exp $
@


1.8.4.1
log
@Pull up following revision(s) (requested by martin in ticket #475):
	lib/csu/sparc_elf/Makefile: revision 1.7
	external/gpl3/gcc/dist/gcc/config/netbsd-elf.h: revision 1.4
	lib/csu/sparc64/Makefile: revision 1.9
	lib/csu/sparc_elf/crt0.c: revision 1.15
	lib/csu/sparc64/crt0.c: revision 1.27
Make this position independend (for -pie executables)
Slightly simplify and make position independend.
Part of fixing PR port-sparc64/46724.
pay attention to -pie: link crt{begin,end}S.o.
this fixes -fpie on sparc and sparc64, and probably others.
@
text
@d1 1
a1 1
#	$NetBSD$
d3 1
a4 1
CFLAGS+=	-fPIC
@


1.7
log
@XXX: for now, build sparc64 csu with -O1 if using GCC 4.5.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2006/05/19 19:11:12 christos Exp $
a8 6

# XXX something is wrong with the -O2 crt0.o and the code in ___start
# accesses data outside of the mapped space -> crash
.if defined(HAVE_GCC) && ${HAVE_GCC} == 45
DBG+=   -O1
.endif
@


1.6
log
@Instead of using -I- -I${.CURDIR} and #include "dot_init.h", use:
-I${.CURDIR} and #include <dot_init.h>, since -I- is obsoleted in gcc-4,
and it is too confusing anyway.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2001/07/17 18:25:11 mrg Exp $
d9 6
@


1.5
log
@enable dot_init.h on both sparc & sparc64, fixing .init & .fini processing
for both platforms.  they share dot_init.h with a single #ifdef #define
difference...
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 1999/03/20 00:32:41 thorpej Exp $
d4 1
a4 1
CPPFLAGS+=	-I- -I${.CURDIR}/../sparc_elf
@


1.4
log
@Pull together common Makefile fragments for ELF crt0 files, and use it
across the board.
@
text
@d1 4
a4 1
#	$NetBSD: Makefile,v 1.3 1999/03/19 23:34:52 thorpej Exp $
@


1.3
log
@Put a good chunk of code common to all ELF crt0.c files into a common
location, and use it.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 1999/03/19 23:16:27 thorpej Exp $
d3 1
a3 4
CPPFLAGS+=	-DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=64
CPPFLAGS+=	-I${.CURDIR}/../../../libexec/ld.elf_so
CPPFLAGS+=	-I${.CURDIR}/../common_elf
COPT+=		-fPIC
d5 1
a5 40
.PATH:		${.CURDIR}/../common_elf

OBJS=		crt0.o gcrt0.o crtbegin.o crtend.o

CLEANFILES+=	core a.out

all: ${OBJS}

crt0.o: crt0.c
	@@echo "${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}.o
	@@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
	@@rm -f ${.TARGET}.o

gcrt0.o: crt0.c
	@@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
	@@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
	@@rm -f ${.TARGET}.o

crtbegin.o: crtbegin.c
	@@echo "${COMPILE.c} ${.ALLSRC} -o ${.TARGET}"
	@@${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
	@@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
	@@rm -f ${.TARGET}.o

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

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

.include <bsd.prog.mk>
@


1.2
log
@Move crtbegin.c and crtend.c from alpha subdir to common_elf subdir via
repository copy, remove all redundant copies of these files, and make all
ELF platforms use the common versions.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 1998/09/11 03:36:23 eeh Exp $
d5 1
@


1.1
log
@Add sparc64-specific stuff.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.16 1998/03/28 00:52:06 cgd Exp $
d6 2
@

