Update bmake glue to build GCC 4.2.

Also:
        Switch FreeBSD to use libgcc_s.so.1.

        Use dl_iterate_phdr to locate shared objects' exception frame
        info instead of depending on older register_frame_info machinery.
        This allows us to avoid depending on libgcc_s.so.1 in binaries
        that do not use exception handling directly. As an additional
        benefit it breaks circular libc <=> libgcc_s.so.1 dependency too.

        Build newly added libgomp.so.1 library, the runtime support
        bits for OpenMP.

        Build LGPLed libssp library. Our libc provides our own
        BSD-licensed SSP callbacks implementation, so this library
        is only built to benefit applications that have hadcoded
        knowledge of libssp.so and libssp_nonshared.a. When linked
        in from command line, these libraries override libc
        implementation.
This commit is contained in:
Alexander Kabaev 2007-05-19 04:25:59 +00:00
parent 25a362d725
commit afb57df680
43 changed files with 4169 additions and 1606 deletions

View File

@ -2,7 +2,7 @@
.include <bsd.own.mk>
SUBDIR= csu libgcc libgcov libdialog libregex libreadline
SUBDIR= csu libgcc libgcov libdialog libgomp libregex libreadline
# libsupc++ uses libstdc++ headers, although 'make includes' should
# have taken care of that already.
@ -14,8 +14,8 @@ SUBDIR+= libstdc++ libsupc++
SUBDIR+= libobjc
.endif
.if ${MK_FORTRAN} != "no"
SUBDIR+= libg2c
.if ${MK_SSP} != "no"
SUBDIR+= libssp
.endif
.include <bsd.subdir.mk>

View File

