diff --git a/gnu/lib/libstdc++/Makefile b/gnu/lib/libstdc++/Makefile index e8853641657c..620228ed2f5a 100644 --- a/gnu/lib/libstdc++/Makefile +++ b/gnu/lib/libstdc++/Makefile @@ -22,14 +22,21 @@ LDADD+= -lm DPADD+= ${LIBM} # libstdc++ sources (libstdc++/src/Makefile.in, do not reorder) -SRCS+= globals.cc limits.cc basic_file_stdio.cc complex_io.cc ios.cc \ - strstream-fixed.cc bitset.cc functexcept.cc stdexcept.cc \ - vterminate.cc ctype.cc c_locale.cc locale.cc localename.cc codecvt.cc \ - codecvt_members.cc collate_members.cc ctype_members.cc messages_members.cc \ - monetary_members.cc numeric_members.cc time_members.cc concept-inst.cc \ - locale-inst.cc misc-inst.cc stl-inst.cc string-inst.cc wstring-inst.cc \ - valarray-inst.cc ext-inst.cc fstream.cc fstream-inst.cc io-inst.cc \ - istream-inst.cc ostream-inst.cc streambuf-inst.cc sstream-inst.cc +SRCS+= bitset.cc codecvt.cc complex_io.cc concept-inst.cc ctype.cc \ + ext-inst.cc fstream.cc fstream-inst.cc functexcept.cc \ + globals.cc io-inst.cc ios.cc istream-inst.cc limits.cc \ + locale.cc locale-inst.cc localename.cc misc-inst.cc \ + ostream-inst.cc sstream-inst.cc stdexcept.cc stl-inst.cc \ + streambuf-inst.cc string-inst.cc strstream-fixed.cc \ + valarray-inst.cc vterminate.cc wstring-inst.cc + +# target sources +SRCS+= codecvt_members.cc collate_members.cc ctype_members.cc \ + messages_members.cc monetary_members.cc numeric_members.cc \ + time_members.cc + +# target sources extra +SRCS+= basic_file_stdio.cc c_locale.cc # C parts of math SRCS+= nan.c signbit.c signbitf.c signbitl.c stubs.c @@ -38,7 +45,7 @@ SRCS+= nan.c signbit.c signbitf.c signbitl.c stubs.c SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc \ eh_alloc.cc eh_aux_runtime.cc eh_catch.cc eh_exception.cc \ eh_globals.cc eh_personality.cc eh_terminate.cc eh_throw.cc eh_type.cc \ - new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc \ + guard.cc new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc \ pure.cc tinfo.cc tinfo2.cc vec.cc # from libiberty: @@ -55,9 +62,10 @@ INCSGROUPS= BITSHDRS BKWHDRS EXTHDRS BASEHDRS BASEXHDRS STDHDRS \ BITSHDRS= basic_ios.h basic_ios.tcc basic_string.h basic_string.tcc \ boost_concept_check.h char_traits.h codecvt.h concept_check.h \ - cpp_type_traits.h fpos.h fstream.tcc functexcept.h \ + cpp_type_traits.h deque.tcc fpos.h fstream.tcc functexcept.h \ generic_shadow.h gslice.h gslice_array.h indirect_array.h \ - ios_base.h istream.tcc locale_facets.h locale_facets.tcc \ + ios_base.h istream.tcc list.tcc \ + locale_classes.h locale_facets.h locale_facets.tcc \ localefwd.h mask_array.h ostream.tcc pthread_allocimpl.h \ slice.h slice_array.h sstream.tcc stl_algo.h stl_algobase.h \ stl_alloc.h stl_bvector.h stl_construct.h stl_deque.h \ @@ -69,9 +77,10 @@ BITSHDRS= basic_ios.h basic_ios.tcc basic_string.h basic_string.tcc \ stl_tempbuf.h stl_threads.h stl_tree.h stl_uninitialized.h \ stl_vector.h stream_iterator.h streambuf.tcc \ streambuf_iterator.h stringfwd.h type_traits.h \ - valarray_array.h valarray_array.tcc valarray_meta.h + valarray_array.h valarray_array.tcc valarray_meta.h \ + vector.tcc BITSHDRS:= ${BITSHDRS:S;^;${SRCDIR}/include/bits/;} -BITSHDRSDIR= ${INCLUDEDIR}/g++/bits +BITSHDRSDIR= ${INCLUDEDIR}/c++/3.3/bits BKWHDRS= algo.h algobase.h alloc.h backward_warning.h bvector.h \ complex.h defalloc.h deque.h fstream.h function.h \ @@ -81,13 +90,13 @@ BKWHDRS= algo.h algobase.h alloc.h backward_warning.h bvector.h \ slist.h stack.h stream.h streambuf.h strstream strstream.h \ tempbuf.h tree.h vector.h BKWHDRS:= ${BKWHDRS:S;^;${SRCDIR}/include/backward/;} -BKWHDRSDIR= ${INCLUDEDIR}/g++/backward +BKWHDRSDIR= ${INCLUDEDIR}/c++/3.3/backward EXTHDRS= algorithm enc_filebuf.h functional hash_map hash_set \ iterator memory numeric rb_tree rope ropeimpl.h slist \ stdio_filebuf.h stl_hash_fun.h stl_hashtable.h stl_rope.h EXTHDRS:= ${EXTHDRS:S;^;${SRCDIR}/include/ext/;} -EXTHDRSDIR= ${INCLUDEDIR}/g++/ext +EXTHDRSDIR= ${INCLUDEDIR}/c++/3.3/ext # This is the common subset of files that all three "C" header models use. BASEHDRS= std_cassert.h std_cctype.h std_cerrno.h std_cfloat.h \ @@ -99,11 +108,11 @@ BASEHDRS= std_cassert.h std_cctype.h std_cerrno.h std_cfloat.h \ BASEHDRSNAME_$h=${h:R:S;^std_;;} .endfor BASEHDRS:= ${BASEHDRS:S;^;${SRCDIR}/include/c_std/;} -BASEHDRSDIR= ${INCLUDEDIR}/g++ +BASEHDRSDIR= ${INCLUDEDIR}/c++/3.3 # Some of the different "C" header models need extra files. BASEXHDRS= ${SRCDIR}/include/c_std/cmath.tcc -BASEXHDRSDIR= ${INCLUDEDIR}/g++/bits +BASEXHDRSDIR= ${INCLUDEDIR}/c++/3.3/bits STDHDRS= std_algorithm.h std_bitset.h std_complex.h std_deque.h \ std_fstream.h std_functional.h std_iomanip.h std_ios.h \ @@ -116,7 +125,7 @@ STDHDRS= std_algorithm.h std_bitset.h std_complex.h std_deque.h \ STDHDRSNAME_$h=${h:R:S;^std_;;} .endfor STDHDRS:= ${STDHDRS:S;^;${SRCDIR}/include/std/;} -STDHDRSDIR= ${INCLUDEDIR}/g++ +STDHDRSDIR= ${INCLUDEDIR}/c++/3.3 TARGETHDRS= io/basic_file_stdio.h io/c_io_stdio.h \ locale/generic/c_locale.h \ @@ -124,33 +133,36 @@ TARGETHDRS= io/basic_file_stdio.h io/c_io_stdio.h \ locale/generic/codecvt_specializations.h \ locale/generic/messages_members.h \ locale/generic/time_members.h \ - os/bsd/freebsd/bits/ctype_base.h \ - os/bsd/freebsd/bits/ctype_inline.h \ - os/bsd/freebsd/bits/ctype_noninline.h \ - os/bsd/freebsd/bits/os_defines.h + os/bsd/freebsd/ctype_base.h \ + os/bsd/freebsd/ctype_inline.h \ + os/bsd/freebsd/ctype_noninline.h \ + os/bsd/freebsd/os_defines.h TARGETHDRS:= ${TARGETHDRS:S;^;${SRCDIR}/config/;} TARGETHDRS+= ${.CURDIR}/c++config.h TARGETHDRSNAME_basic_file_stdio.h= basic_file.h TARGETHDRSNAME_c_io_stdio.h= c++io.h TARGETHDRSNAME_c_locale.h= c++locale.h -TARGETHDRSDIR= ${INCLUDEDIR}/g++/bits +TARGETHDRSDIR= ${INCLUDEDIR}/c++/3.3/bits -MARCHHDRS= atomicity.h cpu_limits.h +MARCHHDRS= atomicity.h .if ${MACHINE_ARCH} == "sparc64" -MARCHDIR= ${SRCDIR}/config/cpu/sparc/${MACHINE_ARCH}/bits +MARCHDIR= sparc +.elif ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU} != 'i386' +MARCHDIR= i486 .else -MARCHDIR= ${SRCDIR}/config/cpu/${MACHINE_ARCH}/bits +MARCHDIR= ${MACHINE_ARCH} .endif + .for h in ${MARCHHDRS} -.if exists(${MARCHDIR}/${h}) -TARGETHDRS+= ${MARCHDIR}/${h} +.if exists(${SRCDIR}/config/cpu/${MARCHDIR}/${h}) +TARGETHDRS+= ${SRCDIR}/config/cpu/${MARCHDIR}/${h} .else TARGETHDRS+= ${SRCDIR}/config/cpu/generic/bits/${h} .endif .endfor THRHDRS= gthr.h gthr-single.h gthr-posix.h gthr-default.h -THRHDRSDIR= ${INCLUDEDIR}/g++/bits +THRHDRSDIR= ${INCLUDEDIR}/c++/3.3/bits gthr.h: ${GCCDIR}/gthr.h sed -e '/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCPP_\1/g' \ diff --git a/gnu/lib/libsupc++/Makefile b/gnu/lib/libsupc++/Makefile index 681b1d8e0897..cb41af28d09c 100644 --- a/gnu/lib/libsupc++/Makefile +++ b/gnu/lib/libsupc++/Makefile @@ -10,7 +10,7 @@ LIB= supc++ SRCS= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc \ eh_alloc.cc eh_aux_runtime.cc eh_catch.cc eh_exception.cc \ eh_globals.cc eh_personality.cc eh_terminate.cc eh_throw.cc eh_type.cc \ - new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc \ + guard.cc new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc \ pure.cc tinfo.cc tinfo2.cc vec.cc # from libiberty: @@ -22,6 +22,6 @@ CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections HDRS= exception new typeinfo cxxabi.h exception_defines.h INCS= ${HDRS:S;^;${SRCDIR}/;} -INCSDIR=${INCLUDEDIR}/g++ +INCSDIR=${INCLUDEDIR}/c++/3.3 .include diff --git a/gnu/usr.bin/cc/Makefile b/gnu/usr.bin/cc/Makefile index 23499e19f3e9..d8ea8c26ae28 100644 --- a/gnu/usr.bin/cc/Makefile +++ b/gnu/usr.bin/cc/Makefile @@ -3,7 +3,7 @@ # The order of some of these are rather important. Some depend on previous # subdirs. -SUBDIR= cc_tools cc_int cc cc1 cpp0 include protoize tradcpp0 doc +SUBDIR= cc_tools cc_int cc cc1 include protoize doc .if !defined(NO_CPP) SUBDIR+= cpp diff --git a/gnu/usr.bin/cc/c++filt/Makefile b/gnu/usr.bin/cc/c++filt/Makefile index 95c340d713b5..f187a7b527a0 100644 --- a/gnu/usr.bin/cc/c++filt/Makefile +++ b/gnu/usr.bin/cc/c++filt/Makefile @@ -8,7 +8,7 @@ PROG= c++filt SRCS= cp-demangle.c cplus-dem+%DIKED.c NOMAN= 1 -CFLAGS+= -DMAIN -DIN_GCC -DVERSION=\"$(version)\" +CFLAGS+= -DSTANDALONE_DEMANGLER -DIN_GCC -DVERSION=\"$(version)\" DPADD+= ${LIBCC_INT} LDADD+= ${LIBCC_INT} diff --git a/gnu/usr.bin/cc/cc1/Makefile b/gnu/usr.bin/cc/cc1/Makefile index 09a89b59a6d9..98cdc81e4d1f 100644 --- a/gnu/usr.bin/cc/cc1/Makefile +++ b/gnu/usr.bin/cc/cc1/Makefile @@ -5,7 +5,7 @@ .PATH: ${GCCDIR} PROG= cc1 -SRCS= main.c c-parse+%DIKED.c c-lang.c c-decl.c +SRCS= main.c c-parse+%DIKED.c c-lang.c c-decl.c c-opts.c BINDIR= /usr/libexec NOMAN= 1 NOSHARED?=yes diff --git a/gnu/usr.bin/cc/cc1plus/Makefile b/gnu/usr.bin/cc/cc1plus/Makefile index 97ccdcf2f345..883bfdbb7145 100644 --- a/gnu/usr.bin/cc/cc1plus/Makefile +++ b/gnu/usr.bin/cc/cc1plus/Makefile @@ -6,7 +6,7 @@ PROG= cc1plus SRCS= parse+%DIKED.c parse.h cfns.h -SRCS+= main.c cp-lang.c \ +SRCS+= main.c cp-lang.c c-opts.c \ call.c class.c cvt.c decl.c decl2.c error.c except.c expr.c friend.c \ init.c lex.c mangle.c method.c pt.c ptree.c repo.c rtti.c search.c \ semantics.c spew.c tree.c typeck.c typeck2.c dump.c optimize.c diff --git a/gnu/usr.bin/cc/cc_int/Makefile b/gnu/usr.bin/cc/cc_int/Makefile index bfc7b7705fbc..fe6d82847431 100644 --- a/gnu/usr.bin/cc/cc_int/Makefile +++ b/gnu/usr.bin/cc/cc_int/Makefile @@ -2,40 +2,31 @@ .include "../Makefile.inc" -.PATH: ../cc_tools ${GCCDIR}/config/${GCC_CPU} ${GCCDIR} ${GCCDIR}/../libiberty +.PATH: ../cc_tools ${GCCDIR}/config/${GCC_CPU} ${GCCDIR} ${GCCDIR}/../libiberty LIB= cc_int INTERNALLIB= YES # dbxout.c dwarfout.c emit-rtl.c explow.c expmed.c expr.c \ # alias.c bitmap.c dwarf2out.c dyn-string.c \ -SRCS= c-common.c c-format.c \ +SRCS= c-common.c c-dump.c c-format.c c-opts.c \ c-pragma.c c-semantics.c \ - \ caller-save.c calls.c combine.c convert.c cse.c \ dbxout.c dwarfout.c dwarf2out.c dwarf2asm.c emit-rtl.c explow.c expmed.c expr.c \ final.c flow.c fold-const.c function.c getpwd.c global.c graph.c \ - hash.c haifa-sched.c \ + gtype-desc.c hash.c haifa-sched.c \ integrate.c jump.c lcm.c local-alloc.c loop.c optabs.c \ - print-rtl.c print-tree.c real.c recog.c reg-stack.c regclass.c \ + print-rtl.c print-tree.c \ + ra.c ra-build.c ra-colorize.c ra-debug.c ra-rewrite.c \ + real.c recog.c reg-stack.c regclass.c \ reload.c reload1.c reorg.c rtl.c rtlanal.c \ sbitmap.c sdbout.c stmt.c stor-layout.c \ - toplev.c tree.c unroll.c varasm.c version.c xcoffout.c \ + toplev.c tracer.c tree.c unroll.c varasm.c version.c xcoffout.c \ alias.c bitmap.c dyn-string.c \ gcse.c genrtl.c profile.c regmove.c varray.c \ attribs.c cselib.c debug.c rtl-error.c tree-dump.c tree-inline.c -.if ${TARGET_ARCH} != "amd64" SRCS+= ${GCC_CPU}.c -.else -SRCS+= i386-hacked.c -CLEANFILES+= i386-hacked.c - -i386-hacked.c: ${GCCDIR}/config/i386/i386.c amd64.patch - rm -f i386-hacked.c # in case p4 readonly copied - cp ${GCCDIR}/config/i386/i386.c i386-hacked.c - patch -b .orig < ${.CURDIR}/amd64.patch -.endif SRCS+= bb-reorder.c conflict.c ggc-common.c \ ggc-page.c ifcvt.c lists.c predict.c regrename.c resource.c sibcall.c \ @@ -64,17 +55,18 @@ SRCS+= c-lex.c c-typeck.c \ c-errors.o c-pragma.o c-convert.o c-aux-info.o c-common.o c-format.o c-semantics.o c-objc-common.o # libbackend -SRCS+= builtins.c diagnostic.c doloop.c dominance.c except.c gcse.c params.c sched-deps.c sched-vis.c sched-rgn.c sched-ebb.c \ +SRCS+= builtins.c diagnostic.c doloop.c dominance.c et-forest.c \ + except.c gcse.c params.c sched-deps.c sched-vis.c sched-rgn.c sched-ebb.c \ stringpool.c c-lex.c langhooks.c hashtable.c \ hooks.c \ cfg.c cfganal.c cfgbuild.c cfgcleanup.c cfglayout.c cfgloop.c cfgrtl.c # libcpp SRCS+= cppdefault.c cpperror.c cppexp.c cppfiles.c cppinit.c cpphash.c \ - cpplex.c cpplib.c cppmacro.c mkdeps.c line-map.c + cpplex.c cpplib.c cppmacro.c cppmain.c cpptrad.c mkdeps.c line-map.c # stuff that makes libiberty now required (2.95) and shouldn't be... -SRCS+= obstack.c splay-tree.c hashtab.c partition.c lbasename.c md5.c hex.c getopt.c getopt1.c +SRCS+= obstack.c splay-tree.c hashtab.c partition.c lbasename.c md5.c hex.c getopt.c getopt1.c xmemdup.c physmem.c CFLAGS+= -DHAVE_CONFIG_H CFLAGS+= -DTARGET_NAME=\"${target}\" -DIN_GCC diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile index 0e7f760003e7..3fab4d1b4955 100644 --- a/gnu/usr.bin/cc/cc_tools/Makefile +++ b/gnu/usr.bin/cc/cc_tools/Makefile @@ -11,49 +11,71 @@ # Prevent mkdep from using it, so that we don't have to give rules for # aliases of generated headers. -CFLAGS+= -I. +CFLAGS+= -I. -static -DGENERATOR_FILE .include "../Makefile.inc" -.PATH: ${GCCDIR} ${GCCDIR}/cp ${GCCDIR}/../libiberty - -CFLAGS+= -static -DGENERATOR_FILE +.PATH: ${GCCDIR} #----------------------------------------------------------------------- # insn-* gunk -.for F in attr codes config flags +.for F in attr codes config flags constants insn-$F.h: gen$F ${MD_FILE} ./gen$F ${MD_FILE} > insn-$F.h GENSRCS+= insn-$F.h .endfor +.for F in conditions +insn-$F.c: gen$F ${MD_FILE} + ./gen$F ${MD_FILE} > insn-$F.c +GENSRCS+= insn-$F.c +.endfor + GENSRCS+= gen-time-stamp -gen-time-stamp: genattrtab genemit genextract genopinit genoutput genpeep genrecog +gen-time-stamp: genattr genattrtab genconditions genconstants genemit \ + genextract gengtype genopinit genoutput genpeep genrecog touch ${.TARGET} .for F in attr codes config emit extract flags opinit output peep recog build-tools: gen$F -gen$F: gen$F.o rtl.o obstack.o print-rtl.o bitmap.o errors.o gensupport.o ggc-none.o hashtab.o read-rtl.o +gen$F: gen$F.o rtl.o obstack.o print-rtl.o bitmap.o errors.o gensupport.o \ + ggc-none.o hashtab.o read-rtl.o concat.o insn-conditions.o ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c CLEANFILES+= gen$F .endfor -.for F in attrtab +# +# genattrtab needs more complex build rule +# +build-tools: genattrtab + +genattrtab : genattrtab.o rtl.o obstack.o print-rtl.o bitmap.o errors.o \ + gensupport.o ggc-none.o hashtab.o read-rtl.o concat.o \ + insn-conditions.o genautomata.o varray.o getruntime.o + ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm + +GENSRCS+= genattrtab.c +CLEANFILES+= genattrtab + +# +# genconstants and genconditions cannot depend on insn-conditions.o +# they should be liked with dummy-conditions.o stubs instead +# +.for F in constants conditions build-tools: gen$F -gen$F: gen$F.o rtl.o print-rtl.o obstack.o bitmap.o errors.o gensupport.o ggc-none.o hashtab.o read-rtl.o +gen$F: gen$F.o rtl.o obstack.o bitmap.o errors.o gensupport.o \ + ggc-none.o hashtab.o read-rtl.o concat.o dummy-conditions.o ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c CLEANFILES+= gen$F .endfor -SRCS+= bitmap.c errors.c gensupport.c ggc-none.c hashtab.c obstack.c print-rtl.c regclass.c rtl.c rtlanal.c read-rtl.c - .for F in check genrtl preds build-tools: gen$F @@ -71,6 +93,10 @@ genrtl.c genrtl.h: gengenrtl GENSRCS+= genrtl.c genrtl.h +SRCS+= bitmap.c concat.c dummy-conditions.c errors.c genautomata.c \ + gensupport.c getruntime.c ggc-none.c hashtab.c insn-conditions.c \ + obstack.c physmem.c print-rtl.c read-rtl.c rtl.c varray.c xmemdup.c + #----------------------------------------------------------------------- # Common parser stuff. @@ -85,19 +111,172 @@ tm-preds.h: genpreds ./genpreds > ${.TARGET} GENSRCS+= tm-preds.h +#----------------------------------------------------------------------- +# Gengtype + +gengtype-lex.c : gengtype-lex.l + ${LEX} -t ${.ALLSRC} | \ + sed 's/^\(char msg\[\];\)/yyconst \1/' > ${.TARGET} + +.ORDER: gengtype-yacc.c gengtype-yacc.h +gengtype-yacc.c gengtype-yacc.h: gengtype-yacc.y + ${YACC} -d -o gengtype-yacc.c ${.ALLSRC} + +GENSRCS+= gengtype-yacc+%DIKED.c gengtype-yacc.h gengtype-lex.c +CLEANFILES+= gengtype-yacc.c + +gengtype-yacc+%DIKED.c: gengtype-yacc.c + cat ${.ALLSRC} > ${.TARGET} + sed -e "s/xmalloc/malloc/g" \ + -e "s/xrealloc/realloc/g" \ + -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + ${.ALLSRC} > ${.TARGET} + +gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o xmemdup.o + ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} + +GENSRCS+= gengtype.c +CLEANFILES+= gengtype + +gengtype-lex.o: gengtype-yacc.h + +.ORDER: gtype-desc.c gtype-desc.h +gtype-desc.c gtype-desc.h: gtype-time-stamp + @true + +GENSRCS+= gtype-time-stamp +gtype-time-stamp: gengtype ${GTFILES} + ./gengtype + touch ${.TARGET} + +GENSRCS+= gtype-desc.c gtype-desc.h +CLEANFILES+= gt-*.h gtype-*.h + +#----------------------------------------------------------------------- +# Determine content of variables used by the target/host config files + +# +# The list of headers to go into tconfig.h +# +TARGET_INC= ansidecl.h +TARGET_INC+= ${GCC_CPU}/${GCC_CPU}.h +.if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64" +TARGET_INC+= ${GCC_CPU}/unix.h +TARGET_INC+= ${GCC_CPU}/att.h +.endif +.if ${TARGET_ARCH} != "alpha" +TARGET_INC+= dbxelf.h +TARGET_INC+= elfos.h +.endif +TARGET_INC+= freebsd-native.h +TARGET_INC+= freebsd-spec.h +TARGET_INC+= freebsd.h +.if ${TARGET_ARCH} == "alpha" +TARGET_INC+= ${GCC_CPU}/elf.h +.endif +.if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" +.if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h) +TARGET_INC+= ${GCC_CPU}/sysv4.h +.endif +.endif +TARGET_INC+= ${GCC_CPU}/freebsd.h +.if ${TARGET_ARCH} == "amd64" +TARGET_INC+= ${GCC_CPU}/x86-64.h +TARGET_INC+= ${GCC_CPU}/freebsd64.h +.endif +TARGET_INC+= defaults.h + +# +# Use TARGET_INC as a template and build a list of target specific +# include files for gengtype to scan +# +GCONFIG_H= ${.OBJDIR}/tconfig.h ${.CURDIR}/auto-host.h + +.for H in ${TARGET_INC} +.for D in ${GCCDIR}/config ${GCCDIR} ${.CURDIR} +.if exists($D/$H) +GCONFIG_H+= $D/$H +.endif +.endfor +.endfor + +# +# Define some variables to make blocks copied from Makefile.in happy +# +srcdir= ${GCCDIR} +HASHTAB_H= ${GCCDIR}/hashtab.h +out_file= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.c +GTFILES_SRCDIR= ${GCCDIR} + +# +# Copied unchanged from gcc/Makefile.in +# +GTFILES = $(GCONFIG_H) $(srcdir)/location.h \ + $(HASHTAB_H) \ + $(srcdir)/bitmap.h $(srcdir)/function.h $(srcdir)/rtl.h $(srcdir)/optabs.h \ + $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h $(srcdir)/real.h \ + $(srcdir)/varray.h $(srcdir)/ssa.h $(srcdir)/insn-addr.h $(srcdir)/cselib.h \ + $(srcdir)/c-common.h $(srcdir)/c-tree.h \ + $(srcdir)/basic-block.h \ + $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c \ + $(srcdir)/dwarf2out.c $(srcdir)/emit-rtl.c \ + $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \ + $(srcdir)/fold-const.c $(srcdir)/function.c \ + $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \ + $(srcdir)/profile.c $(srcdir)/ra-build.c $(srcdir)/regclass.c \ + $(srcdir)/reg-stack.c \ + $(srcdir)/sdbout.c $(srcdir)/stmt.c $(srcdir)/stor-layout.c \ + $(srcdir)/tree.c $(srcdir)/varasm.c \ + $(out_file) + +# +# Build a list of frontend directories to look into +# +GTFILES_LANG_DIR_NAMES= + +.if !defined(NO_CXX) +GTFILES_LANG_DIR_NAMES+= cp +.endif + +.if !defined(NO_OBJC) +GTFILES_LANG_DIR_NAMES+= objc +.endif + +.if !defined(NO_FORTRAN) +GTFILES_LANG_DIR_NAMES+= f +.endif + +# +# Build a list of language specific files for gengtype +# +.for L in ${GTFILES_LANG_DIR_NAMES} c +.if exists(${GCCDIR}/$L-config-lang.in) +# Source the language config file +$L_GTFILES!= sh -c '. ${GCCDIR}/$L-config-lang.in; echo $$gtfiles' +.else +$L_GTFILES!= sh -c '. ${GCCDIR}/$L/config-lang.in; echo $$gtfiles' +.endif +GTFILES+= ${$L_GTFILES} +.for F in ${$L_GTFILES} +GTFILES_FILES+= $F +GTFILES_LANGS+= $L +.endfor +.endfor + #----------------------------------------------------------------------- # the host/target compiler config. COMMONHDRS= config.h hconfig.h multilib.h options.h specs.h tconfig.h \ tm_p.h configargs.h safe-ctype.h -GENSRCS+= ${COMMONHDRS} gencheck.h +GENSRCS+= ${COMMONHDRS} gencheck.h gtyp-gen.h MFILE?= ${.CURDIR}/Makefile ${COMMONHDRS}: ${MFILE} configargs.h: echo 'static const char configuration_arguments[] =' > ${.TARGET} - echo ' "FreeBSD/${TARGET_ARCH} system compiler";' >> ${.TARGET} + echo ' "FreeBSD/${TARGET_ARCH} system compiler";' >> ${.TARGET} echo 'static const char thread_model[] = "posix";' >> ${.TARGET} hconfig.h: @@ -131,7 +310,7 @@ specs.h: config.h: echo '#include ' > ${.TARGET} echo '#ifndef GENERATOR_FILE' >> ${.TARGET} - echo '#include "insn-codes.h"' >> ${.TARGET} + echo '#include "insn-constants.h"' >> ${.TARGET} echo '#include "insn-flags.h"' >> ${.TARGET} echo '#endif' >> ${.TARGET} @@ -142,6 +321,9 @@ tconfig.h: echo 'typedef struct rtvec_def *rtvec;' >> ${.TARGET} echo 'union tree_node;' >> ${.TARGET} echo 'typedef union tree_node *tree;' >> ${.TARGET} + echo '#ifndef GTY' >> ${.TARGET} + echo '# define GTY(x)' >> ${.TARGET} + echo '#endif' >> ${.TARGET} echo '' >> ${.TARGET} .if ${TARGET_ARCH} == "amd64" echo '#include "i386/biarch64.h"' >> ${.TARGET} @@ -149,37 +331,15 @@ tconfig.h: .if ${TARGET_ARCH} == "ia64" echo '#define TARGET_CPU_DEFAULT (MASK_GNU_AS|MASK_GNU_LD)' >>${.TARGET} .endif - echo '#include "ansidecl.h"' >> ${.TARGET} - echo '#include "${GCC_CPU}/${GCC_CPU}.h"' >> ${.TARGET} -.if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64" - echo '#include "${GCC_CPU}/att.h"' >> ${.TARGET} -.endif -.if ${TARGET_ARCH} != "alpha" - echo '#include "dbxelf.h"' >> ${.TARGET} - echo '#include "elfos.h"' >> ${.TARGET} -.endif - echo '#include ' >> ${.TARGET} - echo '#include "freebsd-spec.h"' >> ${.TARGET} - echo '#include "freebsd.h"' >> ${.TARGET} -.if ${TARGET_ARCH} == "alpha" - echo '#include "${GCC_CPU}/elf.h"' >> ${.TARGET} -.endif -.if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" -.if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h) - echo '#include "${GCC_CPU}/sysv4.h"' >> ${.TARGET} -.endif -.endif - echo '#include "${GCC_CPU}/freebsd.h"' >> ${.TARGET} -.if ${TARGET_ARCH} == "amd64" - echo '#include "${GCC_CPU}/x86-64.h"' >> ${.TARGET} - echo '#include "${GCC_CPU}/freebsd64.h"' >> ${.TARGET} -.endif - echo '#include "defaults.h"' >> ${.TARGET} +.for H in ${TARGET_INC} + echo '#include "$H"' >> ${.TARGET} +.endfor echo '#ifndef POSIX' >> ${.TARGET} echo '# define POSIX' >> ${.TARGET} echo '#endif' >> ${.TARGET} -.if ${TARGET_ARCH} != "ia64" - echo '#define CONFIG_SJLJ_EXCEPTIONS 0' >> ${.TARGET} +.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def) + echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET} + echo '#define EXTRA_CC_MODES 1' >> ${.TARGET} .endif tm_p.h: @@ -203,6 +363,33 @@ safe-ctype.h: Makefile echo "#define IS_SPACE_OR_NUL(x) \ (isspace(x) || (x) == '\0')" >> ${.TARGET} +gtyp-gen.h: + echo "/* This file is machine generated. Do not edit. */" > ${.TARGET} + echo "static const char *srcdir = " >> ${.TARGET} + echo "\"$(GTFILES_SRCDIR)\";" >> ${.TARGET} + echo "static const char *lang_files[] = {" >> ${.TARGET} +.for F in ${GTFILES_FILES} + echo "\"$F\", " >> ${.TARGET} +.endfor + echo "NULL};" >> ${.TARGET} + echo "static const char *langs_for_lang_files[] = {" >> ${.TARGET} +.for F in ${GTFILES_LANGS} + echo "\"$F\", " >> ${.TARGET} +.endfor + echo "NULL};" >> ${.TARGET} + echo "static const char *all_files[] = {" >> ${.TARGET} +.for F in ${GTFILES} + echo "\"$F\", " >> ${.TARGET} +.endfor + echo "NULL};" >> ${.TARGET} + echo "static const char *lang_dir_names[] = { \"c\", " >> ${.TARGET} +.for F in ${GTFILES_LANG_DIR_NAMES} + echo "\"$F\", " >> ${.TARGET} +.endfor + echo "NULL};" >> ${.TARGET} + echo "#define xexit exit" >> ${.TARGET} + + #----------------------------------------------------------------------- # General things. @@ -228,18 +415,14 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} # all headers. Filter out the objects that would cause problems (i.e., # objects that will be used to create programs that will generate headers). # -${OBJS:Nbitmap.o:Nerrors.o:Ngenattr.o:Ngencheck.o:Ngencodes.o:Ngenconfig.o:Ngenflags.o:Ngengenrtl.o:Ngenpreds.o:Ngensupport.o:Nggc-none.o:Nhashtab.o:Nobstack.o:Nprint-rtl.o:Nread-rtl.o:Nrtl.o}: ${SRCS:M*.h} +${OBJS}: ${SRCS:M*.h:Ngtype-desc.h:Ngenrtl.h:Ntree-check.h:Ntm-preds.h:Ninsn-*.h} -# Force these to be made absolustly first w/-j -${OBJS}: ${COMMONHDRS} +${OBJS:Ngencheck.o:Ngengenrtl.o:Ngenpreds.o}: tree-check.h tm-preds.h genrtl.h + +${OBJS:Ngengtype*.o:Nxmemdup.o:Ngengenrtl.o:Ngencheck.o:Ngenpreds.o}: gtype-desc.h + +genextract.o: insn-config.h + +insn-conditions.o: insn-constants.h -# Next, make each of the problematic objects depend on only most headers. -# Filter out the headers that would cause problems (and a few more when it -# is inconvenient to filter precisely). -# -bitmap.o genattr.o gencodes.o genconfig.o genflags.o gensupport.o obstack.o print-rtl.o \ - read-rtl.o rtl.o: ${SRCS:M*.h:Ninsn-*.h} -gencheck.o: gencheck.h ${SRCS:M*.h:Ngenrtl.h:Ntree-check.h:Ninsn-*.h} -gengenrtl.o: ${SRCS:M*.h:Ngenrtl.h:Ninsn-*.h} -genpreds.o: ${COMMONHDRS} .endif diff --git a/gnu/usr.bin/cc/doc/Makefile b/gnu/usr.bin/cc/doc/Makefile index bc2cd1c18ba6..74cdf82517e5 100644 --- a/gnu/usr.bin/cc/doc/Makefile +++ b/gnu/usr.bin/cc/doc/Makefile @@ -14,7 +14,7 @@ INFOENTRY_cppinternals= "* cppinternals: (cppinternals). The GNU compiler prepr gcc.info: gcc.texi include/gcc-common.texi frontends.texi standards.texi \ invoke.texi extend.texi md.texi objc.texi gcov.texi trouble.texi \ - bugreport.texi service.texi contribute.texi vms.texi \ + bugreport.texi service.texi contribute.texi compat.texi \ include/funding.texi gnu.texi include/gpl.texi include/fdl.texi \ contrib.texi cppenv.texi cppopts.texi @@ -23,7 +23,7 @@ gccint.info: gccint.texi include/gcc-common.texi contribute.texi \ passes.texi c-tree.texi rtl.texi md.texi tm.texi hostconfig.texi \ fragments.texi configfiles.texi collect2.texi headerdirs.texi \ include/funding.texi gnu.texi include/gpl.texi include/fdl.texi \ - contrib.texi languages.texi sourcebuild.texi + contrib.texi languages.texi sourcebuild.texi gty.texi cpp.info: cpp.texi include/fdl.texi cppenv.texi cppopts.texi