head	1.22;
access;
symbols
	perseant-exfatfs-base-20250801:1.22
	perseant-exfatfs-base-20240630:1.22
	cjep_sun2x:1.22.0.44
	cjep_sun2x-base:1.22
	cjep_staticlib_x-base1:1.22
	cjep_staticlib_x:1.22.0.42
	cjep_staticlib_x-base:1.22
	phil-wifi-20200421:1.22
	phil-wifi-20200411:1.22
	phil-wifi-20200406:1.22
	pgoyette-compat-merge-20190127:1.22
	pgoyette-compat-20190127:1.22
	pgoyette-compat-20190118:1.22
	pgoyette-compat-1226:1.22
	pgoyette-compat-1126:1.22
	pgoyette-compat-1020:1.22
	pgoyette-compat-0930:1.22
	pgoyette-compat-0906:1.22
	pgoyette-compat-0728:1.22
	pgoyette-compat-0625:1.22
	pgoyette-compat-0521:1.22
	pgoyette-compat-0502:1.22
	pgoyette-compat-0422:1.22
	pgoyette-compat-0415:1.22
	pgoyette-compat-0407:1.22
	pgoyette-compat-0330:1.22
	pgoyette-compat-0322:1.22
	pgoyette-compat-0315:1.22
	pgoyette-compat:1.22.0.40
	pgoyette-compat-base:1.22
	perseant-stdc-iso10646:1.22.0.38
	perseant-stdc-iso10646-base:1.22
	prg-localcount2-base3:1.22
	prg-localcount2-base2:1.22
	prg-localcount2-base1:1.22
	prg-localcount2:1.22.0.36
	prg-localcount2-base:1.22
	pgoyette-localcount-20170426:1.22
	bouyer-socketcan-base1:1.22
	pgoyette-localcount-20170320:1.22
	bouyer-socketcan:1.22.0.34
	bouyer-socketcan-base:1.22
	pgoyette-localcount-20170107:1.22
	pgoyette-localcount-20161104:1.22
	localcount-20160914:1.22
	pgoyette-localcount-20160806:1.22
	pgoyette-localcount-20160726:1.22
	pgoyette-localcount:1.22.0.32
	pgoyette-localcount-base:1.22
	netbsd-5-2-3-RELEASE:1.22
	netbsd-5-1-5-RELEASE:1.22
	yamt-pagecache-base9:1.22
	yamt-pagecache-tag8:1.22
	tls-earlyentropy:1.22.0.28
	tls-earlyentropy-base:1.22
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.22
	riastradh-drm2-base3:1.22
	netbsd-5-2-2-RELEASE:1.22
	netbsd-5-1-4-RELEASE:1.22
	netbsd-5-2-1-RELEASE:1.22
	netbsd-5-1-3-RELEASE:1.22
	agc-symver:1.22.0.30
	agc-symver-base:1.22
	tls-maxphys-base:1.22
	yamt-pagecache-base8:1.22
	netbsd-5-2:1.22.0.26
	yamt-pagecache-base7:1.22
	netbsd-5-2-RELEASE:1.22
	netbsd-5-2-RC1:1.22
	yamt-pagecache-base6:1.22
	yamt-pagecache-base5:1.22
	yamt-pagecache-base4:1.22
	netbsd-5-1-2-RELEASE:1.22
	netbsd-5-1-1-RELEASE:1.22
	yamt-pagecache-base3:1.22
	yamt-pagecache-base2:1.22
	yamt-pagecache:1.22.0.24
	yamt-pagecache-base:1.22
	bouyer-quota2-nbase:1.22
	bouyer-quota2:1.22.0.22
	bouyer-quota2-base:1.22
	matt-nb5-pq3:1.22.0.20
	matt-nb5-pq3-base:1.22
	netbsd-5-1:1.22.0.18
	netbsd-5-1-RELEASE:1.22
	netbsd-5-1-RC4:1.22
	netbsd-5-1-RC3:1.22
	netbsd-5-1-RC2:1.22
	netbsd-5-1-RC1:1.22
	netbsd-5-0-2-RELEASE:1.22
	netbsd-5-0-1-RELEASE:1.22
	jym-xensuspend-nbase:1.22
	netbsd-5-0:1.22.0.16
	netbsd-5-0-RELEASE:1.22
	netbsd-5-0-RC4:1.22
	netbsd-5-0-RC3:1.22
	netbsd-5-0-RC2:1.22
	jym-xensuspend:1.22.0.14
	jym-xensuspend-base:1.22
	netbsd-5-0-RC1:1.22
	netbsd-5:1.22.0.12
	netbsd-5-base:1.22
	mjf-devfs2:1.22.0.10
	mjf-devfs2-base:1.22
	yamt-pf42-base4:1.22
	yamt-pf42-base3:1.22
	hpcarm-cleanup-nbase:1.22
	yamt-pf42-base2:1.22
	yamt-pf42:1.22.0.8
	yamt-pf42-base:1.22
	keiichi-mipv6:1.22.0.6
	keiichi-mipv6-base:1.22
	cube-autoconf:1.22.0.4
	cube-autoconf-base:1.22
	hpcarm-cleanup:1.22.0.2
	hpcarm-cleanup-base:1.22
	netbsd-3-1-1-RELEASE:1.17
	netbsd-3-0-3-RELEASE:1.17
	abandoned-netbsd-4-base:1.20
	abandoned-netbsd-4:1.20.0.2
	netbsd-3-1:1.17.0.6
	netbsd-3-1-RELEASE:1.17
	netbsd-3-0-2-RELEASE:1.17
	netbsd-3-1-RC4:1.17
	netbsd-3-1-RC3:1.17
	netbsd-3-1-RC2:1.17
	netbsd-3-1-RC1:1.17
	netbsd-3-0-1-RELEASE:1.17
	netbsd-3-0:1.17.0.4
	netbsd-3-0-RELEASE:1.17
	netbsd-3-0-RC6:1.17
	netbsd-3-0-RC5:1.17
	netbsd-3-0-RC4:1.17
	netbsd-3-0-RC3:1.17
	netbsd-3-0-RC2:1.17
	netbsd-3-0-RC1:1.17
	netbsd-2-0-3-RELEASE:1.14.2.2
	netbsd-2-1:1.14.2.2.0.4
	netbsd-2-1-RELEASE:1.14.2.2
	netbsd-2-1-RC6:1.14.2.2
	netbsd-2-1-RC5:1.14.2.2
	netbsd-2-1-RC4:1.14.2.2
	netbsd-2-1-RC3:1.14.2.2
	netbsd-2-1-RC2:1.14.2.2
	netbsd-2-1-RC1:1.14.2.2
	netbsd-2-0-2-RELEASE:1.14.2.2
	netbsd-3:1.17.0.2
	netbsd-3-base:1.17
	netbsd-2-0-1-RELEASE:1.14.2.2
	netbsd-2:1.14.2.2.0.2
	netbsd-2-base:1.14.2.2
	netbsd-2-0-RELEASE:1.14.2.2
	netbsd-2-0-RC5:1.14.2.2
	netbsd-2-0-RC4:1.14.2.2
	netbsd-2-0-RC3:1.14.2.2
	netbsd-2-0-RC2:1.14.2.2
	netbsd-2-0-RC1:1.14.2.2
	netbsd-2-0:1.14.0.2
	netbsd-2-0-base:1.14;