@ -1,20 +1,21 @@
# $FreeBSD$
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
CCDIR= ${.CURDIR}/../../usr.bin/cc
.include "${CCDIR}/Makefile.tgt"
.PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}
SRCS= crtstuff.c tconfig.h tm.h
OBJS= crtbegin.o crtend.o
SRCS= crtstuff.c tconfig.h tm.h options.h
OBJS= crtbegin.o crtend.o crtbeginT.o
SOBJS= crtbegin.So crtend.So
CSTD?= gnu89
CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR
CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3
CFLAGS+= -finhibit-size-directive -fno-inline-functions \
-fno-exceptions -fno-zero-initialized-in-bss \
-fno-omit-frame-pointer -fno-unit-at-a-time
CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \
-fno-zero-initialized-in-bss -fno-toplevel-reorder
CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \
-I${CCDIR}/cc_tools
CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG}
MKDEP= -DCRT_BEGIN
@ -46,6 +47,10 @@ crtbegin.o: ${BEGINSRC}
${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
crtbeginT.o: ${BEGINSRC}
${CC} ${CFLAGS} -g0 -DCRT_BEGIN -DCRTSTUFFT_O \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
crtbegin.So: ${BEGINSRC}
${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
@ -58,8 +63,8 @@ crtend.So: ${ENDSRC}
${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
CLEANFILES+= tm.h tconfig.h
tm.h tconfig.h: ${CCDIR}/cc_tools/Makefile
CLEANFILES+= tm.h tconfig.h options.h optionlist cs-tconfig.h cs-tm.h
tm.h tconfig.h options.h: ${CCDIR}/cc_tools/Makefile
${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
realinstall:

View File

@ -1,43 +1,24 @@
# $FreeBSD$
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
LIB= gcc
SHLIB_NAME= libgcc_s.so.1
SHLIBDIR?= /lib
.include <bsd.own.mk>
.include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt"
GCCDIR= ${.CURDIR}/../../../contrib/gcc
.PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}
.PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}/config ${GCCDIR}
# allow to be overridden for the a.out case
.if !defined(LIB) || ${LIB} != "gcc_r"
LIB= gcc
.endif
#SHLIB_MAJOR= 1
# We need to install libgcc_pic.a as well, for use by shared libs.
INSTALL_PIC_ARCHIVE=
#
# 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
# compiler for some of the libgcc2.c __attribute__ stuff.
#
# We now depend on a bootstrap pass (normally in `make world') to build
# and install the new version of gcc before we get here. This makes
# finding the new version (XCC) easy but may break finding the old version
# (CC).
#
XCC= ${CC}
XCXX= ${CXX}
CFLAGS+= -fexceptions
CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
-DFINE_GRAINED_LIBRARIES
CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK
CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \
-I${GCCDIR}/config -I${GCCDIR} -I.
-DHAVE_GTHR_DEFAULT \
-I${GCCLIB}/include \
-I${GCCDIR}/config -I${GCCDIR} -I. \
-I${.CURDIR}/../../usr.bin/cc/cc_tools
LDFLAGS+= -nodefaultlibs
LDADD+= -lc
OBJS= # added to below in various ways depending on TARGET_ARCH
@ -46,27 +27,57 @@ OBJS= # added to below in various ways depending on TARGET_ARCH
# When upgrading GCC, get the following defintions straight from Makefile.in
#
# Library members defined in libgcc2.c.
LIB2FUNCS = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 \
_cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \
_fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi \
_floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf _clear_cache \
LIB2FUNCS= _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 \
_cmpdi2 _ucmpdi2 _clear_cache \
_enable_execute_stack _trampoline __main _absvsi2 _absvdi2 _addvsi3 \
_addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors \
_ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab \
_popcountsi2 _popcountdi2 _paritysi2 _paritydi2
_popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _powisf2 _powidf2 \
_powixf2 _powitf2 _mulsc3 _muldc3 _mulxc3 _multc3 _divsc3 _divdc3 \
_divxc3 _divtc3
# The floating-point conversion routines that involve a single-word integer.
.for mode in sf df xf
LIB2FUNCS+= _fixuns${mode}si
.endfor
# Likewise double-word routines.
.for mode in sf df xf tf
LIB2FUNCS+= _fix${mode}di _fixuns${mode}di
LIB2FUNCS+= _floatdi${mode} _floatundi${mode}
.endfor
LIB2ADD = $(LIB2FUNCS_EXTRA)
LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA)
# Additional sources to handle exceptions; overridden by targets as needed.
LIB2ADDEH = unwind-dw2.c unwind-dw2-fde-glibc.c unwind-sjlj.c gthr-gnat.c \
unwind-c.c
LIB2ADDEHSTATIC = $(LIB2ADDEH)
LIB2ADDEHSHARED = $(LIB2ADDEH)
# List of extra C and assembler files to add to static and shared libgcc2.
# Assembler files should have names ending in `.asm'.
LIB2FUNCS_EXTRA =
# List of extra C and assembler files to add to static libgcc2.
# Assembler files should have names ending in `.asm'.
LIB2FUNCS_STATIC_EXTRA =
# Defined in libgcc2.c, included only in the static library.
# KAN: Excluded _sf_to_tf and _df_to_tf as TPBIT_FUNCS are not
# built on any of our platforms.
LIB2FUNCS_ST = _eprintf __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 _sf_to_tf _thenan_sf _sf_to_usi _usi_to_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 _df_to_tf _thenan_df _df_to_usi _usi_to_df
_df_to_sf _thenan_df _df_to_usi _usi_to_df
TPBIT_FUNCS = _pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf \
_fpcmp_parts_tf _compare_tf _eq_tf _ne_tf _gt_tf _ge_tf \
@ -77,81 +88,50 @@ TPBIT_FUNCS = _pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf \
# unwinder info.
LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
LIB2ADD = $(LIB2FUNCS_EXTRA)
LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA)
# Additional sources to handle exceptions; overridden by targets as needed.
LIB2ADDEH = unwind-dw2.c unwind-dw2-fde.c unwind-sjlj.c gthr-gnat.c unwind-c.c
#-----------------------------------------------------------------------
#
# Platform specific bits.
# When upgrading GCC, get the following defintions from config/<cpu>/t-*
# When upgrading GCC, get the following definitions 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
CFLAGS+= -Dinhibit_libc -fno-inline
LIB1ASMSRC = lib1funcs.asm
LIB1ASMFUNCS = _dvmd_tls _bb_init_func
OBJS+= dp-bit.o fp-bit.o
# 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
LIB1ASMFUNCS = _dvmd_tls _bb_init_func
LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
# Not now
#LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func
#LIB1ASMFUNCS+= _call_via_rX _interwork_call_via_rX \
# _lshrdi3 _ashrdi3 _ashldi3 \
# _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
# _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
# _fixsfsi _fixunssfsi _floatdidf _floatdisf
.endif
.if ${TARGET_ARCH} == "ia64"
# from config/ia64/t-ia64
LIB1ASMSRC = lib1funcs.asm
LIB1ASMFUNCS = __divxf3 __divdf3 __divsf3 \
__divdi3 __moddi3 __udivdi3 __umoddi3 \
__divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \
__nonlocal_goto __restore_stack_nonlocal __trampoline __compat
LIB2ADDEH = unwind-ia64.c unwind-sjlj.c unwind-c.c gthr-gnat.c
LIB1ASMSRC = lib1funcs.asm
LIB1ASMFUNCS = __divxf3 __divdf3 __divsf3 \
__divdi3 __moddi3 __udivdi3 __umoddi3 \
__divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \
__nonlocal_goto __restore_stack_nonlocal __trampoline \
_fixtfdi _fixunstfdi _floatditf
LIB2ADDEH = unwind-ia64.c unwind-sjlj.c unwind-c.c
.endif
.if ${TARGET_ARCH} == "powerpc"
# from config/rs6000/t-ppccomm
LIB2FUNCS_EXTRA = tramp.asm
# This one can't end up in shared libgcc
LIB2FUNCS_EXTRA = tramp.asm darwin-ldouble.c
LIB2FUNCS_STATIC_EXTRA = eabi.asm
# 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 = lb1spc.asm
LIB1ASMSRC = 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*}
#-----------------------------------------------------------------------
# Remove any objects from LIB2FUNCS and LIB2_DIVMOD_FUNCS that are
@ -163,64 +143,204 @@ LIB2_DIVMOD_FUNCS:= ${LIB2_DIVMOD_FUNCS:S/${sym}//g}
.endfor
.endif
ASM_T= ${LIB1ASMFUNCS:S/$/.o/}
ASM_P= ${LIB1ASMFUNCS:S/$/.po/}
ASM_S= ${LIB1ASMFUNCS:S/$/.So/}
COMMONHDRS= tm.h tconfig.h options.h unwind.h gthr-default.h
SYMS= ${LIB2FUNCS} \
${LIB2_DIVMOD_FUNCS}
.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64"
SYMS+= ${FPBIT_FUNCS} ${DPBIT_FUNCS}
#-----------------------------------------------------------------------
#
# Helpful shortcuts for compiler invocations.
#
HIDE = -fvisibility=hidden -DHIDE_EXPORTS
CC_T = ${CC} -c ${CFLAGS} ${HIDE} -fPIC
CC_P = ${CC} -c ${CFLAGS} ${HIDE} -p -fPIC
CC_S = ${CC} -c ${CFLAGS} ${PICFLAG} -DSHARED
#-----------------------------------------------------------------------
#
# Functions from libgcc2.c
#
STD_CFLAGS =
DIV_CFLAGS = -fexceptions -fnon-call-exceptions
STD_FUNCS = ${LIB2FUNCS}
DIV_FUNCS = ${LIB2_DIVMOD_FUNCS}
STD_CFILE = libgcc2.c
DIV_CFILE = libgcc2.c
OBJ_GRPS = STD DIV
#-----------------------------------------------------------------------
#
# Floating point emulation functions
#
.if ${TARGET_ARCH} == "armNOT_YET" || ${TARGET_ARCH} == "powerpc" || \
${TARGET_ARCH} == "sparc64"
FPBIT_CFLAGS = -DFINE_GRAINED_LIBRARIES -DFLOAT
DPBIT_CFLAGS = -DFINE_GRAINED_LIBRARIES
FPBIT_CFILE = config/fp-bit.c
DPBIT_CFILE = config/fp-bit.c
OBJ_GRPS += FPBIT DPBIT
.endif
SYMS_ST= ${LIB2FUNCS_ST} \
${LIB2ADD_ST}
OBJS+= ${SYMS:S/$/.o/} ${LIB1ASMFUNCS:S/$/.o/}
OBJS_T= ${SYMS:S/$/.o/} ${SYMS_ST:S/$/.o/}
OBJS_P= ${SYMS:S/$/.po/} ${SYMS_ST:S/$/.po/}
OBJS_S= ${SYMS:S/$/.So/}
STATICOBJS= ${SYMS_ST:S/$/.o/}
SRCS= ${LIB2ADD} ${LIB2ADDEH}
COMMONHDRS= tm.h tconfig.h
SRCS+= ${COMMONHDRS}
CLEANFILES+= ${COMMONHDRS}
#-----------------------------------------------------------------------
#
# Generic build rules for object groups defined above
#
.for T in ${OBJ_GRPS}
${T}_OBJS_T = ${${T}_FUNCS:S/$/.o/}
${T}_OBJS_P = ${${T}_FUNCS:S/$/.po/}
${T}_OBJS_S = ${${T}_FUNCS:S/$/.So/}
OBJS += ${${T}_FUNCS:S/$/.o/}
${${T}_OBJS_T}: ${${T}_CFILE} ${COMMONHDRS}
${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
${${T}_OBJS_P}: ${${T}_CFILE} ${COMMONHDRS}
${CC_P} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
${${T}_OBJS_S}: ${${T}_CFILE} ${COMMONHDRS}
${CC_S} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
.endfor
#-----------------------------------------------------------------------
#
# Extra objects coming from separate files
#
.if !empty(LIB2ADD)
OBJS += ${LIB2ADD:R:S/$/.o/}
SOBJS += ${LIB2ADD:R:S/$/.So/}
POBJS += ${LIB2ADD:R:S/$/.po/}
.endif
#-----------------------------------------------------------------------
#
# Objects that should be in static library only.
#
#SYMS_ST = ${LIB2FUNCS_ST} ${LIB2ADD_ST}
STAT_OBJS_T = ${SYMS_ST:S/$/.o/}
STAT_OBJS_P = ${SYMS_ST:S/$/.po/}
STATICOBJS = ${SYMS_ST:S/$/.o/}
${STAT_OBJS_T}: ${STD_CFILE} ${COMMONHDRS}
${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
${STAT_OBJS_P}: ${STD_CFILE} ${COMMONHDRS}
${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
#-----------------------------------------------------------------------
#
# Assembler files.
#
.if defined(LIB1ASMSRC)
ASM_T = ${LIB1ASMFUNCS:S/$/.o/}
ASM_P = ${LIB1ASMFUNCS:S/$/.po/}
ASM_S = ${LIB1ASMFUNCS:S/$/.So/}
ASM_V = ${LIB1ASMFUNCS:S/$/.vis/}
OBJS += ${LIB1ASMFUNCS:S/$/.o/}
${ASM_T}: ${LIB1ASMSRC} ${.PREFIX}.vis
${CC} -x assembler-with-cpp -c ${CFLAGS} -DL${.PREFIX} \
-o ${.TARGET} -include ${.PREFIX}.vis ${.ALLSRC:N*.h:N*.vis}
${ASM_P}: ${LIB1ASMSRC} ${.PREFIX}.vis
${CC} -x assembler-with-cpp -p -c ${CFLAGS} -DL${.PREFIX} \
-o ${.TARGET} -include ${.PREFIX}.vis ${.ALLSRC:N*.h:N*.vis}
${ASM_S}: ${LIB1ASMSRC}
${CC} -x assembler-with-cpp -c ${PICFLAG} ${CFLAGS} -DL${.PREFIX} \
-o ${.TARGET} ${.ALLSRC:N*.h}
${ASM_V}: ${LIB1ASMSRC}
${CC} -x assembler-with-cpp -c ${CFLAGS} -DL${.PREFIX} \
-o ${.PREFIX}.vo ${.ALLSRC:N*.h}
( nm -pg ${.PREFIX}.vo | \
awk 'NF == 3 && $$2 !~ /^[UN]$$/ { print "\t.hidden ", $$3 }'\
) > ${.TARGET}
CLEANFILES += ${ASM_V} ${ASM_V:R:S/$/.vo/}
.endif
#-----------------------------------------------------------------------
#
# Exception handling / unwinding support.
#
EH_OBJS_T = ${LIB2ADDEHSTATIC:R:S/$/.o/}
EH_OBJS_P = ${LIB2ADDEHSTATIC:R:S/$/.po/}
EH_OBJS_S = ${LIB2ADDEHSHARED:R:S/$/.So/}
EH_CFLAGS = -fexceptions -D__GLIBC__=3 -DElfW=__ElfN
SOBJS += ${EH_OBJS_S}
.for _src in ${LIB2ADDEHSTATIC}
${_src:R:S/$/.o/}: ${_src} ${COMMONHDRS}
${CC_T} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC}
${_src:R:S/$/.po/}: ${_src} ${COMMONHDRS}
${CC_P} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC}
.endfor
.for _src in ${LIB2ADDEHSHARED}
${_src:R:S/$/.So/}: ${_src} ${COMMONHDRS}
${CC_S} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC}
.endfor
#-----------------------------------------------------------------------
#
# Generated headers
#
${COMMONHDRS}: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile
${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
${OBJS} beforedepend: ${COMMONHDRS}
CLEANFILES += ${COMMONHDRS}
CLEANFILES += cs-*.h option*
${OBJS_T}: libgcc2.c
${XCC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
#-----------------------------------------------------------------------
#
# Build additional static libgcc_eh[_p].a librarries.
#
SHLIB_MKMAP = ${GCCDIR}/mkmap-symver.awk
SHLIB_MKMAP_OPTS =
SHLIB_MAPFILES = ${GCCDIR}/libgcc-std.ver
VERSION_MAP = libgcc.map
.if !defined(NO_PIC)
${OBJS_S}: libgcc2.c
${XCC} -c ${PICFLAG} ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
.endif
libgcc.map: ${SHLIB_MKMAP} ${SHLIB_MAPFILES} ${SOBJS} ${OBJS:R:S/$/.So/}
( nm -pg ${SOBJS};echo %% ; \
cat ${SHLIB_MAPFILES} \
| sed -e '/^[ ]*#/d' \
-e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' \
| ${CC} ${CFLAGS} -E -xassembler-with-cpp -; \
) | awk -f ${SHLIB_MKMAP} ${SHLIB_MKMAP_OPTS} > ${.TARGET}
CLEANFILES += libgcc.map
#-----------------------------------------------------------------------
#
# Build additional static libgcc_eh[_p].a librarries.
#
lib${LIB}_eh.a: ${EH_OBJS_T}
@${ECHO} building static ${LIB}_eh library
@rm -f ${.TARGET}
@${AR} cq ${.TARGET} `lorder ${EH_OBJS_T} | tsort -q`
${RANLIB} ${.TARGET}
all: lib${LIB}_eh.a
.if ${MK_PROFILE} != "no"
${OBJS_P}: libgcc2.c
${XCC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
lib${LIB}_eh_p.a: ${EH_OBJS_P}
@${ECHO} building profiled ${LIB}_eh library
@rm -f ${.TARGET}
@${AR} cq ${.TARGET} `lorder ${EH_OBJS_P} | tsort -q`
${RANLIB} ${.TARGET}
all: lib${LIB}_eh_p.a
.endif
.if defined(LIB1ASMSRC)
.for _lib1asmsrc in ${LIB1ASMSRC}
${ASM_T}: ${_lib1asmsrc}
${XCC} -x assembler-with-cpp -c ${CFLAGS} -DL${.PREFIX} \
-o ${.TARGET} ${.ALLSRC:N*.h}
.if !defined(NO_PIC)
${ASM_S}: ${_lib1asmsrc}
${XCC} -x assembler-with-cpp -c ${PICFLAG} ${CFLAGS} -DL${.PREFIX} \
-o ${.TARGET} ${.ALLSRC:N*.h}
.endif
_libinstall: _lib-eh-install
_lib-eh-install:
${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} lib${LIB}_eh.a ${DESTDIR}${LIBDIR}
.if ${MK_PROFILE} != "no"
${ASM_P}: ${_lib1asmsrc}
${XCC} -x assembler-with-cpp -p -c ${CFLAGS} -DL${.PREFIX} \
-o ${.TARGET} ${.ALLSRC:N*.h}
.endif
.endfor
${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} lib${LIB}_eh_p.a ${DESTDIR}${LIBDIR}
.endif
CLEANFILES+= lib${LIB}_eh.a lib${LIB}_eh_p.a ${EH_OBJS_T} ${EH_OBJS_P}
.include <bsd.lib.mk>
.SUFFIXES: .vis .vo

View File

@ -5,6 +5,7 @@ NO_PROFILE=
.include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt"
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
.PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}
LIB= gcov
@ -12,18 +13,22 @@ LIB= gcov
CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK
CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \
-I${GCCDIR}/config -I${GCCDIR} -I.
-I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I.
#
# Library members defined in libgcov.c.
SYMS= _gcov _gcov_merge_add _gcov_merge_delta _gcov_merge_single
# Defined in libgcov.c, included only in gcov library
SYMS = _gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta \
_gcov_fork _gcov_execl _gcov_execlp _gcov_execle \
_gcov_execv _gcov_execvp _gcov_execve \
_gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler
OBJS= ${SYMS:S/$/.o/}
OBJS_T= ${SYMS:S/$/.o/}
OBJS_P= ${SYMS:S/$/.po/}
OBJS_S= ${SYMS:S/$/.So/}
COMMONHDRS= tm.h tconfig.h gcov-iov.h
CLEANFILES+= ${COMMONHDRS}
COMMONHDRS= tm.h tconfig.h gcov-iov.h options.h
CLEANFILES+= ${COMMONHDRS} cs-tm.h cs-tconfig.h options.h optionlist
${COMMONHDRS}: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile
${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
@ -39,7 +44,7 @@ ${OBJS_S}: libgcov.c
.endif
.if ${MK_PROFILE} != "no"
${OBJS_P}: libgcc2.c
${OBJS_P}: libgcov.c
${CC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
.endif

58
gnu/lib/libgomp/Makefile Normal file
View File

@ -0,0 +1,58 @@
# $FreeBSD$
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
SRCDIR= ${GCCLIB}/libgomp
.PATH: ${SRCDIR} ${SRCDIR}/config/posix
LIB= gomp
SHLIB_MAJOR= 1
SRCS= alloc.c barrier.c critical.c env.c \
error.c iter.c loop.c ordered.c parallel.c sections.c \
single.c team.c work.c lock.c mutex.c proc.c sem.c \
bar.c time.c fortran.c
SRCS+= gstdint.h libgomp_f.h omp.h omp_lib.h
CFLAGS+= -DHAVE_CONFIG_H
CFLAGS+= -I${.CURDIR} -I. -I${SRCDIR} -I${SRCDIR}/config/posix
VERSION_MAP= ${SRCDIR}/libgomp.map
# Target-specific OpenMP configuration
.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == i386 || \
${MACHINE_ARCH} == powerpc
OMP_LOCK_ALIGN = 4
OMP_LOCK_KIND= 4
OMP_LOCK_SIZE= 4
OMP_NEST_LOCK_ALIGN= 4
OMP_NEST_LOCK_KIND= 8
OMP_NEST_LOCK_SIZE= 8
.else
OMP_LOCK_ALIGN = 8
OMP_LOCK_KIND= 8
OMP_LOCK_SIZE= 8
OMP_NEST_LOCK_ALIGN= 8
OMP_NEST_LOCK_KIND= 8
OMP_NEST_LOCK_SIZE= 16
.endif
gstdint.h:
echo '#include <sys/types.h>' > ${.TARGET}
echo '#include <stdint.h>' >> ${.TARGET}
CLEANFILES+= gstdint.h
.for HFILE in libgomp_f.h omp.h omp_lib.h
${HFILE}: ${SRCDIR}/${HFILE}.in
sed -e 's/@OMP_LOCK_ALIGN@/${OMP_LOCK_ALIGN}/g' \
-e 's/@OMP_LOCK_KIND@/${OMP_LOCK_KIND}/g' \
-e 's/@OMP_LOCK_SIZE@/${OMP_LOCK_SIZE}/g' \
-e 's/@OMP_NEST_LOCK_ALIGN@/${OMP_NEST_LOCK_ALIGN}/g' \
-e 's/@OMP_NEST_LOCK_KIND@/${OMP_NEST_LOCK_KIND}/g' \
-e 's/@OMP_NEST_LOCK_SIZE@/${OMP_NEST_LOCK_SIZE}/g' \
< ${.ALLSRC} > ${.TARGET}
CLEANFILES+= ${HFILE}
.endfor
.include <bsd.lib.mk>

109
gnu/lib/libgomp/config.h Normal file
View File

@ -0,0 +1,109 @@
/* config.h. Generated by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* $FreeBSD$ */
/* Define to 1 if the target supports __attribute__((alias(...))). */
#define HAVE_ATTRIBUTE_ALIAS 1
/* Define to 1 if the target supports __attribute__((dllexport)). */
/* #undef HAVE_ATTRIBUTE_DLLEXPORT */
/* Define to 1 if the target supports __attribute__((visibility(...))). */
#define HAVE_ATTRIBUTE_VISIBILITY 1
/* Define if the POSIX Semaphores do not work on your system. */
/* #undef HAVE_BROKEN_POSIX_SEMAPHORES */
/* Define to 1 if you have the `clock_gettime' function. */
#define HAVE_CLOCK_GETTIME 1
/* Define to 1 if you have the `getloadavg' function. */
#define HAVE_GETLOADAVG 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <semaphore.h> header file. */
#define HAVE_SEMAPHORE_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if the target supports __sync_*_compare_and_swap */
#ifdef __amd64__
#define HAVE_SYNC_BUILTINS 1
#endif
/* Define to 1 if you have the <sys/loadavg.h> header file. */
/* #undef HAVE_SYS_LOADAVG_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if the target supports thread-local storage. */
#if !defined(__sparc64__) && !defined(__arm__)
#define HAVE_TLS 1
#endif
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Name of package */
#define PACKAGE "libgomp"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "GNU OpenMP Runtime Library"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "GNU OpenMP Runtime Library 1.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libgomp"
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.0"
/* The size of a `char', as computed by sizeof. */
/* #undef SIZEOF_CHAR */
/* The size of a `int', as computed by sizeof. */
/* #undef SIZEOF_INT */
/* The size of a `long', as computed by sizeof. */
/* #undef SIZEOF_LONG */
/* The size of a `short', as computed by sizeof. */
/* #undef SIZEOF_SHORT */
/* The size of a `void *', as computed by sizeof. */
/* #undef SIZEOF_VOID_P */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Version number of package */
#define VERSION "1.0"

View File

@ -2,39 +2,44 @@
OBJCDIR=${.CURDIR}/../../../contrib/libobjc
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
.PATH: ${OBJCDIR}/objc ${OBJCDIR}
LIB= objc
SHLIB_MAJOR= 2
SRCS= archive.c class.c encoding.c gc.c hash.c init.c misc.c \
nil_method.c objects.c sarray.c selector.c sendmsg.c \
thr.c thr-posix.c \
NXConstStr.m Object.m Protocol.m linking.m
SRCS= archive.c class.c encoding.c gc.c hash.c init.c linking.m misc.c \
nil_method.c NXConstStr.m Object.m objects.c Protocol.m sarray.c \
selector.c sendmsg.c thr.c thr-objc.c exception.c hash_compat.c
INCS= 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
INCSDIR=${INCLUDEDIR}/objc
OBJCFLAGS= -fgnu-runtime ${CFLAGS}
CFLAGS+= -DHAVE_GTHR_DEFAULT -DIN_GCC -DIN_TARGET_LIBS
CFLAGS+= -I. -I${.CURDIR}/../../usr.bin/cc/cc_tools
CFLAGS+= -I${OBJCDIR}/objc -I${OBJCDIR}
CFLAGS+= -I${OBJCDIR}/objc -I${OBJCDIR}
CFLAGS+= -I${GCCDIR}/config -I${GCCDIR}
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
CFLAGS+= -I${GCCLIB}/include
CFLAGS+= -fexceptions -frandom-seed=RepeatabilityConsideredGood
OBJCFLAGS= -fgnu-runtime ${CFLAGS}
GENHDRS= runtime-info.h tconfig.h tm.h
CLEANFILES+= ${GENHDRS}
SRCS+= ${GENHDRS}
${OBJS}: ${GENHDRS}
GENHDRS= runtime-info.h
runtime-info.h:
`${CC} --print-prog-name=cc1obj` -print-objc-runtime-info \
< /dev/null > ${.TARGET}
tconfig.h tm.h : ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile
.for H in tconfig.h tm.h config.h options.h gthr-default.h unwind.h
$H: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile
${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
GENHDRS+= $H
.endfor
CLEANFILES+= ${GENHDRS} cs-* optionlist
SRCS+= ${GENHDRS}
${OBJS}: ${GENHDRS}
.include <bsd.lib.mk>

33
gnu/lib/libssp/Makefile Normal file
View File

@ -0,0 +1,33 @@
# $FreeBSD$
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
SRCDIR= ${GCCLIB}/libssp
.PATH: ${SRCDIR} ${SRCDIR}/ssp
LIB= ssp
SHLIB_MAJOR= 0
SHLIBDIR?= /lib
NO_PROFILE=
SRCS= ssp.c gets-chk.c memcpy-chk.c memmove-chk.c mempcpy-chk.c \
memset-chk.c snprintf-chk.c sprintf-chk.c stpcpy-chk.c \
strcat-chk.c strcpy-chk.c strncat-chk.c strncpy-chk.c \
vsnprintf-chk.c vsprintf-chk.c
CFLAGS+= -DHAVE_CONFIG_H
CFLAGS+= -I${.CURDIR} -I${SRCDIR} -I${GCCLIB}/include
VERSION_MAP= ${SRCDIR}/ssp.map
INCS= ssp.h string.h stdio.h unistd.h
INCSDIR=${INCLUDEDIR}/ssp
ssp.h: ssp.h.in
sed -e 's/@ssp_have_usable_vsnprintf@/define/' ${.ALLSRC} > ${.TARGET}
SUBDIR+= libssp_nonshared
.include <bsd.lib.mk>

87
gnu/lib/libssp/config.h Normal file
View File

@ -0,0 +1,87 @@
/* config.h. Generated by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* $FreeBSD$ */
/* Define to 1 if you have the <alloca.h> header file. */
/* #undef HAVE_ALLOCA_H */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* __attribute__((visibility ("hidden"))) supported */
#define HAVE_HIDDEN_VISIBILITY 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mempcpy' function. */
/* #undef HAVE_MEMPCPY */
/* Define to 1 if you have the <paths.h> header file. */
#define HAVE_PATHS_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strncat' function. */
#define HAVE_STRNCAT 1
/* Define to 1 if you have the `strncpy' function. */
#define HAVE_STRNCPY 1
/* Define to 1 if you have the <syslog.h> header file. */
#define HAVE_SYSLOG_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* vsnprintf is present and works */
#define HAVE_USABLE_VSNPRINTF 1
/* Name of package */
#define PACKAGE "libssp"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "libssp"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libssp 1.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libssp"
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.0"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "1.0"

View File

@ -0,0 +1,18 @@
# $FreeBSD$
GCCDIR= ${.CURDIR}/../../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../../contrib/gcclibs
.PATH: ${GCCLIB}/libssp ${GCCLIB}/libssp/ssp
LIB= ssp_nonshared
NO_PIC=
NO_PROFILE=
SRCS= ssp-local.c
CFLAGS+= -DHAVE_CONFIG_H
CFLAGS+= -I${.CURDIR}/.. -I${GCCLIB}/libssp -I${GCCLIB}/include
CFLAGS+= -fPIC -DPIC
.include <bsd.lib.mk>

View File

@ -1,21 +1,23 @@
# $FreeBSD$
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
SRCDIR= ${.CURDIR}/../../../contrib/libstdc++
SUPDIR= ${SRCDIR}/libsupc++
.PATH: ${SRCDIR}/src ${SRCDIR}/libmath ${SRCDIR}/config/io \
${SRCDIR}/config/locale/generic ${SRCDIR}/include \
${SUPDIR} ${GCCDIR}
${SRCDIR}/config/locale/darwin ${SRCDIR}/config/locale/generic \
${SRCDIR}/include ${SUPDIR} ${GCCDIR} ${GCCLIB}/libiberty
LIB= stdc++
SHLIB_MAJOR= 5
SHLIB_MAJOR= 6
CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
.if ${MACHINE_ARCH} == "arm"
CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1
.endif
CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include
CFLAGS+= -I${GCCLIB}/include -I${SRCDIR}/include -I.
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \
-Wno-deprecated
@ -24,15 +26,21 @@ DPADD= ${LIBM}
LDADD= -lm
# libstdc++ sources
SRCS+= allocator.cc codecvt.cc complex_io.cc ctype.cc debug.cc debug_list.cc \
functexcept.cc globals_locale.cc globals_io.cc ios.cc ios_failure.cc \
ios_init.cc ios_locale.cc limits.cc debug_list.cc list.cc locale.cc \
locale_init.cc locale_facets.cc localename.cc stdexcept.cc \
strstream.cc tree.cc allocator-inst.cc concept-inst.cc fstream-inst.cc \
ext-inst.cc io-inst.cc istream-inst.cc locale-inst.cc \
locale-misc-inst.cc misc-inst.cc ostream-inst.cc sstream-inst.cc \
streambuf-inst.cc string-inst.cc valarray-inst.cc wlocale-inst.cc \
wstring-inst.cc
SRCS+= bitmap_allocator.cc pool_allocator.cc \
mt_allocator.cc codecvt.cc compatibility.cc complex_io.cc \
ctype.cc debug.cc debug_list.cc functexcept.cc globals_io.cc \
ios.cc ios_failure.cc ios_init.cc ios_locale.cc limits.cc \
list.cc locale.cc locale_init.cc locale_facets.cc \
localename.cc stdexcept.cc strstream.cc tree.cc \
allocator-inst.cc concept-inst.cc fstream-inst.cc ext-inst.cc \
ios-inst.cc iostream-inst.cc istream-inst.cc istream.cc \
locale-inst.cc misc-inst.cc ostream-inst.cc sstream-inst.cc \
streambuf-inst.cc streambuf.cc string-inst.cc valarray-inst.cc \
wlocale-inst.cc wstring-inst.cc atomicity.cc \
codecvt_members.cc collate_members.cc ctype_members.cc \
messages_members.cc monetary_members.cc numeric_members.cc \
time_members.cc basic_file_stdio.cc c_locale.cc \
# compatibility-ldbl.cc
# target sources
SRCS+= atomicity.cc codecvt_members.cc collate_members.cc ctype_members.cc \
@ -43,11 +51,11 @@ SRCS+= atomicity.cc codecvt_members.cc collate_members.cc ctype_members.cc \
SRCS+= basic_file_stdio.cc c_locale.cc
# C parts of math
SRCS+= signbitf.c signbitl.c stubs.c
SRCS+= stubs.c
# Embedded copy of libsupc++
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 \
SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \
eh_aux_runtime.cc eh_call.cc eh_catch.cc eh_exception.cc eh_globals.cc \
eh_personality.cc eh_term_handler.cc eh_terminate.cc eh_throw.cc \
eh_type.cc eh_unex_handler.cc guard.cc new_handler.cc new_op.cc \
new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc tinfo2.cc \
@ -74,13 +82,19 @@ ATOMICITY_H= ${SRCDIR}/config/cpu/${MARCHDIR}/atomicity.h
ATOMICITY_H= ${SRCDIR}/config/cpu/generic/atomicity.h
.endif
.if ${MACHINE_ARCH} == "amd64"
.if exists(${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h)
ATOMICITY_H= ${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h
.endif
.endif
atomicity.cc: ${ATOMICITY_H}
ln -sf ${.ALLSRC} ${.TARGET}
CLEANFILES+= atomicity.cc
INCSGROUPS= BITSHDRS BKWHDRS EXTHDRS BASEHDRS BASEXHDRS STDHDRS \
TARGETHDRS THRHDRS DEBUGHDRS
CXXINCLUDEDIR= ${INCLUDEDIR}/c++/3.4
TARGETHDRS THRHDRS DEBUGHDRS TR1HDRS PBHDRS0
CXXINCLUDEDIR= ${INCLUDEDIR}/c++/4.2
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 \
@ -95,22 +109,21 @@ STDHDRSNAME_$h=${h:R:S;^std_;;}
STDHDRS:= ${STDHDRS:S;^;${SRCDIR}/include/std/;}
STDHDRSDIR= ${CXXINCLUDEDIR}
BITSHDRS= allocator.h atomicity.h basic_ios.h basic_ios.tcc \
basic_string.h basic_string.tcc boost_concept_check.h \
char_traits.h codecvt.h concept_check.h concurrence.h \
cpp_type_traits.h deque.tcc fstream.tcc functexcept.h \
gslice.h gslice_array.h indirect_array.h ios_base.h \
istream.tcc list.tcc locale_classes.h locale_facets.h \
locale_facets.tcc localefwd.h mask_array.h ostream.tcc \
postypes.h stream_iterator.h streambuf_iterator.h \
slice_array.h sstream.tcc stl_algo.h stl_algobase.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_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 \
BITSHDRS= allocator.h 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 deque.tcc fstream.tcc \
functexcept.h gslice.h gslice_array.h indirect_array.h \
ios_base.h istream.tcc list.tcc locale_classes.h \
locale_facets.h locale_facets.tcc localefwd.h mask_array.h \
ostream.tcc ostream_insert.h postypes.h stream_iterator.h \
streambuf_iterator.h slice_array.h sstream.tcc stl_algo.h \
stl_algobase.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_queue.h stl_raw_storage_iter.h stl_relops.h \
stl_set.h stl_stack.h stl_tempbuf.h stl_tree.h \
stl_uninitialized.h stl_vector.h streambuf.tcc stringfwd.h \
valarray_array.h valarray_array.tcc valarray_before.h \
valarray_after.h vector.tcc
BITSHDRS:= ${BITSHDRS:S;^;${SRCDIR}/include/bits/;}
@ -125,15 +138,33 @@ BKWHDRS= complex.h iomanip.h istream.h ostream.h stream.h streambuf.h \
BKWHDRS:= ${BKWHDRS:S;^;${SRCDIR}/include/backward/;}
BKWHDRSDIR= ${CXXINCLUDEDIR}/backward
EXTHDRS= algorithm bitmap_allocator.h debug_allocator.h \
enc_filebuf.h stdio_filebuf.h stdio_sync_filebuf.h functional \
hash_map hash_set iterator malloc_allocator.h memory \
mt_allocator.h new_allocator.h numeric pod_char_traits.h \
pool_allocator.h rb_tree rope ropeimpl.h slist hash_fun.h \
hashtable.h
EXTHDRS= algorithm atomicity.h array_allocator.h bitmap_allocator.h \
codecvt_specializations.h concurrence.h debug_allocator.h \
stdio_filebuf.h stdio_sync_filebuf.h functional \
hash_map hash_set hash_fun.h hashtable.h iterator \
malloc_allocator.h memory mt_allocator.h new_allocator.h \
numeric pod_char_traits.h pool_allocator.h rb_tree rope \
ropeimpl.h slist throw_allocator.h typelist.h type_traits.h \
rc_string_base.h sso_string_base.h vstring.h vstring.tcc \
vstring_fwd.h vstring_util.h
EXTHDRS:= ${EXTHDRS:S;^;${SRCDIR}/include/ext/;}
EXTHDRSDIR= ${CXXINCLUDEDIR}/ext
TR1HDRS= array bind_repeat.h bind_iterate.h boost_shared_ptr.h cctype \
cfenv cfloat cinttypes climits cmath common.h complex cstdarg \
cstdbool cstdint cstdio cstdlib ctgmath ctime ctype.h cwchar \
cwctype fenv.h float.h functional functional_hash.h \
functional_iterate.h hashtable hashtable_policy.h inttypes.h \
limits.h math.h memory mu_iterate.h random random.tcc \
ref_fwd.h ref_wrap_iterate.h repeat.h stdarg.h stdbool.h \
stdint.h stdio.h stdlib.h tgmath.h tuple tuple_defs.h \
tuple_iterate.h type_traits type_traits_fwd.h unordered_set \
unordered_map utility wchar.h wctype.h
TR1HDRS:= ${TR1HDRS:S;^;${SRCDIR}/include/tr1/;}
TR1HDRSDIR= ${CXXINCLUDEDIR}/tr1
# This is the common subset of files that all three "C" header models use.
BASEHDRS= std_cassert.h std_cctype.h std_cerrno.h std_cfloat.h \
std_ciso646.h std_climits.h std_clocale.h std_cmath.h \
@ -150,21 +181,343 @@ BASEHDRSDIR= ${CXXINCLUDEDIR}
BASEXHDRS= ${SRCDIR}/include/c_std/cmath.tcc
BASEXHDRSDIR= ${CXXINCLUDEDIR}/bits
DEBUGHDRS= bitset debug.h deque formatter.h hash_map hash_map.h \
hash_multimap.h hash_multiset.h hash_set hash_set.h list \
map map.h multimap.h multiset.h safe_base.h safe_iterator.h \
safe_iterator.tcc safe_sequence.h set set.h string vector
DEBUGHDRS= bitset debug.h deque formatter.h functions.h hash_map \
hash_map.h hash_multimap.h hash_multiset.h hash_set hash_set.h \
list macros.h map map.h multimap.h multiset.h safe_base.h \
safe_iterator.h safe_iterator.tcc safe_sequence.h set set.h \
string vector
DEBUGHDRS:= ${DEBUGHDRS:S;^;${SRCDIR}/include/debug/;}
DEBUGHDRSDIR= ${CXXINCLUDEDIR}/debug
TARGETHDRS= allocator/new_allocator_base.h \
# Not installed, but kept here for completeness
COMPATHDRS= assert.h ctype.h errno.h float.h iso646.h limits.h locale.h \
math.h setjmp.h signal.h stdarg.h stddef.h stdio.h stdlib.h \
string.h time.h wchar.h wctype.h
COMPATHDRS:= ${COMPATHDRS:S;^;${SRCDIR}/include/debug/;}
COMPATHDRSDIR= ${CXXINCLUDEDIR}/c_compatibility
PBHDRS0 = \
assoc_container.hpp \
exception.hpp \
hash_policy.hpp \
list_update_policy.hpp \
priority_queue.hpp \
tag_and_trait.hpp \
tree_policy.hpp \
trie_policy.hpp
PBHDRS0:= ${PBHDRS0:S;^;${SRCDIR}/include/ext/pb_ds/;}
PBHDRS0DIR= ${CXXINCLUDEDIR}/ext/pb_ds
PBHDRS+= \
basic_tree_policy/basic_tree_policy_base.hpp \
basic_tree_policy/null_node_metadata.hpp \
basic_tree_policy/traits.hpp \
basic_types.hpp \
binary_heap_/binary_heap_.hpp \
binary_heap_/const_iterator.hpp \
binary_heap_/const_point_iterator.hpp \
binary_heap_/constructors_destructor_fn_imps.hpp \
binary_heap_/debug_fn_imps.hpp \
binary_heap_/entry_cmp.hpp \
binary_heap_/entry_pred.hpp \
binary_heap_/erase_fn_imps.hpp \
binary_heap_/find_fn_imps.hpp \
binary_heap_/info_fn_imps.hpp \
binary_heap_/insert_fn_imps.hpp \
binary_heap_/iterators_fn_imps.hpp \
binary_heap_/policy_access_fn_imps.hpp \
binary_heap_/resize_policy.hpp \
binary_heap_/split_join_fn_imps.hpp \
binary_heap_/trace_fn_imps.hpp \
binomial_heap_base_/binomial_heap_base_.hpp \
binomial_heap_base_/constructors_destructor_fn_imps.hpp \
binomial_heap_base_/debug_fn_imps.hpp \
binomial_heap_base_/erase_fn_imps.hpp \
binomial_heap_base_/find_fn_imps.hpp \
binomial_heap_base_/insert_fn_imps.hpp \
binomial_heap_base_/split_join_fn_imps.hpp \
binomial_heap_/binomial_heap_.hpp \
binomial_heap_/constructors_destructor_fn_imps.hpp \
binomial_heap_/debug_fn_imps.hpp \
bin_search_tree_/bin_search_tree_.hpp \
bin_search_tree_/cond_dtor_entry_dealtor.hpp \
bin_search_tree_/cond_key_dtor_entry_dealtor.hpp
PBHDRS+= \
bin_search_tree_/constructors_destructor_fn_imps.hpp \
bin_search_tree_/debug_fn_imps.hpp \
bin_search_tree_/erase_fn_imps.hpp \
bin_search_tree_/find_fn_imps.hpp \
bin_search_tree_/info_fn_imps.hpp \
bin_search_tree_/insert_fn_imps.hpp \
bin_search_tree_/iterators_fn_imps.hpp \
bin_search_tree_/node_iterators.hpp \
bin_search_tree_/point_iterators.hpp \
bin_search_tree_/policy_access_fn_imps.hpp \
bin_search_tree_/r_erase_fn_imps.hpp \
bin_search_tree_/rotate_fn_imps.hpp \
bin_search_tree_/split_join_fn_imps.hpp \
bin_search_tree_/traits.hpp \
cc_hash_table_map_/cc_ht_map_.hpp \
cc_hash_table_map_/cmp_fn_imps.hpp \
cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp \
cc_hash_table_map_/constructor_destructor_fn_imps.hpp \
cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp \
cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp \
cc_hash_table_map_/debug_fn_imps.hpp \
cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp \
cc_hash_table_map_/debug_store_hash_fn_imps.hpp \
cc_hash_table_map_/entry_list_fn_imps.hpp \
cc_hash_table_map_/erase_fn_imps.hpp \
cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp \
cc_hash_table_map_/erase_store_hash_fn_imps.hpp \
cc_hash_table_map_/find_fn_imps.hpp \
cc_hash_table_map_/find_store_hash_fn_imps.hpp \
cc_hash_table_map_/info_fn_imps.hpp \
cc_hash_table_map_/insert_fn_imps.hpp \
cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp \
cc_hash_table_map_/insert_store_hash_fn_imps.hpp \
cc_hash_table_map_/iterators_fn_imps.hpp \
cc_hash_table_map_/policy_access_fn_imps.hpp \
cc_hash_table_map_/resize_fn_imps.hpp \
cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp \
cc_hash_table_map_/resize_store_hash_fn_imps.hpp \
cc_hash_table_map_/size_fn_imps.hpp \
cc_hash_table_map_/standard_policies.hpp
PBHDRS+= \
cc_hash_table_map_/trace_fn_imps.hpp \
cond_dealtor.hpp \
constructors_destructor_fn_imps.hpp \
container_base_dispatch.hpp \
eq_fn/eq_by_less.hpp \
eq_fn/hash_eq_fn.hpp \
gp_hash_table_map_/constructor_destructor_fn_imps.hpp \
gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp \
gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp \
gp_hash_table_map_/debug_fn_imps.hpp \
gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp \
gp_hash_table_map_/debug_store_hash_fn_imps.hpp \
gp_hash_table_map_/erase_fn_imps.hpp \
gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp \
gp_hash_table_map_/erase_store_hash_fn_imps.hpp \
gp_hash_table_map_/find_fn_imps.hpp \
gp_hash_table_map_/find_no_store_hash_fn_imps.hpp \
gp_hash_table_map_/find_store_hash_fn_imps.hpp \
gp_hash_table_map_/gp_ht_map_.hpp \
gp_hash_table_map_/info_fn_imps.hpp \
gp_hash_table_map_/insert_fn_imps.hpp \
gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp \
gp_hash_table_map_/insert_store_hash_fn_imps.hpp \
gp_hash_table_map_/iterator_fn_imps.hpp \
gp_hash_table_map_/policy_access_fn_imps.hpp \
gp_hash_table_map_/resize_fn_imps.hpp \
gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp \
gp_hash_table_map_/resize_store_hash_fn_imps.hpp \
gp_hash_table_map_/standard_policies.hpp \
gp_hash_table_map_/trace_fn_imps.hpp \
hash_fn/direct_mask_range_hashing_imp.hpp \
hash_fn/direct_mod_range_hashing_imp.hpp \
hash_fn/linear_probe_fn_imp.hpp \
hash_fn/mask_based_range_hashing.hpp \
hash_fn/mod_based_range_hashing.hpp \
hash_fn/probe_fn_base.hpp \
hash_fn/quadratic_probe_fn_imp.hpp \
hash_fn/ranged_hash_fn.hpp \
hash_fn/ranged_probe_fn.hpp
PBHDRS+= \
hash_fn/sample_probe_fn.hpp \
hash_fn/sample_ranged_hash_fn.hpp \
hash_fn/sample_ranged_probe_fn.hpp \
hash_fn/sample_range_hashing.hpp \
left_child_next_sibling_heap_/const_iterator.hpp \
left_child_next_sibling_heap_/const_point_iterator.hpp \
left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp \
left_child_next_sibling_heap_/debug_fn_imps.hpp \
left_child_next_sibling_heap_/erase_fn_imps.hpp \
left_child_next_sibling_heap_/info_fn_imps.hpp \
left_child_next_sibling_heap_/insert_fn_imps.hpp \
left_child_next_sibling_heap_/iterators_fn_imps.hpp \
left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp \
left_child_next_sibling_heap_/node.hpp \
left_child_next_sibling_heap_/null_metadata.hpp \
left_child_next_sibling_heap_/policy_access_fn_imps.hpp \
left_child_next_sibling_heap_/trace_fn_imps.hpp \
list_update_map_/constructor_destructor_fn_imps.hpp \
list_update_map_/debug_fn_imps.hpp \
list_update_map_/entry_metadata_base.hpp \
list_update_map_/erase_fn_imps.hpp \
list_update_map_/find_fn_imps.hpp \
list_update_map_/info_fn_imps.hpp \
list_update_map_/insert_fn_imps.hpp \
list_update_map_/iterators_fn_imps.hpp \
list_update_map_/lu_map_.hpp \
list_update_map_/trace_fn_imps.hpp \
list_update_policy/counter_lu_metadata.hpp \
list_update_policy/counter_lu_policy_imp.hpp \
list_update_policy/mtf_lu_policy_imp.hpp \
list_update_policy/sample_update_policy.hpp \
map_debug_base.hpp \
ov_tree_map_/cond_dtor.hpp \
ov_tree_map_/constructors_destructor_fn_imps.hpp \
ov_tree_map_/debug_fn_imps.hpp \
ov_tree_map_/erase_fn_imps.hpp \
ov_tree_map_/info_fn_imps.hpp \
ov_tree_map_/insert_fn_imps.hpp \
ov_tree_map_/iterators_fn_imps.hpp \
ov_tree_map_/node_iterators.hpp \
ov_tree_map_/ov_tree_map_.hpp
PBHDRS+= \
ov_tree_map_/policy_access_fn_imps.hpp \
ov_tree_map_/split_join_fn_imps.hpp \
ov_tree_map_/traits.hpp \
pairing_heap_/constructors_destructor_fn_imps.hpp \
pairing_heap_/debug_fn_imps.hpp \
pairing_heap_/erase_fn_imps.hpp \
pairing_heap_/find_fn_imps.hpp \
pairing_heap_/insert_fn_imps.hpp \
pairing_heap_/pairing_heap_.hpp \
pairing_heap_/split_join_fn_imps.hpp \
pat_trie_/child_iterator.hpp \
pat_trie_/cond_dtor_entry_dealtor.hpp \
pat_trie_/const_child_iterator.hpp \
pat_trie_/constructors_destructor_fn_imps.hpp \
pat_trie_/debug_fn_imps.hpp \
pat_trie_/erase_fn_imps.hpp \
pat_trie_/find_fn_imps.hpp \
pat_trie_/head.hpp \
pat_trie_/info_fn_imps.hpp \
pat_trie_/insert_join_fn_imps.hpp \
pat_trie_/internal_node.hpp \
pat_trie_/iterators_fn_imps.hpp \
pat_trie_/leaf.hpp \
pat_trie_/node_base.hpp \
pat_trie_/node_iterators.hpp \
pat_trie_/node_metadata_base.hpp \
pat_trie_/pat_trie_.hpp \
pat_trie_/point_iterators.hpp \
pat_trie_/policy_access_fn_imps.hpp \
pat_trie_/r_erase_fn_imps.hpp \
pat_trie_/rotate_fn_imps.hpp \
pat_trie_/split_fn_imps.hpp \
pat_trie_/split_join_branch_bag.hpp \
pat_trie_/synth_e_access_traits.hpp \
pat_trie_/trace_fn_imps.hpp \
pat_trie_/traits.hpp \
pat_trie_/update_fn_imps.hpp \
priority_queue_base_dispatch.hpp \
rb_tree_map_/constructors_destructor_fn_imps.hpp \
rb_tree_map_/debug_fn_imps.hpp
PBHDRS+= \
rb_tree_map_/erase_fn_imps.hpp \
rb_tree_map_/find_fn_imps.hpp \
rb_tree_map_/info_fn_imps.hpp \
rb_tree_map_/insert_fn_imps.hpp \
rb_tree_map_/node.hpp \
rb_tree_map_/rb_tree_.hpp \
rb_tree_map_/split_join_fn_imps.hpp \
rb_tree_map_/traits.hpp \
rc_binomial_heap_/constructors_destructor_fn_imps.hpp \
rc_binomial_heap_/debug_fn_imps.hpp \
rc_binomial_heap_/erase_fn_imps.hpp \
rc_binomial_heap_/insert_fn_imps.hpp \
rc_binomial_heap_/rc_binomial_heap_.hpp \
rc_binomial_heap_/rc.hpp \
rc_binomial_heap_/split_join_fn_imps.hpp \
rc_binomial_heap_/trace_fn_imps.hpp \
resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp \
resize_policy/hash_exponential_size_policy_imp.hpp \
resize_policy/hash_load_check_resize_trigger_imp.hpp \
resize_policy/hash_load_check_resize_trigger_size_base.hpp \
resize_policy/hash_prime_size_policy_imp.hpp \
resize_policy/hash_standard_resize_policy_imp.hpp \
resize_policy/sample_resize_policy.hpp \
resize_policy/sample_resize_trigger.hpp \
resize_policy/sample_size_policy.hpp \
splay_tree_/constructors_destructor_fn_imps.hpp \
splay_tree_/debug_fn_imps.hpp \
splay_tree_/erase_fn_imps.hpp \
splay_tree_/find_fn_imps.hpp \
splay_tree_/info_fn_imps.hpp \
splay_tree_/insert_fn_imps.hpp \
splay_tree_/node.hpp \
splay_tree_/splay_fn_imps.hpp \
splay_tree_/splay_tree_.hpp \
splay_tree_/split_join_fn_imps.hpp \
splay_tree_/traits.hpp \
standard_policies.hpp \
thin_heap_/constructors_destructor_fn_imps.hpp \
thin_heap_/debug_fn_imps.hpp \
thin_heap_/erase_fn_imps.hpp
PBHDRS+= \
thin_heap_/find_fn_imps.hpp \
thin_heap_/insert_fn_imps.hpp \
thin_heap_/split_join_fn_imps.hpp \
thin_heap_/thin_heap_.hpp \
thin_heap_/trace_fn_imps.hpp \
tree_policy/node_metadata_selector.hpp \
tree_policy/null_node_update_imp.hpp \
tree_policy/order_statistics_imp.hpp \
tree_policy/sample_tree_node_update.hpp \
tree_trace_base.hpp \
trie_policy/node_metadata_selector.hpp \
trie_policy/null_node_update_imp.hpp \
trie_policy/order_statistics_imp.hpp \
trie_policy/prefix_search_node_update_imp.hpp \
trie_policy/sample_trie_e_access_traits.hpp \
trie_policy/sample_trie_node_update.hpp \
trie_policy/string_trie_e_access_traits_imp.hpp \
trie_policy/trie_policy_base.hpp \
types_traits.hpp \
type_utils.hpp \
unordered_iterator/const_iterator.hpp \
unordered_iterator/const_point_iterator.hpp \
unordered_iterator/iterator.hpp \
unordered_iterator/point_iterator.hpp
PBHDRSDIRS= \
pairing_heap_ \
splay_tree_ \
list_update_map_ \
basic_tree_policy \
trie_policy \
gp_hash_table_map_ \
tree_policy \
binomial_heap_base_ \
resize_policy \
bin_search_tree_ \
binomial_heap_ \
thin_heap_ \
pat_trie_ \
cc_hash_table_map_ \
rc_binomial_heap_ \
left_child_next_sibling_heap_ \
unordered_iterator \
binary_heap_ \
ov_tree_map_ \
hash_fn \
eq_fn \
rb_tree_map_ \
list_update_policy
.for D in ${PBHDRSDIRS}
PHDRGRP$D:= ${PBHDRS:M$D/*:S;^;${SRCDIR}/include/ext/pb_ds/detail/;}
PHDRGRP$DDIR= ${CXXINCLUDEDIR}/ext/pb_ds/detail/$D
INCSGROUPS+= PHDRGRP$D
.endfor
TARGETHDRS= abi/compatibility.h \
allocator/new_allocator_base.h \
io/basic_file_stdio.h \
io/c_io_stdio.h \
locale/generic/c_locale.h \
locale/generic/c++locale_internal.h \
locale/generic/messages_members.h \
locale/generic/time_members.h \
locale/generic/codecvt_specializations.h \
os/bsd/freebsd/ctype_base.h \
os/bsd/freebsd/ctype_inline.h \
os/bsd/freebsd/ctype_noninline.h \
@ -177,7 +530,7 @@ TARGETHDRSNAME_c_locale.h= c++locale.h
TARGETHDRSNAME_new_allocator_base.h= c++allocator.h
TARGETHDRSDIR= ${CXXINCLUDEDIR}/bits
MARCHHDRS= atomic_word.h
MARCHHDRS= atomic_word.h cpu_defines.h cxxabi_tweaks.h
.for h in ${MARCHHDRS}
.if exists(${SRCDIR}/config/cpu/${MARCHDIR}/${h})
TARGETHDRS+= ${SRCDIR}/config/cpu/${MARCHDIR}/${h}
@ -186,12 +539,13 @@ TARGETHDRS+= ${SRCDIR}/config/cpu/generic/${h}
.endif
.endfor
THRHDRS= gthr.h gthr-single.h gthr-posix.h gthr-default.h
THRHDRS= gthr.h gthr-single.h gthr-posix.h gthr-tpf.h gthr-default.h
THRHDRSDIR= ${CXXINCLUDEDIR}/bits
uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
gthr.h: ${GCCDIR}/gthr.h
sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \
sed -e '/^#pragma/b' \
-e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \
-e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
< ${.ALLSRC} > ${.TARGET}
@ -208,6 +562,13 @@ gthr-posix.h: ${GCCDIR}/gthr-posix.h
-e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \
< ${.ALLSRC} > ${.TARGET}
gthr-tpf.h: ${GCCDIR}/gthr-posix.h
sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
-e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
-e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
-e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \
< ${.ALLSRC} > ${.TARGET}
gthr-default.h: ${GCCDIR}/gthr-posix.h
sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
-e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
@ -218,8 +579,19 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h
CLEANFILES+= ${THRHDRS}
unwind.h: ${GCCDIR}/unwind-generic.h
ln -sf ${.ALLSRC} ${.TARGET}
SRCS+= unwind.h
CLEANFILES+= unwind.h
DATESTAMP!= cat ${GCCDIR}/DATESTAMP
c++config.h: ${.CURDIR}/config.h ${SRCDIR}/include/bits/c++config
cat ${SRCDIR}/include/bits/c++config > ${.TARGET} && \
sed -e "s/\\(define __GLIBCXX__\\)/\1 ${DATESTAMP}/" \
-e 's/\(define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY\)/\1 1/' \
-e 's/\(define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION\)/\1 0/' \
< ${SRCDIR}/include/bits/c++config > ${.TARGET} && \
sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
-e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
-e 's/VERSION/_GLIBCXX_VERSION/g' \
@ -228,4 +600,13 @@ c++config.h: ${.CURDIR}/config.h ${SRCDIR}/include/bits/c++config
echo "#endif // _CXXCONFIG_" >> ${.TARGET}
CLEANFILES+= c++config.h
# Symbol versioning.
VERSION_MAP= libstdc++.map
${VERSION_MAP}: ${SRCDIR}/config/abi/pre/gnu.ver
ln -sf ${.ALLSRC} ${.TARGET}
CLEANFILES+= ${VERSION_MAP}
.include <bsd.lib.mk>

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,15 @@
# $FreeBSD$
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
SRCDIR= ${.CURDIR}/../../../contrib/libstdc++/libsupc++
.PATH: ${SRCDIR} ${GCCDIR}
.PATH: ${SRCDIR} ${GCCLIB}/libiberty
# Static only.
LIB= supc++
SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc \
eh_aux_runtime.cc eh_catch.cc eh_exception.cc eh_globals.cc \
SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \
eh_aux_runtime.cc eh_call.cc eh_catch.cc eh_exception.cc eh_globals.cc \
eh_personality.cc eh_term_handler.cc eh_terminate.cc eh_throw.cc \
eh_type.cc eh_unex_handler.cc guard.cc new_handler.cc new_op.cc \
new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc tinfo2.cc \
@ -18,12 +19,19 @@ SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc \
SRCS+= cp-demangle.c
CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
CFLAGS+= -I${SRCDIR} -I${GCCDIR} -I${.CURDIR}/../libstdc++
CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} -I${GCCDIR}
CFLAGS+= -I${.CURDIR}/../libstdc++ -I.
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections
HDRS= exception new typeinfo cxxabi.h exception_defines.h
INCS= ${HDRS:S;^;${SRCDIR}/;}
INCSDIR=${INCLUDEDIR}/c++/3.4
INCSDIR=${INCLUDEDIR}/c++/4.2
unwind.h: ${GCCDIR}/unwind-generic.h
ln -sf ${.ALLSRC} ${.TARGET}
SRCS+= unwind.h
CLEANFILES+= unwind.h
.include <bsd.lib.mk>

View File

@ -5,7 +5,7 @@
# The order of some of these are rather important. Some depend on previous
# subdirs.
SUBDIR= cc_tools cc_int cc cc1 include protoize doc
SUBDIR= cc_tools libiberty libcpp libdecnumber cc_int cc cc1 include doc
.if ${MK_CPP} != "no"
SUBDIR+= cpp
@ -13,19 +13,12 @@ SUBDIR+= cpp
.if ${MK_CXX} != "no"
SUBDIR+= cc1plus c++ c++filt
#.if ${MK_COLLECT2} != "no"
#SUBDIR+= collect2
#.endif
.endif
.if ${MK_OBJC} != "no"
SUBDIR+= cc1obj
.endif
.if ${MK_FORTRAN} != "no"
SUBDIR+= f77 f771 f77doc
.endif
.if ${MK_GCOV} != "no"
SUBDIR+= gcov
.endif

View File

@ -2,14 +2,26 @@
# Front-end-only bits
GCC_VERSION!= sed -n /version_string/p ${GCCDIR}/version.c | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'
.include "Makefile.ver"
#
# These were previously defined in gcc.c. Just copy previous values from
# there. We ifdef most of them out for FREEBSD_NATIVE builds anyway.
# gcc.c won't compile without them though.
DRIVER_DEFINES = \
-DDEFAULT_TARGET_VERSION=\"$(GCC_VERSION)\" \
-DDEFAULT_TARGET_MACHINE=\"$(GCC_TARGET)\" \
DRIVER_DEFINES = -DGCC_DRIVER \
-DDEFAULT_TARGET_VERSION=\"$(BASEVER)\" \
-DDEFAULT_TARGET_MACHINE=\"$(GCC_TARGET)\" \
-DENABLE_SHARED_LIBGCC
CFLAGS+= ${DRIVER_DEFINES}
.PATH: ../cc_tools ${GCCDIR} ${GCCDIR}/doc ${GCCDIR}/config/${GCC_CPU}
SRCS= gcc.c opts-common.c options.c intl.c prefix.c version.c
.if exists(${GCCDIR}/config/${GCC_CPU}/driver-${GCC_CPU}.c)
SRCS+= driver-${GCC_CPU}.c
.endif
DPADD= ${LIBCPP} ${LIBIBERTY}
LDADD= ${LIBCPP} ${LIBIBERTY}

View File

@ -7,15 +7,12 @@
__CC_MAKEFILE_INC__= ${MFILE}
GCCDIR= ${.CURDIR}/../../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../../contrib/gcclibs
.include "Makefile.tgt"
# Machine description.
.if ${TARGET_ARCH} == "arm"
MD_FILE= ../cc_tools/arm-diked.md
.else
MD_FILE= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md
.endif
GCC_TARGET= ${TARGET_ARCH}-undermydesk-freebsd
CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H
@ -44,10 +41,32 @@ CFLAGS+= -I${.CURDIR}/../cc_tools
# correctly.
CFLAGS+= -I${GCCDIR} -I${GCCDIR}/config
CFLAGS+= -I${GCCLIB}/include
CFLAGS+= -I${GCCLIB}/libcpp/include
CFLAGS+= -I${GCCLIB}/libdecnumber
.if exists(${.OBJDIR}/../cc_int)
LIBCC_INT= ${.OBJDIR}/../cc_int/libcc_int.a
LIBBACKEND= ${.OBJDIR}/../cc_int/libbackend.a
.else
LIBCC_INT= ${.CURDIR}/../cc_int/libcc_int.a
LIBBACKEND= ${.CURDIR}/../cc_int/libbackend.a
.endif
.if exists(${.OBJDIR}/../libiberty)
LIBIBERTY= ${.OBJDIR}/../libiberty/libiberty.a
.else
LIBIBERTY= ${.CURDIR}/../libiberty/libiberty.a
.endif
.if exists(${.OBJDIR}/../libcpp)
LIBCPP= ${.OBJDIR}/../libcpp/libcpp.a
.else
LIBCPP= ${.CURDIR}/../libcpp/libcpp.a
.endif
.if exists(${.OBJDIR}/../libdecnumber)
LIBDECNUMBER= ${.OBJDIR}/../libdecnumber/libdecnumber.a
.else
LIBDECNUMBER= ${.CURDIR}/../libdecnumber/libdecnumber.a
.endif
.endif # !__CC_MAKEFILE_INC__

View File

@ -2,14 +2,8 @@
TARGET_ARCH?= ${MACHINE_ARCH}
.if ${TARGET_ARCH} == "alpha"
GCC_CPU= alpha
.elif ${TARGET_ARCH} == "arm"
.if ${TARGET_ARCH} == "arm"
GCC_CPU= arm
# TARGET_CPU_DEFAULT= TARGET_CPU_xscale
.if defined(TARGET_BIG_ENDIAN)
CFLAGS+= -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END
.endif
.elif ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64"
GCC_CPU= i386
.elif ${TARGET_ARCH} == "ia64"

View File

@ -0,0 +1,10 @@
# $FreeBSD$
BASEVER!= cat ${GCCDIR}/BASE-VER
DATESTAMP!= cat ${GCCDIR}/DATESTAMP
DEVPHASE!= cat ${GCCDIR}/DEV-PHASE
version.o: version.c
${CC} ${CFLAGS} -DBASEVER=\"${BASEVER}\" \
-DDATESTAMP=\"\ ${DATESTAMP}\" \
-DDEVPHASE=\"\ ${DEVPHASE}\" -c ${.IMPSRC}

View File

@ -3,15 +3,15 @@
.include "../Makefile.inc"
.include "../Makefile.fe"
.PATH: ${GCCDIR}/cp ${GCCDIR}
.PATH: ${GCCDIR}/cp
PROG= c++
SRCS= gcc.c g++spec.c
SRCS+= g++spec.c
LINKS= ${BINDIR}/c++ ${BINDIR}/g++
LINKS+= ${BINDIR}/c++ ${BINDIR}/CC
NO_MAN=
DPADD= ${LIBCC_INT}
LDADD= ${LIBCC_INT}
DPADD= ${LIBCPP} ${LIBIBERTY}
LDADD= ${LIBCPP} ${LIBIBERTY}
.include <bsd.prog.mk>

View File

@ -3,7 +3,7 @@
.include "../Makefile.inc"
.include "../Makefile.fe"
.PATH: ${GCCDIR}
.PATH: ${GCCLIB}/libiberty
PROG= c++filt
SRCS= cp-demangle.c
@ -11,7 +11,7 @@ NO_MAN=
CFLAGS+= -DSTANDALONE_DEMANGLER -DVERSION=\"$(GCC_VERSION)\"
DPADD= ${LIBCC_INT}
LDADD= ${LIBCC_INT}
DPADD= ${LIBIBERTY}
LDADD= ${LIBIBERTY}
.include <bsd.prog.mk>

View File

@ -3,17 +3,13 @@
.include "../Makefile.inc"
.include "../Makefile.fe"
.PATH: ${GCCDIR} ${GCCDIR}/doc
PROG= cc
MAN= gcc.1
SRCS= gcc.c gccspec.c
SRCS+= gccspec.c
NO_SHARED?=yes
LINKS= ${BINDIR}/cc ${BINDIR}/gcc
MLINKS= gcc.1 cc.1 gcc.1 c++.1 gcc.1 g++.1 gcc.1 CC.1
DPADD= ${LIBCC_INT}
LDADD= ${LIBCC_INT}
.include <bsd.prog.mk>

View File

@ -3,31 +3,24 @@
.include "../Makefile.inc"
.PATH: ${GCCDIR}
PROG= cc1
SRCS= main.c c-parse+%DIKED.c c-lang.c stub-objc.c
SRCS= main.c c-parser.c c-lang.c
BINDIR= /usr/libexec
NO_MAN=
NO_SHARED?=yes
CFLAGS+= -I.
OBJS+= ${PROG}-checksum.o
DPADD= ${LIBBACKEND} ${LIBCPP} ${LIBDECNUMBER} ${LIBIBERTY}
LDADD= ${LIBBACKEND} ${LIBCPP} ${LIBDECNUMBER} ${LIBIBERTY}
DPADD= ${LIBCC_INT}
LDADD= ${LIBCC_INT}
DOBJS+= ${SRCS:N*.h:R:S/$/.o/g}
${PROG}-dummy: ${DOBJS}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${DOBJS} ${LDADD}
CLEANFILES+= ${PROG}-dummy
#-----------------------------------------------------------------------
# C parser
c-parse+%DIKED.c: c-parse.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
${.ALLSRC} > ${.TARGET}
c-parse.y: c-parse.in
sed -e "/^@@ifobjc.*/,/^@@end_ifobjc.*/d" \
-e "/^@@ifc.*/d" -e "/^@@end_ifc.*/d" \
${.ALLSRC} > ${.TARGET}
CLEANFILES= c-parse+%DIKED.c c-parse.c c-parse.y
CLEANFILES+= y.tab.h # we don't use it, but the system YACC rules are naive
${PROG}-checksum.c: ${PROG}-dummy
../cc_tools/genchecksum ${PROG}-dummy > ${.TARGET}
CLEANFILES+= ${PROG}-checksum.c
.include <bsd.prog.mk>

View File

@ -5,31 +5,24 @@
.PATH: ${GCCDIR}/objc ${GCCDIR}
PROG= cc1obj
SRCS= main.c objc-parse+DIKED.c objc-act.c objc-lang.c c-decl.c
SRCS= main.c c-parser.c objc-act.c objc-lang.c c-decl.c
BINDIR= /usr/libexec
NO_MAN=
NO_SHARED?=yes
CFLAGS+= -I${GCCDIR}/objc -I.
DPADD= ${LIBCC_INT}
LDADD= ${LIBCC_INT}
OBJS+= ${PROG}-checksum.o
DPADD= ${LIBBACKEND} ${LIBCPP} ${LIBDECNUMBER} ${LIBIBERTY}
LDADD= ${LIBBACKEND} ${LIBCPP} ${LIBDECNUMBER} ${LIBIBERTY}
#-----------------------------------------------------------------------
# objc parser
objc-parse+DIKED.c: objc-parse.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
${.ALLSRC} > ${.TARGET}
DOBJS+= ${SRCS:N*.h:R:S/$/.o/g}
${PROG}-dummy: ${DOBJS}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${DOBJS} ${LDADD}
CLEANFILES+= ${PROG}-dummy
objc-parse.y: c-parse.in
sed -e "/^@@ifc.*/,/^@@end_ifc.*/d" \
-e "/^@@ifobjc.*/d" -e "/^@@end_ifobjc.*/d" \
${.ALLSRC} > ${.TARGET}
CLEANFILES= objc-parse+DIKED.c objc-parse.c objc-parse.y
CLEANFILES+= y.tab.h # we don't use it, but the system YACC rules are naive
#-----------------------------------------------------------------------
${PROG}-checksum.c: ${PROG}-dummy
../cc_tools/genchecksum ${PROG}-dummy > ${.TARGET}
CLEANFILES+= ${PROG}-checksum.c
.include <bsd.prog.mk>

View File

@ -9,7 +9,8 @@ SRCS= cfns.h
SRCS+= main.c cp-lang.c c-opts.c call.c class.c cvt.c cxx-pretty-print.c \
decl.c decl2.c error.c except.c expr.c dump.c friend.c init.c lex.c \
mangle.c method.c name-lookup.c parser.c pt.c ptree.c repo.c rtti.c \
search.c semantics.c tree.c typeck.c typeck2.c optimize.c
search.c semantics.c tree.c typeck.c typeck2.c optimize.c \
cp-objcp-common.c cp-gimplify.c tree-mudflap.c
BINDIR= /usr/libexec
NO_MAN=
@ -17,15 +18,24 @@ NO_SHARED?=yes
CFLAGS+= -I${GCCDIR}/cp -I.
DPADD= ${LIBCC_INT}
LDADD= ${LIBCC_INT}
OBJS+= ${PROG}-checksum.o
DPADD= ${LIBBACKEND} ${LIBCPP} ${LIBDECNUMBER} ${LIBIBERTY}
LDADD= ${LIBBACKEND} ${LIBCPP} ${LIBDECNUMBER} ${LIBIBERTY}
#-----------------------------------------------------------------------
# C++ parser
cfns.h: cfns.gperf
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
${.ALLSRC} > ${.TARGET}
CLEANFILES= cfns.h
DOBJS+= ${SRCS:N*.h:R:S/$/.o/g}
${PROG}-dummy: ${DOBJS}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${DOBJS} ${LDADD}
CLEANFILES+= ${PROG}-dummy
${PROG}-checksum.c: ${PROG}-dummy
../cc_tools/genchecksum ${PROG}-dummy > ${.TARGET}
CLEANFILES+= ${PROG}-checksum.c
.include <bsd.prog.mk>

View File

@ -1,93 +1,101 @@
# $FreeBSD$
.include "../Makefile.inc"
.include "../Makefile.ver"
.PATH: ../cc_tools ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}
.PATH: ../cc_tools ${GCCDIR} ${GCCDIR}/config/${GCC_CPU}
LIB= cc_int
LIB= backend
INTERNALLIB=
# Files from libiberty.
SRCS= choose-temp.c concat.c cp-demangle.c cp-demint.c cplus-dem.c \
dyn-string.c fibheap.c getpwd.c getruntime.c hashtab.c hex.c \
lbasename.c make-temp-file.c md5.c obstack.c partition.c pex-unix.c \
physmem.c splay-tree.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c
EXTRA_OBJS=
GGC= ggc-page.o
host_hook_obj= host-default.o
# Language-independent files.
SRCS+= alias.c bb-reorder.c bitmap.c builtins.c caller-save.c calls.c \
cfg.c cfganal.c cfgbuild.c cfgcleanup.c cfglayout.c cfgloop.c \
cfgloopanal.c cfgloopmanip.c loop-init.c loop-unswitch.c loop-unroll.c \
cfgrtl.c combine.c conflict.c convert.c coverage.c cse.c cselib.c \
dbxout.c debug.c df.c diagnostic.c dojump.c doloop.c dominance.c \
dwarf2asm.c dwarf2out.c emit-rtl.c except.c explow.c \
expmed.c expr.c final.c flow.c fold-const.c function.c gcse.c \
genrtl.c ggc-common.c global.c graph.c gtype-desc.c \
haifa-sched.c hooks.c ifcvt.c \
integrate.c intl.c jump.c langhooks.c lcm.c lists.c local-alloc.c \
loop.c optabs.c options.c opts.c params.c postreload.c predict.c \
print-rtl.c print-tree.c value-prof.c \
profile.c ra.c ra-build.c ra-colorize.c ra-debug.c ra-rewrite.c \
real.c recog.c reg-stack.c regclass.c regmove.c regrename.c \
reload.c reload1.c reorg.c resource.c rtl.c rtlanal.c rtl-error.c \
sbitmap.c sched-deps.c sched-ebb.c sched-rgn.c sched-vis.c sdbout.c \
sibcall.c simplify-rtx.c sreal.c stmt.c stor-layout.c stringpool.c \
targhooks.c timevar.c toplev.c tracer.c tree.c tree-dump.c unroll.c \
varasm.c varray.c version.c vmsdbgout.c xcoffout.c alloc-pool.c \
et-forest.c cfghooks.c bt-load.c pretty-print.c ggc-page.c web.c
#
# Most lists copied verbatim from GCC Makefiles.
#
OBJS-common = \
double-int.o tree-chrec.o tree-scalar-evolution.o tree-data-ref.o \
tree-cfg.o tree-dfa.o tree-eh.o tree-ssa.o tree-optimize.o tree-gimple.o \
gimplify.o tree-pretty-print.o tree-into-ssa.o \
tree-outof-ssa.o tree-ssa-ccp.o tree-vn.o tree-ssa-uncprop.o \
tree-ssa-dce.o tree-ssa-copy.o tree-nrv.o tree-ssa-copyrename.o \
tree-ssa-pre.o tree-ssa-live.o tree-ssa-operands.o tree-ssa-alias.o \
tree-ssa-phiopt.o tree-ssa-forwprop.o tree-nested.o tree-ssa-dse.o \
tree-ssa-dom.o domwalk.o tree-tailcall.o gimple-low.o tree-iterator.o \
omp-low.o tree-phinodes.o tree-ssanames.o tree-sra.o tree-complex.o \
tree-vect-generic.o tree-ssa-loop.o tree-ssa-loop-niter.o \
tree-ssa-loop-manip.o tree-ssa-threadupdate.o tree-ssa-threadedge.o \
tree-vectorizer.o tree-vect-analyze.o tree-vect-transform.o \
tree-vect-patterns.o tree-ssa-loop-prefetch.o \
tree-ssa-loop-ivcanon.o tree-ssa-propagate.o tree-ssa-address.o \
tree-ssa-math-opts.o \
tree-ssa-loop-ivopts.o tree-if-conv.o tree-ssa-loop-unswitch.o \
alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \
cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o \
cfgloopanal.o cfgloopmanip.o loop-init.o loop-unswitch.o loop-unroll.o \
cfgrtl.o combine.o conflict.o convert.o coverage.o cse.o cselib.o \
dbxout.o ddg.o tree-ssa-loop-ch.o loop-invariant.o tree-ssa-loop-im.o \
debug.o df-core.o df-problems.o df-scan.o dfp.o diagnostic.o dojump.o \
dominance.o loop-doloop.o \
dwarf2asm.o dwarf2out.o emit-rtl.o except.o explow.o loop-iv.o \
expmed.o expr.o final.o flow.o fold-const.o function.o gcse.o \
genrtl.o ggc-common.o global.o graph.o gtype-desc.o \
haifa-sched.o hooks.o ifcvt.o insn-attrtab.o insn-emit.o insn-modes.o \
insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o \
integrate.o intl.o jump.o langhooks.o lcm.o lists.o local-alloc.o \
mode-switching.o modulo-sched.o optabs.o options.o opts.o opts-common.o \
params.o postreload.o postreload-gcse.o predict.o \
insn-preds.o insn-automata.o pointer-set.o \
print-rtl.o print-tree.o profile.o value-prof.o var-tracking.o \
real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \
reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \
sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \
see.o simplify-rtx.o sreal.o stmt.o stor-layout.o stringpool.o \
struct-equiv.o targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o \
varasm.o varray.o vec.o version.o vmsdbgout.o xcoffout.o alloc-pool.o \
et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o passes.o \
tree-profile.o rtlhooks.o cfgexpand.o lambda-mat.o \
lambda-trans.o lambda-code.o tree-loop-linear.o tree-ssa-sink.o \
tree-vrp.o tree-stdarg.o tree-cfgcleanup.o tree-ssa-reassoc.o \
tree-ssa-structalias.o tree-object-size.o \
rtl-factoring.o
# Miscellaneous files.
SRCS+= hashtable.c tree-inline.c tree-optimize.c cgraph.c cgraphunit.c
OBJS-archive= $(EXTRA_OBJS) $(host_hook_obj) tree-inline.o \
cgraph.o cgraphunit.o tree-nomudflap.o ipa.o ipa-inline.o \
ipa-utils.o ipa-reference.o ipa-pure-const.o ipa-type-escape.o \
ipa-prop.o ipa-cp.o
# Host hooks.
SRCS+= host-default.c
# C and ObjC files.
SRCS+= attribs.c c-errors.c c-lex.c c-pragma.c c-decl.c c-typeck.c \
c-convert.c c-aux-info.c c-common.c c-opts.c c-format.c c-semantics.c \
c-incpath.c cppdefault.c c-ppoutput.c c-cppbuiltin.c prefix.c \
c-objc-common.c c-dump.c c-pch.c
# Files shared by cc1plus, cc1 and cc1obj
SRCS+= c-pretty-print.c
# Machine-dependent files.
SRCS+= ${GCC_CPU}.c
OBJS-md= ${GCC_CPU}.o
.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-c.c)
SRCS+= ${GCC_CPU}-c.c
OBJS-md+= ${GCC_CPU}-c.o
.endif
# libcpp files.
SRCS+= cpplib.c cpplex.c cppmacro.c cppexp.c cppfiles.c cpptrad.c \
cpphash.c cpperror.c cppinit.c cppcharset.c \
line-map.c mkdeps.c cpppch.c
# Target specific, C specific object file
C_TARGET_OBJS=
# insn-* gunk -- headers are built in cc_tools, as they are used by the
# "build-tools"
.for F in attrtab emit extract opinit output peep recog
SRCS+= insn-$F.c
CLEANFILES+= insn-$F.c
insn-$F.c: ${.OBJDIR}/../cc_tools/gen$F ${MD_FILE}
${.OBJDIR}/../cc_tools/gen$F ${MD_FILE} > insn-$F.c \
${.MAKEFLAGS:M-s:S;-s;2>/dev/null;}
.endfor
.for F in modes
SRCS+= insn-$F.c
CLEANFILES+= insn-$F.c
insn-$F.c: ${.OBJDIR}/../cc_tools/gen$F
${.OBJDIR}/../cc_tools/gen$F > insn-$F.c
.endfor
# Language-specific object files for C and Objective C.
C_AND_OBJC_OBJS = 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-opts.o c-format.o c-semantics.o \
c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o \
c-objc-common.o c-dump.o c-pch.o c-parser.o $(C_TARGET_OBJS) \
c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o
CFLAGS+= -DHAVE_CONFIG_H
CFLAGS+= -DTARGET_NAME=\"${GCC_TARGET}\"
# Language-specific object files for C.
C_OBJS = c-lang.o stub-objc.o $(C_AND_OBJC_OBJS)
.if ${TARGET_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN)
CFLAGS += -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END
.endif
# Put objC stub objects in library. objc frontend will override it
# Put dummy checksum object in library too. It will be overridden
# by each indidual front-end binary as needed.
OBJS-dummy= stub-objc.o dummy-checksum.o
# c-pch.o needs extra defines. Replicate the rule here rather than
# pollute compiler command line for all other files.
c-pch.o: c-pch.c
${CC} ${CFLAGS} -DHOST_MACHINE=\"${host}\" \
-DTARGET_MACHINE=\"${GCC_TARGET}\" -c ${.IMPSRC}
OBJS-all= ${OBJS-common} ${OBJS-archive} ${OBJS-md} ${C_AND_OBJC_OBJS} \
${OBJS-dummy}
SRCS+= ${OBJS-all:R:S/$/.c/g}
toplev.o: toplev.c
${CC} ${CFLAGS} -DTARGET_NAME=\"${GCC_TARGET}\" -c ${.IMPSRC}
.include <bsd.lib.mk>

View File

@ -2,209 +2,18 @@
.include <bsd.own.mk>
#
# This could probably be merged with ../cc_int/Makefile, but bsd.lib.mk
# is such a !@#!*#% nightmare because of how it reprograms the dependencies,
# suffix rules, SRCS, etc. It's easiest to cheat by using bsd.prog.mk and
# SRCS to get dependencies.
#
#
# ../Makefile.inc will put an absolute path to our objdir in CFLAGS.
# Prevent mkdep from using it, so that we don't have to give rules for
# aliases of generated headers.
#
CFLAGS+= -I.
.include "../Makefile.inc"
.PATH: ${GCCDIR} ${GCCDIR}/f
CFLAGS+= -g
CFLAGS+= -DGENERATOR_FILE -DHAVE_CONFIG_H
CFLAGS+= -DGENERATOR_FILE
# Override LIBIBERTY set by Makefile.inc, We use our own for
# build tools.
LIBIBERTY= libiberty.a
#
#-----------------------------------------------------------------------
# Build 'pocket' libiberty exclusively for build tools use.
LIBIBERTY_SRCS= choose-temp.c concat.c cp-demangle.c cp-demint.c cplus-dem.c \
dyn-string.c fibheap.c getpwd.c getruntime.c hashtab.c hex.c \
lbasename.c make-temp-file.c md5.c obstack.c partition.c pex-unix.c \
physmem.c splay-tree.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c
LIBIBERTY_OBJS= ${LIBIBERTY_SRCS:R:S/$/.o/g}
SRCS+= ${LIBIBERTY_SRCS}
LIBIBERTY=libiberty.a
${LIBIBERTY}: ${LIBIBERTY_OBJS}
@rm -f ${.TARGET}
@${AR} cq ${.TARGET} `lorder ${LIBIBERTY_OBJS} | tsort -q`
${RANLIB} ${.TARGET}
CLEANFILES+= ${LIBIBERTY}
#
#-----------------------------------------------------------------------
# options
OPTION_FILES=${GCCDIR}/f/lang.opt ${GCCDIR}/c.opt ${GCCDIR}/common.opt
.ORDER: options.h options.c
options.h options.c: opts.sh ${OPTION_FILES}
/bin/sh ${GCCDIR}/opts.sh mv options.c options.h ${OPTION_FILES}
GENSRCS+= options.c options.h
CLEANFILES+= options.c options.h
#-----------------------------------------------------------------------
# insn-* gunk
.for F in attr codes config flags constants
insn-$F.h: gen$F ${MD_FILE}
./gen$F ${MD_FILE} > insn-$F.h
GENSRCS+= insn-$F.h
.endfor
.for F in conditions
insn-$F.c: gen$F ${MD_FILE}
./gen$F ${MD_FILE} > insn-$F.c
GENSRCS+= insn-$F.c
.endfor
GENSRCS+= gen-time-stamp
gen-time-stamp: genattr genattrtab genconditions genconstants genemit \
genextract gengtype genopinit genoutput genpeep genrecog
touch ${.TARGET}
.for F in attr codes config emit extract flags opinit output peep recog
gen$F: gen$F.o rtl.o print-rtl.o bitmap.o gensupport.o ggc-none.o \
read-rtl.o insn-conditions.o min-insn-modes.o errors.o ${LIBIBERTY}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
GENSRCS+= gen$F.c
CLEANFILES+= gen$F
.endfor
#
# genattrtab needs more complex build rule
#
genattrtab : genattrtab.o rtl.o print-rtl.o bitmap.o gensupport.o ggc-none.o \
read-rtl.o insn-conditions.o genautomata.o varray.o min-insn-modes.o \
errors.o ${LIBIBERTY}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm
GENSRCS+= genattrtab.c
CLEANFILES+= genattrtab
#
# genconstants and genconditions cannot depend on insn-conditions.o
# they should be liked with dummy-conditions.o stubs instead
#
.for F in constants conditions
gen$F: gen$F.o rtl.o bitmap.o gensupport.o ggc-none.o read-rtl.o dummy-conditions.o min-insn-modes.o errors.o ${LIBIBERTY}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
GENSRCS+= gen$F.c
CLEANFILES+= gen$F
.endfor
.for F in modes check genrtl preds
gen$F: gen$F.o errors.o ${LIBIBERTY}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
GENSRCS+= gen$F.c
CLEANFILES+= gen$F
.endfor
.ORDER: genrtl.c genrtl.h
genrtl.c genrtl.h: gengenrtl
./gengenrtl > genrtl.c
./gengenrtl -h > genrtl.h
GENSRCS+= genrtl.c genrtl.h
SRCS+= bitmap.c dummy-conditions.c errors.c genautomata.c gensupport.c \
ggc-none.c print-rtl.c read-rtl.c rtl.c varray.c
#-----------------------------------------------------------------------
# insn modes stuff.
.ORDER: insn-modes.c insn-modes.h
insn-modes.h: genmodes
./genmodes -h > insn-modes.h
insn-modes.c: genmodes
./genmodes > insn-modes.c
min-insn-modes.c: genmodes
./genmodes -m > min-insn-modes.c
GENSRCS+= insn-modes.c min-insn-modes.c insn-modes.h
#-----------------------------------------------------------------------
# Common parser stuff.
tree-check.h: gencheck
./gencheck > ${.TARGET}
GENSRCS+= tree-check.h
#-----------------------------------------------------------------------
# Predicates stuff.
tm-preds.h: genpreds
./genpreds > ${.TARGET}
GENSRCS+= tm-preds.h
#-----------------------------------------------------------------------
# Gengtype
gengtype-lex.c : gengtype-lex.l
${LEX} -t ${.ALLSRC} | \
sed 's/^\(char msg\[\];\)/yyconst \1/' > ${.TARGET}
.ORDER: gengtype-yacc.c gengtype-yacc.h
gengtype-yacc.c gengtype-yacc.h: gengtype-yacc.y
${YACC} -d -o gengtype-yacc.c ${.ALLSRC}
GENSRCS+= gengtype-yacc+%DIKED.c gengtype-yacc.h gengtype-lex.c
CLEANFILES+= gengtype-yacc.c
gengtype-yacc+%DIKED.c: gengtype-yacc.c
cat ${.ALLSRC} > ${.TARGET}
sed -e "s/xmalloc/malloc/g" \
-e "s/xrealloc/realloc/g" \
-e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
${.ALLSRC} > ${.TARGET}
gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o ${LIBIBERTY}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
GENSRCS+= gengtype.c
CLEANFILES+= gengtype
gengtype-lex.o: gengtype-yacc.h
.ORDER: gtype-desc.c gtype-desc.h
gtype-desc.c gtype-desc.h: gtype-time-stamp
@true
GENSRCS+= gtype-time-stamp
gtype-time-stamp: gengtype ${GTFILES}
./gengtype
touch ${.TARGET}
GENSRCS+= gtype-desc.c gtype-desc.h
CLEANFILES+= gt-*.h gtype-*.h
#
#-----------------------------------------------------------------------
# Fortran build tools
.if ${MK_FORTRAN} != "no"
gen-time-stamp: fini
fini: fini.o ${LIBIBERTY}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
SRCS+= fini.c
CLEANFILES+= fini
.endif
.PATH: ${GCCDIR} ${GCCLIB}/libiberty
#-----------------------------------------------------------------------
# Determine content of variables used by the target/host config files
@ -212,8 +21,9 @@ CLEANFILES+= fini
#
# The list of headers to go into tm.h
#
TARGET_INC+= options.h
.if ${TARGET_ARCH} == "amd64"
TARGET_INC= i386/biarch64.h
TARGET_INC+= i386/biarch64.h
.endif
.if ${TARGET_ARCH} != "arm"
TARGET_INC+= ${GCC_CPU}/${GCC_CPU}.h
@ -222,92 +32,90 @@ TARGET_INC+= ${GCC_CPU}/${GCC_CPU}.h
TARGET_INC+= ${GCC_CPU}/unix.h
TARGET_INC+= ${GCC_CPU}/att.h
.endif
.if ${TARGET_ARCH} != "alpha"
TARGET_INC+= dbxelf.h
TARGET_INC+= elfos.h
.endif
TARGET_INC+= freebsd-native.h
TARGET_INC+= freebsd-spec.h
TARGET_INC+= freebsd.h
.if ${TARGET_ARCH} == "alpha"
TARGET_INC+= ${GCC_CPU}/elf.h
.endif
.if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64"
.if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h)
TARGET_INC+= ${GCC_CPU}/sysv4.h
.endif
.endif
.if ${TARGET_ARCH} == "arm"
.if ${TARGET_ARCH} == "amd64"
TARGET_INC+= ${GCC_CPU}/x86-64.h
TARGET_INC+= ${GCC_CPU}/freebsd.h
TARGET_INC+= ${GCC_CPU}/freebsd64.h
TARGET_INC+= freebsd64-fix.h
.elif ${TARGET_ARCH} == "arm"
TARGET_INC+= ${GCC_CPU}/elf.h
TARGET_INC+= ${GCC_CPU}/aout.h
TARGET_INC+= ${GCC_CPU}/${GCC_CPU}.h
. if defined(TARGET_BIG_ENDIAN)
CFLAGS+= -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END
. endif
.endif
.if ${TARGET_ARCH} == "arm"
TARGET_INC+= freebsd-diked.h
TARGET_INC+= ${GCC_CPU}/freebsd.h
TARGET_INC+= ${GCC_CPU}/arm.h
.else
TARGET_INC+= ${GCC_CPU}/freebsd.h
.endif
.if ${TARGET_ARCH} == "amd64"
TARGET_INC+= ${GCC_CPU}/x86-64.h
TARGET_INC+= ${GCC_CPU}/freebsd64.h
TARGET_INC+= freebsd64-fix.h
.endif
.if ${TARGET_ARCH} == "powepc"
TARGET_INC+= altivec-defs.h
.endif
TARGET_INC+= defaults.h
#
# Use TARGET_INC as a template and build a list of target specific
# include files for gengtype to scan
#
GCONFIG_H= ${.CURDIR}/auto-host.h
.for H in ${TARGET_INC}
.for D in ${GCCDIR}/config ${GCCDIR} ${.CURDIR}
.if exists($D/$H)
GCONFIG_H+= $D/$H
TARGET_INC_FILES+= $D/$H
.endif
.endfor
.endfor
#
# Define some variables to make blocks copied from Makefile.in happy
# gtyp includes.
#
srcdir= ${GCCDIR}
HASHTAB_H= ${GCCDIR}/hashtab.h
SPLAY_TREE_H= ${GCCDIR}/splay-tree.h
out_file= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.c
GTFILES_SRCDIR= ${GCCDIR}
CPPLIB_H= ${GCCLIB}/libcpp/include/line-map.h \
${GCCLIB}/libcpp/include/cpplib.h
SYMTAB_H= ${GCCLIB}/libcpp/include/symtab.h
CPP_ID_DATA_H= ${CPPLIB_H} ${GCCLIB}/libcpp/include/cpp-id-data.h
HASHTAB_H= ${GCCLIB}/include/hashtab.h
SPLAY_TREE_H= ${GCCLIB}/include/splay-tree.h
out_file= ${srcdir}/config/${GCC_CPU}/${GCC_CPU}.c
tm_file_list= ${TARGET_INC_FILES}
host_xm_file_list= ${.CURDIR}/auto-host.h ${GCCLIB}/include/ansidecl.h
GTFILES_SRCDIR= ${srcdir}
#
# Copied unchanged from gcc/Makefile.in
#
GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
$(GCONFIG_H) $(HASHTAB_H) $(SPLAY_TREE_H) \
$(srcdir)/bitmap.h $(srcdir)/coverage.c $(srcdir)/function.h $(srcdir)/rtl.h \
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h \
$(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h \
GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
$(CPP_ID_DATA_H) $(host_xm_file_list) \
$(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
$(srcdir)/coverage.c $(srcdir)/rtl.h \
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/function.h $(srcdir)/libfuncs.h $(SYMTAB_H) \
$(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
$(srcdir)/ipa-reference.h $(srcdir)/output.h \
$(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \
$(srcdir)/c-common.h $(srcdir)/c-tree.h \
$(srcdir)/c-common.h $(srcdir)/c-tree.h $(srcdir)/reload.h \
$(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
$(srcdir)/ipa-prop.c $(srcdir)/ipa-cp.c $(srcdir)/ipa-inline.c \
$(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
$(srcdir)/dojump.c \
$(srcdir)/dojump.c $(srcdir)/tree-profile.c \
$(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
$(srcdir)/fold-const.c $(srcdir)/function.c \
$(srcdir)/function.c $(srcdir)/except.h \
$(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
$(srcdir)/profile.c $(srcdir)/ra-build.c $(srcdir)/regclass.c \
$(srcdir)/reg-stack.c $(srcdir)/cfglayout.c $(srcdir)/langhooks.c \
$(srcdir)/sdbout.c $(srcdir)/stmt.c $(srcdir)/stor-layout.c \
$(srcdir)/profile.c $(srcdir)/regclass.c \
$(srcdir)/reg-stack.c $(srcdir)/cfglayout.c \
$(srcdir)/sdbout.c $(srcdir)/stor-layout.c \
$(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
$(out_file)
$(srcdir)/tree-mudflap.c $(srcdir)/tree-flow.h \
$(srcdir)/c-objc-common.c $(srcdir)/c-common.c $(srcdir)/c-parser.c \
$(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
$(srcdir)/tree-phinodes.c $(srcdir)/tree-cfg.c \
$(srcdir)/tree-dfa.c $(srcdir)/tree-ssa-propagate.c \
$(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \
$(srcdir)/tree-chrec.h $(srcdir)/tree-vect-generic.c \
$(srcdir)/tree-ssa-operands.h $(srcdir)/tree-ssa-operands.c \
$(srcdir)/tree-profile.c $(srcdir)/tree-nested.c \
$(srcdir)/ipa-reference.c $(srcdir)/tree-ssa-structalias.h \
$(srcdir)/tree-ssa-structalias.c \
$(srcdir)/c-pragma.h $(srcdir)/omp-low.c \
$(srcdir)/targhooks.c $(srcdir)/cgraphunit.c $(out_file) \
#
# Build a list of frontend directories to look into
#
# The list of frontend directories to look into
GTFILES_LANG_DIR_NAMES=
.if ${MK_CXX} != "no"
@ -318,13 +126,7 @@ GTFILES_LANG_DIR_NAMES+= cp
GTFILES_LANG_DIR_NAMES+= objc
.endif
.if ${MK_FORTRAN} != "no"
GTFILES_LANG_DIR_NAMES+= f
.endif
#
# Build a list of language specific files for gengtype
#
# The list of language specific files for gengtype
.for L in ${GTFILES_LANG_DIR_NAMES} c
.if exists(${GCCDIR}/$L-config-lang.in)
# Source the language config file
@ -339,16 +141,173 @@ GTFILES_LANGS+= $L
.endfor
GTFILES+= ${GTFILES_FILES}
#
# Tree definition files.
#
TREE_DEF_FILES=
.if ${MK_CXX} != "no"
TREE_DEF_FILES+= cp/cp-tree.def
.endif
.if ${MK_OBJC} != "no"
TREE_DEF_FILES+= objc/objc-tree.def
.endif
#
# Option files.
#
OPT_FILES= c.opt common.opt
.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt)
OPT_FILES+= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt
.endif
.if exists(${.CURDIR}/${GCC_CPU}-freebsd.opt)
OPT_FILES+= ${.CURDIR}/${GCC_CPU}-freebsd.opt
.endif
.if ${TARGET_ARCH} == "powerpc"
OPT_FILES+= ${GCCDIR}/config/${GCC_CPU}/sysv4.opt
.endif
.if ${TARGET_ARCH} == "sparc64"
OPT_FILES+= ${GCCDIR}/config/${GCC_CPU}/long-double-switch.opt
.endif
.if exists(${.CURDIR}/freebsd.opt)
OPT_FILES+= ${.CURDIR}/freebsd.opt
.endif
#-----------------------------------------------------------------------
# the host/target compiler config.
# Build rules for header files and generator tools
COMMONHDRS= bconfig.h config.h configargs.h gencheck.h multilib.h \
specs.h safe-ctype.h tconfig.h tm.h tm_p.h gcov-iov.h \
gtyp-gen.h
GENSRCS+= ${COMMONHDRS}
# Host config
config.h:
TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
HEADERS="auto-host.h ansidecl.h" \
DEFINES="" \
/bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
MFILE?= ${.CURDIR}/Makefile
${COMMONHDRS}: ${MFILE}
GENSRCS+= config.h
CLEANFILES+= cs-config.h
# Build config
bconfig.h:
TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
HEADERS="auto-host.h ansidecl.h" \
DEFINES="" \
/bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def)
echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET}
.endif
GENSRCS+= bconfig.h
CLEANFILES+= cs-bconfig.h
# tconfig.h
tconfig.h:
TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
HEADERS="auto-host.h ansidecl.h" \
DEFINES="USED_FOR_TARGET" \
/bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
GENSRCS+= tconfig.h
CLEANFILES+= cs-tconfig.h
# Options
optionlist: ${OPT_FILES}
awk -f ${GCCDIR}/opt-gather.awk ${.ALLSRC} > ${.TARGET}
options.h: optionlist
awk -f ${GCCDIR}/opt-functions.awk \
-f ${GCCDIR}/opth-gen.awk \
< ${.ALLSRC} > ${.TARGET}
options.c: optionlist
awk -f ${GCCDIR}/opt-functions.awk \
-f ${GCCDIR}/optc-gen.awk \
-v header_name="config.h system.h coretypes.h tm.h" \
< ${.ALLSRC} > ${.TARGET}
GENONLY+= optionlist options.h options.c
# Target machine config
tm.h:
TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
HEADERS="${TARGET_INC}" \
DEFINES="" \
/bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def)
echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET}
.endif
GENSRCS+= tm.h
CLEANFILES+= cs-tm.h
# Target machine protos/preds.
tm_p.h:
TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
HEADERS="${GCC_CPU}/${GCC_CPU}-protos.h tm-preds.h" \
DEFINES="" \
/bin/sh ${GCCDIR}/mkconfig.sh tm_p.h
GENSRCS+= tm_p.h
CLEANFILES+= cs-tm_p.h
# gencheck
gencheck.h:
.for F in ${TREE_DEF_FILES}
echo "#include \"$F\"" >> ${.TARGET}
.endfor
GENSRCS+= gencheck.h
# Source header for gtyp generator.
gtyp-gen.h: ${GTFILES}
echo "/* This file is machine generated. Do not edit. */" > ${.TARGET}
echo "static const char * const srcdir = " >> ${.TARGET}
echo "\"$(GTFILES_SRCDIR)\";" >> ${.TARGET}
echo "static const char * const lang_files[] = {" >> ${.TARGET}
.for F in ${GTFILES_FILES}
echo "\"$F\", " >> ${.TARGET}
.endfor
echo "NULL};" >> ${.TARGET}
echo "static const char * const langs_for_lang_files[] = {">> ${.TARGET}
.for F in ${GTFILES_LANGS}
echo "\"$F\", " >> ${.TARGET}
.endfor
echo "NULL};" >> ${.TARGET}
echo "static const char * const all_files[] = {" >> ${.TARGET}
.for F in ${GTFILES}
echo "\"$F\", " >> ${.TARGET}
.endfor
echo "NULL};" >> ${.TARGET}
echo "static const char * const lang_dir_names[] = {" >> ${.TARGET}
.for F in c ${GTFILES_LANG_DIR_NAMES}
echo "\"$F\", " >> ${.TARGET}
.endfor
echo "NULL};" >> ${.TARGET}
GENSRCS+= gtyp-gen.h
# Version header for gcov
gcov-iov.h:
echo "#define GCOV_VERSION ((gcov_unsigned_t)0x34303270)" >> ${.TARGET}
GENSRCS+= gcov-iov.h
# Multilib config file
multilib.h:
echo 'static const char *const multilib_raw[] = { \
". ;", NULL };' > ${.TARGET}
echo 'static const char *const multilib_matches_raw[] = { \
NULL };' >> ${.TARGET}
echo 'static const char *multilib_extra = "";' >> ${.TARGET}
echo 'static const char *multilib_options = "";' >> ${.TARGET}
echo 'static const char *const multilib_exclusions_raw[] = { \
NULL };' >> ${.TARGET}
GENSRCS+= multilib.h
configargs.h:
echo 'static const char configuration_arguments[] =' > ${.TARGET}
@ -359,147 +318,194 @@ configargs.h:
echo '} configure_default_options[] = {' >> ${.TARGET}
echo ' { "NULL", "NULL" } };' >> ${.TARGET}
tconfig.h:
echo '#ifndef GCC_TCONFIG_H' > ${.TARGET}
echo '#define GCC_TCONFIG_H' >> ${.TARGET}
echo '#ifdef IN_GCC' >> ${.TARGET}
echo '# include "ansidecl.h"' >> ${.TARGET}
echo '#endif' >> ${.TARGET}
echo '#define USED_FOR_TARGET' >> ${.TARGET}
echo '#endif /* GCC_TCONFIG_H */' >> ${.TARGET}
bconfig.h:
echo '#ifndef GCC_BCONFIG_H' > ${.TARGET}
echo '#define GCC_BCONFIG_H' >> ${.TARGET}
echo '#include "auto-host.h"' >> ${.TARGET}
.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def)
echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET}
.endif
echo '#ifdef IN_GCC' >> ${.TARGET}
echo '# include "ansidecl.h"' >> ${.TARGET}
echo '#endif' >> ${.TARGET}
echo '#endif /* GCC_BCONFIG_H */' >> ${.TARGET}
gencheck.h:
echo '#include "cp/cp-tree.def"' > ${.TARGET}
echo '#include "objc/objc-tree.def"' >> ${.TARGET}
multilib.h:
echo 'static const char *const multilib_raw[] = { \
"aout maout;", "elf !maout;", NULL };' > ${.TARGET}
echo 'static const char *const multilib_matches_raw[] = { \
"maout maout;", "melf melf;", NULL };' >> ${.TARGET}
echo 'static const char *multilib_extra = "";' >> ${.TARGET}
echo 'static const char *multilib_options = "";'>> ${.TARGET}
echo 'static const char *const multilib_exclusions_raw[] = { \
NULL };' >> ${.TARGET}
GENSRCS+= configargs.h
# Language spec files
specs.h:
echo '#include "cp/lang-specs.h"' > ${.TARGET}
echo '#include "f/lang-specs.h"' >> ${.TARGET}
echo '#include "objc/lang-specs.h"' >> ${.TARGET}
echo '#include "cp/lang-specs.h"' > ${.TARGET}
echo '#include "objc/lang-specs.h"' >> ${.TARGET}
config.h: bconfig.h
echo '#include <bconfig.h>' > ${.TARGET}
GENSRCS+= specs.h
tm.h:
echo '#ifndef GCC_TM_H' > ${.TARGET}
echo '#define GCC_TM_H' >> ${.TARGET}
.if defined(TARGET_CPU_DEFAULT)
echo "#define TARGET_CPU_DEFAULT (${TARGET_CPU_DEFAULT})" >> ${.TARGET}
.endif
echo '#ifdef IN_GCC' >> ${.TARGET}
.for H in ${TARGET_INC}
echo '#include "$H"' >> ${.TARGET}
gstdint.h:
echo '#include "sys/types.h"' > ${.TARGET}
echo '#include "sys/stdint.h"' >> ${.TARGET}
GENSRCS+= gstdint.h
# Linked headers
gthr-default.h: ${GCCDIR}/gthr-posix.h
ln -sf ${.ALLSRC} ${.TARGET}
GENSRCS+= gthr-default.h
unwind.h: ${GCCDIR}/unwind-generic.h
ln -sf ${.ALLSRC} ${.TARGET}
GENSRCS+= unwind.h
#
# gtype gunk
#
gengtype-lex.c: gengtype-lex.l
flex -ogengtype-lex.c ${.ALLSRC}
gengtype-yacc.h: gengtype-yacc.y
yacc -d -o gengtype-yacc.c ${.ALLSRC}
gengtype-yacc.c: gengtype-yacc.h
gengtype-yacc+%DIKED.c: gengtype-yacc.c
cat ${.ALLSRC} > ${.TARGET}
sed -e "s/xmalloc/malloc/g" \
-e "s/xrealloc/realloc/g" \
-e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
${.ALLSRC} > ${.TARGET}
GENSRCS+= gengtype-lex.c gengtype-yacc.h gengtype-yacc+%DIKED.c
CLEANFILES+= gengtype-yacc.c
gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o errors.o \
${LIBIBERTY}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
gtype-desc.h: gengtype
./gengtype
touch ${.TARGET}
gtype-desc.c: gtype-desc.h
GENONLY+= gtype-desc.c gtype-desc.h
CLEANFILES+= gt-*.h gtype-*.h
#
# Generator tools.
#
.for F in check checksum genrtl modes
gen$F: gen$F.o errors.o ${LIBIBERTY}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
.endfor
echo '#if !defined GENERATOR_FILE && !defined USED_FOR_TARGET' >> ${.TARGET}
echo '# include "insn-constants.h"' >> ${.TARGET}
echo '# include "insn-flags.h"' >> ${.TARGET}
echo '#endif' >> ${.TARGET}
echo '#endif' >> ${.TARGET}
.if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def)
echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET}
.endif
echo '#endif /* GCC_TM_H */' >> ${.TARGET}
tm_p.h:
echo '#include "${GCC_CPU}/${GCC_CPU}-protos.h"' >> ${.TARGET}
echo '#include "tm-preds.h"' >> ${.TARGET}
safe-ctype.h:
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}
.for F in attr attrtab automata codes conditions config constants emit \
extract flags opinit output peep preds recog
gen$F: gen$F.o rtl.o read-rtl.o ggc-none.o vec.o min-insn-modes.o \
gensupport.o print-rtl.o errors.o ${LIBIBERTY}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm
.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}
gtyp-gen.h:
echo "/* This file is machine generated. Do not edit. */" > ${.TARGET}
echo "static const char *srcdir = " >> ${.TARGET}
echo "\"$(GTFILES_SRCDIR)\";" >> ${.TARGET}
echo "static const char *lang_files[] = {" >> ${.TARGET}
.for F in ${GTFILES_FILES}
echo "\"$F\", " >> ${.TARGET}
gencondmd: gencondmd.o
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
#
# Generated .md files.
#
insn-conditions.md: gencondmd
./gencondmd > ${.TARGET}
GENSRCS+= insn-conditions.md
#
# Generated header files.
#
.for F in constants
insn-$F.h: gen$F ${MD_FILE}
./gen$F ${MD_FILE} > ${.TARGET}
GENSRCS+= insn-$F.h
.endfor
echo "NULL};" >> ${.TARGET}
echo "static const char *langs_for_lang_files[] = {" >> ${.TARGET}
.for F in ${GTFILES_LANGS}
echo "\"$F\", " >> ${.TARGET}
.for F in attr codes config flags
insn-$F.h: gen$F ${MD_FILE} insn-conditions.md
./gen$F ${MD_FILE} insn-conditions.md > ${.TARGET}
GENSRCS+= insn-$F.h
.endfor
echo "NULL};" >> ${.TARGET}
echo "static const char *all_files[] = {" >> ${.TARGET}
.for F in ${GTFILES}
echo "\"$F\", " >> ${.TARGET}
# Header files with irregular names.
genrtl.h: gengenrtl
./gengenrtl -h > ${.TARGET}
GENSRCS+= genrtl.h
tm-preds.h: genpreds
./genpreds -h ${MD_FILE} > ${.TARGET}
GENSRCS+= tm-preds.h
tm-constrs.h: genpreds
./genpreds -c ${MD_FILE} > ${.TARGET}
GENSRCS+= tm-constrs.h
tree-check.h: gencheck
./gencheck > ${.TARGET}
GENSRCS+= tree-check.h
insn-modes.h: genmodes
./genmodes -h > ${.TARGET}
GENSRCS+= insn-modes.h
#
# Generated source files.
#
.for F in attrtab automata emit extract opinit output peep preds recog
insn-$F.c: gen$F ${MD_FILE} insn-conditions.md
./gen$F ${MD_FILE} insn-conditions.md > ${.TARGET}
GENONLY+= insn-$F.c
.endfor
echo "NULL};" >> ${.TARGET}
echo "static const char *lang_dir_names[] = { \"c\", " >> ${.TARGET}
.for F in ${GTFILES_LANG_DIR_NAMES}
echo "\"$F\", " >> ${.TARGET}
.for F in conditions
insn-$F.c: gen$F ${MD_FILE}
./gen$F ${MD_FILE} > ${.TARGET}
GENSRCS+= insn-$F.c
.endfor
echo "NULL};" >> ${.TARGET}
gcov-iov.h:
echo "#define GCOV_VERSION ((gcov_unsigned_t)0x33303470)" >> ${.TARGET}
# Source files with irregular names.
insn-modes.c: genmodes
./genmodes > ${.TARGET}
GENONLY+= insn-modes.c
.if ${TARGET_ARCH} == "arm"
freebsd-diked.h: ${GCCDIR}/../../gnu/usr.bin/cc/cc_tools/arm-freebsd.h.diff
cp ${GCCDIR}/config/arm/freebsd.h freebsd.h
patch freebsd.h ${.ALLSRC}
mv freebsd.h ${.TARGET}
COMMONHDRS+= freebsd-diked.h
CLEANFILES+= freebsd.h.orig
min-insn-modes.c: genmodes
./genmodes -m > ${.TARGET}
GENSRCS+= min-insn-modes.c
# Make sure freebsd-diked.h is built when tm.h is built for csu's sake
tm.h: freebsd-diked.h
genrtl.c: gengenrtl
./gengenrtl > ${.TARGET}
GENONLY+= genrtl.c
gencondmd.c: genconditions ${MD_FILE}
./genconditions ${MD_FILE} > ${.TARGET}
GENSRCS+= gencondmd.c
${MD_FILE}: ${MFILE}
cp ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md .
ln -sf ${GCCDIR}/config/${GCC_CPU}/fpa.md .
ln -sf ${GCCDIR}/config/${GCC_CPU}/cirrus.md .
ln -sf ${GCCDIR}/config/${GCC_CPU}/iwmmxt.md .
patch ${GCC_CPU}.md ${.CURDIR}/arm.md.diff
mv ${GCC_CPU}.md ${.TARGET}
CLEANFILES+= arm-diked.md ${GCC_CPU}.md.orig fpa.md cirrus.md iwmmxt.md
.endif
#-----------------------------------------------------------------------
# General things.
# Build tools.
SRCS+= ${GENSRCS}
CLEANFILES+= ${GENSRCS}
GNTOOLS+= genattr genattrtab genautomata gencodes gencheck genchecksum \
genconditions gencondmd genconfig genconstants genemit \
genextract genflags gengenrtl gengtype genmodes genopinit \
genoutput genpeep genpreds genrecog
all: ${SRCS}
all: ${GNTOOLS} ${GENSRCS} ${GENONLY}
beforedepend: ${GENONLY}
#
#-----------------------------------------------------------------------
# Build 'pocket' libiberty exclusively for build tools use.
LIBIBERTY_SRCS= choose-temp.c concat.c cp-demangle.c cp-demint.c cplus-dem.c \
dyn-string.c fibheap.c fopen_unlocked.c getpwd.c getruntime.c \
hashtab.c hex.c lbasename.c make-temp-file.c md5.c obstack.c \
partition.c pex-unix.c physmem.c safe-ctype.c splay-tree.c xexit.c \
xmalloc.c xmemdup.c xstrdup.c xstrerror.c
LIBIBERTY_OBJS= ${LIBIBERTY_SRCS:R:S/$/.o/g}
.for _src in ${LIBIBERTY_SRCS}
${_src:R:S/$/.o/}: ${_src}
${CC} -c -I ${.CURDIR}/../libiberty ${CFLAGS} -o ${.TARGET} ${.IMPSRC}
.endfor
${LIBIBERTY}: ${LIBIBERTY_OBJS}
@rm -f ${.TARGET}
@${AR} cq ${.TARGET} `lorder ${LIBIBERTY_OBJS} | tsort -q`
${RANLIB} ${.TARGET}
CLEANFILES+= ${LIBIBERTY} ${LIBIBERTY_OBJS}
.include <bsd.prog.mk>
#-----------------------------------------------------------------------
# Fixups.
@ -507,47 +513,24 @@ all: ${SRCS}
# Set OBJS the same as bsd.prog.mk would do if we defined PROG. We can't
# define PROG because we have multiple programs.
#
SRCS= errors.c genattr.c genattrtab.c \
genautomata.c gencheck.c genchecksum.c gencodes.c \
genconditions.c genconfig.c genconstants.c genemit.c \
genextract.c genflags.c gengenrtl.c gengtype.c genmodes.c \
genopinit.c genoutput.c genpeep.c genpreds.c genrecog.c \
gensupport.c ggc-none.c print-rtl.c read-rtl.c rtl.c \
vec.c
SRCS+= ${GENSRCS}
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
CLEANFILES+= ${OBJS}
GENOBJS+= ${GENSRCS:N*.h:R:S/$/.o/g}
CLEANFILES+= ${GENSRCS} ${GENONLY} ${GENOBJS} ${GNTOOLS}
#-----------------------------------------------------------------------
# Manual dependencies.
.if !exists(${DEPENDFILE})
# Fudge pre-dependfile dependencies of objects in much the same way as
# bsd.prog.mk would do if we defined PROG.
${OBJS}: ${COMMONHDRS}
dummy-conditions.o:
gencheck.o:
genmodes.o:
genpreds.o: insn-modes.h
genconstants.o: insn-modes.h genrtl.h
gengtype.o: insn-modes.h genrtl.h gtyp-gen.h
rtl.o: insn-modes.h gtype-desc.h genrtl.h
bitmap.o: insn-modes.h gtype-desc.h genrtl.h
ggc-none.o: gtype-desc.h
gensupport.o: insn-modes.h genrtl.h
varray.o: gtype-desc.h
genautomata.o: insn-modes.h genrtl.h
genconditions.o: insn-modes.h genrtl.h
gencodes.o: insn-modes.h genrtl.h
genconfig.o: insn-modes.h genrtl.h
print-rtl.o: insn-modes.h genrtl.h tm-preds.h tree-check.h
read-rtl.o: insn-modes.h genrtl.h
genattr.o: insn-modes.h genrtl.h
genemit.o: insn-modes.h genrtl.h
genflags.o: insn-modes.h genrtl.h
genopinit.o: insn-modes.h genrtl.h
genoutput.o: insn-modes.h genrtl.h
genpeep.o: insn-modes.h genrtl.h
genrecog.o: insn-modes.h genrtl.h
genextract.o: genrtl.h insn-config.h
genattrtab.o: insn-modes.h gtype-desc.h genrtl.h
genrtl.o: insn-modes.h genrtl.h gtype-desc.h
insn-conditions.o: insn-constants.h tm-preds.h
insn-modes.o: insn-modes.h
min-insn-modes.o: insn-modes.h
gtype-desc.o: insn-modes.h insn-config.h insn-codes.h tree-check.h
.include "Makefile.dep"
.endif
.include <bsd.prog.mk>
# DO NOT DELETE

View File

@ -0,0 +1,153 @@
# $FreeBSD$
errors.o: bconfig.h auto-host.h
genattr.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
genattrtab.o: bconfig.h \
auto-host.h \
tm.h options.h \
insn-modes.h \
gtype-desc.h
genautomata.o: bconfig.h \
auto-host.h \
tm.h options.h \
insn-modes.h
gencheck.o: bconfig.h auto-host.h \
tm.h options.h \
gencheck.h
genchecksum.o: bconfig.h \
auto-host.h
gencodes.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
genconditions.o: bconfig.h \
auto-host.h \
tm.h options.h \
insn-modes.h
genconfig.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
genconstants.o: bconfig.h \
auto-host.h \
tm.h options.h \
insn-modes.h
genemit.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
genextract.o: bconfig.h \
auto-host.h \
tm.h options.h \
insn-modes.h \
insn-config.h
genflags.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
gengenrtl.o: bconfig.h auto-host.h
gengtype.o: bconfig.h auto-host.h \
tm.h options.h \
gtyp-gen.h
genmddeps.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
genmodes.o: bconfig.h auto-host.h
genopinit.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
genoutput.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
genpeep.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
genpreds.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
genrecog.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
gensupport.o: bconfig.h \
auto-host.h \
tm.h options.h \
insn-modes.h
ggc-none.o: bconfig.h auto-host.h \
gtype-desc.h
print-rtl.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
read-rtl.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h
rtl.o: bconfig.h auto-host.h \
tm.h options.h \
insn-modes.h \
gtype-desc.h
insn-modes.o: insn-modes.c config.h auto-host.h \
tm.h options.h \
insn-modes.h
min-insn-modes.o: min-insn-modes.c bconfig.h auto-host.h \
insn-modes.h
gengtype-lex.o: gengtype-lex.c \
bconfig.h auto-host.h \
gengtype-yacc.h
gengtype-yacc+%DIKED.o: gengtype-yacc+%DIKED.c \
bconfig.h \
auto-host.h \
tm.h options.h \
insn-conditions.o: insn-conditions.c bconfig.h auto-host.h \
insn-constants.h \
tm.h options.h \
insn-modes.h \
tm_p.h \
tm-preds.h \
options.h
gencondmd.o: gencondmd.c \
tm.h options.h tm_p.h \
tm-preds.h tm-constrs.h tree-check.h \
insn-constants.h
gencondmd.o: gencondmd.c bconfig.h auto-host.h \
tm.h options.h \
insn-constants.h \
insn-modes.h \
tm_p.h \
tm-preds.h \
tree-check.h \
tm-constrs.h
vec.o: vec.c bconfig.h auto-host.h \
insn-modes.h \
tree-check.h \
gtype-desc.h

View File

@ -1,111 +0,0 @@
$FreeBSD$
Index: freebsd.h
===================================================================
RCS file: /cognet/ncvs/src/contrib/gcc/config/arm/freebsd.h,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 freebsd.h
--- freebsd.h 28 Jul 2004 03:11:35 -0000 1.1.1.3
+++ freebsd.h 21 Jul 2006 00:50:25 -0000
@@ -22,7 +22,10 @@
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
- { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }
+ { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }, \
+ { "subtarget_extra_asm_spec", SUBTARGET_EXTRA_ASM_SPEC }, \
+ { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC }
+
#undef SUBTARGET_CPP_SPEC
#define SUBTARGET_CPP_SPEC FBSD_CPP_SPEC
@@ -39,7 +42,8 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \
%{static:-Bstatic}} \
- %{symbolic:-Bsymbolic}"
+ %{symbolic:-Bsymbolic} \
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}"
/************************[ Target stuff ]***********************************/
@@ -67,3 +71,80 @@
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (FreeBSD/StrongARM ELF)");
+
+#ifndef TARGET_ENDIAN_DEFAULT
+#define TARGET_ENDIAN_DEFAULT 0
+#endif
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT \
+ (ARM_FLAG_APCS_32 \
+ | ARM_FLAG_SOFT_FLOAT \
+ | ARM_FLAG_APCS_FRAME \
+ | ARM_FLAG_ATPCS \
+ | ARM_FLAG_VFP \
+ | ARM_FLAG_MMU_TRAPS \
+ | TARGET_ENDIAN_DEFAULT)
+
+#undef TYPE_OPERAND_FMT
+#define TYPE_OPERAND_FMT "%%%s"
+
+#undef SUBTARGET_EXTRA_ASM_SPEC
+#define SUBTARGET_EXTRA_ASM_SPEC \
+ "-matpcs %{fpic|fpie:-k} %{fPIC|fPIE:-k}"
+
+ /* Default floating point model is soft-VFP.
+ * FIXME: -mhard-float currently implies FPA. */
+#undef SUBTARGET_ASM_FLOAT_SPEC
+#define SUBTARGET_ASM_FLOAT_SPEC \
+ "%{mhard-float:-mfpu=fpa} \
+ %{msoft-float:-mfpu=softvfp} \
+ %{!mhard-float: \
+ %{!msoft-float:-mfpu=softvfp}}"
+
+
+/* FreeBSD does its profiling differently to the Acorn compiler. We
+ don't need a word following the mcount call; and to skip it
+ requires either an assembly stub or use of fomit-frame-pointer when
+ compiling the profiling functions. Since we break Acorn CC
+ compatibility below a little more won't hurt. */
+
+#undef ARM_FUNCTION_PROFILER
+#define ARM_FUNCTION_PROFILER(STREAM,LABELNO) \
+{ \
+ asm_fprintf (STREAM, "\tmov\t%Rip, %Rlr\n"); \
+ asm_fprintf (STREAM, "\tbl\t_mcount%s\n", \
+ NEED_PLT_RELOC ? "(PLT)" : ""); \
+}
+
+/* Emit code to set up a trampoline and synchronize the caches. */
+#undef INITIALIZE_TRAMPOLINE
+#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
+do \
+ { \
+ emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 8)), \
+ (CXT)); \
+ emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 12)), \
+ (FNADDR)); \
+ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
+ 0, VOIDmode, 2, TRAMP, Pmode, \
+ plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode); \
+ } \
+while (0)
+
+/* Clear the instruction cache from `BEG' to `END'. This makes a
+ call to the ARM_SYNC_ICACHE architecture specific syscall. */
+#define CLEAR_INSN_CACHE(BEG, END) \
+do \
+ { \
+ extern int sysarch(int number, void *args); \
+ struct \
+ { \
+ unsigned int addr; \
+ int len; \
+ } s; \
+ s.addr = (unsigned int)(BEG); \
+ s.len = (END) - (BEG); \
+ (void) sysarch (0, &s); \
+ } \
+while (0)

