diff options
Diffstat (limited to 'gnu/usr.bin')
25 files changed, 777 insertions, 363 deletions
diff --git a/gnu/usr.bin/cc/Makefile b/gnu/usr.bin/cc/Makefile index a75747bf5d01..06dee66ff6ef 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_fbsd cc_tools cc_int cccp cc1 cc +SUBDIR= cc_fbsd cc_tools cc_int cc cc1 cpp0 protoize tradcpp0 .if !defined(NO_CPP) SUBDIR+= cpp @@ -11,9 +11,9 @@ SUBDIR+= cpp .if !defined(NO_CXX) SUBDIR+= cc1plus c++ c++filt doc -#.if !defined(NO_COLLECT2) -#SUBDIR+= collect2 -#.endif +.if !defined(NO_COLLECT2) +SUBDIR+= collect2 +.endif .endif .if !defined(NO_OBJC) diff --git a/gnu/usr.bin/cc/Makefile.fe b/gnu/usr.bin/cc/Makefile.fe index e8c0da7a1d7e..c4a02f88bf23 100644 --- a/gnu/usr.bin/cc/Makefile.fe +++ b/gnu/usr.bin/cc/Makefile.fe @@ -1 +1,5 @@ # $FreeBSD$ + +# Front-end-only bits + +version!= sed -n /version_string/p ${GCCDIR}/version.c | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index 355b0bc9f837..e9f4867046bc 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -6,24 +6,17 @@ .if !defined(__CC_MAKEFILE_INC__) __CC_MAKEFILE_INC__= ${MFILE} -GCCDIR= ${.CURDIR}/../../../../contrib/gcc.295 +GCCDIR= ${.CURDIR}/../../../../contrib/gcc -TARGET_ARCH?= ${MACHINE_ARCH} +.include "Makefile.tgt" # Machine description. -MD_FILE= ${GCCDIR}/config/${TARGET_ARCH}/${TARGET_ARCH}.md -target= ${TARGET_ARCH}-unknown-freebsd - -# These architectures are Cygnus's default for enabling Haifa. -.if ${TARGET_ARCH} == "alpha" -USE_EGCS_HAIFA= 1 -.endif - -version!= grep version_string ${GCCDIR}/version.c \ - | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' +MD_FILE= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md +target= ${TARGET_ARCH}-undermydesk-freebsd CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\" +#CFLAGS+= -DWANT_COMPILER_INVARIANTS # If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined # to get the proper sizes in limits.h @@ -31,10 +24,6 @@ CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\" CFLAGS+= -DLONG_TYPE_SIZE=${LONG_TYPE_SIZE} .endif -.if defined(USE_EGCS_HAIFA) -CFLAGS+= -DHAIFA -.endif - .if ${TARGET_ARCH} != ${MACHINE_ARCH} CFLAGS+= -DCROSS_COMPILE .endif diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt index e8c0da7a1d7e..19dc3fa4c387 100644 --- a/gnu/usr.bin/cc/Makefile.tgt +++ b/gnu/usr.bin/cc/Makefile.tgt @@ -1 +1,16 @@ # $FreeBSD$ + +TARGET_ARCH?= ${MACHINE_ARCH} + +.if ${TARGET_ARCH} == "alpha" +GCC_CPU= alpha +.elif ${TARGET_ARCH} == "arm" +GCC_CPU= arm +.elif ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "x86-64" +GCC_CPU= i386 +.elif ${TARGET_ARCH} == "powerpc" +GCC_CPU= rs6000 +.elif ${TARGET_ARCH} == "sparc64" +GCC_CPU= sparc +TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc +.endif diff --git a/gnu/usr.bin/cc/c++/Makefile b/gnu/usr.bin/cc/c++/Makefile index d5a37ea66d55..be231122fa93 100644 --- a/gnu/usr.bin/cc/c++/Makefile +++ b/gnu/usr.bin/cc/c++/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ .include "../Makefile.inc" +.include "../Makefile.fe" .PATH: ${GCCDIR}/cp ${GCCDIR} diff --git a/gnu/usr.bin/cc/c++filt/Makefile b/gnu/usr.bin/cc/c++filt/Makefile index 8e188f16262f..49a9254f42bc 100644 --- a/gnu/usr.bin/cc/c++filt/Makefile +++ b/gnu/usr.bin/cc/c++filt/Makefile @@ -2,26 +2,22 @@ .include "../Makefile.inc" -.PATH: ${GCCDIR} +.PATH: ${GCCDIR} ${GCCDIR}/../libiberty PROG= c++filt -SRCS= cplus-dem.c getopt.c getopt1.c underscore.c +SRCS= cp-demangle.c cplus-dem+%DIKED.c BINDIR= /usr/libexec/${OBJFORMAT} NOMAN= 1 CFLAGS+= -DMAIN -DIN_GCC -DVERSION=\"$(version)\" -CLEANFILES= tmp-dum.c tmp-dum.s underscore.c +DPADD+= ${LIBCC_INT} +LDADD+= ${LIBCC_INT} -underscore.c: - echo "int xxy_us_dummy;" >tmp-dum.c - ${CC} -S tmp-dum.c - echo '/*WARNING: This file is automatically generated!*/' >underscore.c - if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \ - echo "int prepends_underscore = 1;" >>underscore.c; \ - else \ - echo "int prepends_underscore = 0;" >>underscore.c; \ - fi - rm -f tmp-dum.c tmp-dum.s +cplus-dem+%DIKED.c: cplus-dem.c + sed \ + -e 's/^xmalloc[ ]/_DONT_xmalloc /g' \ + -e 's/^xrealloc[ ]/_DONT_xrealloc /g' \ + ${.ALLSRC} > ${.TARGET} .include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/cc/Makefile b/gnu/usr.bin/cc/cc/Makefile index bc86c4de5233..0ad1e81913e9 100644 --- a/gnu/usr.bin/cc/cc/Makefile +++ b/gnu/usr.bin/cc/cc/Makefile @@ -1,13 +1,15 @@ # $FreeBSD$ .include "../Makefile.inc" +.include "../Makefile.fe" .PATH: ${GCCDIR} PROG= cc MAN= gcc.1 +NOMAN= # not while compile from GCC repo checkout SRCS= gcc.c gccspec.c -NOSHARED=yes +NOSHARED?=yes LINKS= ${BINDIR}/cc ${BINDIR}/gcc MLINKS= gcc.1 cc.1 gcc.1 c++.1 gcc.1 g++.1 gcc.1 CC.1 diff --git a/gnu/usr.bin/cc/cc1/Makefile b/gnu/usr.bin/cc/cc1/Makefile index 210cf1575ceb..ad7bc6affa19 100644 --- a/gnu/usr.bin/cc/cc1/Makefile +++ b/gnu/usr.bin/cc/cc1/Makefile @@ -2,15 +2,13 @@ .include "../Makefile.inc" -.PATH: ${GCCDIR} +.PATH: ../cc_tools ${GCCDIR} PROG= cc1 -SRCS= c-parse.y c-lang.c -# Ugh, compiled twice... -SRCS+= c-decl.c c-lex.c +SRCS= main.c c-parse.c c-lang.c c-decl.c BINDIR= /usr/libexec NOMAN= 1 -NOSHARED=yes +NOSHARED?=yes CFLAGS+= -I. @@ -19,13 +17,17 @@ LDADD+= ${LIBCC_INT} #----------------------------------------------------------------------- # C parser -c-parse.y: c-parse.in +.ORDER: c-parse.c +c-parse.c: c-parse.in sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ -e "/^ifc$$/d" \ -e "/^end ifc$$/d" \ - ${.ALLSRC} > ${.TARGET} + ${GCCDIR}/c-parse.in > c-parse.y + ${YACC} -o c-parse.c.in c-parse.y + sed -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + c-parse.c.in >c-parse.c -CLEANFILES+= c-parse.y -#----------------------------------------------------------------------- +CLEANFILES+= c-parse.c c-parse.y # insurance .include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/cc1obj/Makefile b/gnu/usr.bin/cc/cc1obj/Makefile index 567b566dabb1..8c585c9d36bd 100644 --- a/gnu/usr.bin/cc/cc1obj/Makefile +++ b/gnu/usr.bin/cc/cc1obj/Makefile @@ -2,15 +2,13 @@ .include "../Makefile.inc" -.PATH: ${GCCDIR}/objc ${GCCDIR} +.PATH: ../cc_tools ${GCCDIR}/objc ${GCCDIR} PROG= cc1obj -SRCS= c-parse.y objc-act.c -# Ugh, compiled twice... -SRCS+= c-decl.c c-lex.c +SRCS= objc-parse.c objc-act.c objc-lang.c main.c c-decl.c BINDIR= /usr/libexec NOMAN= 1 -NOSHARED=yes +NOSHARED?=yes CFLAGS+= -I${GCCDIR}/objc -I. @@ -19,14 +17,18 @@ LDADD+= ${LIBCC_INT} #----------------------------------------------------------------------- # objc parser - -c-parse.y: c-parse.in +.ORDER: objc-parse.c +objc-parse.c: c-parse.in sed -e "/^ifc$$/,/^end ifc$$/d" \ -e "/^ifobjc$$/d" \ -e "/^end ifobjc$$/d" \ - ${.ALLSRC} > ${.TARGET} + ${GCCDIR}/c-parse.in > objc-parse.y + ${YACC} -o objc-parse.c.in objc-parse.y + sed -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + objc-parse.c.in >objc-parse.c -CLEANFILES+= c-parse.y +CLEANFILES+= objc-parse.c objc-parse.y # insurance #----------------------------------------------------------------------- diff --git a/gnu/usr.bin/cc/cc1plus/Makefile b/gnu/usr.bin/cc/cc1plus/Makefile index 30ab06eb9ba5..6b7c49d4d05d 100644 --- a/gnu/usr.bin/cc/cc1plus/Makefile +++ b/gnu/usr.bin/cc/cc1plus/Makefile @@ -2,33 +2,39 @@ .include "../Makefile.inc" -.PATH: ${GCCDIR}/cp +.PATH: ${GCCDIR}/cp ${GCCDIR} PROG= cc1plus -SRCS= parse.y y.tab.h parse.h -SRCS+= call.c class.c cvt.c decl.c decl2.c errfn.c error.c except.c expr.c \ - friend.c init.c lex.c method.c pt.c ptree.c repo.c rtti.c \ - search.c semantics.c sig.c spew.c tree.c typeck.c typeck2.c xref.c +SRCS= parse.y cfns.h +SRCS+= main.c cp-lang.c +SRCS+= 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 + BINDIR= /usr/libexec NOMAN= 1 -NOSHARED=yes +NOSHARED?=yes CFLAGS+= -I${GCCDIR}/cp -I. DPADD+= ${LIBCC_INT} LDADD+= ${LIBCC_INT} -parse.h: y.tab.h parse.c - cp -p y.tab.h ${.TARGET} - grep '^#define[ ]*YYEMPTY' parse.c >>${.TARGET} +CLEANFILES+= parse.c parse.h y.tab.c y.tab.h cfns.h -CLEANFILES+= parse.h +.ORDER: parse.c parse.h +parse.c: parse.y + ${YACC} ${YFLAGS} ${GCCDIR}/cp/${.TARGET:S/c$/y/} + sed -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + y.tab.c >${.TARGET} -CPPHDRS= exception new new.h typeinfo +parse.h: parse.c y.tab.h + cp -pf y.tab.h ${.TARGET} + grep '^#define[ ]*YYEMPTY' ${.TARGET:S/h$/c/} >>${.TARGET} -beforeinstall: - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${CPPHDRS:S;^;${GCCDIR}/cp/inc/;} \ - ${DESTDIR}/usr/include/g++ +cfns.h: + gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' \ + ${GCCDIR}/cp/cfns.gperf > ${.TARGET} .include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/cc_int/Makefile b/gnu/usr.bin/cc/cc_int/Makefile index 834ebc200810..9799a9c32552 100644 --- a/gnu/usr.bin/cc/cc_int/Makefile +++ b/gnu/usr.bin/cc/cc_int/Makefile @@ -2,31 +2,34 @@ .include "../Makefile.inc" -.PATH: ../cc_tools ${GCCDIR}/config/${TARGET_ARCH} ${GCCDIR} +.PATH: ../cc_tools ${GCCDIR}/config/${GCC_CPU} ${GCCDIR} ${GCCDIR}/../libiberty LIB= cc_int NOPROFILE= YES NOPIC= YES -SRCS= c-aux-info.c c-common.c c-convert.c c-iterate.c \ - c-pragma.c c-typeck.c \ +# 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 \ + c-pragma.c c-semantics.c \ + \ caller-save.c calls.c combine.c convert.c cse.c \ - dbxout.c dwarfout.c emit-rtl.c explow.c expmed.c expr.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 \ + 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 \ reload.c reload1.c reorg.c rtl.c rtlanal.c \ - sbitmap.c sdbout.c stmt.c stor-layout.c stupid.c \ + sbitmap.c sdbout.c stmt.c stor-layout.c \ toplev.c tree.c unroll.c varasm.c version.c xcoffout.c \ - alias.c bitmap.c dwarf2out.c dyn-string.c except.c \ + alias.c bitmap.c dyn-string.c \ gcse.c genrtl.c profile.c regmove.c varray.c \ - ${TARGET_ARCH}.c -.if defined(USE_EGCS_HAIFA) && ${USE_EGCS_HAIFA} == 1 -SRCS+= haifa-sched.c -.else -SRCS+= sched.c -.endif + attribs.c cselib.c debug.c rtl-error.c tree-dump.c tree-inline.c \ + ${GCC_CPU}.c + +SRCS+= bb-reorder.c conflict.c ggc-common.c \ + ggc-page.c ifcvt.c lists.c predict.c regrename.c resource.c sibcall.c \ + simplify-rtx.c ssa.c timevar.c ssa-dce.c ssa-ccp.c df.c fibheap.c # insn-* gunk -- headers are built in cc_tools, as they are used by the # "build-tools" @@ -38,12 +41,47 @@ insn-$F.c: ${.OBJDIR}/../cc_tools/gen$F ${MD_FILE} .endfor # shared between the drivers -SRCS+= multilib.h choose-temp.c obstack.c prefix.c pexecute.c version.c +SRCS+= multilib.h choose-temp.c obstack.c prefix.c pexecute.c version.c mbchar.c concat.c make-temp-file.c underscore.c +# C_AND_OBJC_OBJS +#SRCS+= attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \ +# c-convert.o c-aux-info.o c-common.o c-format.o c-semantics.o \ +# c-objc-common.o + +# XXX: shared by cc1, cc1obj & cpp0 +# cc1plus seems to be able to tolerate these here, +# BUT only if the right .o's are specified in cc1plus/Makefile +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 \ + 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 # stuff that makes libiberty now required (2.95) and shouldn't be... -SRCS+= obstack.c splay-tree.c +SRCS+= obstack.c splay-tree.c hashtab.c partition.c lbasename.c md5.c hex.c getopt.c getopt1.c +CFLAGS+= -DHAVE_CONFIG_H CFLAGS+= -DTARGET_NAME=\"${target}\" -DIN_GCC +.if defined(TARGET_CPU_DEFAULT) +CFLAGS+= -DTARGET_CPU_DEFAULT=${TARGET_CPU_DEFAULT} +.endif + +.if ${OBJFORMAT} == aout +UNDERSCORES= 1 +.else +UNDERSCORES= 0 +.endif +SRCS+= underscore.c +CLEANFILES+= underscore.c +underscore.c: Makefile + echo '/*WARNING: This file is automatically generated!*/' >${.TARGET} + echo "int prepends_underscore = ${UNDERSCORES};" >>${.TARGET} install: @true diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile index 63b03fa934fe..839842f0f727 100644 --- a/gnu/usr.bin/cc/cc_tools/Makefile +++ b/gnu/usr.bin/cc/cc_tools/Makefile @@ -12,11 +12,12 @@ # aliases of generated headers. CFLAGS+= -I. -CFLAGS+= -static .include "../Makefile.inc" -.PATH: ${GCCDIR} ${GCCDIR}/cp +.PATH: ${GCCDIR} ${GCCDIR}/cp ${GCCDIR}/../libiberty + +CFLAGS+= -static -DGENERATOR_FILE #----------------------------------------------------------------------- # insn-* gunk @@ -34,7 +35,7 @@ gen-time-stamp: genattrtab genemit genextract genopinit genoutput genpeep genrec .for F in attr codes config emit extract flags opinit output peep recog build-tools: gen$F -gen$F: gen$F.o rtl.o print-rtl.o obstack.o bitmap.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 ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c @@ -44,16 +45,16 @@ CLEANFILES+= gen$F .for F in attrtab build-tools: gen$F -gen$F: gen$F.o rtl.o rtlanal.o print-rtl.o obstack.o bitmap.o +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 ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c CLEANFILES+= gen$F .endfor -SRCS+= bitmap.c obstack.c print-rtl.c rtl.c rtlanal.c +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 +.for F in check genrtl preds build-tools: gen$F gen$F: gen$F.o @@ -65,30 +66,12 @@ CLEANFILES+= gen$F .ORDER: genrtl.c genrtl.h genrtl.c genrtl.h: gengenrtl - ./gengenrtl genrtl.h genrtl.c + ./gengenrtl > genrtl.c + ./gengenrtl -h > genrtl.h GENSRCS+= genrtl.c genrtl.h #----------------------------------------------------------------------- -# C hash codes -c-gperf.h: c-parse.gperf - gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \ - ${GCCDIR}/c-parse.gperf > ${.TARGET} -GENSRCS+= c-gperf.h - -#----------------------------------------------------------------------- -# C++ hash codes -gxx-hash.h: gxx.gperf - gperf -p -j1 -g -o -t -N is_reserved_word '-k1,4,7,$$' \ - ${GCCDIR}/cp/gxx.gperf >gxx-hash.h -GENSRCS+= gxx-hash.h - -# make a link the the Cygnus used name for now -- hopes are they will change it -hash.h: gxx-hash.h - ln -sf ${.ALLSRC} ${.TARGET} -GENSRCS+= hash.h - -#----------------------------------------------------------------------- # Common parser stuff. tree-check.h: gencheck @@ -96,57 +79,116 @@ tree-check.h: gencheck GENSRCS+= tree-check.h #----------------------------------------------------------------------- +# Predicates stuff. + +tm-preds.h: genpreds + ./genpreds > ${.TARGET} +GENSRCS+= tm-preds.h + +#----------------------------------------------------------------------- # the host/target compiler config. -COMMONHDRS= config.h hconfig.h multilib.h options.h specs.h tconfig.h tm.h +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 -config.h hconfig.h: - echo '#include "auto-host.h"' > ${.TARGET} - echo '#include "gansidecl.h"' >> ${.TARGET} - echo '#include "${TARGET_ARCH}/xm-${TARGET_ARCH}.h"' >> ${.TARGET} - echo '#include "hwint.h"' >> ${.TARGET} +MFILE?= ${.CURDIR}/Makefile +${COMMONHDRS}: ${MFILE} + +configargs.h: + echo 'static const char configuration_arguments[] =' > ${.TARGET} + echo ' "FreeBSD/${TARGET_ARCH} system compiler";' >> ${.TARGET} + echo 'static const char thread_model[] = "posix";' >> ${.TARGET} + +hconfig.h: + echo '#include "auto-host.h"' > ${.TARGET} + echo '#include <tconfig.h>' >> ${.TARGET} gencheck.h: echo '#include "cp/cp-tree.def"' > ${.TARGET} echo '#include "objc/objc-tree.def"' >> ${.TARGET} multilib.h: - echo 'static char *multilib_raw[] = { \ + echo 'static const char *const multilib_raw[] = { \ "aout maout;", "elf !maout;", NULL };' > ${.TARGET} - echo 'static char *multilib_matches_raw[] = { \ + echo 'static const char *const multilib_matches_raw[] = { \ "maout maout;", "melf melf;", NULL };' >> ${.TARGET} - echo 'static char *multilib_extra = "";' >> ${.TARGET} + echo 'static const char *multilib_extra = "";' >> ${.TARGET} + echo 'static const char *const multilib_exclusions_raw[] = { \ + NULL };' >> ${.TARGET} options.h: echo '#include "cp/lang-options.h"' > ${.TARGET} echo '#include "f/lang-options.h"' >> ${.TARGET} + echo '#include "objc/lang-options.h"' >> ${.TARGET} specs.h: echo '#include "cp/lang-specs.h"' > ${.TARGET} echo '#include "f/lang-specs.h"' >> ${.TARGET} echo '#include "objc/lang-specs.h"' >> ${.TARGET} -tconfig.h: - echo '#include "gansidecl.h"' > ${.TARGET} - echo '#include "${TARGET_ARCH}/xm-${TARGET_ARCH}.h"' >> ${.TARGET} +config.h: + echo '#include <hconfig.h>' > ${.TARGET} + echo '#ifndef GENERATOR_FILE' >> ${.TARGET} + echo '#include "insn-codes.h"' >> ${.TARGET} + echo '#include "insn-flags.h"' >> ${.TARGET} + echo '#endif' >> ${.TARGET} -# KEEP THIS IN SYNC with src/gcc/lib/libgcc/Makefile !! -tm.h: - echo '#include "${TARGET_ARCH}/${TARGET_ARCH}.h"' > ${.TARGET} +tconfig.h: + echo 'struct rtx_def;' > ${.TARGET} + echo 'typedef struct rtx_def *rtx;' >> ${.TARGET} + echo 'struct rtvec_def;' >> ${.TARGET} + echo 'typedef struct rtvec_def *rtvec;' >> ${.TARGET} + echo 'union tree_node;' >> ${.TARGET} + echo 'typedef union tree_node *tree;' >> ${.TARGET} + echo '' >> ${.TARGET} + echo '#include "ansidecl.h"' >> ${.TARGET} + echo '#include "${GCC_CPU}/${GCC_CPU}.h"' >> ${.TARGET} .if ${TARGET_ARCH} == "i386" - echo '#include "${TARGET_ARCH}/att.h"' >> ${.TARGET} + echo '#include "${GCC_CPU}/att.h"' >> ${.TARGET} .endif - echo '#include <freebsd.h>' >> ${.TARGET} - echo '#include "dbxelf.h"' >> ${.TARGET} -.if exists(${GCCDIR}/config/${TARGET_ARCH}/elf.h) - echo '#include "${TARGET_ARCH}/elf.h"' >> ${.TARGET} +.if ${TARGET_ARCH} != "alpha" + echo '#include "dbxelf.h"' >> ${.TARGET} + echo '#include "elfos.h"' >> ${.TARGET} .endif - echo '#include "${TARGET_ARCH}/freebsd.h"' >> ${.TARGET} -.if ${TARGET_ARCH} == "i386" - echo '#include "${TARGET_ARCH}/perform.h"' >> ${.TARGET} + echo '#include <freebsd-native.h>' >> ${.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" +.if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h) + echo '#include "${GCC_CPU}/sysv4.h"' >> ${.TARGET} .endif - echo '#include <freebsd-native.h>' >> ${.TARGET} +.endif + echo '#include "${GCC_CPU}/freebsd.h"' >> ${.TARGET} + echo '#include "defaults.h"' >> ${.TARGET} + echo '#ifndef POSIX' >> ${.TARGET} + echo '# define POSIX' >> ${.TARGET} + echo '#endif' >> ${.TARGET} + echo '#define CONFIG_SJLJ_EXCEPTIONS 0' >> ${.TARGET} + +tm_p.h: + echo '#include "${GCC_CPU}/${GCC_CPU}-protos.h"' >> ${.TARGET} + echo '#include "tm-preds.h"' >> ${.TARGET} + +safe-ctype.h: Makefile + echo '#include <ctype.h>' > ${.TARGET} +.for Z in TOUPPER TOLOWER ISDIGIT ISXDIGIT ISUPPER ISLOWER ISALPHA ISALNUM \ + ISSPACE ISPUNCT ISGRAPH ISBLANK ISPRINT ISCNTRL + echo '#define ${Z} ${Z:L}' >> ${.TARGET} +.endfor + echo "#define ISIDST(x) \ + ((x) == '_' || isalpha(x))" >> ${.TARGET} + echo "#define ISIDNUM(x) \ + (isdigit(x) || ISIDST(x))" >> ${.TARGET} + echo "#define IS_VSPACE(x) \ + ((x) == '\n' || (x) == '\r')" >> ${.TARGET} + echo "#define IS_NVSPACE(x) \ + (!IS_VSPACE(x) && (isspace(x) || (x) == '\0'))" >> ${.TARGET} + echo "#define IS_SPACE_OR_NUL(x) \ + (isspace(x) || (x) == '\0')" >> ${.TARGET} #----------------------------------------------------------------------- # General things. @@ -156,8 +198,6 @@ CLEANFILES+= ${GENSRCS} all: ${SRCS} -build-tools: depend - .include <bsd.prog.mk> #----------------------------------------------------------------------- @@ -175,7 +215,7 @@ 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:Ngenattr.o:Ngencheck.o:Ngencodes.o:Ngenconfig.o:Ngenflags.o:Ngengenrtl.o:Nobstack.o:Nprint-rtl.o:Nrtl.o}: ${SRCS:M*.h} +${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} # 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 @@ -185,4 +225,5 @@ bitmap.o genattr.o gencodes.o genconfig.o genflags.o obstack.o print-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/cc_tools/auto-host.h b/gnu/usr.bin/cc/cc_tools/auto-host.h index 87bd1eaee588..512302836903 100644 --- a/gnu/usr.bin/cc/cc_tools/auto-host.h +++ b/gnu/usr.bin/cc/cc_tools/auto-host.h @@ -1,132 +1,7 @@ /* $FreeBSD$ */ /* auto-host.h. Generated automatically by configure. */ -/* config.in. Generated automatically from configure.in by autoheader. */ - -/* Define if you can safely include both <string.h> and <strings.h>. */ -#define STRING_WITH_STRINGS 1 - -/* Define if printf supports "%p". */ -#define HAVE_PRINTF_PTR 1 - -/* Define if you want expensive run-time checks. */ -/* #undef ENABLE_CHECKING */ - -/* Define to 1 if NLS is requested. */ -/* #undef ENABLE_NLS */ - -/* Define as 1 if you have catgets and don't want to use GNU gettext. */ -/* #undef HAVE_CATGETS */ - -/* Define as 1 if you have gettext and don't want to use GNU gettext. */ -/* #undef HAVE_GETTEXT */ - -/* Define if your cpp understands the stringify operator. */ -#define HAVE_CPP_STRINGIFY 1 - -/* Define if your compiler understands volatile. */ -#define HAVE_VOLATILE 1 - -/* Define if your assembler supports specifying the maximum number - of bytes to skip when using the GAS .p2align command. */ -/* #undef HAVE_GAS_MAX_SKIP_P2ALIGN */ - -/* Define if your assembler supports .balign and .p2align. */ -/* #undef HAVE_GAS_BALIGN_AND_P2ALIGN */ - -/* Define if your assembler supports .subsection and .subsection -1 starts - emitting at the beginning of your section */ -/* #undef HAVE_GAS_SUBSECTION_ORDERING */ - -/* Define if your assembler uses the old HImode fild and fist notation. */ -/* #undef HAVE_GAS_FILDS_FISTS */ - -/* Define if you have a working <inttypes.h> header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Define if your locale.h file contains LC_MESSAGES. */ -#define HAVE_LC_MESSAGES 1 - -/* Whether malloc must be declared even if <stdlib.h> is included. */ -/* #undef NEED_DECLARATION_MALLOC */ - -/* Whether realloc must be declared even if <stdlib.h> is included. */ -/* #undef NEED_DECLARATION_REALLOC */ - -/* Whether calloc must be declared even if <stdlib.h> is included. */ -/* #undef NEED_DECLARATION_CALLOC */ - -/* Whether free must be declared even if <stdlib.h> is included. */ -/* #undef NEED_DECLARATION_FREE */ - -/* Whether bcopy must be declared even if <string.h> is included. */ -/* #undef NEED_DECLARATION_BCOPY */ - -/* Whether bcmp must be declared even if <string.h> is included. */ -/* #undef NEED_DECLARATION_BCMP */ - -/* Whether bzero must be declared even if <string.h> is included. */ -/* #undef NEED_DECLARATION_BZERO */ - -/* Whether index must be declared even if <string.h> is included. */ -/* #undef NEED_DECLARATION_INDEX */ - -/* Whether rindex must be declared even if <string.h> is included. */ -/* #undef NEED_DECLARATION_RINDEX */ - -/* Whether getenv must be declared even if <stdlib.h> is included. */ -/* #undef NEED_DECLARATION_GETENV */ - -/* Whether atol must be declared even if <stdlib.h> is included. */ -/* #undef NEED_DECLARATION_ATOL */ - -/* Whether atof must be declared even if <stdlib.h> is included. */ -/* #undef NEED_DECLARATION_ATOF */ - -/* Whether sbrk must be declared even if <stdlib.h> is included. */ -/* #undef NEED_DECLARATION_SBRK */ - -/* Whether abort must be declared even if <stdlib.h> is included. */ -/* #undef NEED_DECLARATION_ABORT */ - -/* Whether strerror must be declared even if <string.h> is included. */ -/* #undef NEED_DECLARATION_STRERROR */ - -/* Whether strsignal must be declared even if <string.h> is included. */ -/* #undef NEED_DECLARATION_STRSIGNAL */ - -/* Whether strstr must be declared even if <string.h> is included. */ -/* #undef NEED_DECLARATION_STRSTR */ - -/* Whether getcwd must be declared even if <unistd.h> is included. */ -/* #undef NEED_DECLARATION_GETCWD */ - -/* Whether getwd must be declared even if <unistd.h> is included. */ -/* #undef NEED_DECLARATION_GETWD */ - -/* Whether getrlimit must be declared even if <sys/resource.h> is included. */ -#define NEED_DECLARATION_GETRLIMIT 1 - -/* Whether setrlimit must be declared even if <sys/resource.h> is included. */ -#define NEED_DECLARATION_SETRLIMIT 1 - -/* Whether putc_unlocked must be declared even if <stdio.h> is included. */ -#define NEED_DECLARATION_PUTC_UNLOCKED 1 - -/* Whether fputs_unlocked must be declared even if <stdio.h> is included. */ -#define NEED_DECLARATION_FPUTS_UNLOCKED 1 - -/* Define to enable the use of a default assembler. */ -/* #undef DEFAULT_ASSEMBLER */ - -/* Define to enable the use of a default linker. */ -/* #undef DEFAULT_LINKER */ - -/* Define if host mkdir takes a single argument. */ -/* #undef MKDIR_TAKES_ONE_ARG */ - -/* Define to the name of the distribution. */ -#define PACKAGE "gcc" +/* config.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define if using alloca.c. */ /* #undef C_ALLOCA */ @@ -138,17 +13,21 @@ This function is required for alloca.c support on those systems. */ /* #undef CRAY_STACKSEG_END */ +/* Define to the type of elements in the array set by `getgroups'. + Usually this is either `int' or `gid_t'. */ +#define GETGROUPS_T gid_t + +/* Define to `int' if <sys/types.h> doesn't define. */ +/* #undef gid_t */ + /* Define if you have alloca, as a function or macro. */ #define HAVE_ALLOCA 1 /* Define if you have <alloca.h> and it should be used (not on Ultrix). */ /* #undef HAVE_ALLOCA_H */ -/* Define if you don't have vprintf but do have _doprnt. */ -/* #undef HAVE_DOPRNT */ - -/* Define if you have a working `mmap' system call. */ -#define HAVE_MMAP 1 +/* Define if you have the ANSI # stringizing operator in cpp. */ +#define HAVE_STRINGIZE 1 /* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ #define HAVE_SYS_WAIT_H 1 @@ -156,12 +35,12 @@ /* Define if you have <vfork.h>. */ /* #undef HAVE_VFORK_H */ -/* Define if you have the vprintf function. */ -#define HAVE_VPRINTF 1 - /* Define as __inline if that's what the C compiler calls it. */ /* #undef inline */ +/* Define if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + /* Define to `long' if <sys/types.h> doesn't define. */ /* #undef off_t */ @@ -183,15 +62,31 @@ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 -/* Define if `sys_siglist' is declared by <signal.h>. */ -#define SYS_SIGLIST_DECLARED 1 - /* Define if you can safely include both <sys/time.h> and <time.h>. */ #define TIME_WITH_SYS_TIME 1 +/* Define to `int' if <sys/types.h> doesn't define. */ +/* #undef uid_t */ + /* Define vfork as fork if vfork does not work. */ /* #undef vfork */ +/* Define if your assembler supports specifying the maximum number + of bytes to skip when using the GAS .p2align command. */ +#define HAVE_GAS_MAX_SKIP_P2ALIGN 1 + +/* Define if your assembler supports .balign and .p2align. */ +#define HAVE_GAS_BALIGN_AND_P2ALIGN 1 + +/* Define if your assembler uses the old HImode fild and fist notation. */ +#define HAVE_GAS_FILDS_FISTS 1 + +/* Define to `int' if <sys/types.h> doesn't define. */ +/* #undef ssize_t */ + +/* Define if cpp should also search $prefix/include. */ +#define PREFIX_INCLUDE_DIR "NONE/include" + /* Define if you have the __argz_count function. */ /* #undef HAVE___ARGZ_COUNT */ @@ -202,25 +97,28 @@ /* #undef HAVE___ARGZ_STRINGIFY */ /* Define if you have the atoll function. */ -/* #undef HAVE_ATOLL */ +#define HAVE_ATOLL 1 /* Define if you have the atoq function. */ /* #undef HAVE_ATOQ */ -/* Define if you have the bcmp function. */ -#define HAVE_BCMP 1 +/* Define if you have the clock function. */ +#define HAVE_CLOCK 1 + +/* Define if you have the dcgettext function. */ +/* #undef HAVE_DCGETTEXT */ -/* Define if you have the bcopy function. */ -#define HAVE_BCOPY 1 +/* Define if you have the dup2 function. */ +#define HAVE_DUP2 1 -/* Define if you have the bsearch function. */ -#define HAVE_BSEARCH 1 +/* Define if you have the feof_unlocked function. */ +/* #undef HAVE_FEOF_UNLOCKED */ -/* Define if you have the bzero function. */ -#define HAVE_BZERO 1 +/* Define if you have the fgets_unlocked function. */ +/* #undef HAVE_FGETS_UNLOCKED */ -/* Define if you have the dcgettext function. */ -/* #undef HAVE_DCGETTEXT */ +/* Define if you have the fprintf_unlocked function. */ +/* #undef HAVE_FPRINTF_UNLOCKED */ /* Define if you have the fputc_unlocked function. */ /* #undef HAVE_FPUTC_UNLOCKED */ @@ -228,32 +126,47 @@ /* Define if you have the fputs_unlocked function. */ /* #undef HAVE_FPUTS_UNLOCKED */ +/* Define if you have the fwrite_unlocked function. */ +/* #undef HAVE_FWRITE_UNLOCKED */ + /* Define if you have the getcwd function. */ #define HAVE_GETCWD 1 +/* Define if you have the getegid function. */ +#define HAVE_GETEGID 1 + +/* Define if you have the geteuid function. */ +#define HAVE_GETEUID 1 + +/* Define if you have the getgid function. */ +#define HAVE_GETGID 1 + /* Define if you have the getpagesize function. */ #define HAVE_GETPAGESIZE 1 /* Define if you have the getrlimit function. */ #define HAVE_GETRLIMIT 1 -/* Define if you have the gettimeofday function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define if you have the index function. */ -#define HAVE_INDEX 1 +/* Define if you have the getrusage function. */ +#define HAVE_GETRUSAGE 1 -/* Define if you have the isascii function. */ -#define HAVE_ISASCII 1 +/* Define if you have the getuid function. */ +#define HAVE_GETUID 1 /* Define if you have the kill function. */ #define HAVE_KILL 1 +/* Define if you have the lstat function. */ +#define HAVE_LSTAT 1 + +/* Define if you have the mempcpy function. */ +/* #undef HAVE_MEMPCPY */ + /* Define if you have the munmap function. */ #define HAVE_MUNMAP 1 -/* Define if you have the popen function. */ -#define HAVE_POPEN 1 +/* Define if you have the nl_langinfo function. */ +#define HAVE_NL_LANGINFO 1 /* Define if you have the putc_unlocked function. */ /* #undef HAVE_PUTC_UNLOCKED */ @@ -261,9 +174,6 @@ /* Define if you have the putenv function. */ #define HAVE_PUTENV 1 -/* Define if you have the rindex function. */ -#define HAVE_RINDEX 1 - /* Define if you have the setenv function. */ #define HAVE_SETENV 1 @@ -285,12 +195,6 @@ /* Define if you have the strdup function. */ #define HAVE_STRDUP 1 -/* Define if you have the strerror function. */ -#define HAVE_STRERROR 1 - -/* Define if you have the strrchr function. */ -#define HAVE_STRRCHR 1 - /* Define if you have the strsignal function. */ #define HAVE_STRSIGNAL 1 @@ -300,6 +204,12 @@ /* Define if you have the sysconf function. */ #define HAVE_SYSCONF 1 +/* Define if you have the times function. */ +#define HAVE_TIMES 1 + +/* Define if you have the tsearch function. */ +#define HAVE_TSEARCH 1 + /* Define if you have the <argz.h> header file. */ /* #undef HAVE_ARGZ_H */ @@ -309,6 +219,9 @@ /* Define if you have the <fcntl.h> header file. */ #define HAVE_FCNTL_H 1 +/* Define if you have the <langinfo.h> header file. */ +#define HAVE_LANGINFO_H 1 + /* Define if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 @@ -321,9 +234,6 @@ /* Define if you have the <nl_types.h> header file. */ #define HAVE_NL_TYPES_H 1 -/* Define if you have the <stab.h> header file. */ -#define HAVE_STAB_H 1 - /* Define if you have the <stddef.h> header file. */ #define HAVE_STDDEF_H 1 @@ -360,5 +270,315 @@ /* Define if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 -/* Define if you have the i library (-li). */ -/* #undef HAVE_LIBI */ +/* Define to enable the use of a default linker. */ +/* #undef DEFAULT_LINKER */ + +/* Define to enable the use of a default assembler. */ +/* #undef DEFAULT_ASSEMBLER */ + +#ifdef WANT_COMPILER_INVARIANTS +//#warning WANT_COMPILER_INVARIANTS turned on + +/* Define if you want more run-time sanity checks. This one gets a grab + bag of miscellaneous but relatively cheap checks. */ +#define ENABLE_CHECKING 1 + +/* Define if you want all operations on trees (the basic data + structure of the front ends) to be checked for dynamic type safety + at runtime. This is moderately expensive. */ +#define ENABLE_TREE_CHECKING 1 + +/* Define if you want all operations on RTL (the basic data structure + of the optimizer and back end) to be checked for dynamic type safety + at runtime. This is quite expensive. */ +#define ENABLE_RTL_CHECKING 1 + +/* Define if you want the garbage collector to do object poisoning and + other memory allocation checks. This is quite expensive. */ +#define ENABLE_GC_CHECKING 1 + +/* Define if you want the garbage collector to operate in maximally + paranoid mode, validating the entire heap and collecting garbage at + every opportunity. This is extremely expensive. */ +#define ENABLE_GC_ALWAYS_COLLECT 1 + +#endif /* WANT_COMPILER_INVARIANTS */ + +/* Define if you want the C and C++ compilers to support multibyte + character sets for source code. */ +/* #undef MULTIBYTE_CHARS */ + +/* Define if your compiler understands volatile. */ +#define HAVE_VOLATILE 1 + +/* Define if your compiler supports the `long double' type. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define if your compiler supports the `long long' type. */ +#define HAVE_LONG_LONG 1 + +/* Define if your compiler supports the `__int64' type. */ +/* #undef HAVE___INT64 */ + +/* Define if the `_Bool' type is built-in. */ +/* #undef HAVE__BOOL */ + +/* The number of bytes in type short */ +#define SIZEOF_SHORT 2 + +/* The number of bytes in type int */ +#define SIZEOF_INT 4 + +/* The number of bytes in type long */ +/* #define SIZEOF_LONG 4 */ +#if defined(__i386__) || defined(__powerpc__) || defined(__strongarm__) +#define SIZEOF_LONG SIZEOF_INT +#elif defined(__alpha__) || defined(__sparc64__) || defined(__ia64__) +#define SIZEOF_LONG SIZEOF_LONG_LONG +#else +#error "I don't know what arch this is." +#endif + +/* The number of bytes in type long long */ +#define SIZEOF_LONG_LONG 8 + +/* The number of bytes in type __int64 */ +/* #undef SIZEOF___INT64 */ + +/* Define if the host execution character set is EBCDIC. */ +/* #undef HOST_EBCDIC */ + +/* Always define this when using the GNU C Library */ +/* #undef _GNU_SOURCE */ + +/* Define if you have a working <stdbool.h> header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define if you can safely include both <string.h> and <strings.h>. */ +#define STRING_WITH_STRINGS 1 + +/* Define as the number of bits in a byte, if `limits.h' doesn't. */ +/* #undef CHAR_BIT */ + +/* Define if the host machine stores words of multi-word integers in + big-endian order. */ +/* #undef HOST_WORDS_BIG_ENDIAN */ + +/* Define to the floating point format of the host machine, if not IEEE. */ +/* #undef HOST_FLOAT_FORMAT */ + +/* Define to 1 if the host machine stores floating point numbers in + memory with the word containing the sign bit at the lowest address, + or to 0 if it does it the other way around. + + This macro should not be defined if the ordering is the same as for + multi-word integers. */ +/* #undef HOST_FLOAT_WORDS_BIG_ENDIAN */ + +/* Define if you have a working <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if printf supports %p. */ +#define HAVE_PRINTF_PTR 1 + +/* Define if mmap can get us zeroed pages from /dev/zero. */ +#define HAVE_MMAP_DEV_ZERO 1 + +/* Define if mmap can get us zeroed pages using MAP_ANON(YMOUS). */ +#define HAVE_MMAP_ANON 1 + +/* Define if read-only mmap of a plain file works. */ +#define HAVE_MMAP_FILE 1 + +/* Define if you have the iconv() function. */ +/* #undef HAVE_ICONV */ + +/* Define as const if the declaration of iconv() needs const. */ +/* #undef ICONV_CONST */ + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETENV 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_ATOL 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_SBRK 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_ABORT 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_ATOF 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETCWD 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETWD 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_STRSIGNAL 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_PUTC_UNLOCKED 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_FPUTS_UNLOCKED 0 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_FWRITE_UNLOCKED 0 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_FPRINTF_UNLOCKED 0 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_STRSTR 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_ERRNO 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_MALLOC 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_REALLOC 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_CALLOC 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_FREE 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_BASENAME 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETOPT 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_CLOCK 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETRLIMIT 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_SETRLIMIT 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETRUSAGE 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_TIMES 1 + +/* Define if <sys/times.h> defines struct tms. */ +#define HAVE_STRUCT_TMS 1 + +/* Define if <time.h> defines clock_t. */ +#define HAVE_CLOCK_T 1 + +/* Define if host mkdir takes a single argument. */ +/* #undef MKDIR_TAKES_ONE_ARG */ + +/* Define if you have the iconv() function. */ +/* #undef HAVE_ICONV */ + +/* Define as const if the declaration of iconv() needs const. */ +/* #undef ICONV_CONST */ + +/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ +#define HAVE_LANGINFO_CODESET 1 + +/* Define if your <locale.h> file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if translation of program messages to the user's native language + is requested. */ +/* #define ENABLE_NLS 1 */ + +/* Define if you have the <libintl.h> header file. */ +/* #undef HAVE_LIBINTL_H */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to use the libintl included with this package instead of any + version in the system libraries. */ +/* #define USE_INCLUDED_LIBINTL 1 */ + +/* Define to 1 if installation paths should be looked up in Windows32 + Registry. Ignored on non windows32 hosts. */ +/* #undef ENABLE_WIN32_REGISTRY */ + +/* Define to be the last portion of registry key on windows hosts. */ +/* #undef WIN32_REGISTRY_KEY */ + +/* Define if your assembler supports .subsection and .subsection -1 starts + emitting at the beginning of your section. */ +#define HAVE_GAS_SUBSECTION_ORDERING 1 + +/* Define if your assembler supports .weak. */ +#define HAVE_GAS_WEAK 1 + +/* Define if your assembler supports .hidden. */ +#define HAVE_GAS_HIDDEN 1 + +/* Define if your assembler supports .uleb128. */ +#define HAVE_AS_LEB128 1 + +/* Define if your assembler mis-optimizes .eh_frame data. */ +/* #undef USE_AS_TRADITIONAL_FORMAT */ + +/* Define if your assembler supports marking sections with SHF_MERGE flag. */ +#define HAVE_GAS_SHF_MERGE 1 /* XXX:DEO new, caused Peter IA-64 trouble until he adjusted sys/boot/efi/libefi/arch/ia64/ldscript.ia64 */ + +/* Define if your assembler supports explicit relocations. */ +/* #undef HAVE_AS_EXPLICIT_RELOCS */ + +/* Define if your assembler supports .register. */ +/* #undef HAVE_AS_REGISTER_PSEUDO_OP */ + +/* Define if your assembler supports -relax option. */ +/* #undef HAVE_AS_RELAX_OPTION */ + +/* Define if your assembler and linker support unaligned PC relative relocs. */ +/* #undef HAVE_AS_SPARC_UA_PCREL */ + +/* Define if the assembler supports 64bit sparc. */ +/* #undef AS_SPARC64_FLAG */ + +/* Define if your assembler supports offsetable %lo(). */ +/* #undef HAVE_AS_OFFSETABLE_LO10 */ + +/* Define true if the assembler supports '.long foo@GOTOFF'. */ +/* DEO:XXX match TARGET_ELF definition in i386/freebsd.h. */ +#define HAVE_AS_GOTOFF_IN_DATA ((target_flags & MASK_AOUT) == 0) + +/* Define if your assembler supports dwarf2 .file/.loc directives, + and preserves file table indices exactly as given. */ +/* #undef HAVE_AS_DWARF2_DEBUG_LINE */ + +/* Define if your assembler supports the --gdwarf2 option. */ +#define HAVE_AS_GDWARF2_DEBUG_FLAG 1 + +/* Define if your assembler supports the --gstabs option. */ +#define HAVE_AS_GSTABS_DEBUG_FLAG 1 + +/* Define if your linker supports --eh-frame-hdr option. */ +#define HAVE_LD_EH_FRAME_HDR 1 + +/* Define 0/1 to force the choice for exception handling model. */ +/* #undef CONFIG_SJLJ_EXCEPTIONS */ + + +/* Bison unconditionally undefines `const' if neither `__STDC__' nor + __cplusplus are defined. That's a problem since we use `const' in + the GCC headers, and the resulting bison code is therefore type + unsafe. Thus, we must match the bison behavior here. */ + +#ifndef __STDC__ +#ifndef __cplusplus +/* #undef const */ +#define const +#endif +#endif diff --git a/gnu/usr.bin/cc/cc_tools/freebsd-native.h b/gnu/usr.bin/cc/cc_tools/freebsd-native.h index 6243d27fdb60..5a0a996f140a 100644 --- a/gnu/usr.bin/cc/cc_tools/freebsd-native.h +++ b/gnu/usr.bin/cc/cc_tools/freebsd-native.h @@ -6,6 +6,9 @@ #define FREEBSD_NATIVE 1 +/* Fake out gcc/config/freebsd<version>.h. */ +#define FBSD_MAJOR 5 + #undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ #undef TOOL_INCLUDE_DIR /* We don't need one for now. */ #undef LOCAL_INCLUDE_DIR /* We don't wish to support one. */ @@ -27,9 +30,9 @@ programs: /usr/libexec/<OBJFORMAT>/:STANDARD_EXEC_PREFIX:MD_EXEC_PREFIX libraries: MD_EXEC_PREFIX:MD_STARTFILE_PREFIX:STANDARD_STARTFILE_PREFIX */ -#undef TOOLDIR_BASE_PREFIX /* Old?? This is not documented. */ -#define STANDARD_EXEC_PREFIX PREFIX"/libexec/" -#undef MD_EXEC_PREFIX /* We don't want one. */ +#undef TOOLDIR_BASE_PREFIX /* Old?? This is not documented. */ +#define STANDARD_EXEC_PREFIX PREFIX"/libexec/" +#define MD_EXEC_PREFIX PREFIX"/libexec/" /* Under FreeBSD, the normal location of the various *crt*.o files is the /usr/lib directory. */ @@ -42,9 +45,22 @@ /* For the native system compiler, we actually build libgcc in a profiled version. So we should use it with -pg. */ -#define LIBGCC_SPEC "%{!pg: -lgcc} %{pg: -lgcc_p}" -#define LIBSTDCXX_PROFILE "-lstdc++_p" -#define MATH_LIBRARY_PROFILE "-lm_p" +#define LIBGCC_SPEC "%{!pg: -lgcc} %{pg: -lgcc_p}" /* FreeBSD is 4.4BSD derived */ #define bsd4_4 + +/* Dike out [stupid, IMHO] libiberty functions. */ +#define xmalloc_set_program_name(dummy) +#define xmalloc malloc +#define xcalloc calloc +#define xrealloc realloc +#define xstrdup strdup +#define xstrerror strerror + +/* And now they want to replace ctype.h.... grr... [stupid, IMHO] */ +#define xxxISDIGIT isdigit +#define xxxISGRAPH isgraph +#define xxxISLOWER islower +#define xxxISSPACE isspace +#define xxxTOUPPER toupper diff --git a/gnu/usr.bin/cc/cccp/Makefile b/gnu/usr.bin/cc/cccp/Makefile index c4265e3dc4e5..15f5d327d289 100644 --- a/gnu/usr.bin/cc/cccp/Makefile +++ b/gnu/usr.bin/cc/cccp/Makefile @@ -5,11 +5,30 @@ .PATH: ${GCCDIR} PROG= cpp0 -SRCS= cccp.c cexp.y obstack.c prefix.c version.c -YFLAGS= +SRCS= cppmain.c c-parse.c c-lang.c c-decl.c + BINDIR= /usr/libexec -NOSHARED=yes -MAN= cccp.1 -MLINKS= cccp.1 cpp.1 +NOMAN= 1 +NOSHARED?=yes + +DPADD+= ${LIBCC_INT} +LDADD+= ${LIBCC_INT} + +#----------------------------------------------------------------------- +# C parser +.ORDER: c-parse.c +c-parse.c: c-parse.in + sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ + -e "/^ifc$$/d" \ + -e "/^end ifc$$/d" \ + ${GCCDIR}/c-parse.in > c-parse.y + ${YACC} -o c-parse.c.in c-parse.y + sed -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + c-parse.c.in >c-parse.c + +CLEANFILES+= c-parse.c c-parse.y # insurance + +#----------------------------------------------------------------------- .include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/collect2/Makefile b/gnu/usr.bin/cc/collect2/Makefile index 9eba1c08da25..7fe6877fb6d7 100644 --- a/gnu/usr.bin/cc/collect2/Makefile +++ b/gnu/usr.bin/cc/collect2/Makefile @@ -2,32 +2,13 @@ .include "../Makefile.inc" -.PATH: ${GCCDIR} +.PATH: ${GCCDIR} ${GCCDIR}/../libiberty PROG= collect2 -SRCS= collect2.c cplus-dem.c tlink.c underscore.c -BINDIR= /usr/libexec +SRCS= collect2.c cp-demangle.c cplus-dem.c tlink.c NOMAN= -NOSHARED=yes - -CFLAGS+= -DTARGET_MACHINE=\"$(target)\" DPADD+= ${LIBCC_INT} LDADD+= ${LIBCC_INT} -CLEANFILES= tmp-dum.c tmp-dum.s underscore.c -underscore.c: Makefile - echo "int xxy_us_dummy;" >tmp-dum.c - ${CC} -S tmp-dum.c - echo '/*WARNING: This file is automatically generated!*/' >underscore.c - if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \ - echo "int prepends_underscore = 1;" >>underscore.c; \ - else \ - echo "int prepends_underscore = 0;" >>underscore.c; \ - fi - @# wrong to do this here, but easiest way out to duplicate gcc.c. - echo "#include <stdio.h>" >>underscore.c - echo "char *xstrerror(int e) { return strerror(e); }" >>underscore.c - rm -f tmp-dum.c tmp-dum.s - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/cpp/Makefile b/gnu/usr.bin/cc/cpp/Makefile index 3ba15347903b..27e49835b344 100644 --- a/gnu/usr.bin/cc/cpp/Makefile +++ b/gnu/usr.bin/cc/cpp/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ .include "../Makefile.inc" +.include "../Makefile.fe" .PATH: ${GCCDIR} diff --git a/gnu/usr.bin/cc/cpp0/Makefile b/gnu/usr.bin/cc/cpp0/Makefile index e8c0da7a1d7e..15f5d327d289 100644 --- a/gnu/usr.bin/cc/cpp0/Makefile +++ b/gnu/usr.bin/cc/cpp0/Makefile @@ -1 +1,34 @@ # $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ${GCCDIR} + +PROG= cpp0 +SRCS= cppmain.c c-parse.c c-lang.c c-decl.c + +BINDIR= /usr/libexec +NOMAN= 1 +NOSHARED?=yes + +DPADD+= ${LIBCC_INT} +LDADD+= ${LIBCC_INT} + +#----------------------------------------------------------------------- +# C parser +.ORDER: c-parse.c +c-parse.c: c-parse.in + sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ + -e "/^ifc$$/d" \ + -e "/^end ifc$$/d" \ + ${GCCDIR}/c-parse.in > c-parse.y + ${YACC} -o c-parse.c.in c-parse.y + sed -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + c-parse.c.in >c-parse.c + +CLEANFILES+= c-parse.c c-parse.y # insurance + +#----------------------------------------------------------------------- + +.include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/doc/Makefile b/gnu/usr.bin/cc/doc/Makefile index 5e44319015bb..bc2cd1c18ba6 100644 --- a/gnu/usr.bin/cc/doc/Makefile +++ b/gnu/usr.bin/cc/doc/Makefile @@ -2,18 +2,31 @@ .include "../Makefile.inc" -.PATH: ${GCCDIR}/cp ${GCCDIR} +.PATH: ${GCCDIR}/doc -INFO= gcc cpp gxxint +INFO= gcc cpp gccint cppinternals INFOSECTION= "Gcc Documentation" -INFOENTRY_gcc= "* gcc: (gcc). The EGCS GNU C compiler." -INFOENTRY_cpp= "* cpp: (cpp). The EGCS GNU C pre-processor." -INFOENTRY_gxxint= "* gxxint: (gxxint). The EGCS GNU compiler family internal documentation." +INFOENTRY_gcc= "* gcc: (gcc). The GNU C compiler." +INFOENTRY_cpp= "* cpp: (cpp). The GNU C pre-processor." +INFOENTRY_gccint= "* gccint: (gccint). The GNU compiler family internal documentation." +INFOENTRY_cppinternals= "* cppinternals: (cppinternals). The GNU compiler preprocessor internal documentation." -gcc.info: gcc.texi invoke.texi install.texi extend.texi gcov.texi rtl.texi \ - md.texi tm.texi +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 \ + include/funding.texi gnu.texi include/gpl.texi include/fdl.texi \ + contrib.texi cppenv.texi cppopts.texi -MAKEINFOFLAGS+= -I ${GCCDIR} -I ${GCCDIR}/cp +gccint.info: gccint.texi include/gcc-common.texi contribute.texi \ + makefile.texi configterms.texi portability.texi interface.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 + +cpp.info: cpp.texi include/fdl.texi cppenv.texi cppopts.texi + +MAKEINFOFLAGS+= -I ${GCCDIR}/doc -I ${GCCDIR}/doc/include .include <bsd.info.mk> diff --git a/gnu/usr.bin/cc/f77/Makefile b/gnu/usr.bin/cc/f77/Makefile index e209ff1d06b4..717a983118a9 100644 --- a/gnu/usr.bin/cc/f77/Makefile +++ b/gnu/usr.bin/cc/f77/Makefile @@ -1,11 +1,13 @@ # $FreeBSD$ .include "../Makefile.inc" +.include "../Makefile.fe" .PATH: ${GCCDIR}/f ${GCCDIR} PROG= f77 SRCS= gcc.c g77spec.c version.c +NOMAN= # not while compile from GCC repo checkout CFLAGS+= -DDEFAULT_TARGET_VERSION=\"$(version)\" CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"$(target)\" diff --git a/gnu/usr.bin/cc/f771/Makefile b/gnu/usr.bin/cc/f771/Makefile index 8b922db86b66..d5c065e6c915 100644 --- a/gnu/usr.bin/cc/f771/Makefile +++ b/gnu/usr.bin/cc/f771/Makefile @@ -2,13 +2,13 @@ .include "${.CURDIR}/../Makefile.inc" -.PATH: ${GCCDIR}/f +.PATH: ${GCCDIR}/f ${GCCDIR} PROG= f771 SRCS= bad.c bit.c bld.c com.c data.c equiv.c expr.c global.c implic.c info.c \ - intrin.c lab.c lex.c malloc.c name.c parse.c proj.c src.c st.c sta.c \ + intrin.c lab.c lex.c malloc.c name.c parse.c src.c st.c sta.c \ stb.c stc.c std.c ste.c storag.c stp.c str.c sts.c stt.c stu.c stv.c \ - stw.c symbol.c target.c top.c type.c version.c where.c + stw.c symbol.c target.c top.c type.c version.c where.c main.c BINDIR= /usr/libexec NOMAN= @@ -18,16 +18,10 @@ DPADD= ${LIBCC_INT} LDADD= ${LIBCC_INT} build-tools: fini - -# The use of ``proj+%BT.o'' is to get around bogus dependacy information -# created for build-tools sources. -fini: fini.o proj+%BT.o +fini: fini.o ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -proj+%BT.o: proj.c - ${CC} ${CFLAGS} -o ${.TARGET} -c ${.ALLSRC} - -CLEANFILES+= fini fini.o proj+%BT.o +CLEANFILES+= fini fini.o #----------------------------------------------------------------------- # str-* gunk diff --git a/gnu/usr.bin/cc/f77doc/Makefile b/gnu/usr.bin/cc/f77doc/Makefile index d6e6384dbb4b..1dd59de1397b 100644 --- a/gnu/usr.bin/cc/f77doc/Makefile +++ b/gnu/usr.bin/cc/f77doc/Makefile @@ -6,8 +6,9 @@ INFO= g77 -MAKEINFOFLAGS+= -I ${GCCDIR}/f +MAKEINFOFLAGS+= -I ${GCCDIR}/f -I ${GCCDIR}/doc/include -g77.info: g77.texi intdoc.texi +g77.info: g77.texi intdoc.texi ffe.texi invoke.texi news.texi bugs.texi \ + ../doc/include/gpl.texi ../doc/include/fdl.texi ../doc/include/funding.texi .include <bsd.info.mk> diff --git a/gnu/usr.bin/cc/gcov/Makefile b/gnu/usr.bin/cc/gcov/Makefile index e8a5794348c3..6ecc59fcfd55 100644 --- a/gnu/usr.bin/cc/gcov/Makefile +++ b/gnu/usr.bin/cc/gcov/Makefile @@ -2,10 +2,13 @@ .include "../Makefile.inc" -.PATH: ${GCCDIR} +.PATH: ${GCCDIR} ${GCCDIR}/doc ${GCCDIR}/../libiberty PROG= gcov -SRCS= gcov.c -NOMAN= 1 +SRCS= gcov.c version.c +NOMAN= #true + +DPADD= ${LIBCC_INT} +LDADD= ${LIBCC_INT} .include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/protoize/Makefile b/gnu/usr.bin/cc/protoize/Makefile index 08f29efefb2f..500dd03fa498 100644 --- a/gnu/usr.bin/cc/protoize/Makefile +++ b/gnu/usr.bin/cc/protoize/Makefile @@ -2,6 +2,20 @@ .include "../Makefile.inc" -.PATH: ${GCCDIR} +.PATH: ${.CURDIR}/../cc_tools ${GCCDIR} + +PROG= protoize +NOMAN= + +# things are rather hard-coded, we work around that here +CFLAGS+= -DDEFAULT_TARGET_VERSION=\"\" +CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"../libdata/gcc\" + +DPADD= ${LIBCC_INT} +LDADD= ${LIBCC_INT} + +CLEANFILES= config.h +config.h: auto-host.h freebsd-native.h + cat ${.ALLSRC} >${.TARGET} .include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/tradcpp0/Makefile b/gnu/usr.bin/cc/tradcpp0/Makefile index e8c0da7a1d7e..9a6b085ad6a6 100644 --- a/gnu/usr.bin/cc/tradcpp0/Makefile +++ b/gnu/usr.bin/cc/tradcpp0/Makefile @@ -1 +1,22 @@ # $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ${GCCDIR} + +PROG= tradcpp0 +SRCS= tradcpp.c tradcif.c +BINDIR= /usr/libexec +NOMAN= 1 + +DPADD+= ${LIBCC_INT} +LDADD+= ${LIBCC_INT} + +# ${YACC} ${GCCDIR}/tradcif.y +tradcif.c: tradcif.y + ${YACC} ${.ALLSRC} + sed -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + y.tab.c >${.TARGET} + +.include <bsd.prog.mk> |