locks; strict;
comment	@# @;


1.22
date	2006.11.20.17.08.42;	author skrll;	state dead;
branches;
next	1.21;

1.21
date	2006.09.29.20.14.10;	author apb;	state Exp;
branches;
next	1.20;

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

1.19
date	2006.05.08.14.42.22;	author tsutsui;	state Exp;
branches;
next	1.18;

1.18
date	2006.02.25.12.04.23;	author simonb;	state Exp;
branches;
next	1.17;

1.17
date	2005.02.11.14.58.41;	author jmc;	state Exp;
branches;
next	1.16;

1.16
date	2004.06.12.14.57.57;	author jmc;	state Exp;
branches;
next	1.15;

1.15
date	2004.04.26.09.17.16;	author uwe;	state Exp;
branches;
next	1.14;

1.14
date	2004.02.22.01.24.25;	author uwe;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2003.12.07.19.56.59;	author scw;	state Exp;
branches;
next	1.12;

1.12
date	2003.11.16.16.24.48;	author lukem;	state Exp;
branches;
next	1.11;

1.11
date	2003.11.05.00.05.48;	author mrg;	state Exp;
branches;
next	1.10;

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

1.9
date	2003.10.25.02.42.00;	author dmcmahill;	state Exp;
branches;
next	1.8;

1.8
date	2003.10.16.03.33.28;	author lukem;	state Exp;
branches;
next	1.7;

1.7
date	2003.08.22.03.06.32;	author uwe;	state Exp;
branches;
next	1.6;

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

1.5
date	2003.08.01.17.03.45;	author lukem;	state Exp;
branches;
next	1.4;

1.4
date	2003.07.29.00.16.46;	author uwe;	state Exp;
branches;
next	1.3;

1.3
date	2003.07.26.15.02.52;	author mrg;	state Exp;
branches;
next	1.2;

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

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

1.14.2.1
date	2004.04.28.06.02.53;	author jmc;	state Exp;
branches;
next	1.14.2.2;

1.14.2.2
date	2004.06.14.18.19.40;	author tron;	state Exp;
branches;
next	;


desc
@@


1.22
log
@Delete more gcc3 stuff.
@
text
@#	$NetBSD: Makefile,v 1.21 2006/09/29 20:14:10 apb Exp $

MKPRIVATELIB=	yes

LIB=		backend

SRCS=		${G_OBJS:.o=.c} ${G_out_file:T}

CPPFLAGS+=	-I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \
		-DTARGET_NAME=\"${MACHINE_GNU_PLATFORM}\"
HOST_CPPFLAGS+=	-I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
DPSRCS+=	insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h

.include <bsd.lib.mk>

# Don't auto-frob .y or .l files.
.l.c .y.c .y.h:
	@@true