File diff suppressed because it is too large Load Diff

View File

@ -8,15 +8,15 @@
/* Fake out gcc/config/freebsd<version>.h. */
#define FBSD_MAJOR 7
#define FBSD_CC_VER 700002 /* form like __FreeBSD_version */
#define FBSD_CC_VER 700003 /* form like __FreeBSD_version */
#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. */
/* Look for the include files in the system-defined places. */
#define GPLUSPLUS_INCLUDE_DIR PREFIX"/include/c++/3.4"
#define GPLUSPLUS_BACKWARD_INCLUDE_DIR PREFIX"/include/c++/3.4/backward"
#define GPLUSPLUS_INCLUDE_DIR PREFIX"/include/c++/4.2"
#define GPLUSPLUS_BACKWARD_INCLUDE_DIR PREFIX"/include/c++/4.2/backward"
#define GCC_INCLUDE_DIR PREFIX"/include"
#ifdef CROSS_COMPILE
#define CROSS_INCLUDE_DIR PREFIX"/include"
@ -28,9 +28,9 @@
/usr/libexec directory.
``cc --print-search-dirs'' gives:
install: STANDARD_EXEC_PREFIX/(null)
programs: /usr/libexec/<OBJFORMAT>/:STANDARD_EXEC_PREFIX:MD_EXEC_PREFIX
libraries: MD_EXEC_PREFIX:MD_STARTFILE_PREFIX:STANDARD_STARTFILE_PREFIX
install: STANDARD_EXEC_PREFIX/
programs: STANDARD_EXEC_PREFIX:MD_EXEC_PREFIX
libraries: STANDARD_STARTFILE_PREFIX
*/
#undef STANDARD_BINDIR_PREFIX /* We don't need one for now. */
#define STANDARD_EXEC_PREFIX PREFIX"/libexec/"
@ -46,20 +46,19 @@
#define STANDARD_STARTFILE_PREFIX PREFIX"/lib/"
#define STARTFILE_PREFIX_SPEC PREFIX"/lib/"
/* For the native system compiler, we actually build libgcc in a profiled
version. So we should use it with -pg. */
#if 0
#define LIBGCC_SPEC "%{shared: -lgcc_pic} \
%{!shared: %{!pg: -lgcc} %{pg: -lgcc_p}}"
#endif
#define LIBSTDCXX_PROFILE "-lstdc++_p"
#define MATH_LIBRARY_PROFILE "-lm_p"
#define FORTRAN_LIBRARY_PROFILE "-lg2c_p"
#define LIBGCC_SPEC "-lgcc"
/* For the native system compiler, we actually build libgcc in a profiled
version. So we should use it with -pg. */
#define LIBGCC_STATIC_LIB_SPEC "%{pg: -lgcc_p;:-lgcc}"
#define LIBGCC_EH_STATIC_LIB_SPEC "%{pg: -lgcc_eh_p;:-lgcc_eh}"
/* FreeBSD is 4.4BSD derived */
#define bsd4_4
/* 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

@ -0,0 +1,6 @@
; $FreeBSD$
fformat-extensions
Common Report Var(flag_format_extensions) Init(0)
Allow FreeBSD kernel-specific printf format specifiers.

View File

@ -0,0 +1,13 @@
; $FreeBSD$
mno-align-long-strings
Target RejectNegative Report Mask(NO_ALIGN_LONG_STRINGS)
Do not align long strings specially
malign-long-strings
Target RejectNegative Report InverseMask(NO_ALIGN_LONG_STRINGS, ALIGN_LONG_STRINGS) Undocumented
mprofiler-epilogue
Target Report Mask(PROFILER_EPILOGUE)
Function profiler epilogue

View File

@ -0,0 +1,47 @@
/* $FreeBSD$ */
#ifdef SIZEOF_INT
# undef SIZEOF_INT
#endif
#ifdef SIZEOF_SHORT
# undef SIZEOF_SHORT
#endif
#ifdef SIZEOF_LONG
# undef SIZEOF_LONG
#endif
#ifdef SIZEOF_VOID_P
# undef SIZEOF_VOID_P
#endif
#ifdef SIZEOF_LONG_LONG
# undef SIZEOF_LONG_LONG
#endif
#ifdef HOST_WIDE_INT
# undef HOST_WIDE_INT
#endif
#define SIZEOF_INT 4
#define SIZEOF_SHORT 2
#define SIZEOF_LONG_LONG 8
#if __LP64__
#define SIZEOF_LONG 8
#define SIZEOF_VOID_P 8
#define HOST_WIDE_INT long
#else
#define SIZEOF_LONG 4
#define SIZEOF_VOID_P 4
#define HOST_WIDE_INT long long
#endif
#ifdef WORDS_BIGENDIAN
#undef WORDS_BIGENDIAN
#endif
#if defined(__sparc64__) || defined(__ARMEB__)
#define WORDS_BIGENDIAN 1
#endif

