Tue Jun 28 04:23:01 2011 UTC ()
begin to fix this for GCC 4.5.  gengtype-yacc is gone, and -parse is its
replacement.  build the list of files from $G_GTFILES like GCC build dones.


(mrg)
diff -r1.2 -r1.3 src/external/gpl3/gcc/usr.bin/backend/Makefile

cvs diff -r1.2 -r1.3 src/external/gpl3/gcc/usr.bin/backend/Makefile (expand / switch to unified diff)

--- src/external/gpl3/gcc/usr.bin/backend/Makefile 2011/06/24 05:26:06 1.2
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile 2011/06/28 04:23:01 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.2 2011/06/24 05:26:06 mrg Exp $ 1# $NetBSD: Makefile,v 1.3 2011/06/28 04:23:01 mrg Exp $
2 2
3LIBISPRIVATE= yes 3LIBISPRIVATE= yes
4 4
5LIB= backend 5LIB= backend
6 6
7SRCS= ${G_OBJS:.o=.c} ${G_out_file:T} 7SRCS= ${G_OBJS:.o=.c} ${G_out_file:T}
8 8
9CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \ 9CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \
10 -DTARGET_NAME=\"${MACHINE_GNU_PLATFORM}\" 10 -DTARGET_NAME=\"${MACHINE_GNU_PLATFORM}\"
11HOST_CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} 11HOST_CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
12DPSRCS+= insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h 12DPSRCS+= insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h
13CPPFLAGS.prefix.c+= -DPREFIX=\"/usr\" 13CPPFLAGS.prefix.c+= -DPREFIX=\"/usr\"
14 14
@@ -33,27 +33,27 @@ CLEANFILES+= gengenrtl genrtl.c genrtl.h @@ -33,27 +33,27 @@ CLEANFILES+= gengenrtl genrtl.c genrtl.h
33 insn-preds.c genpreds tm-preds.h tm_p.h cs-tm_p.h \ 33 insn-preds.c genpreds tm-preds.h tm_p.h cs-tm_p.h \
34 genmodes insn-modes.c insn-modes.h min-insn-modes.c \ 34 genmodes insn-modes.c insn-modes.h min-insn-modes.c \
35 auto-host.h build-print-rtl.c \ 35 auto-host.h build-print-rtl.c \
36 build-rtl.c build-errors.c build-varray.c \ 36 build-rtl.c build-errors.c build-varray.c \
37 build-bitmap.c build-ggc-none.c \ 37 build-bitmap.c build-ggc-none.c \
38 gt-*.h *.o *.lo \ 38 gt-*.h *.o *.lo \
39 cs-config.h \ 39 cs-config.h \
40 gcov-iov gcov-iov.h \ 40 gcov-iov gcov-iov.h \
41 41
42# 42#
43# These files have special needs 43# These files have special needs
44# 44#
45.for f in \ 45.for f in \
46 build-errors build-ggc-none build-print-rtl build-rtl build-varray dummy-conditions gcov-iov genattr genattrtab genautomata gencheck genchecksum gencodes genconditions genconfig genconstants genemit genextract genflags gengenrtl gengtype gengtype-lex gengtype-yacc genmddeps genmodes genopinit genoutput genpeep genpreds genrecog gensupport insn-conditions min-insn-modes read-rtl 46 build-errors build-ggc-none build-print-rtl build-rtl build-varray dummy-conditions gcov-iov genattr genattrtab genautomata gencheck genchecksum gencodes genconditions genconfig genconstants genemit genextract genflags gengenrtl gengtype gengtype-lex genmddeps genmodes genopinit genoutput genpeep genpreds genrecog gensupport insn-conditions min-insn-modes read-rtl
47CPPFLAGS.${f}.c= -DGENERATOR_FILE 47CPPFLAGS.${f}.c= -DGENERATOR_FILE
48.endfor 48.endfor
49 49
50# XXX 50# XXX
51COPTS.varasm.c= -Wno-error 51COPTS.varasm.c= -Wno-error
52 52
53 53
54# Headers that host objects depend on (except gen*rtl*) 54# Headers that host objects depend on (except gen*rtl*)
55HH_NORTL= ${G_tm_file_list} ${G_build_xm_include_list} 55HH_NORTL= ${G_tm_file_list} ${G_build_xm_include_list}
56HH= ${HH_NORTL} genrtl.h insn-modes.h 56HH= ${HH_NORTL} genrtl.h insn-modes.h
57 57
58# 58#
59# Generate the various header files we need. 59# Generate the various header files we need.
@@ -78,35 +78,39 @@ insn-preds.c: genpreds ${G_md_file} @@ -78,35 +78,39 @@ insn-preds.c: genpreds ${G_md_file}
78genpreds.lo: ${HH} 78genpreds.lo: ${HH}
79genpreds: genpreds.lo ${EXTRADEPENDSEARLY} 79genpreds: genpreds.lo ${EXTRADEPENDSEARLY}
80 ${_MKTARGET_LINK} 80 ${_MKTARGET_LINK}
81 ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} 81 ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
82 82
83tree-check.h: gencheck 83tree-check.h: gencheck
84 ${_MKTARGET_CREATE} 84 ${_MKTARGET_CREATE}
85 ./gencheck >${.TARGET} 85 ./gencheck >${.TARGET}
86gencheck.lo: ${HH} 86gencheck.lo: ${HH}
87gencheck: gencheck.lo 87gencheck: gencheck.lo
88 ${_MKTARGET_LINK} 88 ${_MKTARGET_LINK}
89 ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} 89 ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
90 90
 91gtyp-input.list: Makefile
 92 for f in ${G_GTFILES}; do echo $f; done > ${.TARGET}
 93CLEANFILES+= gtyp-input.list
 94