#
# Independent generation programs.
#
CLEANFILES+=	gengenrtl genrtl.c genrtl.h \
		gengtype gtyp-gen.h gtype-desc.c gtype-desc.h \
		gtype-c.h gtype-cp.h gtype-f.h gtype-objc.h \
		genflags genflags.h \
		gencheck tree-check.h \
		genpreds tm-preds.h tm_p.h cs-tm_p.h \
		auto-host.h print-rtl1.c \
		build-rtl.c build-errors.c build-varray.c \
		build-bitmap.c build-ggc-none.c \
		gt-*.h *.o *.lo \
		config.h cs-config.h \

#
# These files have special needs
#
CPPFLAGS.build-errors.c=	-DGENERATOR_FILE
CPPFLAGS.build-ggc-none.c=	-DGENERATOR_FILE
CPPFLAGS.build-rtl.c=		-DGENERATOR_FILE
CPPFLAGS.insn-conditions.c=	-DGENERATOR_FILE
CPPFLAGS.print-rtl1.c=		-DGENERATOR_FILE

# XXX
.if ${MACHINE_ARCH} == "m68000"
COPTS.ra-colorize.c=		-O0
.endif

# XXX
.if ${MACHINE_CPU} == "sh5"
NOGCCERROR=			# defined
COPTS.reload1.c=		-O1
.endif



# Headers that host objects depend on (except gen*rtl*)
HH=	${G_HCONFIG_H} genrtl.h

#
# Generate the various header files we need.
#
genrtl.c: gengenrtl
	${_MKTARGET_CREATE}
	./gengenrtl >${.TARGET}
genrtl.h: gengenrtl
	${_MKTARGET_CREATE}
	./gengenrtl -h >${.TARGET}
gengenrtl.lo: ${G_HCONFIG_H} auto-build.h
gengenrtl: gengenrtl.lo
	${_MKTARGET_LINK}
	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}

tm-preds.h: genpreds
	${_MKTARGET_CREATE}
	./genpreds >${.TARGET}
genpreds.lo: ${HH}
genpreds: genpreds.lo
	${_MKTARGET_LINK}
	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}

tree-check.h: gencheck
	${_MKTARGET_CREATE}
	./gencheck >${.TARGET}
gencheck.lo: ${HH}
gencheck: gencheck.lo
	${_MKTARGET_LINK}
	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}

gtype-desc.c: gtype-desc.h
gtype-desc.h: gengtype
	${_MKTARGET_CREATE}
	rm -f auto-host.h
	ln -s ${.CURDIR}/../arch/${MACHINE_ARCH}/auto-host.h .
	./gengtype
gengtype.lo gengtype-lex.lo gengtype-yacc.lo: ${HH} gtyp-gen.h config.h
gengtype: gengtype.lo gengtype-lex.lo gengtype-yacc.lo
	${_MKTARGET_LINK}
	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}

gtyp-gen.h: Makefile
	${_MKTARGET_CREATE}
	(\
	echo "static const char *srcdir = \"$(G_GTFILES_SRCDIR)\";"	; \
	echo "static const char *lang_files[] = {"			; \
	for f in $(G_GTFILES_FILES_FILES); do echo "\"$$f\", "; done	; \
	echo "NULL };"							; \
	echo "static const char *langs_for_lang_files[] = {"		; \
	for f in $(G_GTFILES_FILES_LANGS); do echo "\"$$f\", "; done 	; \
	echo "NULL };"							; \
	echo "static const char *all_files[] = {"			; \
	for f in $(G_GTFILES); do echo "\"$$f\", "; done		; \
	echo " NULL };"							; \
	echo "static const char *lang_dir_names[] = {"			; \
	echo "\"c\", "							; \
	for f in $(G_GTFILES_LANG_DIR_NAMES); do echo "\"$$f\", "; done	; \
	echo "NULL };"							; \
	) >${.TARGET}

config.h: Makefile
	${_MKTARGET_CREATE}
	TM_DEFINES="$(G_tm_defines)" \
	HEADERS="$(G_host_xm_file)" XM_DEFINES="$(G_host_xm_defines)" \
	TARGET_CPU_DEFAULT="$(G_target_cpu_default)" \
	${HOST_SH} ${GNUHOSTDIST}/gcc/mkconfig.sh ${.TARGET}

tm_p.h: Makefile
	${_MKTARGET_CREATE}
	TM_DEFINES="" \
	HEADERS="$(G_tm_p_file)" XM_DEFINES="" TARGET_CPU_DEFAULT="" \
	${HOST_SH} ${GNUHOSTDIST}/gcc/mkconfig.sh ${.TARGET}

CLEANFILES+=	options.h
options.h: Makefile
	${_MKTARGET_CREATE}
	for f in $(lang_options_files) ""; do \
		if [ -n "$$f" ] ; then echo "#include \"$$f\""; fi; \
	done | sed 's|$(GNUHOSTDIST)/gcc/||' >${.TARGET}


# Yuck, we have to run configure to generate this one...
CLEANFILES+=	auto-build.h
auto-build.h: Makefile
	${_MKTARGET_CREATE}
	rm -rf .ab && \
	mkdir .ab && \
	(cd .ab && \
		CC=${HOST_CC:Q} \
		MAKE=${MAKE:Q} \
		CONFIG_SHELL=${HOST_SH:Q} \
		${HOST_SH} ${GNUHOSTDIST}/gcc/configure \
			--build=`${HOST_SH} ${.CURDIR}/../../../dist/gcc/config.guess` \
			--host=`${HOST_SH} ${.CURDIR}/../../../dist/gcc/config.guess` \
			--target=${MACHINE_GNU_PLATFORM} && \
		mv auto-host.h ../auto-build.h) && \
	rm -rf .ab