View File

@ -1,14 +1,10 @@
# $FreeBSD$
.include "../Makefile.inc"
.include "../Makefile.fe"
.PATH: ${GCCDIR} ${GCCDIR}/doc
PROG= cpp
SRCS= gcc.c cppspec.c
DPADD= ${LIBCC_INT}
LDADD= ${LIBCC_INT}
SRCS+= cppspec.c
.include <bsd.prog.mk>

View File

@ -1,8 +1,9 @@
# $FreeBSD$
.include "../Makefile.inc"
.include "../Makefile.ver"
.PATH: ${GCCDIR}/doc
.PATH: ${GCCDIR}/doc ${GCCDIR}/doc/include
INFO= gcc cpp gccint cppinternals
@ -12,21 +13,38 @@ 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 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 compat.texi \
include/funding.texi gnu.texi include/gpl.texi include/fdl.texi \
contrib.texi cppenv.texi cppopts.texi
gcc.info: gcc.texi gcc-common.texi gcc-vers.texi frontends.texi \
standards.texi invoke.texi extend.texi md.texi objc.texi \
gcov.texi trouble.texi bugreport.texi service.texi \
contribute.texi compat.texi funding.texi gnu.texi gpl.texi \
fdl.texi contrib.texi cppenv.texi cppopts.texi \
implement-c.texi
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 gty.texi libgcc.texi
gccint.info: gccint.texi gcc-common.texi gcc-vers.texi \
contribute.texi makefile.texi configterms.texi options.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 funding.texi \
gnu.texi gpl.texi fdl.texi contrib.texi languages.texi \
sourcebuild.texi gty.texi libgcc.texi cfg.texi tree-ssa.texi \
loop.texi
cpp.info: cpp.texi include/fdl.texi cppenv.texi cppopts.texi
cpp.info: cpp.texi fdl.texi cppenv.texi cppopts.texi gcc-common.texi \
gcc-vers.texi
cppinternals.info: cppinternals.texi gcc-common.texi gcc-vers.texi
MAKEINFOFLAGS+= -I ${GCCDIR}/doc -I ${GCCDIR}/doc/include
gcc-vers.texi:
(echo "@set version-GCC $(BASEVER)"; \
if [ "$(DEVPHASE)" = "experimental" ]; then \
echo "@set DEVELOPMENT"; \
else \
echo "@clear DEVELOPMENT"; \
fi; \
echo "@set srcdir $(GCCLIB)/libiberty" ) > ${.TARGET}
CLEANFILES+= gcc-vers.texi
.include <bsd.info.mk>

