Bmake bits for Gcc 3.1.

Partially made possible by:	Wilko.Bulte@compaq.com
This commit is contained in:
David E. O'Brien 2002-05-10 08:54:50 +00:00
commit 3cdd876f04
32 changed files with 2149 additions and 708 deletions

View File

@ -1,70 +1,55 @@
# $FreeBSD$
GCCDIR= ${.CURDIR}/../../../contrib/gcc.295
.if ${MACHINE_ARCH} == "alpha"
.PATH: ${GCCDIR}/config/alpha
SRCS= crtbegin.s crtend.s
UGLYHACK= -x assembler
.else
GCCDIR= ${.CURDIR}/../../../contrib/gcc
.PATH: ${GCCDIR}
SRCS= crtstuff.c tm.h
.endif
CCDIR= ${.CURDIR}/../../usr.bin/cc
.include "${CCDIR}/Makefile.tgt"
SRCS= crtstuff.c tconfig.h
OBJS= crtbegin.o crtend.o
SOBJS= crtbegin.So crtend.So
CFLAGS+= -I${GCCDIR}/config -I. -DIN_GCC \
-finhibit-size-directive -fno-inline-functions \
CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR
CFLAGS+= -finhibit-size-directive -fno-inline-functions \
-fno-exceptions -fno-omit-frame-pointer
INTERNALLIB= true
CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \
-I${CCDIR}/cc_tools
CRTS_CFLAGS= -DCRTSTUFFS_O ${PICFLAG}
MKDEPCMD= CC=${CC} MKDEP_CPP_OPTS="-M -DCRT_BEGIN" mkdep
NOLIB= true
all: ${OBJS} ${SOBJS}
.if ${MACHINE_ARCH} == "alpha"
crtbegin.o crtbegin.So: crtbegin.s
crtend.o crtend.So: crtend.s
.for PART in begin end
CLEANFILES+= crt${PART}.s
crt${PART}.s: crt${PART}.asm
ln -sf ${.ALLSRC} ${.TARGET}
.endfor
.else
crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS}
.if ${TARGET_ARCH} == "sparc64"
.PATH: ${GCCDIR}/config/${GCC_CPU}
TGTOBJS= crtfastmath.o
SRCS+= crtfastmath.c
.endif
all: ${OBJS} ${SOBJS} ${TGTOBJS}
crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS}
crtbegin.o:
${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
-c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
-c -o ${.TARGET} ${.ALLSRC:M*crtstuff*}
crtbegin.So:
${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
-c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
-c -o ${.TARGET} ${.ALLSRC:M*crtstuff*}
crtend.o:
${CC} ${CFLAGS} -g0 -DCRT_END \
-c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
-c -o ${.TARGET} ${.ALLSRC:M*crtstuff*}
crtend.So:
${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
-c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
-c -o ${.TARGET} ${.ALLSRC:M*crtstuff*}
CLEANFILES+= tm.h
# KEEP THIS IN SYNC with src/gnu/usr.bin/cc/cc_tools/Makefile !!
tm.h:
echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' > ${.TARGET}
.if ${MACHINE_ARCH} == "i386"
echo '#include "${MACHINE_ARCH}/att.h"' >> ${.TARGET}
.endif
echo '#include <freebsd.h>' >> ${.TARGET}
echo '#include "${MACHINE_ARCH}/freebsd.h"' >> ${.TARGET}
.if ${MACHINE_ARCH} == "i386"
echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET}
.endif
CLEANFILES= tconfig.h
tconfig.h: ${CCDIR}/cc_tools/Makefile
${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
realinstall:
.for file in ${OBJS} ${SOBJS}
.for file in ${OBJS} ${SOBJS} ${TGTOBJS}
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${file} ${DESTDIR}${LIBDIR}/${file:S/.So$/S.o/}
.endfor

View File

@ -1,23 +1,26 @@
# $FreeBSD$
GCCDIR= ${.CURDIR}/../../../contrib/gcc.295
TARGET_ARCH?= ${MACHINE_ARCH}
.PATH: ${GCCDIR}/cp ${GCCDIR}
GCCDIR= ${.CURDIR}/../../../contrib/gcc
.PATH: ${GCCDIR}/config/${TARGET_ARCH} ${GCCDIR}
# allow to be overridden for the a.out case
.if !defined(LIB) || ${LIB} != "gcc_r"
LIB= gcc
.endif
#SHLIB_MAJOR= 1
#SHLIB_MINOR= 0
.if ${OBJFORMAT} == aout
# Install libgcc_pic.a, since ld.so uses it.
INSTALL_PIC_ARCHIVE= yes
.endif
#
# XXX This is a hack, but it seems to work. libgcc1.a is supposed to be
# compiled by the native compiler, and libgcc2.a is meant to be compiled
# by *this* version of gcc.
# XXX This is a hack, but it seems to work.
# libgcc2.a is meant to be compiled by *this* version of gcc.
#
# Normally, this does not make any difference, since we only have gcc, but
# when bootstrapping from gcc-2.6.3, we have to use the freshly built 2.7.2
@ -31,146 +34,178 @@ INSTALL_PIC_ARCHIVE= yes
XCC= ${CC}
XCXX= ${CXX}
# Members of libgcc1.a.
LIB1FUNCS= _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
_lshrsi3 _ashrsi3 _ashlsi3 \
_divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
_fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
_addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
_eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
_eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
# Library members defined in libgcc2.c.
LIB2FUNCS= _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
_lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
_udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
_fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
_fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
_fixtfdi _fixunstfdi _floatditf \
__gcc_bcmp _varargs __dummy _eprintf \
_bb _shtab _clear_cache _trampoline __main _exit _ctors \
_eh _pure
# Library members defined in new1.cc.
NEW1FUNCS= _op_new _op_newnt
# Library members defined in new2.cc.
NEW2FUNCS= _op_vnew _op_vnewnt _op_delete _op_delnt _op_vdel _op_vdelnt
SRCS= frame.c tinfo.cc tinfo2.cc new.cc exception.cc
CFLAGS+= -fexceptions
CFLAGS+= -DIN_GCC
CFLAGS+= -nostdlib -fexceptions
CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
-DFINE_GRAINED_LIBRARIES
.if ${OBJFORMAT} != aout
CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK
.endif
CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I.
CXXFLAGS+= -I${GCCDIR}/cp/inc
CXXFLAGS+= -nostdinc++
CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \
-I${GCCDIR}/config -I${GCCDIR} -I.
COMMONHDRS= config.h tconfig.h tm.h
CLEANFILES+= ${COMMONHDRS}
# Remove any objects from LIB2FUNCS and LIB2_DIVMOD_FUNCS that are
# defined as optimized assembly code in LIB1ASMFUNCS.
.if defined(LIB1ASMFUNCS)
.for sym in ${LIB1ASMFUNCS}
LIB2FUNCS_1= ${LIB2FUNCS_1:S/${sym}//g}
LIB2FUNCS_2= ${LIB2FUNCS_2:S/${sym}//g}
LIB2_DIVMOD_FUNCS= ${LIB2_DIVMOD_FUNCS:S/${sym}//g}
.endfor
.endif
SYMS= ${LIB1ASMFUNCS} \
${LIB2FUNCS_1} \
${LIB2FUNCS_2} \
${LIB2_DIVMOD_FUNCS}
.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64"
SYMS+= ${FPBIT_FUNCS} ${DPBIT_FUNCS}
.endif
SYMS_ST= ${LIB2FUNCS_ST} \
${LIB2ADD_ST}
OBJS_T= ${SYMS:S/$/.o/} ${SYMS_ST:S/$/.o/}
OBJS_P= ${SYMS:S/$/.po/} ${SYMS_ST:S/$/.po/}
OBJS_S= ${SYMS:S/$/.So/}
OBJS= ${SYMS:S/$/.o/}
STATICOBJS= ${SYMS_ST:S/$/.o/}
SRCS= ${LIB2ADD} ${LIB2ADDEH}
#---------------------------------------------------------------------------
#
# When upgrading GCC, get the following defintions straight from Makefile.in
#
# Library members defined in libgcc2.c.
# Variable length limited to 255 charactes when passed to a shell script.
LIB2FUNCS_1 = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \
_cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \
_fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi
LIB2FUNCS_2 = _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf \
_clear_cache _trampoline __main _exit _absvsi2 _absvdi2 _addvsi3 \
_addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors
# Defined in libgcc2.c, included only in the static library.
LIB2FUNCS_ST = _eprintf _bb __gcc_bcmp
FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
_fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
_lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \
_sf_to_df _thenan_sf _sf_to_usi _usi_to_sf
DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \
_fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \
_lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \
_df_to_sf _thenan_df _df_to_usi _usi_to_df
# These might cause a divide overflow trap and so are compiled with
# unwinder info.
LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
MACHMODE_H = machmode.h machmode.def
LIB2ADD = $(LIB2FUNCS_EXTRA)
LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA)
# Additional sources to handle exceptions; overridden on ia64.
LIB2ADDEH = unwind-dw2.c unwind-dw2-fde.c unwind-sjlj.c
#-----------------------------------------------------------------------
#
# Platform specific bits.
# When upgrading GCC, get the following defintions from config/<cpu>/t-*
#
.if ${TARGET_ARCH} == "alpha"
# from config/alpha/t-alpha
LIB2FUNCS_EXTRA = qrnnd.asm
.endif
.if ${TARGET_ARCH} == "arm"
# from config/arm/t-strongarm-elf
LIB1ASMSRC = arm/lib1funcs.asm
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func
# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.
XXX fix this: NEED_FP_EMULATION set to "yes" with different rules per platform
.endif
.if ${TARGET_ARCH} == "ia64"
# from config/ia64/t-ia64
LIB1ASMSRC = ia64/lib1funcs.asm
LIB1ASMFUNCS = __divtf3 __divdf3 __divsf3 \
__divdi3 __moddi3 __udivdi3 __umoddi3 \
__divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \
__nonlocal_goto __restore_stack_nonlocal __trampoline
LIB2ADDEH = unwind-ia64.c unwind-sjlj.c
.endif
.if ${TARGET_ARCH} == "powerpc"
# from config/rs6000/t-ppccomm
LIB2FUNCS_EXTRA = tramp.S
# This one can't end up in shared libgcc
LIB2FUNCS_STATIC_EXTRA = eabi.S
# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.
OBJS+= dp-bit.o fp-bit.o
.endif
.if ${TARGET_ARCH} == "sparc64"
# from config/sparc/t-elf
# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.
LIB1ASMSRC = sparc/lb1spc.asm
LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3
OBJS+= dp-bit.o fp-bit.o
.endif
dp-bit.o: config/fp-bit.c
${XCC} -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*}
dp-bit.So: config/fp-bit.c
${XCC} ${PICFLAG} -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*}
dp-bit.po: config/fp-bit.c
${XCC} -p -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*}
fp-bit.o: config/fp-bit.c
${XCC} -DFLOAT=1 -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*}
fp-bit.So: config/fp-bit.c
${XCC} ${PICFLAG} -DFLOAT=1 -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*}
fp-bit.po: config/fp-bit.c
${XCC} -p -DFLOAT=1 -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*}
#-----------------------------------------------------------------------
COMMONHDRS= tconfig.h
SRCS+= ${COMMONHDRS}
CLEANFILES+= ${COMMONHDRS}
LIB1OBJS= ${LIB1FUNCS:S/$/.o/}
LIB2OBJS= ${LIB2FUNCS:S/$/.o/}
LIB1SOBJS= ${LIB1FUNCS:S/$/.So/}
LIB2SOBJS= ${LIB2FUNCS:S/$/.So/}
LIB1POBJS= ${LIB1FUNCS:S/$/.po/}
LIB2POBJS= ${LIB2FUNCS:S/$/.po/}
NEW1OBJS= ${NEW1FUNCS:S/$/.o/}
NEW2OBJS= ${NEW2FUNCS:S/$/.o/}
NEW1SOBJS= ${NEW1FUNCS:S/$/.So/}
NEW2SOBJS= ${NEW2FUNCS:S/$/.So/}
NEW1POBJS= ${NEW1FUNCS:S/$/.po/}
NEW2POBJS= ${NEW2FUNCS:S/$/.po/}
tconfig.h: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile
${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
OBJS= ${LIB1OBJS} ${LIB2OBJS} ${NEW1OBJS} ${NEW2OBJS}
${OBJS} beforedepend: ${COMMONHDRS}
config.h:
echo '#include <${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h>' > ${.TARGET}
echo '#include <xm-freebsd.h>' >> ${.TARGET}
tconfig.h:
echo '#include "gansidecl.h"' > ${.TARGET}
echo '#include "${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h"' >> ${.TARGET}
# KEEP THIS IN SYNC with src/gcc/usr.bin/cc/cc_tools/Makefile !!
tm.h:
echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' > ${.TARGET}
.if ${MACHINE_ARCH} == "i386"
echo '#include "${MACHINE_ARCH}/att.h"' >> ${.TARGET}
.endif
echo '#include <freebsd.h>' >> ${.TARGET}
echo '#include "${MACHINE_ARCH}/freebsd.h"' >> ${.TARGET}
.if ${MACHINE_ARCH} == "i386"
echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET}
.endif
${OBJS}: ${COMMONHDRS}
${LIB1OBJS}: libgcc1.c
${CC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
${LIB2OBJS}: libgcc2.c
${OBJS_T}: libgcc2.c
${XCC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
${NEW1OBJS}: new1.cc
${XCXX} -c ${CXXFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.cc}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
${NEW2OBJS}: new2.cc
${CXX} -c ${CXXFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.cc}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.if !defined(NOPIC)
${LIB1SOBJS}: libgcc1.c
${CC} -c ${PICFLAG} ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
${LIB2SOBJS}: libgcc2.c
${OBJS_S}: libgcc2.c
${XCC} -c ${PICFLAG} ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
${NEW1SOBJS}: new1.cc
${XCXX} -c ${PICFLAG} ${CXXFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.cc}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
${NEW2SOBJS}: new2.cc
${CXX} -c ${PICFLAG} ${CXXFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.cc}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.endif
.if !defined(NOPROFILE)
${LIB1POBJS}: libgcc1.c
${CC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
${LIB2POBJS}: libgcc2.c
${OBJS_P}: libgcc2.c
${XCC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
${NEW1POBJS}: new1.cc
${XCXX} -c -p ${CXXFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.cc}
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
${NEW2POBJS}: new2.cc
${CXX} -c -p ${CXXFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.cc}
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.endif
.include <bsd.lib.mk>

View File

@ -6,6 +6,7 @@ SRCDIR= ${.CURDIR}/../../../contrib/binutils/libiberty
LIB= iberty
NOPIC= true
INTERNALLIB= true
NOMAN= sorry
# miniumally required sources

View File

@ -1,7 +1,7 @@
# $FreeBSD$
OBJCDIR=${.CURDIR}/../../../contrib/libobjc.295
GCCDIR= ${.CURDIR}/../../../contrib/gcc.295
OBJCDIR=${.CURDIR}/../../../contrib/libobjc
GCCDIR= ${.CURDIR}/../../../contrib/gcc
.PATH: ${OBJCDIR}/objc ${OBJCDIR}
@ -17,14 +17,16 @@ SRCS= archive.c class.c encoding.c gc.c hash.c init.c misc.c \
HDRS= encoding.h hash.h objc-api.h objc-list.h objc.h runtime.h \
sarray.h thr.h typedstream.h NXConstStr.h Object.h Protocol.h
CFLAGS+= -I${OBJCDIR}/objc -I${OBJCDIR} -I.
CFLAGS+= -fgnu-runtime -DHAVE_GTHR_DEFAULT -DIN_TARGET_LIBS
CFLAGS+= -I. -I${.CURDIR}/../../usr.bin/cc/cc_tools
CFLAGS+= -I${OBJCDIR}/objc -I${OBJCDIR}
CFLAGS+= -I${GCCDIR}/config -I${GCCDIR}
beforeinstall:
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
${HDRS:S;^;${OBJCDIR}/objc/;} ${DESTDIR}/usr/include/objc
GENHDRS= runtime-info.h tconfig.h tm.h
GENHDRS= runtime-info.h tconfig.h
CLEANFILES+= ${GENHDRS}
SRCS+= ${GENHDRS}
@ -34,20 +36,7 @@ runtime-info.h:
`${CC} --print-prog-name=cc1obj` -print-objc-runtime-info \
< /dev/null > ${.TARGET}
tconfig.h:
echo '#include "gansidecl.h"' > ${.TARGET}
echo '#include "${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h"' >> ${.TARGET}
# KEEP THIS IN SYNC with src/gcc/usr.bin/cc/cc_tools/Makefile !!
tm.h:
echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' > ${.TARGET}
.if ${MACHINE_ARCH} == "i386"
echo '#include "${MACHINE_ARCH}/att.h"' >> ${.TARGET}
.endif
echo '#include <freebsd.h>' >> ${.TARGET}
echo '#include "${MACHINE_ARCH}/freebsd.h"' >> ${.TARGET}
.if ${MACHINE_ARCH} == "i386"
echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET}
.endif
tconfig.h: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile
${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
.include <bsd.lib.mk>

View File

@ -1,75 +1,97 @@
# $FreeBSD$
SRCDIR= ${.CURDIR}/../../../contrib/libstdc++.295
.PATH: ${SRCDIR} ${SRCDIR}/stl ${SRCDIR}/../libio
SRCDIR= ${.CURDIR}/../../../contrib/libstdc++-v3/src
.PATH: ${SRCDIR}/src ${SRCDIR}/libmath ${SRCDIR}/config/io \
${SRCDIR}/config/locale/generic ${SRCDIR}
SUBDIR= doc
LIB= stdc++
SHLIB_MAJOR= 3
SHLIB_MAJOR= 4
SHLIB_MINOR= 0
CFLAGS+= -I${.CURDIR} -I${SRCDIR}/include -I${SRCDIR}/../libio -I.
CXXFLAGS+= -I${SRCDIR}/stl -I${SRCDIR} -I${SRCDIR}/../gcc/cp/inc -I.
CXXFLAGS+= -nostdinc++ -fno-implicit-templates
CFLAGS+= -DHAVE_CONFIG_H
CFLAGS+= -I${.CURDIR} -I${SRCDIR}/include -I.
CXXFLAGS+= -nostdinc++ \
-fno-implicit-templates -ffunction-sections -fdata-sections
LDFLAGS+= -version-info 4:0:0 -Wl,--version-script=linker.map
LDADD+= -lm
DPADD+= ${LIBM}
LDADD+= -lm -lsupc++
DPADD+= ${LIBM} ${LIBSUPCXX}
HDRS= cassert cctype cerrno cfloat ciso646 climits clocale cmath complex \
csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime \
cwchar cwctype fstream iomanip iosfwd iostream sstream stdexcept \
string strstream complex.h stl.h valarray
# libstdc++ sources (libstdc++-v3/src/Makefile.in, do not reorder)
SRCS+= globals.cc limits.cc basic_file_stdio.cc complex_io.cc ios.cc \
strstream.cc cmath.cc bitset.cc functexcept.cc stdexcept.cc \
vterminate.cc c_locale.cc locale.cc localename.cc codecvt.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
STDHDRS=bastring.cc bastring.h complext.cc complext.h dcomplex.h fcomplex.h \
gslice.h gslice_array.h indirect_array.h ldcomplex.h mask_array.h \
slice.h slice_array.h std_valarray.h straits.h valarray_array.h \
# C parts of math
SRCS+= nan.c signbit.c signbitf.c signbitl.c # stubs.c
#------------------------------------------------------------------------------
# From libstdc++-v3/include/Makefile.am
BITHDRS=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 generic_shadow.h \
gslice.h gslice_array.h indirect_array.h ios_base.h istream.tcc \
locale_facets.h locale_facets.tcc localefwd.h mask_array.h ostream.tcc \
pthread_allocimpl.h stream_iterator.h streambuf_iterator.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 stl_function.h stl_heap.h stl_iterator.h \
stl_iterator_base_funcs.h stl_iterator_base_types.h stl_list.h \
stl_map.h stl_multimap.h stl_multiset.h stl_numeric.h stl_pair.h \
stl_pthread_alloc.h stl_queue.h stl_raw_storage_iter.h stl_relops.h \
stl_set.h stl_stack.h stl_tempbuf.h stl_threads.h stl_tree.h \
stl_uninitialized.h stl_vector.h \
streambuf.tcc stringfwd.h type_traits.h valarray_array.h \
valarray_array.tcc valarray_meta.h
STLHDRS=algo.h algobase.h algorithm alloc.h bitset bvector.h defalloc.h deque \
deque.h function.h functional hash_map hash_map.h hash_set hash_set.h \
hashtable.h heap.h iterator iterator.h list list.h map map.h memory \
multimap.h multiset.h numeric pair.h pthread_alloc pthread_alloc.h \
queue rope rope.h ropeimpl.h set set.h slist slist.h stack stack.h \
stl_algo.h stl_algobase.h stl_alloc.h stl_bvector.h stl_config.h \
stl_construct.h stl_deque.h stl_function.h stl_hash_fun.h \
stl_hash_map.h stl_hash_set.h stl_hashtable.h stl_heap.h \
stl_iterator.h stl_list.h stl_map.h stl_multimap.h stl_multiset.h \
stl_numeric.h stl_pair.h stl_queue.h stl_raw_storage_iter.h \
stl_relops.h stl_rope.h stl_set.h stl_slist.h stl_stack.h \
stl_tempbuf.h stl_tree.h stl_uninitialized.h stl_vector.h \
tempbuf.h tree.h type_traits.h utility vector vector.h
BKWHDRS=complex.h iomanip.h istream.h ostream.h stream.h streambuf.h algo.h \
algobase.h alloc.h bvector.h defalloc.h deque.h function.h hash_map.h \
hash_set.h hashtable.h heap.h iostream.h iterator.h list.h map.h \
multimap.h new.h multiset.h pair.h queue.h rope.h set.h slist.h \
stack.h tempbuf.h tree.h vector.h fstream.h strstream.h strstream \
backward_warning.h
# libstdc++ sources
SRCS+= cmathi.cc cstdlibi.cc cstringi.cc stdexcepti.cc stlinst.cc
EXTHDRS=algorithm functional hash_map hash_set iterator memory numeric \
rb_tree rope ropeimpl.h slist stl_hash_fun.h stl_hashtable.h stl_rope.h
# Headers for iostream / libio
IHDRS= PlotFile.h SFile.h builtinbuf.h editbuf.h floatio.h fstream.h \
indstream.h iolibio.h iomanip.h iostdio.h iostream.h iostreamP.h \
istream.h libio.h libioP.h ostream.h parsestream.h pfstream.h \
procbuf.h stdiostream.h stream.h streambuf.h strfile.h strstream.h
# This is the common subset of files that all three "C" header models use.
BASEDHDRS=std_cassert.h std_cctype.h std_cerrno.h std_cfloat.h std_ciso646.h \
std_climits.h std_clocale.h std_cmath.h std_csetjmp.h std_csignal.h \
std_cstdarg.h std_cstddef.h std_cstdio.h std_cstdlib.h std_cstring.h \
std_ctime.h std_cwchar.h std_cwctype.h \
cmath.tcc
# C++ parts of iostream / libio
SRCS+= PlotFile.cc SFile.cc builtinbuf.cc editbuf.cc filebuf.cc fstream.cc \
indstream.cc ioassign.cc ioextend.cc iomanip.cc iostream.cc \
isgetline.cc isgetsb.cc isscan.cc osform.cc parsestream.cc \
pfstream.cc procbuf.cc sbform.cc sbgetline.cc sbscan.cc \
stdiostream.cc stdstrbufs.cc stdstreams.cc stream.cc streambuf.cc \
strstream.cc
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 std_iosfwd.h std_iostream.h \
std_istream.h std_iterator.h std_limits.h std_list.h std_locale.h \
std_map.h std_memory.h std_numeric.h std_ostream.h std_queue.h \
std_set.h std_sstream.h std_stack.h std_stdexcept.h std_streambuf.h \
std_string.h std_utility.h std_valarray.h std_vector.h
# C parts of iostream / libio
SRCS+= cleanup.c filedoalloc.c fileops.c floatconv.c genops.c iofclose.c \
iofdopen.c iofeof.c ioferror.c iofflush.c iofflush_u.c iofgetpos.c \
iofgets.c iofopen.c iofprintf.c iofputs.c iofread.c iofscanf.c \
iofsetpos.c ioftell.c iofwrite.c iogetc.c iogetdelim.c iogetline.c \
iogets.c ioignore.c iopadn.c ioperror.c iopopen.c ioprims.c ioprintf.c \
ioputc.c ioputs.c ioscanf.c ioseekoff.c ioseekpos.c iosetbuffer.c \
iosetvbuf.c iosprintf.c iosscanf.c iostrerror.c ioungetc.c \
iovfprintf.c iovfscanf.c iovsprintf.c iovsscanf.c outfloat.c \
peekc.c strops.c
TGTHDRS=ctype_base.h ctype_inline.h ctype_noninline.h os_defines.h \
atomicity.h cpu_limits.h
# These extra_target_headers files are all built with ad hoc naming rules.
XTGHDRS=basic_file.h c++config.h c++io.h c++locale.h messages_members.h \
codecvt_specializations.h
THDHDRS=gthr.h gthr-single.h gthr-posix.h gthr-default.h
BASEDHDRS_renamed= ${BASEDHDRS:Mstd_*:S/std_//g:S/.h//g}
STDHDRS_renamed= ${STDHDRS:Mstd_*:S/std_//g:S/.h//g}
#------------------------------------------------------------------------------
# gxx_include_dir = $(prefix)/include/g++-v3
beforeinstall:
mkdir -p ${DESTDIR}/usr/include/g++/{backward,ext}
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
${.CURDIR}/_G_config.h \
${HDRS:S;^;${SRCDIR}/;} \
@ -80,111 +102,4 @@ beforeinstall:
${STDHDRS:S;^;${SRCDIR}/std/;} \
${DESTDIR}/usr/include/g++/std
CLEANFILES+= dummy.h dummy.c dummy.C
# Lots of special cases
# ======== cstrmain.o ========
SRCS+= cstrmain.cc
CLEANFILES+= cstrmain.cc
cstrmain.cc: sinst.cc
echo "#define C 1" > ${.TARGET}
.for i in REP MAIN TRAITS ADDSS ADDPS ADDCS ADDSP ADDSC EQSS EQPS EQSP NESS \
NEPS NESP LTSS LTPS LTSP GTSS GTPS GTSP LESS LEPS LESP GESS GEPS GESP
echo "#define $i 1" >> ${.TARGET}
.endfor
cat ${.ALLSRC} >> ${.TARGET}
# ======== cstrio.o ========
SRCS+= cstrio.cc
CLEANFILES+= cstrio.cc
cstrio.cc: sinst.cc
echo "#define C 1" > ${.TARGET}
.for i in EXTRACT INSERT GETLINE
echo "#define $i 1" >> ${.TARGET}
.endfor
cat ${.ALLSRC} >> ${.TARGET}
# ======== fcomplex.o =======
SRCS+= fcomplex.cc
CLEANFILES+= fcomplex.cc
fcomplex.cc: cinst.cc
echo "#define F 1" > ${.TARGET}
.for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR CONJ \
NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
echo "#define $i 1" >> ${.TARGET}
.endfor
cat ${.ALLSRC} >> ${.TARGET}
# ======== fcomio.o =======
SRCS+= fcomio.cc
CLEANFILES+= fcomio.cc
fcomio.cc: cinst.cc
echo "#define F 1" > ${.TARGET}
.for i in EXTRACT INSERT
echo "#define $i 1" >> ${.TARGET}
.endfor
cat ${.ALLSRC} >> ${.TARGET}
# ======== dcomplex.o =======
SRCS+= dcomplex.cc
CLEANFILES+= dcomplex.cc
dcomplex.cc: cinst.cc
echo "#define D 1" > ${.TARGET}
.for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR CONJ \
NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
echo "#define $i 1" >> ${.TARGET}
.endfor
cat ${.ALLSRC} >> ${.TARGET}
# ======== dcomio.o =======
SRCS+= dcomio.cc
CLEANFILES+= dcomio.cc
dcomio.cc: cinst.cc
echo "#define D 1" > ${.TARGET}
.for i in EXTRACT INSERT
echo "#define $i 1" >> ${.TARGET}
.endfor
cat ${.ALLSRC} >> ${.TARGET}
# ======== ldcomplex.o =======
SRCS+= ldcomplex.cc
CLEANFILES+= ldcomplex.cc
ldcomplex.cc: cinst.cc
echo "#define LD 1" > ${.TARGET}
.for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR CONJ \
NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
echo "#define $i 1" >> ${.TARGET}
.endfor
cat ${.ALLSRC} >> ${.TARGET}
# ======== ldcomio.o =======
SRCS+= ldcomio.cc
CLEANFILES+= ldcomio.cc
ldcomio.cc: cinst.cc
echo "#define LD 1" > ${.TARGET}
.for i in EXTRACT INSERT
echo "#define $i 1" >> ${.TARGET}
.endfor
cat ${.ALLSRC} >> ${.TARGET}
# ======== _G_config.h generation =======
# In case you want or need to generate a _G_config.h file.
make_G_config_h:
CC="${CC}" CXX="${CXX}" CONFIG_NM="nm" \
CPP="${CC} -E -nostdinc -idirafter ${DESTDIR}/usr/include" \
sh ${SRCDIR}/../libio/gen-params \
LIB_VERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.0 >${.TARGET}
.include <bsd.lib.mk>

File diff suppressed because it is too large Load Diff

View File

@ -1 +1,28 @@
# $FreeBSD$
SRCDIR= ${.CURDIR}/../../../contrib/libstdc++-v3
.PATH: ${SRCDIR} ${SRCDIR}/../../gcc
LIB= stdc++
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 \
pure.cc tinfo.cc tinfo2.cc vec.cc
# from libiberty:
SRCS+= cp-demangle.c dyn-string.c
CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
CFLAGS+= -I${SRCDIR}/../../gcc
CXXFLAGS+= -nostdinc++ \
-fno-implicit-templates -ffunction-sections -fdata-sections
HDRS= exception new typeinfo cxxabi.h exception_defines.h
beforeinstall:
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
${HDRS:S;^;${SRCDIR}/;} \
${DESTDIR}/usr/include/g++-v3
.include <bsd.lib.mk>

View File

@ -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)

View File

@ -1 +1,5 @@
# $FreeBSD$
# Front-end-only bits
version!= sed -n /version_string/p ${GCCDIR}/version.c | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,7 @@
# $FreeBSD$
.include "../Makefile.inc"
.include "../Makefile.fe"
.PATH: ${GCCDIR}/cp ${GCCDIR}

View File

@ -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>

View File

@ -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

View File

@ -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>

View File

@ -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
#-----------------------------------------------------------------------

View File

@ -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>

View File

@ -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

View File

@ -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,29 +66,11 @@ 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.
@ -95,58 +78,117 @@ tree-check.h: gencheck
./gencheck > ${.TARGET}
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
echo '#include <freebsd-native.h>' >> ${.TARGET}
.if ${TARGET_ARCH} != "i386"
.if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h)
echo '#include "${GCC_CPU}/sysv4.h"' >> ${.TARGET}
.endif
.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

View File

@ -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,58 +97,76 @@
/* #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 bcopy function. */
#define HAVE_BCOPY 1
/* Define if you have the bsearch function. */
#define HAVE_BSEARCH 1
/* Define if you have the bzero function. */
#define HAVE_BZERO 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 dup2 function. */
#define HAVE_DUP2 1
/* Define if you have the feof_unlocked function. */
/* #undef HAVE_FEOF_UNLOCKED */
/* Define if you have the fgets_unlocked function. */
/* #undef HAVE_FGETS_UNLOCKED */
/* Define if you have the fprintf_unlocked function. */
/* #undef HAVE_FPRINTF_UNLOCKED */
/* Define if you have the fputc_unlocked function. */
/* #undef HAVE_FPUTC_UNLOCKED */
/* 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 getrusage function. */
#define HAVE_GETRUSAGE 1
/* Define if you have the index function. */
#define HAVE_INDEX 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

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -1,6 +1,7 @@
# $FreeBSD$
.include "../Makefile.inc"
.include "../Makefile.fe"
.PATH: ${GCCDIR}

View File

@ -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>

View File

@ -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>

View File

@ -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)\"

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>