#
# These are copies of files we build for the build host that are used
# by the genfoo programs.
#

build-rtl.c: rtl.c \
  ${G_RTL_H} real.h ${G_GCC_H} errors.h gtype-desc.h
	${_MKTARGET_CREATE}
	rm -f build-rtl.c
	sed -e 's/config[.]h/hconfig.h/' ${GNUHOSTDIST}/gcc/rtl.c >${.TARGET}
build-rtl.lo: ${HH}

print-rtl1.c: print-rtl.c \
  ${G_RTL_H} ${G_TREE_H} hard-reg-set.h ${G_BASIC_BLOCK_H}
	${_MKTARGET_CREATE}
	rm -f print-rtl1.c
	sed -e 's/config[.]h/hconfig.h/' ${GNUHOSTDIST}/gcc/print-rtl.c >${.TARGET}
print-rtl1.lo: ${HH}

build-bitmap.c: bitmap.c \
  ${G_RTL_H} flags.h ${G_BASIC_BLOCK_H} ${REGS_H} ${G_GCC_H} gtype-desc.h
	${_MKTARGET_CREATE}
	rm -f build-bitmap.c
	sed -e 's/config[.]h/hconfig.h/' ${GNUHOSTDIST}/gcc/bitmap.c >${.TARGET}
build-bitmap.lo: ${HH}

build-errors.c: errors.c errors.h
	${_MKTARGET_CREATE}
	rm -f build-errors.c
	sed -e 's/config[.]h/hconfig.h/' ${GNUHOSTDIST}/gcc/errors.c >${.TARGET}
build-errors.lo: ${HH}

build-varray.c: varray.c \
  ${G_RTL_H} ${G_GCC_H} ${TREE_H} bitmap.h errors.h
	${_MKTARGET_CREATE}
	rm -f build-varray.c
	sed -e 's/config[.]h/hconfig.h/' ${GNUHOSTDIST}/gcc/varray.c >${.TARGET}
build-varray.lo: ${HH} gtype-desc.h

build-ggc-none.c: ggc-none.c \
  ${G_GCC_H} gtype-desc.h
	${_MKTARGET_CREATE}
	rm -f build-ggc-none.c
	sed -e 's/config[.]h/hconfig.h/' ${GNUHOSTDIST}/gcc/ggc-none.c >${.TARGET}
build-ggc-none.lo: ${HH}

#
# The `early' insn-foo generators
#
EXTRADEPENDSEARLY=	${G_HOST_EARLY_SUPPORT:.o=.lo} ${G_HOST_RTL:.o=.lo} \
			${G_HOST_ERRORS:.o=.lo}
.for f in conditions.c constants.h
CLEANFILES+=		gen${f:R} insn-${f}

gen${f:R}.lo: gen${f:R}.c ${HH}
gen${f:R}: gen${f:R}.lo ${EXTRADEPENDSEARLY}
	${_MKTARGET_LINK}
	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
insn-${f}: gen${f:R} ${G_md_file}
	${_MKTARGET_CREATE}
	./gen${f:R} ${G_md_file} >${.TARGET}
.endfor

#
# The normal insn-foo generators
#
.for f in gensupport.c read-rtl.c dummy-conditions.c
${f:R}.lo: ${HH}
.endfor

EXTRADEPENDS=		${G_HOST_RTL:.o=.lo} ${G_HOST_SUPPORT:.o=.lo} \
			${G_HOST_PRINT:.o=.lo} ${G_HOST_ERRORS:.o=.lo}
.for f in attr.h codes.h config.h emit.c extract.c flags.h opinit.c output.c \
	  peep.c recog.c
CLEANFILES+=		gen${f:R} insn-${f}

gen${f:R}.lo: ${HH}
gen${f:R}: gen${f:R}.lo ${EXTRADEPENDS} 
	${_MKTARGET_LINK}
	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
insn-${f}: gen${f:R} ${G_md_file}
	${_MKTARGET_CREATE}
	./gen${f:R} ${G_md_file} >${.TARGET}
.endfor

#
# "One of these things is not like the other"
#
CLEANFILES+=		genattrtab insn-attrtab.c
genattrtab.lo: ${HH} gtype-desc.h
genautomata.lo: ${HH}
genattrtab: genattrtab.lo genautomata.lo ${EXTRADEPENDS} ${G_HOST_VARRAY:.o=.lo}
	${_MKTARGET_LINK}
	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} -lm
insn-attrtab.c: genattrtab ${G_md_file}
	${_MKTARGET_CREATE}
	./genattrtab ${G_md_file} >${.TARGET}

#
# Required hard-coded dependancies.
#
genextract.lo: insn-config.h
insn-conditions.lo: insn-constants.h tm_p.h tm-preds.h

insn-attrtab.o: insn-config.h ${G_HOST_RTLANAL:.o=.c}
insn-extract.o: insn-config.h
toplev.d toplev.o: options.h

.PATH: ${DIST}/gcc ${DIST}/libiberty ${GCCARCH} ${G_out_file:H}
@