View File

@ -1,13 +1,15 @@
# $FreeBSD$
.include "../Makefile.inc"
.include "../Makefile.ver"
.PATH: ${GCCDIR} ${GCCDIR}/doc
PROG= gcov
SRCS= gcov.c version.c
SRCS= gcov.c version.c errors.c
MAN= gcov.1
DPADD= ${LIBCC_INT}
LDADD= ${LIBCC_INT}
DPADD= ${LIBIBERTY}
LDADD= ${LIBIBERTY}
.include <bsd.prog.mk>

View File

@ -5,7 +5,7 @@
.PATH: ${GCCDIR}/config/${GCC_CPU}
.if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64"
INCS= emmintrin.h mmintrin.h pmmintrin.h xmmintrin.h
INCS= emmintrin.h mmintrin.h pmmintrin.h xmmintrin.h mm_malloc.h
.elif ${TARGET_ARCH} == "ia64"
INCS= ia64intrin.h
.elif ${TARGET_ARCH} == "arm"
@ -14,7 +14,10 @@ INCS= mmintrin.h
INCS= ppc-asm.h altivec.h spe.h
.endif
NO_OBJ=
mm_malloc.h: pmm_malloc.h
@rm -rf ${.TARGET}
@cp ${.ALLSRC} ${.TARGET}
CLEANFILES+= mm_malloc.h
.include <bsd.init.mk>
.include <bsd.incs.mk>

