Module Name: src Committed By: mrg Date: Wed Feb 7 02:33:05 UTC 2018
Modified Files: src/external/gpl3/gcc/usr.bin/backend: Makefile Log Message: make this actually work: - use ${G_OBJS} directly, it avoids issues with .c vs .cc files. - add a method to not rm -rf .ab for inspection. - fix and add missing depends for many things. - use -Wno-error for mips and arm insn-recog.c, due to eg: insn-recog.c:10304:7: error: this decimal constant is unsigned only in ISO C90 [-Werror] mips.md:3474:11: error: this decimal constant is unsigned only in ISO C90 [-Werror] To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/external/gpl3/gcc/usr.bin/backend/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl3/gcc/usr.bin/backend/Makefile diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.41 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.42 --- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.41 Sun Feb 4 10:16:07 2018 +++ src/external/gpl3/gcc/usr.bin/backend/Makefile Wed Feb 7 02:33:05 2018 @@ -1,10 +1,13 @@ -# $NetBSD: Makefile,v 1.41 2018/02/04 10:16:07 mrg Exp $ +# $NetBSD: Makefile,v 1.42 2018/02/07 02:33:05 mrg Exp $ LIBISPRIVATE= yes LIB= backend -SRCS= ${G_OBJS:.o=.c} ${G_out_file:T} regsub.c +SRCS= ${G_OBJS} ${G_out_file:T} regsub.c + +# XXX: something misses these. +CLEANDIRFILES+= ${G_OBJS:.o=.d} # Make sure we use the pre-generated C files .l.c: @@ -29,16 +32,6 @@ HOSTPROG_CXX= 1 HOST_LIBIBERTYOBJ!= cd ${.CURDIR}/../host-libiberty && ${PRINTOBJDIR} -# XXX ${G_OBJS:.o=.c} is invalid in GCC 5.3, but work around for now -BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/wide-int-print.cc wide-int-print.c -BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/wide-int.cc wide-int.c - -.if ${MACHINE_CPU} == "sh3" -BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/config/sh/sh-mem.cc sh-mem.c -BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/config/sh/sh_treg_combine.cc sh_treg_combine.c -BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/config/sh/sh_optimize_sett_clrt.cc sh_optimize_sett_clrt.c -.endif - .include <bsd.lib.mk> # Force using C++ for this @@ -211,6 +204,10 @@ ${G_OBJS} ${G_OBJS:.o=.d}: tm_p.h # XXX CLEANFILES+= auto-build.h HOST_CFLAGS+= -I${.OBJDIR} HOST_CXXFLAGS+= -I${.OBJDIR} + +# Set this to "true" to leave .ab around +HOST_AB_CLEAN?= rm -rf .ab + auto-build.h: gmp.h Makefile ${_MKTARGET_CREATE} rm -rf .ab && \ @@ -228,8 +225,7 @@ auto-build.h: gmp.h Makefile --host=`${HOST_SH} ${GNUHOSTDIST}/config.guess` \ --target=${MACHINE_GNU_PLATFORM} && \ mv auto-host.h ../auto-build.h) && \ - true - #rm -rf .ab + ${HOST_AB_CLEAN} pass-instances.def: passes.def gen-pass-instances.awk ${_MKTARGET_CREATE} @@ -243,12 +239,12 @@ CLEANFILES+= pass-instances.def # build-rtl.c: rtl.c \ - ${G_RTL_H} real.h ${G_GCC_H} ${G_GGC_H} errors.h + ${G_RTL_H} real.h ${G_GCC_H} ${G_RTL_BASE_H} ${G_GGC_H} errors.h ${_MKTARGET_CREATE} rm -f build-rtl.c ${TOOL_SED} -e 's/<config[.]h/hconfig.h/' \ ${GNUHOSTDIST}/gcc/rtl.c >${.TARGET} -build-rtl.lo: ${HH} +build-rtl.lo: ${HH} insn-constants.h CLEANFILES+= build-rtl.c build-print-rtl.c: print-rtl.c \ @@ -310,6 +306,8 @@ build-vec.c: vec.c vec.h ${G_GGC_H} build-vec.lo: ${HH_NORTL} CLEANFILES+= build-vec.c +build-genattrtab.o: ${G_GGC_H} + # # The normal insn-foo generators # @@ -333,7 +331,7 @@ GENPROG_RTL_DEPENDS= ${G_BUILD_RTL:.o=.l .for f in attr attr-common attrtab automata codes conditions config emit \ extract flags opinit output peep preds recog mddump condmd \ target-def cfn-macros -gen${f}.lo: ${HH} gen${f}.c +gen${f}.lo: ${HH} gen${f}.c ${G_RTL_BASE_H} gen${f}: gen${f}.lo ${GENPROG_RTL_DEPENDS} ${_MKTARGET_LINK} ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}} @@ -341,15 +339,15 @@ CLEANFILES+= gen${f} gen${f}.lo .endfor .for f in mddeps constants enums -gen${f}.lo: ${HH} gen${f}.c -gen${f}: gen${f}.lo ${GENPROG_READER_DEPENDS} +gen${f}.lo: ${HH} gen${f}.c ${G_RTL_BASE_H} +gen${f}: gen${f}.lo ${GENPROG_READER_DEPENDS} ${_MKTARGET_LINK} ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}} CLEANFILES+= gen${f} gen${f}.lo .endfor .for f in check checksum -gen${f}.lo: ${HH} gen${f}.c +gen${f}.lo: ${HH} gen${f}.c ${G_RTL_BASE_H} gen${f}: gen${f}.lo ${_MKTARGET_LINK} ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}} @@ -421,7 +419,7 @@ CLEANFILES+= insn-conditions.md # build params.list for params.h. params.h: params.list -DPSRCS+= params.h +${SRCS}: params.list params-list.h: params.def params.list: params-list.h ${CPP} ${.ALLSRC} | sed 's/^#.*//;/^$$/d' > params.list.tmp && \ @@ -450,10 +448,10 @@ ${CASECFNDEPS}: case-cfn-macros.h # genextract.lo: insn-config.h gencondmd.lo: tm_p.h tm-constrs.h -read-rtl.lo gencodes.lo genattrtab.lo genautomata.lo: insn-constants.h -genattr-common.lo gensupport.lo genconditions.lo: insn-constants.h +read-rtl.lo gencodes.lo genattrtab.lo genautomata.lo: insn-constants.h gtype-desc.h +genattr-common.lo gensupport.lo genconditions.lo gentarget-def.lo: insn-constants.h genattr.lo genflags.lo genemit.lo genconfig.lo gencheck.lo: insn-constants.h gtype-desc.h -genopinit.lo genrecog.lo genpreds.lo genoutput.lo genpeep.lo: insn-constants.h +genopinit.lo genrecog.lo genpreds.lo genoutput.lo genpeep.lo: insn-constants.h build-ggc-none.lo: gtype-desc.h ggc-none.o: gtype-desc.h @@ -474,6 +472,8 @@ data-streamer.o data-streamer-out.o cove gcov-io.h: gcov-iov.h df-scan.d df-scan.o: target-hooks-def.h read-md.d read-md.o read-md.lo: auto-build.h +hash-table.d hash-table.o hash-table.lo: auto-build.h gtype-desc.h +gencfn-macros.d gencfn-macros.o gencfn-macros.lo: gtype-desc.h cgraphunit.d cgraphunit.o: pass-instances.def # XXX make all hooks generated for now. @@ -487,12 +487,21 @@ alpha.d: pass-instances.def .if ${MACHINE_CPU} == "arm" arm.d arm.o: insn-constants.h tm_p.h insn-opinit.h target-hooks-def.h arm-builtins.d arm-builtins.o: insn-opinit.h +# XXX insn-recog.c:10304:7: error: this decimal constant is unsigned only in ISO C90 [-Werror] +COPTS.insn-recog.c+=-Wno-error +.endif + +.if ${MACHINE_CPU} == "mips" +# XXX mips.md:3474:11: error: this decimal constant is unsigned only in ISO C90 [-Werror] +COPTS.insn-recog.c+=-Wno-error .endif .if ${GCC_MACHINE_ARCH} == "i386" || ${GCC_MACHINE_ARCH} == "x86_64" i386.d i386.o: tm-constrs.h .endif +${G_out_file:T:.c=.o}: insn-target-def.h + .if ${GCC_MACHINE_ARCH} == "vax" CPPFLAGS+=-I${.CURDIR}/../../lib/libgcc/libgcov/arch/${GCC_MACHINE_ARCH} COPTS.builtins.c+=-O0