1.21
log
@Use ${HOST_SH} instead of the host system's /bin/sh wherever possible:

* Pass MAKE and CONFIG_SHELL in the environment to configure scripts
  that are run as part of the gcc3 and gcc4 build.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.20 2006/06/02 20:00:38 mrg Exp $
@


1.20
log
@make GCC3 work for vax - without shared library support.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.19 2006/05/08 14:42:22 tsutsui Exp $
d148 4
a151 1
		CC=${HOST_CC} ${HOST_SH} ${GNUHOSTDIST}/gcc/configure \
@


1.19
log
@Remove HACK for m68k ra-colorize.c bug in gcc-3.3.2 since current
self build (with gcc-3.3.3) on hp300 has worked fine without this.

Maybe we could remove this HACK for m68000 too, but I can't confirm it
because it's too slow even on the emulator and it's unlikely to build
whole toolchains on sun2 with its maximum 4MB RAM...
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.18 2006/02/25 12:04:23 simonb Exp $
d69 1
a69 1
gengenrtl.lo: ${G_HCONFIG_H}
@


1.18
log
@Use MKPRIVATELIB instead of NOLINKLIB/NOMAN/NOPIC/NOLINT.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.17 2005/02/11 14:58:41 jmc Exp $
d45 1
a45 1
.if ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m68000"
@


1.17
log
@Make sure to pass HOST_CC to configure
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.16 2004/06/12 14:57:57 jmc Exp $
d3 1
a3 4
NOLINKLIB=	# defined
NOLINT=		# defined
NOPIC=		# defined
NOPROFILE=	# defined
@


1.16
log
@Fix some missing $HOST_SH needs as highlighted in PR#25606
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.15 2004/04/26 09:17:16 uwe Exp $
d151 1
a151 1
		${HOST_SH} ${GNUHOSTDIST}/gcc/configure \
@


1.15
log
@Drop workaround for toolchain/22489 now that the fix for it has been pulled
from the gcc current.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.14 2004/02/22 01:24:25 uwe Exp $
d152 2
a153 2
			--build=`${.CURDIR}/../../../dist/gcc/config.guess` \
			--host=`${.CURDIR}/../../../dist/gcc/config.guess` \
@


1.14
log
@Work around toolchain/22489 (gcc optimization/11937) by compiling
function.c with -O0.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.13 2003/12/07 19:56:59 scw Exp $
a57 4
# XXX: toolchain/22489 (gcc optimization/11937)
.if ${MACHINE_CPU} == "sh3"
COPTS.function.c=		-O0
.endif
@