View File

@ -0,0 +1,23 @@
# $FreeBSD$
# Use our headers in preference to ones from ../cc_tools.
CFLAGS+= -I${.CURDIR} -I.
.include "../Makefile.inc"
.PATH: ${GCCLIB}/libcpp
LIB= cpp
SRCS= localedir.h
SRCS+= charset.c directives.c errors.c expr.c files.c \
identifiers.c init.c lex.c line-map.c macro.c mkdeps.c \
pch.c symtab.c traditional.c
INTERNALLIB=
WARNS?= 1
localedir.h: Makefile
echo '#define LOCALEDIR "/usr/share/locale"' > localedir.h
SRCS+= localedir.h
CLEANFILES+= localedir.h
.include <bsd.lib.mk>

View File

@ -0,0 +1,292 @@
/* config.h. Generated by configure. */
/* config.in. Generated from configure.ac by autoheader. */
/* $FreeBSD$ */
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
/* #undef CRAY_STACKSEG_END */
/* Define to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */
/* Define if you want more run-time sanity checks. */
/* #undef ENABLE_CHECKING */
/* Define to 1 if translation of program messages to the user's native
language is requested. */
/* #undef ENABLE_NLS */
/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
/* #undef HAVE_ALLOCA_H */
/* Define to 1 if you have the `clearerr_unlocked' function. */
#define HAVE_CLEARERR_UNLOCKED 1
/* Define to 1 if you have the declaration of `abort', and to 0 if you don't.
*/
#define HAVE_DECL_ABORT 1
/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
don't. */
#define HAVE_DECL_ASPRINTF 1
/* Define to 1 if you have the declaration of `basename', and to 0 if you
don't. */
#define HAVE_DECL_BASENAME 0
/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_CLEARERR_UNLOCKED 1
/* Define to 1 if you have the declaration of `errno', and to 0 if you don't.
*/
#define HAVE_DECL_ERRNO 0
/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
don't. */
#define HAVE_DECL_FEOF_UNLOCKED 1
/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_FERROR_UNLOCKED 1
/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_FFLUSH_UNLOCKED 0
/* Define to 1 if you have the declaration of `fgetc_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_FGETC_UNLOCKED 0
/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_FGETS_UNLOCKED 0
/* Define to 1 if you have the declaration of `fileno_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_FILENO_UNLOCKED 1
/* Define to 1 if you have the declaration of `fprintf_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_FPRINTF_UNLOCKED 0
/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_FPUTC_UNLOCKED 0
/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_FPUTS_UNLOCKED 0
/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_FREAD_UNLOCKED 0
/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_FWRITE_UNLOCKED 0
/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_GETCHAR_UNLOCKED 1
/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
don't. */
#define HAVE_DECL_GETC_UNLOCKED 1
/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't.
*/
#define HAVE_DECL_GETOPT 1
/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_PUTCHAR_UNLOCKED 1
/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
don't. */
#define HAVE_DECL_PUTC_UNLOCKED 1
/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you
don't. */
#define HAVE_DECL_VASPRINTF 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `feof_unlocked' function. */
#define HAVE_FEOF_UNLOCKED 1
/* Define to 1 if you have the `ferror_unlocked' function. */
#define HAVE_FERROR_UNLOCKED 1
/* Define to 1 if you have the `fflush_unlocked' function. */
/* #undef HAVE_FFLUSH_UNLOCKED */
/* Define to 1 if you have the `fgetc_unlocked' function. */
/* #undef HAVE_FGETC_UNLOCKED */
/* Define to 1 if you have the `fgets_unlocked' function. */
/* #undef HAVE_FGETS_UNLOCKED */
/* Define to 1 if you have the `fileno_unlocked' function. */
#define HAVE_FILENO_UNLOCKED 1
/* Define to 1 if you have the `fprintf_unlocked' function. */
/* #undef HAVE_FPRINTF_UNLOCKED */
/* Define to 1 if you have the `fputc_unlocked' function. */
/* #undef HAVE_FPUTC_UNLOCKED */
/* Define to 1 if you have the `fputs_unlocked' function. */
/* #undef HAVE_FPUTS_UNLOCKED */
/* Define to 1 if you have the `fread_unlocked' function. */
/* #undef HAVE_FREAD_UNLOCKED */
/* Define to 1 if you have the `fwrite_unlocked' function. */
/* #undef HAVE_FWRITE_UNLOCKED */
/* Define to 1 if you have the `getchar_unlocked' function. */
#define HAVE_GETCHAR_UNLOCKED 1
/* Define to 1 if you have the `getc_unlocked' function. */
#define HAVE_GETC_UNLOCKED 1
/* Define if you have the iconv() function. */
#if XXXKAN
#define HAVE_ICONV 1
#endif
/* Define to 1 if you have the <iconv.h> header file. */
/* #undef HAVE_ICONV_H */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#define HAVE_LANGINFO_CODESET 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if libc includes obstacks. */
/* #undef HAVE_OBSTACK */
/* Define to 1 if you have the `putchar_unlocked' function. */
#define HAVE_PUTCHAR_UNLOCKED 1
/* Define to 1 if you have the `putc_unlocked' function. */
#define HAVE_PUTC_UNLOCKED 1
/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define if <sys/types.h> defines \`uchar'. */
/* #undef HAVE_UCHAR */
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to the widest efficient host integer type at least as wide as the
target's size_t type. */
#define HOST_WIDE_INT long
#if XXXKAN
/* Define as const if the declaration of iconv() needs const. */
#define ICONV_CONST const
#endif
/* Define to the name of this package. */
#define PACKAGE "cpplib"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "gcc-bugs@gcc.gnu.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "cpplib"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "cpplib "
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "cpplib"
/* Define to the version of this package. */
#define PACKAGE_VERSION " "
/* The size of a `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of a `long', as computed by sizeof. */
#define SIZEOF_LONG 4
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if you can safely include both <string.h> and <strings.h>. */
#define STRING_WITH_STRINGS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
/* #undef TM_IN_SYS_TIME */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `long' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef size_t */
typedef unsigned char uchar;
#include <size-host.h>