91gtype-desc.c: gtype-desc.h 95gtype-desc.c: gtype-desc.h
92gtype-desc.h: gengtype 96gtype-desc.h: gengtype
93 ${_MKTARGET_CREATE} 97 ${_MKTARGET_CREATE}
94 rm -f auto-host.h 98 rm -f auto-host.h
95 ln -s ${.CURDIR}/../gcc/arch/${MACHINE_ARCH}/auto-host.h . 99 ln -s ${.CURDIR}/../gcc/arch/${MACHINE_ARCH}/auto-host.h .
96 ./gengtype 100 ./gengtype ${DIST} gtyp-input.list
97# gengtype is the real need for options.h 101# gengtype is the real need for options.h
98gengtype.lo gengtype-lex.lo gengtype-yacc.lo: ${HH} gtyp-gen.h config.h options.h 102gengtype.lo gengtype-lex.lo gengtype-parse.lo: ${HH} gtyp-gen.h config.h options.h
99gengtype: gengtype.lo gengtype-lex.lo gengtype-yacc.lo build-errors.lo 103gengtype: gengtype.lo gengtype-lex.lo gengtype-parse.lo build-errors.lo gtyp-input.list
100 ${_MKTARGET_LINK} 104 ${_MKTARGET_LINK}
101 ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} 105 ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
102 106
103gtyp-gen.h: Makefile 107gtyp-gen.h: Makefile
104 ${_MKTARGET_CREATE} 108 ${_MKTARGET_CREATE}
105 (\ 109 (\
106 echo "static const char *srcdir = \"$(G_GTFILES_SRCDIR)\";" ; \ 110 echo "static const char *srcdir = \"$(G_GTFILES_SRCDIR)\";" ; \
107 echo "static const char *lang_files[] = {" ; \ 111 echo "static const char *lang_files[] = {" ; \
108 for f in $(G_GTFILES_FILES_FILES); do echo "\"$$f\", "; done ; \ 112 for f in $(G_GTFILES_FILES_FILES); do echo "\"$$f\", "; done ; \
109 echo "NULL };" ; \ 113 echo "NULL };" ; \
110 echo "static const char *langs_for_lang_files[] = {" ; \ 114 echo "static const char *langs_for_lang_files[] = {" ; \
111 for f in $(G_GTFILES_FILES_LANGS); do echo "\"$$f\", "; done ; \ 115 for f in $(G_GTFILES_FILES_LANGS); do echo "\"$$f\", "; done ; \
112 echo "NULL };" ; \ 116 echo "NULL };" ; \