1.14.2.1
log
@Pullup rev 1.15 (requested by uwe in ticket #203)

Drop workaround for PR#22489 now that the fix for it has been pulled
from the gcc current.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.14 2004/02/22 01:24:25 uwe Exp $
d58 4
@


1.14.2.2
log
@Pull up revision 1.16 (requested by jmc in ticket #474):
Fix some missing $HOST_SH needs as highlighted in PR#25606
@
text
@d1 1
a1 1
#	$NetBSD$
d152 2
a153 2
			--build=`${HOST_SH} ${.CURDIR}/../../../dist/gcc/config.guess` \
			--host=`${HOST_SH} ${.CURDIR}/../../../dist/gcc/config.guess` \
@


1.13
log
@ - Work around a gcc3 ICE when building reload1.c at -O2 on sh5:
   Compile reload1.c at -O1.

 - Work around a fatal warning when building function.c on sh5:
   Define NOGCCERROR to disable -Werror.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.12 2003/11/16 16:24:48 lukem Exp $
d58 6
@


1.12
log
@Use .lo for host tool objects.
Use CPPFLAGS.file correctly (CPPFLAGS.foo.c _not_ CPPFLAGS.foo.o !)
Support MAKEVERBOSE.
Be consistent about make(1) variable use.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11 2003/11/05 00:05:48 mrg Exp $
d50 6
@


1.11
log
@build ra-colorize.c with -O0 until the bug that causes it to have dozens
of undefined references to local symbols is fixed.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10 2003/10/26 03:50:07 lukem Exp $
d26 1
a26 1
CLEANFILES+=	gengenrtl gengenrtl.o genrtl.c genrtl.h \
d33 3
a35 2
		build-rtl.c build-errors.c build-varray.c build-bitmap.c build-ggc-none.c \
		gt-*.h *.o \
d41 5
a45 4
COPTS.prefix.o=			-DPREFIX=\"$(prefix)\"
COPTS.toplev.o=			-DTARGET_NAME=\"$(target_alias)\"
COPTS.insn-conditions.c=	-DGENERATOR_FILE
COPTS.sparc.o=			-DTARGET_CPU_DEFAULT=${G_target_cpu_default}
d59 2
a60 1
	./gengenrtl > genrtl.c
d62 6
a67 5
	./gengenrtl -h > genrtl.h
gengenrtl.o: gengenrtl.c ${G_HCONFIG_H}
	${HOST_COMPILE.c} $<
gengenrtl: gengenrtl.o
	${HOST_LINK.c} -o $@@ $> ${NBCOMPATLIB} ${HOSTLIBIBERTY}
d70 6
a75 5
	./genpreds > tm-preds.h
genpreds.o: genpreds.c $(HH)
	${HOST_COMPILE.c} $<
genpreds: genpreds.o
	${HOST_LINK.c} -o $@@ $> ${NBCOMPATLIB} ${HOSTLIBIBERTY}
d78 6
a83 5
	./gencheck >$@@
gencheck.o: gencheck.c $(HH)
	${HOST_COMPILE.c} $<
gencheck: gencheck.o
	${HOST_LINK.c} -o $@@ $> ${NBCOMPATLIB} ${HOSTLIBIBERTY}
d87 1
d91 4
a94 8
gengtype.o: gengtype.c gtyp-gen.h $(HH)
	${HOST_COMPILE.c} $<
gengtype-lex.o: gengtype-lex.c $(HH)
	${HOST_COMPILE.c} $<
gengtype-yacc.o: gengtype-yacc.c $(HH)
	${HOST_COMPILE.c} $<
gengtype: gengtype.o gtyp-gen.h gengtype-lex.o gengtype-yacc.o config.h
	${HOST_LINK.c} -o $@@ gengtype.o gengtype-lex.o gengtype-yacc.o ${NBCOMPATLIB} ${HOSTLIBIBERTY}
d97 17
a113 15
	(	echo "static const char *srcdir = \"$(G_GTFILES_SRCDIR)\";"		; \
		echo "static const char *lang_files[] = {"				; \
		for f in $(G_GTFILES_FILES_FILES); do echo "\"$$f\", "; done		; \
		echo "NULL };"								; \
		echo "static const char *langs_for_lang_files[] = {"			; \
		for f in $(G_GTFILES_FILES_LANGS); do echo "\"$$f\", "; done 		; \
		echo "NULL };"								; \
		echo "static const char *all_files[] = {"				; \
		for f in $(G_GTFILES); do echo "\"$$f\", "; done			; \
		echo " NULL };"								; \
		echo "static const char *lang_dir_names[] = {"				; \
		echo "\"c\", "								; \
		for f in $(G_GTFILES_LANG_DIR_NAMES); do echo "\"$$f\", "; done		; \
		echo "NULL };"								; \
	) > gtyp-gen.h
d116 1
d120 1
a120 1
	${HOST_SH} $(GNUHOSTDIST)/gcc/mkconfig.sh config.h
d123 1
d126 1
a126 1
	${HOST_SH} $(GNUHOSTDIST)/gcc/mkconfig.sh tm_p.h
d130 1
d133 1
a133 1
	done | sed 's|$(GNUHOSTDIST)/gcc/||' > options.h
d139 1
d143 1
a143 1
		${HOST_SH} $(GNUHOSTDIST)/gcc/configure \
d154 1
d156 2
a157 1
  $(G_RTL_H) real.h $(G_GCC_H) errors.h gtype-desc.h
d159 2
a160 3
	sed -e 's/config[.]h/hconfig.h/' ${GNUHOSTDIST}/gcc/rtl.c > build-rtl.c
build-rtl.o: build-rtl.c $(HH)
	${HOST_COMPILE.c} -DGENERATOR_FILE build-rtl.c
d163 2
a164 1
  $(G_RTL_H) $(G_TREE_H) hard-reg-set.h $(G_BASIC_BLOCK_H)
d166 2
a167 3
	sed -e 's/config[.]h/hconfig.h/' ${GNUHOSTDIST}/gcc/print-rtl.c > print-rtl1.c
print-rtl1.o: print-rtl.c $(HH)
	${HOST_COMPILE.c} -DGENERATOR_FILE print-rtl1.c
d170 2
a171 1
  $(G_RTL_H) flags.h $(G_BASIC_BLOCK_H) $(REGS_H) $(G_GCC_H) gtype-desc.h
d173 2
a174 3
	sed -e 's/config[.]h/hconfig.h/' ${GNUHOSTDIST}/gcc/bitmap.c > build-bitmap.c
build-bitmap.o: build-bitmap.c $(HH)
	${HOST_COMPILE.c} ${COPTS.${.IMPSRC:T}} build-bitmap.c
d177 1
d179 2
a180 3
	sed -e 's/config[.]h/hconfig.h/' ${GNUHOSTDIST}/gcc/errors.c > build-errors.c
build-errors.o: build-errors.c $(HH)
	${HOST_COMPILE.c} -DGENERATOR_FILE build-errors.c
d183 2
a184 1
  $(G_RTL_H) $(G_GCC_H) $(TREE_H) bitmap.h errors.h
d186 2
a187 3
	sed -e 's/config[.]h/hconfig.h/' ${GNUHOSTDIST}/gcc/varray.c > build-varray.c
build-varray.o: build-varray.c $(HH) gtype-desc.h
	${HOST_COMPILE.c} ${COPTS.${.IMPSRC:T}} build-varray.c
d190 2
a191 1
  $(G_GCC_H) gtype-desc.h
d193 2
a194 3
	sed -e 's/config[.]h/hconfig.h/' ${GNUHOSTDIST}/gcc/ggc-none.c > build-ggc-none.c
build-ggc-none.o: build-ggc-none.c $(HH)
	${HOST_COMPILE.c} -DGENERATOR_FILE build-ggc-none.c
d199 2
a200 1
EXTRADEPENDSEARLY=	${G_HOST_EARLY_SUPPORT} ${G_HOST_RTL} ${G_HOST_ERRORS}
d204 7
a210 7
gen${f:R}.o: gen${f:R}.c $(HH)
	${HOST_COMPILE.c} $<
insn-${f:R}.o:
	${HOST_COMPILE.c} ${COPTS.${.IMPSRC:T}} insn-${f:R}.c
insn-${f}: genrtl.h ${G_md_file} ${EXTRADEPENDSEARLY:.c=.o} gen${f:R}.o
	${HOST_LINK.c} -o gen${f:R} gen${f:R}.o ${EXTRADEPENDSEARLY:.c=.o} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
	./gen${f:R} ${G_md_file} >$@@
d217 1
a217 2
${f:R}.o: ${f:R}.c $(HH)
	${HOST_COMPILE.c} $<
d220 2
a221 1
EXTRADEPENDS=		${G_HOST_RTL} ${G_HOST_SUPPORT} ${G_HOST_PRINT} ${G_HOST_ERRORS}
d226 7
a232 5
gen${f:R}.o: gen${f:R}.c $(HH)
	${HOST_COMPILE.c} $<
insn-${f}: genrtl.h ${G_md_file} ${EXTRADEPENDS:.c=.o} gen${f:R}.o
	${HOST_LINK.c} -o gen${f:R} gen${f:R}.o ${EXTRADEPENDS:.c=.o} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
	./gen${f:R} ${G_md_file} >$@@
d239 8
a246 7
genattrtab.o: genattrtab.c $(HH) gtype-desc.h
	${HOST_COMPILE.c} $<
genautomata.o: genautomata.c $(HH)
	${HOST_COMPILE.c} $<
insn-attrtab.c: genrtl.h ${G_md_file} ${EXTRADEPENDS:.c=.o} ${G_HOST_VARRAY:.c=.o} genattrtab.o genautomata.o
	${HOST_LINK.c} -o genattrtab genattrtab.o genautomata.o ${EXTRADEPENDS:.c=.o} ${G_HOST_VARRAY:.c=.o} ${NBCOMPATLIB} ${HOSTLIBIBERTY} -lm
	./genattrtab ${G_md_file} >$@@
d251 3
a253 1
genextract.o: insn-config.h
a254 1
insn-conditions.o: insn-constants.h tm_p.h tm-preds.h
@


1.10
log
@use ${HOST_SH} instead of /bin/sh
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2003/10/25 02:42:00 dmcmahill Exp $
d44 5
@


1.9
log
@avoid trying to do "for f in ; do ..." which breaks while crosscompiling
on certain non-netbsd host.  Approved by Matthew Green, mrg at netbsd.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2003/10/16 03:33:28 lukem Exp $
d109 1
a109 1
	/bin/sh $(GNUHOSTDIST)/gcc/mkconfig.sh config.h
d114 1
a114 1
	/bin/sh $(GNUHOSTDIST)/gcc/mkconfig.sh tm_p.h
d129 1
a129 1
		/bin/sh $(GNUHOSTDIST)/gcc/configure \
@


1.8
log
@Don't auto-frob .y or .l files.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2003/08/22 03:06:32 uwe Exp $
d118 2
a119 2
	for f in $(lang_options_files); do \
		echo "#include \"$$f\""; \
@


1.7
log
@* add ${GCCARCH} to .PATH to make hconfig.h a real file target.
* use ${G_HCONFIG_H} instead of hconfig.h as a dependency.
* hconfig.h: auto-build.h dependency is bogus, remove.
* misc cleanup of ".c depends on .h" -> ".o depends on .h"
* options.h was missing from CLEANFILES.

With these changes running make in this directory doesn't do a
*complete* rebuild anymore.  Still not foolproof, because gen* host
tools do not overwrite generated files that are not changed, so we
really need to use stamp file style dependencies for those, like gcc
makefile does.

Ok by Matthew Green <mrg@@netbsd>.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2003/08/11 07:34:26 mrg Exp $
d18 4
@


1.6
log
@- delete generated-for-i386--netbsdelf auto-build.h
- generate an auto-build.h at build time the same way ./configure does
- add dozens of missing dependancies
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2003/08/01 17:03:45 lukem Exp $
d42 1
a42 1
HH=	hconfig.h genrtl.h
d47 1
a47 1
genrtl.c genrtl.h: gengenrtl
d49 1
d51 1
a51 1
gengenrtl.o: gengenrtl.c hconfig.h
d75 1
a75 2
gengtype.c: gtyp-gen.h
gengtype.o: gengtype.c $(HH)
d112 1
a120 1
hconfig.h: auto-build.h
d228 5
a232 5
genextract.c: insn-config.h
insn-attrtab.c: ${G_HOST_RTLANAL:.o=.c}
insn-attrtab.c insn-extract.c: insn-config.h
insn-conditions.c: insn-constants.h tm_p.h tm-preds.h
toplev.c: options.h
d234 1
a234 1
.PATH: ${DIST}/gcc ${DIST}/libiberty ${G_out_file:H}
@


1.5
log
@Rework how dependency generation is performed:

* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
  This is a change of behaviour.  If a Makefile wants the clean semantics
  it must specifically append to CLEANFILES.
  Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
  that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d  depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2003/07/29 00:16:46 uwe Exp $
d41 3
d50 2
a51 2
gengenrtl.o: gengenrtl.c
	${HOST_COMPILE.c} $>
d53 1
a53 1
	${HOST_LINK.c} -o gengenrtl $> ${NBCOMPATLIB} ${HOSTLIBIBERTY}
d57 2
a58 2
genpreds.o: genpreds.c
	${HOST_COMPILE.c} $>
d60 1
a60 1
	${HOST_LINK.c} -o genpreds $> ${NBCOMPATLIB} ${HOSTLIBIBERTY}
d62 1
a62 4
#gencheck.o: gencheck.c
#	${HOST_COMPILE.c} $>
tree-check.h: gencheck.c
	${HOST_LINK.c} -o gencheck $> ${NBCOMPATLIB} ${HOSTLIBIBERTY}
d64 4
d75 6
a80 6
gengtype.o: gengtype.c
	${HOST_COMPILE.c} $>
gengtype-lex.o: gengtype-lex.c
	${HOST_COMPILE.c} $>
gengtype-yacc.o: gengtype-yacc.c
	${HOST_COMPILE.c} $>
d82 1
a82 1
	${HOST_LINK.c} -o gengtype gengtype.o gengtype-lex.o gengtype-yacc.o ${NBCOMPATLIB} ${HOSTLIBIBERTY}
d101 1
a101 2
# XXX /bin/sh
config.h:
d107 1
a107 1
tm_p.h:
d117 15
d140 1
a140 1
build-rtl.o: build-rtl.c
d147 1
a147 1
print-rtl1.o: print-rtl.c
d154 1
a154 1
build-bitmap.o: build-bitmap.c
d160 1
a160 1
build-errors.o: build-errors.c
d167 1
a167 1
build-varray.o: build-varray.c
d174 1
a174 1
build-ggc-none.o: build-ggc-none.c
d184 2
a185 2
gen${f:R}.o: gen${f:R}.c
	${HOST_COMPILE.c} $>
d197 2
a198 2
${f:R}.o: ${f:R}.c
	${HOST_COMPILE.c} $>
d206 2
a207 2
gen${f:R}.o: gen${f:R}.c
	${HOST_COMPILE.c} $>
d217 4
a220 4
genattrtab.o: genattrtab.c
	${HOST_COMPILE.c} $>
genautomata.o: genautomata.c
	${HOST_COMPILE.c} $>
d228 1
@


1.4
log
@Adapt to bsd.dep.mk changes.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2003/07/26 15:02:52 mrg Exp $
d15 1
a213 1
${OBJS} ${DEPENDSRCS}: insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h
@


1.3
log
@need a host rule for dummy-conditions.c
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2003/07/25 17:19:23 mrg Exp $
d213 1
a213 1
${OBJS} .depend: insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h
@


1.2
log
@clean up and fix a couple of build-from-cleandir problems
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2003/07/25 16:32:30 mrg Exp $
d177 1
a177 1
.for f in gensupport.c read-rtl.c
@


1.1
log
@new reach-over infrastructure (largely based on GCC2.95 one) that (mostly)
works.  sparc & i386 support is included here.  libstdc++-v3 does not yet
properly build for some strange reasons (that may be due to broken netbsd
header files, it's not yet clear) but i have been able to compile, link and
run both i386 & sparc hello.c.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2003/03/14 03:44:11 thorpej Exp $
d13 1
a13 2
		-DTARGET_NAME=\"${MACHINE_GNU_PLATFORM}\" \
		-DTARGET_CPU_DEFAULT=${G_target_cpu_default}
a31 3
LIBIBERTYOBJ!=	cd ${.CURDIR}/../host-libiberty && ${PRINTOBJDIR}
LIBIBERTY=	${LIBIBERTYOBJ}/libiberty/libiberty.a

d38 1
d49 1
a49 1
	${HOST_LINK.c} -o gengenrtl $> ${NBCOMPATLIB} ${LIBIBERTY}
d56 1
a56 1
	${HOST_LINK.c} -o genpreds $> ${NBCOMPATLIB} ${LIBIBERTY}
d61 1
a61 1
	${HOST_LINK.c} -o gencheck $> ${NBCOMPATLIB} ${LIBIBERTY}
d77 1
a77 1
	${HOST_LINK.c} -o gengtype gengtype.o gengtype-lex.o gengtype-yacc.o ${NBCOMPATLIB} ${LIBIBERTY}
d170 1
a170 1
	${HOST_LINK.c} -o gen${f:R} gen${f:R}.o ${EXTRADEPENDSEARLY:.c=.o} ${NBCOMPATLIB} ${LIBIBERTY}
d190 1
a190 1
	${HOST_LINK.c} -o gen${f:R} gen${f:R}.o ${EXTRADEPENDS:.c=.o} ${NBCOMPATLIB} ${LIBIBERTY}
d203 1
a203 1
	${HOST_LINK.c} -o genattrtab genattrtab.o genautomata.o ${EXTRADEPENDS:.c=.o} ${G_HOST_VARRAY:.c=.o} ${NBCOMPATLIB} ${LIBIBERTY} -lm
@