View File

@ -0,0 +1,17 @@
# $FreeBSD$
# Use our headers in preference to ones from ../cc_tools.
CFLAGS+= -I${.CURDIR} -I.
.include "../Makefile.inc"
.PATH: ${GCCLIB}/libdecnumber
LIB= decnumber
SRCS= decNumber.c decContext.c decUtility.c \
decimal32.c decimal64.c decimal128.c
INTERNALLIB=
WARNS?= 1
.include <bsd.lib.mk>

View File

@ -0,0 +1,80 @@
/* config.h. Generated by configure. */
/* config.in. Generated from configure.ac by autoheader. */
/* $FreeBSD$ */
/* Define to 1 if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "gcc-bugs@gcc.gnu.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "libdecnumber"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libdecnumber "
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libdecnumber"
/* Define to the version of this package. */
#define PACKAGE_VERSION " "
/* The size of a `char', as computed by sizeof. */
/* #undef SIZEOF_CHAR */
/* The size of a `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of a `long', as computed by sizeof. */
#define SIZEOF_LONG 8
/* The size of a `short', as computed by sizeof. */
/* #undef SIZEOF_SHORT */
/* The size of a `void *', as computed by sizeof. */
/* #undef SIZEOF_VOID_P */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef off_t */
#include <size-host.h>

View File

@ -0,0 +1,26 @@
# $FreeBSD$
#
# Make sure we will pick up our config.h file first, not the one from
# cc_tools.
#
CFLAGS+= -I${.CURDIR}
.include "../Makefile.inc"
.PATH: ${GCCLIB}/libiberty
LIB= iberty
SRCS= argv.c choose-temp.c concat.c cp-demangle.c cp-demint.c cplus-dem.c \
dyn-string.c fibheap.c fopen_unlocked.c getpwd.c getruntime.c \
hashtab.c hex.c lbasename.c make-temp-file.c md5.c obstack.c \
partition.c pex-unix.c physmem.c safe-ctype.c splay-tree.c xexit.c \
xmalloc.c xmemdup.c xstrdup.c xstrerror.c make-relative-prefix.c \
pexecute.c pex-common.c pex-one.c lrealpath.c strverscmp.c \
regex.c
INTERNALLIB=
WARNS?= 1
CFLAGS+= -UPREFIX
.include <bsd.lib.mk>

View File

@ -0,0 +1,448 @@
/* config.h. Generated by configure. */
/* config.in. Generated from configure.ac by autoheader. */
/* $FreeBSD$ */
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
/* #undef CRAY_STACKSEG_END */
/* Define to 1 if you have the <alloca.h> header file. */
/* #undef HAVE_ALLOCA_H */
/* Define to 1 if you have the `asprintf' function. */
#define HAVE_ASPRINTF 1
/* Define to 1 if you have the `atexit' function. */
#define HAVE_ATEXIT 1
/* Define to 1 if you have the `basename' function. */
#define HAVE_BASENAME 1
/* Define to 1 if you have the `bcmp' function. */
#define HAVE_BCMP 1
/* Define to 1 if you have the `bcopy' function. */
#define HAVE_BCOPY 1
/* Define to 1 if you have the `bsearch' function. */
#define HAVE_BSEARCH 1
/* Define to 1 if you have the `bzero' function. */
#define HAVE_BZERO 1
/* Define to 1 if you have the `calloc' function. */
#define HAVE_CALLOC 1
/* Define to 1 if you have the `canonicalize_file_name' function. */
/* #undef HAVE_CANONICALIZE_FILE_NAME */
/* Define to 1 if you have the `clock' function. */
#define HAVE_CLOCK 1
/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
don't. */
#define HAVE_DECL_ASPRINTF 1
/* Define to 1 if you have the declaration of `basename', and to 0 if you
don't. */
#define HAVE_DECL_BASENAME 0
/* Define to 1 if you have the declaration of `calloc', and to 0 if you don't.
*/
#define HAVE_DECL_CALLOC 1
/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
#define HAVE_DECL_FFS 1
/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
*/
#define HAVE_DECL_GETENV 1
/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't.
*/
#define HAVE_DECL_GETOPT 1
/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
*/
#define HAVE_DECL_MALLOC 1
/* Define to 1 if you have the declaration of `realloc', and to 0 if you
don't. */
#define HAVE_DECL_REALLOC 1
/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
*/
#define HAVE_DECL_SBRK 1
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
#define HAVE_DECL_SNPRINTF 1
/* Define to 1 if you have the declaration of `strverscmp', and to 0 if you
don't. */
#define HAVE_DECL_STRVERSCMP 0
/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you
don't. */
#define HAVE_DECL_VASPRINTF 1
/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
don't. */
#define HAVE_DECL_VSNPRINTF 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `ffs' function. */
#define HAVE_FFS 1
/* Define to 1 if you have the `fork' function. */
#define HAVE_FORK 1
/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getrusage' function. */
#define HAVE_GETRUSAGE 1
/* Define to 1 if you have the `getsysinfo' function. */
/* #undef HAVE_GETSYSINFO */
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the `index' function. */
#define HAVE_INDEX 1
/* Define to 1 if you have the `insque' function. */
#define HAVE_INSQUE 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <machine/hal_sysinfo.h> header file. */
/* #undef HAVE_MACHINE_HAL_SYSINFO_H */
/* Define to 1 if you have the <malloc.h> header file. */
/* #undef HAVE_MALLOC_H */
/* Define to 1 if you have the `memchr' function. */
#define HAVE_MEMCHR 1
/* Define to 1 if you have the `memcmp' function. */
#define HAVE_MEMCMP 1
/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mempcpy' function. */
/* #undef HAVE_MEMPCPY */
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `mkstemps' function. */
#define HAVE_MKSTEMPS 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the `on_exit' function. */
/* #undef HAVE_ON_EXIT */
/* Define to 1 if you have the `psignal' function. */
#define HAVE_PSIGNAL 1
/* Define to 1 if you have the `pstat_getdynamic' function. */
/* #undef HAVE_PSTAT_GETDYNAMIC */
/* Define to 1 if you have the `pstat_getstatic' function. */
/* #undef HAVE_PSTAT_GETSTATIC */
/* Define to 1 if you have the `putenv' function. */
#define HAVE_PUTENV 1
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define to 1 if you have the `realpath' function. */
#define HAVE_REALPATH 1
/* Define to 1 if you have the `rename' function. */
#define HAVE_RENAME 1
/* Define to 1 if you have the `rindex' function. */
#define HAVE_RINDEX 1
/* Define to 1 if you have the `sbrk' function. */
#define HAVE_SBRK 1
/* Define to 1 if you have the `setenv' function. */
#define HAVE_SETENV 1
/* Define to 1 if you have the `sigsetmask' function. */
#define HAVE_SIGSETMASK 1
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio_ext.h> header file. */
/* #undef HAVE_STDIO_EXT_H */
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `stpcpy' function. */
#define HAVE_STPCPY 1
/* Define to 1 if you have the `stpncpy' function. */
/* #undef HAVE_STPNCPY */
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1
/* Define to 1 if you have the `strndup' function. */
/* #undef HAVE_STRNDUP */
/* Define to 1 if you have the `strrchr' function. */
#define HAVE_STRRCHR 1
/* Define to 1 if you have the `strsignal' function. */
#define HAVE_STRSIGNAL 1
/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1
/* Define to 1 if you have the `strtod' function. */
#define HAVE_STRTOD 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if you have the `strverscmp' function. */
/* #undef HAVE_STRVERSCMP */
/* Define to 1 if you have the `sysconf' function. */
#define HAVE_SYSCONF 1
/* Define to 1 if you have the `sysctl' function. */
#define HAVE_SYSCTL 1
/* Define to 1 if you have the `sysmp' function. */
/* #undef HAVE_SYSMP */
/* Define if you have the sys_errlist variable. */
#define HAVE_SYS_ERRLIST 1
/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define to 1 if you have the <sys/mman.h> header file. */
#define HAVE_SYS_MMAN_H 1
/* Define if you have the sys_nerr variable. */
#define HAVE_SYS_NERR 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/pstat.h> header file. */
/* #undef HAVE_SYS_PSTAT_H */
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define if you have the sys_siglist variable. */
#define HAVE_SYS_SIGLIST 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#define HAVE_SYS_SYSCTL_H 1
/* Define to 1 if you have the <sys/sysinfo.h> header file. */
/* #undef HAVE_SYS_SYSINFO_H */
/* Define to 1 if you have the <sys/sysmp.h> header file. */
/* #undef HAVE_SYS_SYSMP_H */
/* Define to 1 if you have the <sys/systemcfg.h> header file. */
/* #undef HAVE_SYS_SYSTEMCFG_H */
/* Define to 1 if you have the <sys/table.h> header file. */
/* #undef HAVE_SYS_TABLE_H */
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#define HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the `table' function. */
/* #undef HAVE_TABLE */
/* Define to 1 if you have the `times' function. */
#define HAVE_TIMES 1
/* Define to 1 if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define to 1 if you have the `tmpnam' function. */
#define HAVE_TMPNAM 1
/* Define if you have the \`uintptr_t' type. */
#define HAVE_UINTPTR_T 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `vasprintf' function. */
#define HAVE_VASPRINTF 1
/* Define to 1 if you have the `vfork' function. */
#define HAVE_VFORK 1
/* Define to 1 if you have the <vfork.h> header file. */
/* #undef HAVE_VFORK_H */
/* Define to 1 if you have the `vfprintf' function. */
#define HAVE_VFPRINTF 1
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
/* Define to 1 if you have the `vsprintf' function. */
#define HAVE_VSPRINTF 1
/* Define to 1 if you have the `wait3' function. */
#define HAVE_WAIT3 1
/* Define to 1 if you have the `wait4' function. */
#define HAVE_WAIT4 1
/* Define to 1 if you have the `waitpid' function. */
#define HAVE_WAITPID 1
/* Define to 1 if `fork' works. */
#define HAVE_WORKING_FORK 1
/* Define to 1 if `vfork' works. */
#define HAVE_WORKING_VFORK 1
/* Define to 1 if you have the `_doprnt' function. */
/* #undef HAVE__DOPRNT */
/* Define if you have the _system_configuration variable. */
/* #undef HAVE__SYSTEM_CONFIGURATION */
/* Define to 1 if you have the `__fsetlocking' function. */
/* #undef HAVE___FSETLOCKING */
/* Define if canonicalize_file_name is not declared in system header files. */
#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
/* Define if errno must be declared even when <errno.h> is included. */
/* #undef NEED_DECLARATION_ERRNO */
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* The size of a `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* Define if you know the direction of stack growth for your system; otherwise
it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows
toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#define STACK_DIRECTION -1
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Define to an unsigned 64-bit type available in the compiler. */
#define UNSIGNED_64BIT_TYPE uint64_t
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef uintptr_t */
/* Define as `fork' if `vfork' does not work. */
/* #undef vfork */
#include <size-host.h>