From 0d4ffb0f07910833279d9e922c82f9968af3e30f Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 18 Dec 2001 03:05:22 +0000 Subject: [PATCH 01/47] Working changes for GCC 3.0.2. We now fake out the native libgcc.mk + GNU autoconf'ed Makefile. This gives us the flexability we will need to support our new arches (StrongARM, Sparc64, PowerPC, and IA-64). If this new way proves to be too much a hassle, I still have a close-to-being-finished version that is more like the 2.95 version of this file. --- gnu/lib/libgcc/Makefile | 230 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 gnu/lib/libgcc/Makefile diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile new file mode 100644 index 00000000000..9e1294471ab --- /dev/null +++ b/gnu/lib/libgcc/Makefile @@ -0,0 +1,230 @@ +# $FreeBSD$ +# ex:ts=8 + +GCCDIR= ${.CURDIR}/../../../contrib/gcc + +.PATH: ${GCCDIR}/cp ${GCCDIR} + +# allow to be overridden for the a.out case +.if !defined(LIB) || ${LIB} != "gcc_r" +LIB= gcc +.endif + +.if ${OBJFORMAT} == aout +# Install libgcc_pic.a, since ld.so uses it. +INSTALL_PIC_ARCHIVE= yes +.endif + +CFLAGS+= -fexceptions +CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED +.if ${OBJFORMAT} != aout +#CFLAGS+= -fPIC -D_PTHREADS -DGTHREAD_USE_WEAK +CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK +.endif + +all: lib${LIB}.a + +lib${LIB}.a: libgcc_build.a + cp -p ${.ALLSRC} ${.TARGET} + +CLEANFILES+= lib${LIB}.a + +# +# fake out to semi-follow what is done in GCC's Makefile.in +# +srcdir= ${GCCDIR} +GCC_FOR_TARGET= ${CC} +LIBGCC2_CFLAGS= ${CFLAGS} +INCLUDES= -I${GCCDIR}/config \ + -I${GCCDIR} \ + -I. \ + -I${.CURDIR}/../../usr.bin/cc/cc_tools + +COMMONHDRS= config.h tconfig.h tm.h +CLEANFILES+= ${COMMONHDRS} +SRCS+= ${COMMONHDRS} + +config.h: + echo '#include "auto-host.h"' > ${.TARGET} + echo '#include "gansidecl.h"' >> ${.TARGET} + echo '#include <${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h>' >> ${.TARGET} + echo '#include ' >> ${.TARGET} + echo '#include "defaults.h"' >> ${.TARGET} + echo '#include "hwint.h"' >> ${.TARGET} + echo '#ifndef POSIX' >> ${.TARGET} + echo '# define POSIX' >> ${.TARGET} + echo '#endif' >> ${.TARGET} + + +tconfig.h: + echo '#include "gansidecl.h"' > ${.TARGET} + echo '#include "${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h"' >> ${.TARGET} + echo '#include "defaults.h"' >> ${.TARGET} + + +# KEEP THIS IN SYNC with src/gcc/usr.bin/cc/cc_tools/Makefile !! +tm.h: + echo '#include "gansidecl.h"' > ${.TARGET} + echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' >> ${.TARGET} +.if ${MACHINE_ARCH} == "i386" + echo '#include "${MACHINE_ARCH}/att.h"' >> ${.TARGET} +.endif + echo '#include ' >> ${.TARGET} + echo '#include ' >> ${.TARGET} +.if exists(${MACHINE_ARCH}/config/${MACHINE_ARCH}/elf.h) + echo '#include "${MACHINE_ARCH}/elf.h"' >> ${.TARGET} +.endif + echo '#include "${MACHINE_ARCH}/freebsd.h"' >> ${.TARGET} +.if ${MACHINE_ARCH} == "i386" + echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET} +.endif + echo '#include "defaults.h"' >> ${.TARGET} + + +# +# XXX Make sure changes in GCC's Makefile.in are synced here !! +# + +libgcc_build.a: ${COMMONHDRS} libgcc.mk + $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ + AR_FOR_TARGET="ar" \ + AR_CREATE_FOR_TARGET="ar rc" \ + AR_FLAGS_FOR_TARGET="" \ + OLDCC="${CC}" CCLIBFLAGS="-O" \ + CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ + RANLIB_FOR_TARGET="ranlib" \ + RANLIB_TEST_FOR_TARGET="true" \ + NM_FOR_TARGET="nm" AWK="awk" \ + LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" \ + INCLUDES="$(INCLUDES)" MAYBE_USE_COLLECT2="$(MAYBE_USE_COLLECT2)" \ + CONFIG_H="${COMMONHDRS}" MACHMODE_H="$(MACHMODE_H)" \ + LIB1ASMSRC='$(LIB1ASMSRC)' \ + -f libgcc.mk ./libgcc_build.a + +# +# XXX Make sure changes in GCC's Makefile.in are synced here !! +# + +libgcc.mk: mklibgcc + objext='.o' \ + OLDCC='${CC}' \ + LIBGCC1='libgcc1.a' \ + LIB1FUNCS='$(LIB1FUNCS)' \ + LIB1ASMFUNCS='$(LIB1ASMFUNCS)' \ + LIB1FUNCS_EXTRA='$(LIB1FUNCS_EXTRA)' \ + LIB2FUNCS='$(LIB2FUNCS)' \ + LIB2FUNCS_ST='$(LIB2FUNCS_ST)' \ + LIB2ADD='$(LIB2ADD)' \ + LIB2ADDEH='$(LIB2ADDEH)' \ + LIB2ADDEHDEP='$(LIB2ADDEHDEP)' \ + LIB2ADD_ST='$(LIB2ADD_ST)' \ + FPBIT='$(FPBIT)' \ + FPBIT_FUNCS='$(FPBIT_FUNCS)' \ + DPBIT='$(DPBIT)' \ + DPBIT_FUNCS='$(DPBIT_FUNCS)' \ + MULTILIBS='.;' \ + EXTRA_MULTILIB_PARTS='$(EXTRA_MULTILIB_PARTS)' \ + SHLIB_LINK='$(SHLIB_LINK)' \ + SHLIB_INSTALL='$(SHLIB_INSTALL)' \ + SHLIB_EXT='$(SHLIB_EXT)' \ + SHLIB_MULTILIB='$(SHLIB_MULTILIB)' \ + SHLIB_MKMAP='$(SHLIB_MKMAP)' \ + SHLIB_MAPFILES='$(SHLIB_MAPFILES)' \ + SHLIB_NM_FLAGS='$(SHLIB_NM_FLAGS)' \ + $(SHELL) mklibgcc > tmp-libgcc.mk + echo ".PATH: ${GCCDIR}" > ${.TARGET} + sed -e 's|libgcc/\./||g' tmp-libgcc.mk >> ${.TARGET} + rm tmp-libgcc.mk + touch config.status stmp-int-hdrs + +mklibgcc: mklibgcc.in + sed \ + -e 's|libgcc\.a|libgcc_build.a|g' \ + -e 's|@srcdir@|${GCCDIR}|g' \ + -e 's|@build_canonical@|${MACHINE_ARCH}-deo-freebsd5.0|g' \ + -e 's|@target@|${MACHINE_ARCH}-deo-freebsd5.0|g' \ + -e 's|@enable_shared@|no|g' \ + -e 's|@NO_MINUS_C_MINUS_O@||g' \ + ${.ALLSRC} > ${.TARGET} + +CLEANFILES+= mklibgcc libgcc.mk config.status \ + stmp-int-hdrs tmp-libgcc.mk stmp-dirs \ + libgcc_build.a + +# +# XXX This is a hack, but it seems to work. +# When upgrading GCC, get the following defintions straight from Makefile.in +# + +# Members of libgcc1.a. +LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \ + _lshrsi3 _ashrsi3 _ashlsi3 \ + _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \ + _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \ + _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \ + _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \ + _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2 + +# Library members defined in libgcc2.c. +LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \ + _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \ + _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \ + _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \ + _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \ + _fixtfdi _fixunstfdi _floatditf \ + _clear_cache _trampoline __main _exit \ + _absvsi2 _absvdi2 _addvsi3 _addvdi3 _subvsi3 _subvdi3 \ + _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 \ + _ctors + +# Defined in libgcc2.c, included only in the static library. +LIB2FUNCS_ST = _eprintf _bb __gcc_bcmp + +FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \ + _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \ + _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \ + _sf_to_df _thenan_sf _sf_to_usi _usi_to_sf + +DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \ + _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \ + _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \ + _df_to_sf _thenan_df _df_to_usi _usi_to_df + +# Build libgcc.a. +LIB2ADD = $(LIB2FUNCS_EXTRA) +LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA) + +# Additional sources to handle exceptions; overridden on ia64. +LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ + $(srcdir)/unwind-sjlj.c +LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h + +MACHMODE_H = machmode.h machmode.def + +# nm flags to list global symbols in libgcc object files. +SHLIB_NM_FLAGS = -pg + +# +# Bmake'ed tweaks for the GCC Makefile.in barrowed bits. +# + +.for objfile in ${LIB1FUNCS} ${LIB2FUNCS} ${LIB2FUNCS_ST} ${FPBIT_FUNCS} \ + ${DPBIT_FUNCS} +CLEANFILES+= ${objfile}.o +.endfor + +CLEANFILES+= ${LIB2ADDEH:S/.c/.o/g:S/$(srcdir)\///g} + +CLEANDIRS+= libgcc + +# +# Need to supply an `install' target as we aren't using bsd.lib.mk. +# + +install: + ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR} + +.include +.include +.include From 2c8b5b12919cede726220e3093f4d570d0056615 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 18 Dec 2001 03:09:26 +0000 Subject: [PATCH 02/47] Working changes for GCC 3.0.2. This thing grew. We now have to link with many more files as if it were one of the driver programs. We also have to deal with the very irritating layering of malloc and friends. Our malloc works *very* well thank you. Thus we will use it. --- gnu/usr.bin/cc/c++filt/Makefile | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 gnu/usr.bin/cc/c++filt/Makefile diff --git a/gnu/usr.bin/cc/c++filt/Makefile b/gnu/usr.bin/cc/c++filt/Makefile new file mode 100644 index 00000000000..30ed4fe22a3 --- /dev/null +++ b/gnu/usr.bin/cc/c++filt/Makefile @@ -0,0 +1,36 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ${GCCDIR} + +PROG= c++filt +SRCS= cp-demangle.c cplus-dem+%DIKED.c getopt.c getopt1.c underscore.c +BINDIR= /usr/libexec/${OBJFORMAT} +NOMAN= 1 + +CFLAGS+= -DMAIN -DIN_GCC -DVERSION=\"$(version)\" + +DPADD+= ${LIBCC_INT} +LDADD+= ${LIBCC_INT} + +CLEANFILES= tmp-dum.c tmp-dum.s underscore.c + +underscore.c: + echo "int xxy_us_dummy;" >tmp-dum.c + ${CC} -S tmp-dum.c + echo '/*WARNING: This file is automatically generated!*/' >underscore.c + if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \ + echo "int prepends_underscore = 1;" >>underscore.c; \ + else \ + echo "int prepends_underscore = 0;" >>underscore.c; \ + fi + rm -f tmp-dum.c tmp-dum.s + +cplus-dem+%DIKED.c: cplus-dem.c + sed \ + -e 's/^xmalloc[ ]/_DONT_xmalloc /g' \ + -e 's/^xrealloc[ ]/_DONT_xrealloc /g' \ + ${.ALLSRC} > ${.TARGET} + +.include From 1a2f149713e852ef5aa1d2e7162b2f4d5c72faca Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 18 Dec 2001 03:10:56 +0000 Subject: [PATCH 03/47] Working changes for GCC 3.0.2. We now have to use the GCC stdarg.h varargs.h. We simply have no choice as it has an internal representation that we really cannot properly define in our headers. --- gnu/usr.bin/cc/cc1/Makefile | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 gnu/usr.bin/cc/cc1/Makefile diff --git a/gnu/usr.bin/cc/cc1/Makefile b/gnu/usr.bin/cc/cc1/Makefile new file mode 100644 index 00000000000..d1d6ce56f6b --- /dev/null +++ b/gnu/usr.bin/cc/cc1/Makefile @@ -0,0 +1,43 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ../cc_tools ${GCCDIR} + +PROG= cc1 +SRCS= c-parse.c c-parse.h c-lang.c +# Ugh, compiled twice... +SRCS+= c-decl.c c-lex.c c-typeck.c +BINDIR= /usr/libexec +NOMAN= 1 +NOSHARED=yes + +CFLAGS+= -I. + +DPADD+= ${LIBCC_INT} +LDADD+= ${LIBCC_INT} + +#----------------------------------------------------------------------- +# C parser +.ORDER: c-parse.c c-parse.h +c-parse.c c-parse.h: c-parse.in + sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ + -e "/^ifc$$/d" -e "/^end ifc$$/d" \ + ${GCCDIR}/c-parse.in > c-parse.y + ${YACC} -d -o c-parse.c c-parse.y + mv c-parse.y c-parse.y.out + +CLEANFILES+= c-parse.c c-parse.h \ + c-parse.y c-parse.y.out # insurance + +#----------------------------------------------------------------------- + +beforeinstall: + mkdir -p ${DESTDIR}/usr/include/machine +.for VAHDR in stdarg.h varargs.h + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${GCCDIR}/ginclude/${VAHDR} \ + ${DESTDIR}/usr/include/machine/gcc_${VAHDR} +.endfor + +.include From 3a7789cfeb789b970a110eccac99ed93f00d0f38 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 18 Dec 2001 03:11:35 +0000 Subject: [PATCH 04/47] Working changes for GCC 3.0.2. --- gnu/lib/csu/Makefile | 89 ++++++++++++++++++++++++++++++++++ gnu/usr.bin/cc/Makefile.inc | 58 ++++++++++++++++++++++ gnu/usr.bin/cc/cc1obj/Makefile | 36 ++++++++++++++ 3 files changed, 183 insertions(+) create mode 100644 gnu/lib/csu/Makefile create mode 100644 gnu/usr.bin/cc/Makefile.inc create mode 100644 gnu/usr.bin/cc/cc1obj/Makefile diff --git a/gnu/lib/csu/Makefile b/gnu/lib/csu/Makefile new file mode 100644 index 00000000000..c3a3f3e152e --- /dev/null +++ b/gnu/lib/csu/Makefile @@ -0,0 +1,89 @@ +# $FreeBSD$ + +GCCDIR= ${.CURDIR}/../../../contrib/gcc + +TARGET_ARCH?= ${MACHINE_ARCH} + +.if ${TARGET_ARCH} == "alpha" +.PATH: ${GCCDIR}/config/alpha +SRCS= crtbegin.s crtend.s +UGLYHACK= -x assembler +.else +.PATH: ${GCCDIR} +SRCS= crtstuff.c tm.h +.endif + +OBJS= crtbegin.o crtend.o +SOBJS= crtbegin.So crtend.So +CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \ + -I${.CURDIR}/../../usr.bin/cc/cc_tools -I../../usr.bin/cc/cc_tools \ + -DIN_GCC \ + -finhibit-size-directive -fno-inline-functions \ + -fno-exceptions -fno-omit-frame-pointer +NOMAN= true +NOPIC= true +NOPROFILE= true +INTERNALLIB= true +CLEANFILES+= tm.h + +CRTS_CFLAGS= -DCRTSTUFFS_O ${PICFLAG} + +all: ${OBJS} ${SOBJS} + +.if ${TARGET_ARCH} == "alpha" +crtbegin.o crtbegin.So: crtbegin.s +crtend.o crtend.So: crtend.s +.for PART in begin end +CLEANFILES+= crt${PART}.s +crt${PART}.s: crt${PART}.asm + ln -sf ${.ALLSRC} ${.TARGET} +.endfor +.else +crtbegin.o crtbegin.So crtend.o crtend.So: crtstuff.c tm.h +.endif + +crtbegin.o: + ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \ + -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h} + +crtbegin.So: + ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \ + -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h} + +crtend.o: + ${CC} ${CFLAGS} -g0 -DCRT_END \ + -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h} + +crtend.So: + ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \ + -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h} + +# KEEP THIS IN SYNC with src/gnu/usr.bin/cc/cc_tools/Makefile !! +tm.h: + echo '#include "gansidecl.h"' > ${.TARGET} + echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' >> ${.TARGET} +.if ${MACHINE_ARCH} == "i386" + echo '#include "${MACHINE_ARCH}/att.h"' >> ${.TARGET} +.endif + echo '#include ' >> ${.TARGET} + echo '#include ' >> ${.TARGET} +.if exists(${MACHINE_ARCH}/config/${MACHINE_ARCH}/elf.h) + echo '#include "${MACHINE_ARCH}/elf.h"' >> ${.TARGET} +.endif + echo '#include "${MACHINE_ARCH}/freebsd.h"' >> ${.TARGET} +.if ${MACHINE_ARCH} == "i386" + echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET} +.endif + echo '#include "defaults.h"' >> ${.TARGET} + echo '#ifndef GENERATOR_FILE' >> ${.TARGET} + echo '#include "insn-codes.h"' >> ${.TARGET} + echo '#include "insn-flags.h"' >> ${.TARGET} + echo '#endif' >> ${.TARGET} + +realinstall: +.for file in ${OBJS} ${SOBJS} + ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${file} ${DESTDIR}${LIBDIR}/${file:S/.So$/S.o/} +.endfor + +.include diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc new file mode 100644 index 00000000000..97c0bb09b61 --- /dev/null +++ b/gnu/usr.bin/cc/Makefile.inc @@ -0,0 +1,58 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +# Sometimes this is .include'd several times... +.if !defined(GCCDIR) +GCCDIR= ${.CURDIR}/../../../../contrib/gcc + +TARGET_ARCH?= ${MACHINE_ARCH} +GCC_ARCH= ${TARGET_ARCH} + +# Machine description. +MD_FILE= ${GCCDIR}/config/${GCC_ARCH}/${GCC_ARCH}.md +OUT_FILE= ${GCC_ARCH}.c +OUT_OBJ= ${GCC_ARCH} +target= ${TARGET_ARCH}-unknown-freebsd + +version!= sed -n /version_string/p ${GCCDIR}/version.c | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' + +CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H +CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\" +CFLAGS+= -DWANT_COMPILER_INVARIANTS + +# If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined +# to get the proper sizes in limits.h +.if defined(LONG_TYPE_SIZE) +CFLAGS+= -DLONG_TYPE_SIZE=${LONG_TYPE_SIZE} +.endif + +.if ${TARGET_ARCH} != ${MACHINE_ARCH} +CFLAGS+= -DCROSS_COMPILE +.endif + +.if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE) +CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE} +.endif + +.if exists(${.OBJDIR}/../cc_tools) +CFLAGS+= -I${.OBJDIR}/../cc_tools +.endif +CFLAGS+= -I${.CURDIR}/../cc_tools +# This must go after the -I for cc_tools to resolve ambiguities for hash.h +# correctly. +CFLAGS+= -I${GCCDIR} -I${GCCDIR}/config + +.if exists(${.OBJDIR}/../cc_fbsd) +LIBCC_FBSD= ${.OBJDIR}/../cc_fbsd/libcc_fbsd.a +.else +LIBCC_FBSD= ${.CURDIR}/../cc_fbsd/libcc_fbsd.a +.endif + +.if exists(${.OBJDIR}/../cc_int) +LIBCC_INT= ${.OBJDIR}/../cc_int/libcc_int.a +.else +LIBCC_INT= ${.CURDIR}/../cc_int/libcc_int.a +.endif + +.endif # !GCCDIR diff --git a/gnu/usr.bin/cc/cc1obj/Makefile b/gnu/usr.bin/cc/cc1obj/Makefile new file mode 100644 index 00000000000..dff38fb4b58 --- /dev/null +++ b/gnu/usr.bin/cc/cc1obj/Makefile @@ -0,0 +1,36 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ../cc_tools ${GCCDIR}/objc ${GCCDIR} + +PROG= cc1obj +SRCS= objc-parse.c objc-parse.h objc-parse.h objc-act.c +# Ugh, compiled twice... +SRCS+= c-decl.c c-lex.c c-typeck.c +BINDIR= /usr/libexec +NOMAN= 1 +NOSHARED=yes + +CFLAGS+= -I${GCCDIR}/objc -I. + +DPADD+= ${LIBCC_INT} +LDADD+= ${LIBCC_INT} + +#----------------------------------------------------------------------- +# objc parser +.ORDER: objc-parse.c objc-parse.h +objc-parse.c objc-parse.h: c-parse.in + sed -e "/^ifc$$/,/^end ifc$$/d" \ + -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \ + ${GCCDIR}/c-parse.in > objc-parse.y + ${YACC} -d -o objc-parse.c objc-parse.y + ln -sf objc-parse.h c-parse.h + mv objc-parse.y objc-parse.y.out + +CLEANFILES+= objc-parse.c objc-parse.h c-parse.h \ + objc-parse.y objc-parse.y.out # insurance + +#----------------------------------------------------------------------- + +.include From 9018d6738b78a5dd1be351e07133122d659c50ee Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 18 Dec 2001 03:12:24 +0000 Subject: [PATCH 05/47] Changes in order to compile GCC 3.0.2. --- gnu/usr.bin/cc/cc1plus/Makefile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 gnu/usr.bin/cc/cc1plus/Makefile diff --git a/gnu/usr.bin/cc/cc1plus/Makefile b/gnu/usr.bin/cc/cc1plus/Makefile new file mode 100644 index 00000000000..cf89851c1d8 --- /dev/null +++ b/gnu/usr.bin/cc/cc1plus/Makefile @@ -0,0 +1,33 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ${GCCDIR}/cp ${GCCDIR} + +PROG= cc1plus +SRCS= parse.c parse.h cfns.h +SRCS+= call.c class.c cvt.c decl.c decl2.c errfn.c error.c except.c expr.c \ + friend.c init.c lex.c mangle.c method.c pt.c ptree.c repo.c rtti.c \ + search.c semantics.c spew.c tree.c typeck.c typeck2.c xref.c dump.c optimize.c + +BINDIR= /usr/libexec +NOMAN= 1 +NOSHARED=yes + +CFLAGS+= -I${GCCDIR}/cp -I. + +DPADD+= ${LIBCC_INT} +LDADD+= ${LIBCC_INT} + +.ORDER: parse.c parse.h +parse.c parse.h: parse.y + ${YACC} -d -o parse.c ${GCCDIR}/cp/parse.y + grep '^#define[ ]*YYEMPTY' parse.c >>parse.h + +CLEANFILES+= parse.c parse.h cfns.h + +cfns.h: + gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' \ + ${GCCDIR}/cp/cfns.gperf > ${.TARGET} + +.include From 9aef7900949592522a4d43232d83ac0a605e5ceb Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 18 Dec 2001 03:13:22 +0000 Subject: [PATCH 06/47] Changes in order to compile GCC 3.0.2. Boy did a lot of files get added or moved around. --- gnu/usr.bin/cc/cc_int/Makefile | 67 ++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 gnu/usr.bin/cc/cc_int/Makefile diff --git a/gnu/usr.bin/cc/cc_int/Makefile b/gnu/usr.bin/cc/cc_int/Makefile new file mode 100644 index 00000000000..299ba481ce1 --- /dev/null +++ b/gnu/usr.bin/cc/cc_int/Makefile @@ -0,0 +1,67 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ../cc_tools ${GCCDIR}/config/${GCC_ARCH} ${GCCDIR} + +LIB= cc_int +NOPROFILE= YES +NOPIC= YES + +# dbxout.c dwarfout.c emit-rtl.c explow.c expmed.c expr.c \ +# alias.c bitmap.c dwarf2out.c dyn-string.c \ +SRCS= c-aux-info.c c-common.c c-convert.c c-format.c \ + c-pragma.c c-semantics.c \ + c-dump.c c-errors.c \ + caller-save.c calls.c combine.c convert.c cse.c \ + dbxout.c dwarfout.c dwarf2out.c dwarf2asm.c emit-rtl.c explow.c expmed.c expr.c \ + final.c flow.c fold-const.c function.c getpwd.c global.c graph.c \ + hash.c haifa-sched.c \ + integrate.c jump.c lcm.c local-alloc.c loop.c optabs.c \ + print-rtl.c print-tree.c real.c recog.c reg-stack.c regclass.c \ + reload.c reload1.c reorg.c rtl.c rtlanal.c \ + sbitmap.c sdbout.c stmt.c stor-layout.c \ + toplev.c tree.c unroll.c varasm.c version.c xcoffout.c \ + alias.c bitmap.c dyn-string.c \ + gcse.c genrtl.c profile.c regmove.c varray.c \ + ${OUT_FILE} + +SRCS+= bb-reorder.c conflict.c ggc-common.c \ + ggc-page.c ifcvt.c lists.c predict.c regrename.c resource.c sibcall.c \ + simplify-rtx.c ssa.c timevar.c + +# 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 +.endfor + +# shared between the drivers +SRCS+= multilib.h choose-temp.c obstack.c prefix.c pexecute.c version.c mbchar.c + +# libbackend +SRCS+= builtins.c dce.c diagnostic.c doloop.c dominance.c except.c gcse.c params.c sched-deps.c sched-vis.c sched-rgn.c sched-ebb.c \ + stringpool.c c-lex.c +# shared by cc1/cc1obj +SRCS+= #c-decl.c +SRCS+= c-typeck.c + +# libcpp +SRCS+= cppdefault.c cpperror.c cppexp.c cppfiles.c cppinit.c cpphash.c \ + cpplex.c cpplib.c cppmacro.c mkdeps.c + +# stuff that makes libiberty now required (2.95) and shouldn't be... +SRCS+= obstack.c splay-tree.c hashtab.c partition.c lbasename.c md5.c +CFLAGS+= -DHAVE_CONFIG_H + +CFLAGS+= -DTARGET_NAME=\"${target}\" -DIN_GCC + +install: + @true + +${OUT_OBJ}.o ${OUT_OBJ}.So: ${OUT_FILE} + +.include From e5d7f6b935559d5991d59982ddcf6fecd381fbbe Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 18 Dec 2001 03:15:02 +0000 Subject: [PATCH 07/47] Regenerated for GCC 3.0.2. --- gnu/usr.bin/cc/cc_tools/auto-host.h | 489 ++++++++++++++++++++++++++++ 1 file changed, 489 insertions(+) create mode 100644 gnu/usr.bin/cc/cc_tools/auto-host.h diff --git a/gnu/usr.bin/cc/cc_tools/auto-host.h b/gnu/usr.bin/cc/cc_tools/auto-host.h new file mode 100644 index 00000000000..94007e8bf03 --- /dev/null +++ b/gnu/usr.bin/cc/cc_tools/auto-host.h @@ -0,0 +1,489 @@ +/* $FreeBSD$ */ + +/* auto-host.h. Generated automatically by configure. */ +/* config.in. Generated automatically from configure.in by autoheader. */ + +/* Define if using alloca.c. */ +/* #undef C_ALLOCA */ + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* 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 the type of elements in the array set by `getgroups'. + Usually this is either `int' or `gid_t'. */ +#define GETGROUPS_T gid_t + +/* Define to `int' if doesn't define. */ +/* #undef gid_t */ + +/* Define if you have alloca, as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define if you have and it should be used (not on Ultrix). */ +/* #undef HAVE_ALLOCA_H */ + +/* Define if you don't have vprintf but do have _doprnt. */ +/* #undef HAVE_DOPRNT */ + +/* Define if you have the ANSI # stringizing operator in cpp. */ +#define HAVE_STRINGIZE 1 + +/* Define if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define if you have . */ +/* #undef HAVE_VFORK_H */ + +/* Define if you have the vprintf function. */ +#define HAVE_VPRINTF 1 + +/* Define as __inline if that's what the C compiler calls it. */ +/* #undef inline */ + +/* Define if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* Define to `long' if doesn't define. */ +/* #undef off_t */ + +/* Define to `int' if doesn't define. */ +/* #undef pid_t */ + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +/* 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 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to `int' if doesn't define. */ +/* #undef uid_t */ + +/* Define vfork as fork if vfork does not work. */ +/* #undef vfork */ + +/* Define to 1 if NLS is requested. */ +/* #undef ENABLE_NLS */ + +/* Define as 1 if you have catgets and don't want to use GNU gettext. */ +/* #undef HAVE_CATGETS */ + +/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +/* #undef HAVE_GETTEXT */ + +/* Define if your locale.h file contains LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define as 1 if you have the stpcpy function. */ +/* #undef HAVE_STPCPY */ + +/* Define if your assembler supports specifying the maximum number + of bytes to skip when using the GAS .p2align command. */ +#define HAVE_GAS_MAX_SKIP_P2ALIGN 1 + +/* Define if your assembler supports .balign and .p2align. */ +#define HAVE_GAS_BALIGN_AND_P2ALIGN 1 + +/* Define if your assembler uses the old HImode fild and fist notation. */ +#define HAVE_GAS_FILDS_FISTS 1 + +/* Define to `int' if doesn't define. */ +/* #undef ssize_t */ + +/* Define if you have the __argz_count function. */ +/* #undef HAVE___ARGZ_COUNT */ + +/* Define if you have the __argz_next function. */ +/* #undef HAVE___ARGZ_NEXT */ + +/* Define if you have the __argz_stringify function. */ +/* #undef HAVE___ARGZ_STRINGIFY */ + +/* Define if you have the atoll function. */ +/* #undef HAVE_ATOLL */ + +/* Define if you have the atoq function. */ +/* #undef HAVE_ATOQ */ + +/* Define if you have the bcopy function. */ +#define HAVE_BCOPY 1 + +/* Define if you have the bsearch function. */ +#define HAVE_BSEARCH 1 + +/* Define if you have the dcgettext function. */ +/* #undef HAVE_DCGETTEXT */ + +/* Define if you have the fputc_unlocked function. */ +/* #undef HAVE_FPUTC_UNLOCKED */ + +/* Define if you have the fputs_unlocked function. */ +/* #undef HAVE_FPUTS_UNLOCKED */ + +/* Define if you have the getcwd function. */ +#define HAVE_GETCWD 1 + +/* Define if you have the getpagesize function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define if you have the getrlimit function. */ +#define HAVE_GETRLIMIT 1 + +/* Define if you have the getrusage function. */ +#define HAVE_GETRUSAGE 1 + +/* Define if you have the gettimeofday function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define if you have the isascii function. */ +#define HAVE_ISASCII 1 + +/* Define if you have the kill function. */ +#define HAVE_KILL 1 + +/* Define if you have the lstat function. */ +#define HAVE_LSTAT 1 + +/* Define if you have the munmap function. */ +#define HAVE_MUNMAP 1 + +/* Define if you have the nl_langinfo function. */ +#define HAVE_NL_LANGINFO 1 + +/* Define if you have the popen function. */ +#define HAVE_POPEN 1 + +/* Define if you have the putc_unlocked function. */ +/* #undef HAVE_PUTC_UNLOCKED */ + +/* Define if you have the putenv function. */ +#define HAVE_PUTENV 1 + +/* Define if you have the setenv function. */ +#define HAVE_SETENV 1 + +/* Define if you have the setlocale function. */ +#define HAVE_SETLOCALE 1 + +/* Define if you have the setrlimit function. */ +#define HAVE_SETRLIMIT 1 + +/* Define if you have the stpcpy function. */ +/* #undef HAVE_STPCPY */ + +/* Define if you have the strcasecmp function. */ +#define HAVE_STRCASECMP 1 + +/* Define if you have the strchr function. */ +#define HAVE_STRCHR 1 + +/* Define if you have the strdup function. */ +#define HAVE_STRDUP 1 + +/* Define if you have the strrchr function. */ +#define HAVE_STRRCHR 1 + +/* Define if you have the strsignal function. */ +#define HAVE_STRSIGNAL 1 + +/* Define if you have the strstr function. */ +#define HAVE_STRSTR 1 + +/* Define if you have the strtoul function. */ +#define HAVE_STRTOUL 1 + +/* Define if you have the sysconf function. */ +#define HAVE_SYSCONF 1 + +/* Define if you have the header file. */ +/* #undef HAVE_ARGZ_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_DIRECT_H */ + +/* Define if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if you have the header file. */ +#define HAVE_LANGINFO_H 1 + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_MALLOC_H */ + +/* Define if you have the header file. */ +#define HAVE_NL_TYPES_H 1 + +/* Define if you have the header file. */ +#define HAVE_STAB_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_TIMES_H 1 + +/* Define if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the i library (-li). */ +/* #undef HAVE_LIBI */ + +/* Define to enable the use of a default linker. */ +/* #undef DEFAULT_LINKER */ + +/* Define to enable the use of a default assembler. */ +/* #undef DEFAULT_ASSEMBLER */ + +#ifdef WANT_COMPILER_INVARIANTS +/* #warning WANT_COMPILER_INVARIANTS turned on*/ + +/* Define if you want more run-time sanity checks. This one gets a grab + bag of miscellaneous but relatively cheap checks. */ +#define ENABLE_CHECKING 1 + +/* Define if you want all operations on trees (the basic data + structure of the front ends) to be checked for dynamic type safety + at runtime. This is moderately expensive. */ +#define ENABLE_TREE_CHECKING 1 + +/* Define if you want all operations on RTL (the basic data structure + of the optimizer and back end) to be checked for dynamic type safety + at runtime. This is quite expensive. */ +#define ENABLE_RTL_CHECKING 1 + +/* Define if you want the garbage collector to do object poisoning and + other memory allocation checks. This is quite expensive. */ +#define ENABLE_GC_CHECKING 1 + +/* Define if you want the garbage collector to operate in maximally + paranoid mode, validating the entire heap and collecting garbage at + every opportunity. This is extremely expensive. */ +#define ENABLE_GC_ALWAYS_COLLECT 1 + +#endif + +/* Define if you want the C and C++ compilers to support multibyte + character sets for source code. */ +/* #undef MULTIBYTE_CHARS */ + +/* Define if your compiler supports the `long double' type. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define if the `_Bool' type is built-in. */ +/* #undef HAVE__BOOL */ + +/* Always define this when using the GNU C Library */ +/* #undef _GNU_SOURCE */ + +/* Define if your compiler understands volatile. */ +#define HAVE_VOLATILE 1 + +/* Define if you have a working header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define if you can safely include both and . */ +#define STRING_WITH_STRINGS 1 + +/* Define if you have a working header file. */ +/* #undef HAVE_INTTYPES_H */ + +/* Define if enumerated bitfields are treated as unsigned values. */ +#define ENUM_BITFIELDS_ARE_UNSIGNED 1 + +/* Define if printf supports %p. */ +#define HAVE_PRINTF_PTR 1 + +/* Define if mmap can get us zeroed pages from /dev/zero. */ +#define HAVE_MMAP_DEV_ZERO 1 + +/* Define if mmap can get us zeroed pages using MAP_ANON(YMOUS). */ +#define HAVE_MMAP_ANON 1 + +/* Define if read-only mmap of a plain file works. */ +#define HAVE_MMAP_FILE 1 + +/* Define if you have the iconv() function. */ +/* #undef HAVE_ICONV */ + +/* Define as const if the declaration of iconv() needs const. */ +/* #undef ICONV_CONST */ + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_BCOPY 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETENV 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_ATOL 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_SBRK 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_ABORT 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_ATOF 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETCWD 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETWD 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_STRSIGNAL 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_PUTC_UNLOCKED 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_FPUTS_UNLOCKED 0 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_STRSTR 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_ENVIRON 0 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_MALLOC 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_REALLOC 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_CALLOC 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_FREE 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_BASENAME 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETOPT 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETRLIMIT 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_SETRLIMIT 1 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETRUSAGE 1 + +/* Define if host mkdir takes a single argument. */ +/* #undef MKDIR_TAKES_ONE_ARG */ + +/* Define to the name of the distribution. */ +#define PACKAGE "gcc" + +/* Define to the version of the distribution. */ +#define VERSION "3.0.1" + +/* Define to 1 if installation paths should be looked up in Windows32 + Registry. Ignored on non windows32 hosts. */ +#define ENABLE_WIN32_REGISTRY 1 + +/* Define to be the last portion of registry key on windows hosts. */ +#define WIN32_REGISTRY_KEY "3.0.1" + +/* Define if your assembler supports .subsection and .subsection -1 starts + emitting at the beginning of your section. */ +#define HAVE_GAS_SUBSECTION_ORDERING 1 + +/* Define if your assembler supports .weak. */ +#define HAVE_GAS_WEAK 1 + +/* Define if your assembler supports .hidden. */ +#define HAVE_GAS_HIDDEN 1 + +/* Define if your assembler supports .uleb128. */ +#define HAVE_AS_LEB128 1 + +/* Define if your assembler mis-optimizes .eh_frame data. */ +/* #undef USE_AS_TRADITIONAL_FORMAT */ + +/* Define if your assembler supports .register. */ +/* #undef HAVE_AS_REGISTER_PSEUDO_OP */ + +/* Define if your assembler supports -relax option. */ +/* #undef HAVE_AS_RELAX_OPTION */ + +/* Define if the assembler supports 64bit sparc. */ +/* #undef AS_SPARC64_FLAG */ + +/* Define if your assembler supports offsetable %lo(). */ +/* #undef HAVE_AS_OFFSETABLE_LO10 */ + +/* Define if your assembler supports dwarf2 .file/.loc directives. */ +/* #undef HAVE_AS_DWARF2_DEBUG_LINE */ + +/* Define to 1 if you want to enable namespaces (-fhonor-std) by default. */ +#define ENABLE_STD_NAMESPACE 1 + +/* Define 0/1 to force the choice for exception handling model. */ +/* #undef CONFIG_SJLJ_EXCEPTIONS */ + + +/* Bison unconditionally undefines `const' if neither `__STDC__' nor + __cplusplus are defined. That's a problem since we use `const' in + the GCC headers, and the resulting bison code is therefore type + unsafe. Thus, we must match the bison behavior here. */ + +#ifndef __STDC__ +#ifndef __cplusplus +/* #undef const */ +#define const +#endif +#endif From 8561d1123deda92f88756504d05f7613ed5eef73 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 18 Dec 2001 03:19:11 +0000 Subject: [PATCH 08/47] Changes in order to compile GCC 3.0.2. Really irritating changes are the "forced" layering of malloc + friends in order to use the GNU versions. Sorry, we have a *very* fine malloc, and we will use it. Period. Even more irritating is that the GNU people now want to replace ctype also!! So we partially dike it out here. --- gnu/usr.bin/cc/cc_tools/Makefile | 226 +++++++++++++++++++++++ gnu/usr.bin/cc/cc_tools/freebsd-native.h | 69 +++++++ 2 files changed, 295 insertions(+) create mode 100644 gnu/usr.bin/cc/cc_tools/Makefile create mode 100644 gnu/usr.bin/cc/cc_tools/freebsd-native.h diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile new file mode 100644 index 00000000000..bed52826158 --- /dev/null +++ b/gnu/usr.bin/cc/cc_tools/Makefile @@ -0,0 +1,226 @@ +# $FreeBSD$ + +# +# 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+= -DGENERATOR_FILE -I. + +.include "../Makefile.inc" + +.PATH: ${GCCDIR} ${GCCDIR}/cp + +#----------------------------------------------------------------------- +# insn-* gunk + +CLEANFILES+= gensupport+%DIKED.c +gensupport+%DIKED.c: gensupport.c + sed \ + -e 's/^xmalloc/DONT_xmalloc/g' \ + -e 's/^xrealloc/DONT_xrealloc/g' \ + -e 's/^xstrdup/DONT_xstrdup/g' \ + ${.ALLSRC} > ${.TARGET} + +.for F in attr codes config flags +insn-$F.h: gen$F ${MD_FILE} + ./gen$F ${MD_FILE} > insn-$F.h +GENSRCS+= insn-$F.h +.endfor + +GENSRCS+= gen-time-stamp +gen-time-stamp: genattrtab genemit genextract genopinit genoutput genpeep genrecog + touch ${.TARGET} + +.for F in attr codes config emit extract flags opinit output peep recog +build-tools: gen$F + +gen$F: gen$F.o rtl.o obstack.o print-rtl.o bitmap.o errors.o gensupport+%DIKED.o ggc-none.o hashtab.o #safe-ctype.o + ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} + +GENSRCS+= gen$F.c +CLEANFILES+= gen$F +.endfor + +.for F in attrtab +build-tools: gen$F + +gen$F: gen$F.o rtl.o print-rtl.o obstack.o bitmap.o errors.o gensupport+%DIKED.o ggc-none.o hashtab.o + ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} + +GENSRCS+= gen$F.c +CLEANFILES+= gen$F +.endfor + +SRCS+= bitmap.c errors.c gensupport+%DIKED.c ggc-none.c hashtab.c obstack.c print-rtl.c regclass.c rtl.c rtlanal.c + +.for F in check genrtl +build-tools: gen$F + +gen$F: gen$F.o + ${CC} -static -DGENERATOR_FILE ${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 + +#----------------------------------------------------------------------- +# Common parser stuff. + +tree-check.h: gencheck + ./gencheck > ${.TARGET} +GENSRCS+= tree-check.h + +#----------------------------------------------------------------------- +# the host/target compiler config. + +COMMONHDRS= config.h hconfig.h multilib.h options.h specs.h tconfig.h tm.h \ + tm_p.h configargs.h safe-ctype.h +GENSRCS+= ${COMMONHDRS} gencheck.h + +${COMMONHDRS}: ${.CURDIR}/Makefile + +configargs.h: + echo 'static const char configuration_arguments[] =' > ${.TARGET} + echo ' "FreeBSD/${GCC_ARCH} system compiler";' >> ${.TARGET} + echo 'static const char thread_model[] = "posix";' >> ${.TARGET} + +config.h hconfig.h: + echo '#include "auto-host.h"' > ${.TARGET} + echo '#include "gansidecl.h"' >> ${.TARGET} + echo '#include "${GCC_ARCH}/xm-${GCC_ARCH}.h"' >> ${.TARGET} + echo '#include "defaults.h"' >> ${.TARGET} + echo '#include "hwint.h"' >> ${.TARGET} + echo '#ifndef POSIX' >> ${.TARGET} + echo '# define POSIX' >> ${.TARGET} + echo '#endif' >> ${.TARGET} + echo '#ifndef GENERATOR_FILE' >> ${.TARGET} + echo '#include "insn-codes.h"' >> ${.TARGET} + echo '#include "insn-flags.h"' >> ${.TARGET} + echo '#endif' >> ${.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 *const multilib_exclusions_raw[] = { \ + NULL };' >> ${.TARGET} + +options.h: + echo '#include "cp/lang-options.h"' > ${.TARGET} + echo '#include "f/lang-options.h"' >> ${.TARGET} + echo '#include "objc/lang-options.h"' >> ${.TARGET} + +specs.h: + echo '#include "cp/lang-specs.h"' > ${.TARGET} + echo '#include "f/lang-specs.h"' >> ${.TARGET} + echo '#include "objc/lang-specs.h"' >> ${.TARGET} + +tconfig.h: + echo '#include "gansidecl.h"' > ${.TARGET} + echo '#include "${GCC_ARCH}/xm-${GCC_ARCH}.h"' >> ${.TARGET} + echo '#include "defaults.h"' >> ${.TARGET} + echo '#ifndef GENERATOR_FILE' >> ${.TARGET} + echo '#include "insn-codes.h"' >> ${.TARGET} + echo '#include "insn-flags.h"' >> ${.TARGET} + echo '#endif' >> ${.TARGET} + echo '#define USING_SJLJ_EXCEPTIONS 0' >> ${.TARGET} + +# KEEP THIS IN SYNC with src/gcc/lib/libgcc/Makefile !! +tm.h: + echo '#include "gansidecl.h"' > ${.TARGET} + echo '#include "${GCC_ARCH}/${GCC_ARCH}.h"' >> ${.TARGET} +.if ${GCC_ARCH} == "i386" + echo '#include "${GCC_ARCH}/att.h"' >> ${.TARGET} +.endif + echo '#include ' >> ${.TARGET} + echo '#include ' >> ${.TARGET} +.if exists(${GCCDIR}/config/${GCC_ARCH}/elf.h) + echo '#include "${GCC_ARCH}/elf.h"' >> ${.TARGET} +.endif + echo '#include "${GCC_ARCH}/freebsd.h"' >> ${.TARGET} +.if ${GCC_ARCH} == "i386" + echo '#include "${GCC_ARCH}/perform.h"' >> ${.TARGET} +.endif + echo '#include "defaults.h"' >> ${.TARGET} + echo '#ifndef GENERATOR_FILE' >> ${.TARGET} + echo '#include "insn-codes.h"' >> ${.TARGET} + echo '#include "insn-flags.h"' >> ${.TARGET} + echo '#endif' >> ${.TARGET} + +tm_p.h: + echo '#include "${GCC_ARCH}/${GCC_ARCH}-protos.h"' > ${.TARGET} + echo '#include ' >> ${.TARGET} + echo '#ifndef GENERATOR_FILE' >> ${.TARGET} + echo '#include "insn-codes.h"' >> ${.TARGET} + echo '#include "insn-flags.h"' >> ${.TARGET} + echo '#endif' >> ${.TARGET} + +#----------------------------------------------------------------------- +# General things. + +SRCS+= ${GENSRCS} +CLEANFILES+= ${GENSRCS} + +all: ${SRCS} + +.include + +#----------------------------------------------------------------------- +# Fixups. + +# Set OBJS the same as bsd.prog.mk would do if we defined PROG. We can't +# define PROG because we have multiple programs. +# +OBJS+= ${SRCS:N*.h:R:S/$/.o/g} + +.if !exists(${DEPENDFILE}) +# Fudge pre-dependfile dependencies of objects in much the same way as +# bsd.prog.mk would do if we defined PROG. There are complications to +# avoid circular dependencies. First, only make most objects depend on +# all headers. Filter out the objects that would cause problems (i.e., +# objects that will be used to create programs that will generate headers). +# +${OBJS:Nbitmap.o:Nerrors.o:Ngenattr.o:Ngencheck.o:Ngencodes.o:Ngenconfig.o:Ngenflags.o:Ngengenrtl.o:Ngensupport+%DIKED.o:Nggc-none.o:Nhashtab.o:Nobstack.o:Nprint-rtl.o:Nrtl.o}: ${SRCS:M*.h} + +# Next, make each of the problematic objects depend on only most headers. +# Filter out the headers that would cause problems (and a few more when it +# is inconvenient to filter precisely). +# +bitmap.o genattr.o gencodes.o genconfig.o genflags.o obstack.o print-rtl.o \ + rtl.o: ${SRCS:M*.h:Ninsn-*.h} +gencheck.o: gencheck.h ${SRCS:M*.h:Ngenrtl.h:Ntree-check.h:Ninsn-*.h} +gengenrtl.o: ${SRCS:M*.h:Ngenrtl.h:Ninsn-*.h} +.endif + +#GENSRCS+= safe-ctype.h +${OBJS} gensupport+%DIKED.o: safe-ctype.h +safe-ctype.h: Makefile + echo '#include ' > ${.TARGET} +.for Z in TOUPPER TOLOWER ISDIGIT ISXDIGIT ISUPPER ISLOWER ISALPHA ISALNUM ISSPACE ISPUNCT ISGRAPH ISBLANK ISPRINT ISCNTRL + echo '#define ${Z} ${Z:L}' >> ${.TARGET} +.endfor + echo "#define ISIDST(x) ((x) == '_' || isalpha(x))" >> ${.TARGET} + echo "#define ISIDNUM(x) (isdigit(x) || ISIDST(x))" >> ${.TARGET} + echo "#define IS_VSPACE(x) ((x) == '\n' || (x) == '\r')" >> ${.TARGET} + echo "#define IS_NVSPACE(x) (!IS_VSPACE(x) && (isspace(x) || (x) == '\0'))" >> ${.TARGET} + echo "#define IS_SPACE_OR_NUL(x) (isspace(x) || (x) == '\0')" >> ${.TARGET} diff --git a/gnu/usr.bin/cc/cc_tools/freebsd-native.h b/gnu/usr.bin/cc/cc_tools/freebsd-native.h new file mode 100644 index 00000000000..20094fe97ec --- /dev/null +++ b/gnu/usr.bin/cc/cc_tools/freebsd-native.h @@ -0,0 +1,69 @@ +/* $FreeBSD$ */ + +/* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD + source tree so it can be configured appropriately without using + the GNU configure/build mechanism. */ + +#undef FREEBSD_NATIVE +#define FREEBSD_NATIVE 1 + +/* Fake out gcc/config/freebsd.h. */ +#define FBSD_MAJOR 5 + +#undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ +#undef GCC_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/g++" +#define GCC_INCLUDE_DIR PREFIX"/include" +#ifdef CROSS_COMPILE +#define CROSS_INCLUDE_DIR PREFIX"/include" +#endif + +/* Under FreeBSD, the normal location of the compiler back ends is the + /usr/libexec directory. + + ``cc --print-search-dirs'' gives: + install: STANDARD_EXEC_PREFIX/(null) + programs: /usr/libexec//:MD_EXEC_PREFIX + libraries: MD_EXEC_PREFIX:MD_STARTFILE_PREFIX:STANDARD_STARTFILE_PREFIX + + We really don't need a "STANDARD_EXEC_PREFIX". However w/o it, + "--print-search-dirs" reports "install: /usr/local/lib/gcc-lib/(null)". + It is not harmful, but is just plain wrong. So we define a + "STANDARD_EXEC_PREFIX" to not be misleading. */ + +#undef STANDARD_EXEC_PREFIX +#undef TOOLDIR_BASE_PREFIX /* Old?? This is not documented. */ +#undef MD_EXEC_PREFIX + +#define STANDARD_EXEC_PREFIX PREFIX"/libexec/" +#define MD_EXEC_PREFIX PREFIX"/libexec/" + +/* Under FreeBSD, the normal location of the various *crt*.o files is the + /usr/lib directory. */ + +#undef STANDARD_STARTFILE_PREFIX +#undef MD_STARTFILE_PREFIX /* We don't need one for now. */ + +#define STANDARD_STARTFILE_PREFIX PREFIX"/lib/" + +/* FreeBSD is 4.4BSD derived */ +#define bsd4_4 + +/* Dike out [stupid, IMHO] libiberty functions. */ +#define xmalloc_set_program_name(dummy) +#define xmalloc malloc +#define xcalloc calloc +#define xrealloc realloc +#define xstrdup strdup +#define xstrerror strerror + +/* And now they want to replace ctype.h.... grr... [stupid, IMHO] */ +#define xxxISDIGIT isdigit +#define xxxISGRAPH isgraph +#define xxxISLOWER islower +#define xxxISSPACE isspace +#define xxxTOUPPER toupper From 523a651a6f5a16cbda0b7a12527c3a5355ed69d8 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 18 Dec 2001 03:20:31 +0000 Subject: [PATCH 09/47] Changes in order to compile GCC 3.0.2. The for-GCC-only preprocessor is now built using cpplib. --- gnu/usr.bin/cc/cccp/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gnu/usr.bin/cc/cccp/Makefile diff --git a/gnu/usr.bin/cc/cccp/Makefile b/gnu/usr.bin/cc/cccp/Makefile new file mode 100644 index 00000000000..70e1aba0140 --- /dev/null +++ b/gnu/usr.bin/cc/cccp/Makefile @@ -0,0 +1,16 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ${GCCDIR} + +PROG= cpp0 +SRCS= cppmain.c + +BINDIR= /usr/libexec +NOMAN= 1 + +DPADD+= ${LIBCC_INT} +LDADD+= ${LIBCC_INT} + +.include From 3dbb6175cdf615bd4095fc178b457136cb109e30 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 18 Dec 2001 03:21:49 +0000 Subject: [PATCH 10/47] Working changes for GCC 3.0.2. --- gnu/usr.bin/cc/f771/Makefile | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 gnu/usr.bin/cc/f771/Makefile diff --git a/gnu/usr.bin/cc/f771/Makefile b/gnu/usr.bin/cc/f771/Makefile new file mode 100644 index 00000000000..5e97d14c492 --- /dev/null +++ b/gnu/usr.bin/cc/f771/Makefile @@ -0,0 +1,52 @@ +# $FreeBSD$ + +.include "${.CURDIR}/../Makefile.inc" + +.PATH: ${GCCDIR}/f + +PROG= f771 +SRCS= bad.c bit.c bld.c com.c data.c equiv.c expr.c global.c implic.c info.c \ + intrin.c lab.c lex.c malloc.c name.c parse.c proj.c src.c st.c sta.c \ + stb.c stc.c std.c ste.c storag.c stp.c str.c sts.c stt.c stu.c stv.c \ + stw.c symbol.c target.c top.c type.c version.c where.c +BINDIR= /usr/libexec +NOMAN= + +CFLAGS+= -I${GCCDIR}/f -I. + +DPADD= ${LIBCC_INT} +LDADD= ${LIBCC_INT} + +build-tools: fini + +# The use of ``proj+%BT.o'' is to get around bogus dependacy information +# created for build-tools sources. +fini: fini.o proj+%BT.o # ${GCCDIR}/safe-ctype.c + ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} + +proj+%BT.o: proj.c + ${CC} ${CFLAGS} -o ${.TARGET} -c ${.ALLSRC} + +CLEANFILES+= fini fini.o proj+%BT.o + +#----------------------------------------------------------------------- +# str-* gunk + +.for i in 1t 2t fo io nq op ot +.ORDER: str-$i.h str-$i.j +str-$i.j str-$i.h: str-$i.fin fini + ./fini ${GCCDIR}/f/str-$i.fin str-$i.j str-$i.h + +FINIHDRS+= str-$i.j str-$i.h +.endfor + +CLEANFILES+= ${FINIHDRS} + +.include + +#----------------------------------------------------------------------- +# Fixups. + +.if !exists(${DEPENDFILE}) +${OBJS:Nproj.o} ${DEPENDFILE}: ${FINIHDRS} +.endif From 05f25aae147498b1f1d95decfb8063220d2fa67e Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 18 Dec 2001 03:22:23 +0000 Subject: [PATCH 11/47] Changes in order to compile GCC 3.0.2. --- gnu/usr.bin/cc/gcov/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gnu/usr.bin/cc/gcov/Makefile diff --git a/gnu/usr.bin/cc/gcov/Makefile b/gnu/usr.bin/cc/gcov/Makefile new file mode 100644 index 00000000000..e8be4693165 --- /dev/null +++ b/gnu/usr.bin/cc/gcov/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ${GCCDIR} ${GCCDIR}/doc + +PROG= gcov +SRCS= gcov.c + +.include From a19de87a67eae05c1439f854896460efd7214157 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 18 Dec 2001 03:24:18 +0000 Subject: [PATCH 12/47] I used this for one of the gcc 2.97 snapshots. It is here in case we decide we want the directory to match the binary name since neither the binary nor the source file(s) are named 'cccp' any longer. --- gnu/usr.bin/cc/cpp0/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gnu/usr.bin/cc/cpp0/Makefile diff --git a/gnu/usr.bin/cc/cpp0/Makefile b/gnu/usr.bin/cc/cpp0/Makefile new file mode 100644 index 00000000000..4dfea5f8f23 --- /dev/null +++ b/gnu/usr.bin/cc/cpp0/Makefile @@ -0,0 +1,16 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ${GCCDIR} + +PROG= cpp0 +SRCS= cppdefault.c cpperror.c cppexp.c cppfiles.c cpphash.c cppinit.c cpplex.c cpplib.c \ + cppmain.c cppulp.c mkdeps.c +BINDIR= /usr/libexec +NOMAN= 1 + +DPADD+= ${LIBCC_INT} +LDADD+= ${LIBCC_INT} + +.include From 4a88cacfed91172dec0d0083d1ec5a0706615ae6 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sat, 2 Mar 2002 00:54:17 +0000 Subject: [PATCH 13/47] MFC: rev 1.13 (use libgcc_p.a when -pg is in effect) --- gnu/usr.bin/cc/cc_tools/freebsd-native.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/usr.bin/cc/cc_tools/freebsd-native.h b/gnu/usr.bin/cc/cc_tools/freebsd-native.h index 20094fe97ec..8160d0b5d39 100644 --- a/gnu/usr.bin/cc/cc_tools/freebsd-native.h +++ b/gnu/usr.bin/cc/cc_tools/freebsd-native.h @@ -50,6 +50,10 @@ #define STANDARD_STARTFILE_PREFIX PREFIX"/lib/" +/* For the native system compiler, we actually build libgcc in a profiled + version. So we should use it with -pg. */ +#define LIBGCC_SPEC "%{!pg: -lgcc} %{pg: -lgcc_p}" + /* FreeBSD is 4.4BSD derived */ #define bsd4_4 From c21c782ba54ea308287bf9ff8dd47dd4e4850f8a Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sat, 2 Mar 2002 01:06:42 +0000 Subject: [PATCH 14/47] Clean up the style a little bit. --- gnu/usr.bin/cc/cc_tools/freebsd-native.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/gnu/usr.bin/cc/cc_tools/freebsd-native.h b/gnu/usr.bin/cc/cc_tools/freebsd-native.h index 8160d0b5d39..40654cd9df2 100644 --- a/gnu/usr.bin/cc/cc_tools/freebsd-native.h +++ b/gnu/usr.bin/cc/cc_tools/freebsd-native.h @@ -4,7 +4,6 @@ source tree so it can be configured appropriately without using the GNU configure/build mechanism. */ -#undef FREEBSD_NATIVE #define FREEBSD_NATIVE 1 /* Fake out gcc/config/freebsd.h. */ @@ -35,20 +34,15 @@ It is not harmful, but is just plain wrong. So we define a "STANDARD_EXEC_PREFIX" to not be misleading. */ -#undef STANDARD_EXEC_PREFIX -#undef TOOLDIR_BASE_PREFIX /* Old?? This is not documented. */ -#undef MD_EXEC_PREFIX - +#undef TOOLDIR_BASE_PREFIX /* Old?? This is not documented. */ #define STANDARD_EXEC_PREFIX PREFIX"/libexec/" #define MD_EXEC_PREFIX PREFIX"/libexec/" /* Under FreeBSD, the normal location of the various *crt*.o files is the /usr/lib directory. */ -#undef STANDARD_STARTFILE_PREFIX -#undef MD_STARTFILE_PREFIX /* We don't need one for now. */ - #define STANDARD_STARTFILE_PREFIX PREFIX"/lib/" +#undef MD_STARTFILE_PREFIX /* We don't need one for now. */ /* For the native system compiler, we actually build libgcc in a profiled version. So we should use it with -pg. */ From a370115d7de879fd7f3b657bf8a56de313688a8f Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 5 Mar 2002 00:17:24 +0000 Subject: [PATCH 15/47] Allow for better control over the GCC front-end when building a cross compiler. * Undo the diking out of cross compiler logic from gcc.c rev 1.16. * Add the `CROSS_STARTFILE_PREFIX' knob. * Add our own definition of `STANDARD_INCLUDE_DIR'. This should have been included in freebsd-native.h rev 1.5. --- gnu/usr.bin/cc/cc_tools/freebsd-native.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/usr.bin/cc/cc_tools/freebsd-native.h b/gnu/usr.bin/cc/cc_tools/freebsd-native.h index 40654cd9df2..cc9d906e4d7 100644 --- a/gnu/usr.bin/cc/cc_tools/freebsd-native.h +++ b/gnu/usr.bin/cc/cc_tools/freebsd-native.h @@ -19,6 +19,8 @@ #define GCC_INCLUDE_DIR PREFIX"/include" #ifdef CROSS_COMPILE #define CROSS_INCLUDE_DIR PREFIX"/include" +#else +#define STANDARD_INCLUDE_DIR PREFIX"/include" #endif /* Under FreeBSD, the normal location of the compiler back ends is the @@ -42,6 +44,9 @@ /usr/lib directory. */ #define STANDARD_STARTFILE_PREFIX PREFIX"/lib/" +#ifdef CROSS_COMPILE +#define CROSS_STARTFILE_PREFIX PREFIX"/lib/" +#endif #undef MD_STARTFILE_PREFIX /* We don't need one for now. */ /* For the native system compiler, we actually build libgcc in a profiled From e4753251f77671e7193f1c6bd34fa84fef4042c8 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 5 Mar 2002 00:39:29 +0000 Subject: [PATCH 16/47] Matching contrib/gcc/gcc.c commit of rev 1.23, remove misleading comment about 'STANDARD_EXEC_PREFIX'. It is used now and is needed if one does not set 'MD_EXEC_PREFIX'. Do not define a 'MD_EXEC_PREFIX'. It is not needed, not used in the cross case, and just ends up causing "/usr/libexec" being added to the library search path. --- gnu/usr.bin/cc/cc_tools/freebsd-native.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gnu/usr.bin/cc/cc_tools/freebsd-native.h b/gnu/usr.bin/cc/cc_tools/freebsd-native.h index cc9d906e4d7..8c9bd204eab 100644 --- a/gnu/usr.bin/cc/cc_tools/freebsd-native.h +++ b/gnu/usr.bin/cc/cc_tools/freebsd-native.h @@ -28,17 +28,12 @@ ``cc --print-search-dirs'' gives: install: STANDARD_EXEC_PREFIX/(null) - programs: /usr/libexec//:MD_EXEC_PREFIX + programs: /usr/libexec//:STANDARD_EXEC_PREFIX:MD_EXEC_PREFIX libraries: MD_EXEC_PREFIX:MD_STARTFILE_PREFIX:STANDARD_STARTFILE_PREFIX - - We really don't need a "STANDARD_EXEC_PREFIX". However w/o it, - "--print-search-dirs" reports "install: /usr/local/lib/gcc-lib/(null)". - It is not harmful, but is just plain wrong. So we define a - "STANDARD_EXEC_PREFIX" to not be misleading. */ - +*/ #undef TOOLDIR_BASE_PREFIX /* Old?? This is not documented. */ #define STANDARD_EXEC_PREFIX PREFIX"/libexec/" -#define MD_EXEC_PREFIX PREFIX"/libexec/" +#define MD_EXEC_PREFIX /* We don't want one. */ /* Under FreeBSD, the normal location of the various *crt*.o files is the /usr/lib directory. */ From fda035bb2c4b56b2cd4545360db7b6e65ba92067 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Thu, 4 Apr 2002 18:30:57 +0000 Subject: [PATCH 17/47] MFC: remove 2.6.3 cc_int shlib cruft and s/GNU_ARCH/TARGET_ARCH/g. --- gnu/usr.bin/cc/Makefile.inc | 5 +- gnu/usr.bin/cc/cc_int/Makefile | 6 +-- gnu/usr.bin/cc/cc_tools/Makefile | 86 ++++++++++++++++---------------- 3 files changed, 46 insertions(+), 51 deletions(-) diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index 97c0bb09b61..d074f9af688 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -7,12 +7,9 @@ GCCDIR= ${.CURDIR}/../../../../contrib/gcc TARGET_ARCH?= ${MACHINE_ARCH} -GCC_ARCH= ${TARGET_ARCH} # Machine description. -MD_FILE= ${GCCDIR}/config/${GCC_ARCH}/${GCC_ARCH}.md -OUT_FILE= ${GCC_ARCH}.c -OUT_OBJ= ${GCC_ARCH} +MD_FILE= ${GCCDIR}/config/${TARGET_ARCH}/${TARGET_ARCH}.md target= ${TARGET_ARCH}-unknown-freebsd version!= sed -n /version_string/p ${GCCDIR}/version.c | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' diff --git a/gnu/usr.bin/cc/cc_int/Makefile b/gnu/usr.bin/cc/cc_int/Makefile index 299ba481ce1..59051ae22dd 100644 --- a/gnu/usr.bin/cc/cc_int/Makefile +++ b/gnu/usr.bin/cc/cc_int/Makefile @@ -2,7 +2,7 @@ .include "../Makefile.inc" -.PATH: ../cc_tools ${GCCDIR}/config/${GCC_ARCH} ${GCCDIR} +.PATH: ../cc_tools ${GCCDIR}/config/${TARGET_ARCH} ${GCCDIR} LIB= cc_int NOPROFILE= YES @@ -24,7 +24,7 @@ SRCS= c-aux-info.c c-common.c c-convert.c c-format.c \ toplev.c tree.c unroll.c varasm.c version.c xcoffout.c \ alias.c bitmap.c dyn-string.c \ gcse.c genrtl.c profile.c regmove.c varray.c \ - ${OUT_FILE} + ${TARGET_ARCH}.c SRCS+= bb-reorder.c conflict.c ggc-common.c \ ggc-page.c ifcvt.c lists.c predict.c regrename.c resource.c sibcall.c \ @@ -62,6 +62,4 @@ CFLAGS+= -DTARGET_NAME=\"${target}\" -DIN_GCC install: @true -${OUT_OBJ}.o ${OUT_OBJ}.So: ${OUT_FILE} - .include diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile index bed52826158..4818c9d37e8 100644 --- a/gnu/usr.bin/cc/cc_tools/Makefile +++ b/gnu/usr.bin/cc/cc_tools/Makefile @@ -95,22 +95,22 @@ ${COMMONHDRS}: ${.CURDIR}/Makefile configargs.h: echo 'static const char configuration_arguments[] =' > ${.TARGET} - echo ' "FreeBSD/${GCC_ARCH} system compiler";' >> ${.TARGET} + echo ' "FreeBSD/${TARGET_ARCH} system compiler";' >> ${.TARGET} echo 'static const char thread_model[] = "posix";' >> ${.TARGET} config.h hconfig.h: - echo '#include "auto-host.h"' > ${.TARGET} - echo '#include "gansidecl.h"' >> ${.TARGET} - echo '#include "${GCC_ARCH}/xm-${GCC_ARCH}.h"' >> ${.TARGET} - echo '#include "defaults.h"' >> ${.TARGET} - echo '#include "hwint.h"' >> ${.TARGET} - echo '#ifndef POSIX' >> ${.TARGET} - echo '# define POSIX' >> ${.TARGET} - echo '#endif' >> ${.TARGET} - echo '#ifndef GENERATOR_FILE' >> ${.TARGET} - echo '#include "insn-codes.h"' >> ${.TARGET} - echo '#include "insn-flags.h"' >> ${.TARGET} - echo '#endif' >> ${.TARGET} + echo '#include "auto-host.h"' > ${.TARGET} + echo '#include "gansidecl.h"' >> ${.TARGET} + echo '#include "${TARGET_ARCH}/xm-${TARGET_ARCH}.h"' >> ${.TARGET} + echo '#include "defaults.h"' >> ${.TARGET} + echo '#include "hwint.h"' >> ${.TARGET} + echo '#ifndef POSIX' >> ${.TARGET} + echo '# define POSIX' >> ${.TARGET} + echo '#endif' >> ${.TARGET} + echo '#ifndef GENERATOR_FILE' >> ${.TARGET} + echo '#include "insn-codes.h"' >> ${.TARGET} + echo '#include "insn-flags.h"' >> ${.TARGET} + echo '#endif' >> ${.TARGET} gencheck.h: echo '#include "cp/cp-tree.def"' > ${.TARGET} @@ -136,44 +136,44 @@ specs.h: echo '#include "objc/lang-specs.h"' >> ${.TARGET} tconfig.h: - echo '#include "gansidecl.h"' > ${.TARGET} - echo '#include "${GCC_ARCH}/xm-${GCC_ARCH}.h"' >> ${.TARGET} - echo '#include "defaults.h"' >> ${.TARGET} - echo '#ifndef GENERATOR_FILE' >> ${.TARGET} - echo '#include "insn-codes.h"' >> ${.TARGET} - echo '#include "insn-flags.h"' >> ${.TARGET} - echo '#endif' >> ${.TARGET} - echo '#define USING_SJLJ_EXCEPTIONS 0' >> ${.TARGET} + echo '#include "gansidecl.h"' > ${.TARGET} + echo '#include "${TARGET_ARCH}/xm-${TARGET_ARCH}.h"' >> ${.TARGET} + echo '#include "defaults.h"' >> ${.TARGET} + echo '#ifndef GENERATOR_FILE' >> ${.TARGET} + echo '#include "insn-codes.h"' >> ${.TARGET} + echo '#include "insn-flags.h"' >> ${.TARGET} + echo '#endif' >> ${.TARGET} + echo '#define USING_SJLJ_EXCEPTIONS 0' >> ${.TARGET} # KEEP THIS IN SYNC with src/gcc/lib/libgcc/Makefile !! tm.h: - echo '#include "gansidecl.h"' > ${.TARGET} - echo '#include "${GCC_ARCH}/${GCC_ARCH}.h"' >> ${.TARGET} -.if ${GCC_ARCH} == "i386" - echo '#include "${GCC_ARCH}/att.h"' >> ${.TARGET} + echo '#include "gansidecl.h"' > ${.TARGET} + echo '#include "${TARGET_ARCH}/${TARGET_ARCH}.h"' >> ${.TARGET} +.if ${TARGET_ARCH} == "i386" + echo '#include "${TARGET_ARCH}/att.h"' >> ${.TARGET} .endif - echo '#include ' >> ${.TARGET} - echo '#include ' >> ${.TARGET} -.if exists(${GCCDIR}/config/${GCC_ARCH}/elf.h) - echo '#include "${GCC_ARCH}/elf.h"' >> ${.TARGET} + echo '#include ' >> ${.TARGET} + echo '#include ' >> ${.TARGET} +.if exists(${GCCDIR}/config/${TARGET_ARCH}/elf.h) + echo '#include "${TARGET_ARCH}/elf.h"' >> ${.TARGET} .endif - echo '#include "${GCC_ARCH}/freebsd.h"' >> ${.TARGET} -.if ${GCC_ARCH} == "i386" - echo '#include "${GCC_ARCH}/perform.h"' >> ${.TARGET} + echo '#include "${TARGET_ARCH}/freebsd.h"' >> ${.TARGET} +.if ${TARGET_ARCH} == "i386" + echo '#include "${TARGET_ARCH}/perform.h"' >> ${.TARGET} .endif - echo '#include "defaults.h"' >> ${.TARGET} - echo '#ifndef GENERATOR_FILE' >> ${.TARGET} - echo '#include "insn-codes.h"' >> ${.TARGET} - echo '#include "insn-flags.h"' >> ${.TARGET} - echo '#endif' >> ${.TARGET} + echo '#include "defaults.h"' >> ${.TARGET} + echo '#ifndef GENERATOR_FILE' >> ${.TARGET} + echo '#include "insn-codes.h"' >> ${.TARGET} + echo '#include "insn-flags.h"' >> ${.TARGET} + echo '#endif' >> ${.TARGET} tm_p.h: - echo '#include "${GCC_ARCH}/${GCC_ARCH}-protos.h"' > ${.TARGET} - echo '#include ' >> ${.TARGET} - echo '#ifndef GENERATOR_FILE' >> ${.TARGET} - echo '#include "insn-codes.h"' >> ${.TARGET} - echo '#include "insn-flags.h"' >> ${.TARGET} - echo '#endif' >> ${.TARGET} + echo '#include "${TARGET_ARCH}/${TARGET_ARCH}-protos.h"' > ${.TARGET} + echo '#include ' >> ${.TARGET} + echo '#ifndef GENERATOR_FILE' >> ${.TARGET} + echo '#include "insn-codes.h"' >> ${.TARGET} + echo '#include "insn-flags.h"' >> ${.TARGET} + echo '#endif' >> ${.TARGET} #----------------------------------------------------------------------- # General things. From 93c646073d20ba811af9e9f870baf6cea571c06d Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Thu, 4 Apr 2002 19:44:34 +0000 Subject: [PATCH 18/47] MFC: tidy up YACCing. --- gnu/usr.bin/cc/cc1/Makefile | 9 ++++----- gnu/usr.bin/cc/cc1obj/Makefile | 17 ++++++++--------- gnu/usr.bin/cc/cc1plus/Makefile | 2 +- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/gnu/usr.bin/cc/cc1/Makefile b/gnu/usr.bin/cc/cc1/Makefile index d1d6ce56f6b..9c5f37cc7aa 100644 --- a/gnu/usr.bin/cc/cc1/Makefile +++ b/gnu/usr.bin/cc/cc1/Makefile @@ -22,13 +22,12 @@ LDADD+= ${LIBCC_INT} .ORDER: c-parse.c c-parse.h c-parse.c c-parse.h: c-parse.in sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ - -e "/^ifc$$/d" -e "/^end ifc$$/d" \ - ${GCCDIR}/c-parse.in > c-parse.y + -e "/^ifc$$/d" \ + -e "/^end ifc$$/d" \ + ${.ALLSRC} > c-parse.y ${YACC} -d -o c-parse.c c-parse.y - mv c-parse.y c-parse.y.out -CLEANFILES+= c-parse.c c-parse.h \ - c-parse.y c-parse.y.out # insurance +CLEANFILES+= c-parse.c c-parse.h c-parse.y # insurance #----------------------------------------------------------------------- diff --git a/gnu/usr.bin/cc/cc1obj/Makefile b/gnu/usr.bin/cc/cc1obj/Makefile index dff38fb4b58..dd2ad3efd4b 100644 --- a/gnu/usr.bin/cc/cc1obj/Makefile +++ b/gnu/usr.bin/cc/cc1obj/Makefile @@ -5,7 +5,7 @@ .PATH: ../cc_tools ${GCCDIR}/objc ${GCCDIR} PROG= cc1obj -SRCS= objc-parse.c objc-parse.h objc-parse.h objc-act.c +SRCS= objc-parse.c c-parse.h objc-act.c # Ugh, compiled twice... SRCS+= c-decl.c c-lex.c c-typeck.c BINDIR= /usr/libexec @@ -19,17 +19,16 @@ LDADD+= ${LIBCC_INT} #----------------------------------------------------------------------- # objc parser -.ORDER: objc-parse.c objc-parse.h -objc-parse.c objc-parse.h: c-parse.in +.ORDER: objc-parse.c c-parse.h +objc-parse.c c-parse.h: c-parse.in sed -e "/^ifc$$/,/^end ifc$$/d" \ - -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \ - ${GCCDIR}/c-parse.in > objc-parse.y + -e "/^ifobjc$$/d" \ + -e "/^end ifobjc$$/d" \ + ${.ALLSRC} > objc-parse.y ${YACC} -d -o objc-parse.c objc-parse.y - ln -sf objc-parse.h c-parse.h - mv objc-parse.y objc-parse.y.out + mv objc-parse.h c-parse.h -CLEANFILES+= objc-parse.c objc-parse.h c-parse.h \ - objc-parse.y objc-parse.y.out # insurance +CLEANFILES+= objc-parse.c c-parse.h objc-parse.y # insurance #----------------------------------------------------------------------- diff --git a/gnu/usr.bin/cc/cc1plus/Makefile b/gnu/usr.bin/cc/cc1plus/Makefile index cf89851c1d8..0be4cda9670 100644 --- a/gnu/usr.bin/cc/cc1plus/Makefile +++ b/gnu/usr.bin/cc/cc1plus/Makefile @@ -21,7 +21,7 @@ LDADD+= ${LIBCC_INT} .ORDER: parse.c parse.h parse.c parse.h: parse.y - ${YACC} -d -o parse.c ${GCCDIR}/cp/parse.y + ${YACC} -d -o parse.c ${.ALLSRC} grep '^#define[ ]*YYEMPTY' parse.c >>parse.h CLEANFILES+= parse.c parse.h cfns.h From 9bd6dcbf9796e5274469268a9e2f939ff9beb27f Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Fri, 5 Apr 2002 08:54:28 +0000 Subject: [PATCH 19/47] MFC: rev 1.4 (style reorg) --- gnu/lib/csu/Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gnu/lib/csu/Makefile b/gnu/lib/csu/Makefile index c3a3f3e152e..3c57937ba80 100644 --- a/gnu/lib/csu/Makefile +++ b/gnu/lib/csu/Makefile @@ -20,11 +20,7 @@ CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \ -DIN_GCC \ -finhibit-size-directive -fno-inline-functions \ -fno-exceptions -fno-omit-frame-pointer -NOMAN= true -NOPIC= true -NOPROFILE= true INTERNALLIB= true -CLEANFILES+= tm.h CRTS_CFLAGS= -DCRTSTUFFS_O ${PICFLAG} @@ -39,7 +35,7 @@ crt${PART}.s: crt${PART}.asm ln -sf ${.ALLSRC} ${.TARGET} .endfor .else -crtbegin.o crtbegin.So crtend.o crtend.So: crtstuff.c tm.h +crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS} .endif crtbegin.o: @@ -58,6 +54,7 @@ crtend.So: ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \ -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h} +CLEANFILES+= tm.h # KEEP THIS IN SYNC with src/gnu/usr.bin/cc/cc_tools/Makefile !! tm.h: echo '#include "gansidecl.h"' > ${.TARGET} From 4d484dd742600a0cca79daa23891d4240f4aa34d Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Fri, 5 Apr 2002 09:02:52 +0000 Subject: [PATCH 20/47] Update for GCC 3.1. (Alpha now uses crtstuff rather than the ASM verisons!) --- gnu/lib/csu/Makefile | 69 ++++++++++---------------------------------- 1 file changed, 16 insertions(+), 53 deletions(-) diff --git a/gnu/lib/csu/Makefile b/gnu/lib/csu/Makefile index 3c57937ba80..27412de8f66 100644 --- a/gnu/lib/csu/Makefile +++ b/gnu/lib/csu/Makefile @@ -1,81 +1,44 @@ # $FreeBSD$ -GCCDIR= ${.CURDIR}/../../../contrib/gcc - -TARGET_ARCH?= ${MACHINE_ARCH} - -.if ${TARGET_ARCH} == "alpha" -.PATH: ${GCCDIR}/config/alpha -SRCS= crtbegin.s crtend.s -UGLYHACK= -x assembler -.else +GCCDIR= ${.CURDIR}/../../../contrib/gcc .PATH: ${GCCDIR} -SRCS= crtstuff.c tm.h -.endif + +SRCS= crtstuff.c tconfig.h OBJS= crtbegin.o crtend.o SOBJS= crtbegin.So crtend.So -CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \ - -I${.CURDIR}/../../usr.bin/cc/cc_tools -I../../usr.bin/cc/cc_tools \ - -DIN_GCC \ - -finhibit-size-directive -fno-inline-functions \ +CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR +CFLAGS+= -finhibit-size-directive -fno-inline-functions \ -fno-exceptions -fno-omit-frame-pointer -INTERNALLIB= true - +CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \ + -I${.CURDIR}/../../usr.bin/cc/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O ${PICFLAG} +MKDEPCMD= CC=${CC} MKDEP_CPP_OPTS="-M -DCRT_BEGIN" mkdep +INTERNALLIB= true all: ${OBJS} ${SOBJS} -.if ${TARGET_ARCH} == "alpha" -crtbegin.o crtbegin.So: crtbegin.s -crtend.o crtend.So: crtend.s -.for PART in begin end -CLEANFILES+= crt${PART}.s -crt${PART}.s: crt${PART}.asm - ln -sf ${.ALLSRC} ${.TARGET} -.endfor -.else crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS} -.endif crtbegin.o: ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \ - -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h} crtbegin.So: ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \ - -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h} crtend.o: ${CC} ${CFLAGS} -g0 -DCRT_END \ - -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h} crtend.So: ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \ - -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h} -CLEANFILES+= tm.h -# KEEP THIS IN SYNC with src/gnu/usr.bin/cc/cc_tools/Makefile !! -tm.h: - echo '#include "gansidecl.h"' > ${.TARGET} - echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' >> ${.TARGET} -.if ${MACHINE_ARCH} == "i386" - echo '#include "${MACHINE_ARCH}/att.h"' >> ${.TARGET} -.endif - echo '#include ' >> ${.TARGET} - echo '#include ' >> ${.TARGET} -.if exists(${MACHINE_ARCH}/config/${MACHINE_ARCH}/elf.h) - echo '#include "${MACHINE_ARCH}/elf.h"' >> ${.TARGET} -.endif - echo '#include "${MACHINE_ARCH}/freebsd.h"' >> ${.TARGET} -.if ${MACHINE_ARCH} == "i386" - echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET} -.endif - echo '#include "defaults.h"' >> ${.TARGET} - echo '#ifndef GENERATOR_FILE' >> ${.TARGET} - echo '#include "insn-codes.h"' >> ${.TARGET} - echo '#include "insn-flags.h"' >> ${.TARGET} - echo '#endif' >> ${.TARGET} +CLEANFILES= tconfig.h +tconfig.h: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile + ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} ${.TARGET} realinstall: .for file in ${OBJS} ${SOBJS} From 0b3c5f4098d3281db2df25d255ae16ee4bcdcad1 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Fri, 5 Apr 2002 09:20:49 +0000 Subject: [PATCH 21/47] MFC: reorg. --- gnu/lib/libgcc/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile index 9e1294471ab..974bc1a0623 100644 --- a/gnu/lib/libgcc/Makefile +++ b/gnu/lib/libgcc/Makefile @@ -18,17 +18,15 @@ INSTALL_PIC_ARCHIVE= yes CFLAGS+= -fexceptions CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED .if ${OBJFORMAT} != aout -#CFLAGS+= -fPIC -D_PTHREADS -DGTHREAD_USE_WEAK CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK .endif all: lib${LIB}.a +CLEANFILES+= lib${LIB}.a lib${LIB}.a: libgcc_build.a cp -p ${.ALLSRC} ${.TARGET} -CLEANFILES+= lib${LIB}.a - # # fake out to semi-follow what is done in GCC's Makefile.in # From bb5545c63eaae16f5dc7ac6bb1cf6f4898aa2ba4 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Fri, 5 Apr 2002 12:14:36 +0000 Subject: [PATCH 22/47] Tell GCC 3.1 our capibilities. --- gnu/usr.bin/cc/cc_tools/auto-host.h | 236 +++++++++++++++++++--------- 1 file changed, 165 insertions(+), 71 deletions(-) diff --git a/gnu/usr.bin/cc/cc_tools/auto-host.h b/gnu/usr.bin/cc/cc_tools/auto-host.h index 94007e8bf03..3c0c3eaa20f 100644 --- a/gnu/usr.bin/cc/cc_tools/auto-host.h +++ b/gnu/usr.bin/cc/cc_tools/auto-host.h @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* auto-host.h. Generated automatically by configure. */ -/* config.in. Generated automatically from configure.in by autoheader. */ +/* config.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define if using alloca.c. */ /* #undef C_ALLOCA */ @@ -26,9 +26,6 @@ /* Define if you have and it should be used (not on Ultrix). */ /* #undef HAVE_ALLOCA_H */ -/* Define if you don't have vprintf but do have _doprnt. */ -/* #undef HAVE_DOPRNT */ - /* Define if you have the ANSI # stringizing operator in cpp. */ #define HAVE_STRINGIZE 1 @@ -38,9 +35,6 @@ /* Define if you have . */ /* #undef HAVE_VFORK_H */ -/* Define if you have the vprintf function. */ -#define HAVE_VPRINTF 1 - /* Define as __inline if that's what the C compiler calls it. */ /* #undef inline */ @@ -77,23 +71,8 @@ /* Define vfork as fork if vfork does not work. */ /* #undef vfork */ -/* Define to 1 if NLS is requested. */ -/* #undef ENABLE_NLS */ - -/* Define as 1 if you have catgets and don't want to use GNU gettext. */ -/* #undef HAVE_CATGETS */ - -/* Define as 1 if you have gettext and don't want to use GNU gettext. */ -/* #undef HAVE_GETTEXT */ - -/* Define if your locale.h file contains LC_MESSAGES. */ -#define HAVE_LC_MESSAGES 1 - -/* Define as 1 if you have the stpcpy function. */ -/* #undef HAVE_STPCPY */ - /* Define if your assembler supports specifying the maximum number - of bytes to skip when using the GAS .p2align command. */ + of bytes to skip when using the GAS .p2align command. */ #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 /* Define if your assembler supports .balign and .p2align. */ @@ -105,6 +84,9 @@ /* Define to `int' if doesn't define. */ /* #undef ssize_t */ +/* Define if cpp should also search $prefix/include. */ +#define PREFIX_INCLUDE_DIR "NONE/include" + /* Define if you have the __argz_count function. */ /* #undef HAVE___ARGZ_COUNT */ @@ -115,29 +97,50 @@ /* #undef HAVE___ARGZ_STRINGIFY */ /* Define if you have the atoll function. */ -/* #undef HAVE_ATOLL */ +#define HAVE_ATOLL 1 /* Define if you have the atoq function. */ /* #undef HAVE_ATOQ */ -/* Define if you have the bcopy function. */ -#define HAVE_BCOPY 1 - -/* Define if you have the bsearch function. */ -#define HAVE_BSEARCH 1 +/* Define if you have the clock function. */ +#define HAVE_CLOCK 1 /* Define if you have the dcgettext function. */ /* #undef HAVE_DCGETTEXT */ +/* Define if you have the dup2 function. */ +#define HAVE_DUP2 1 + +/* Define if you have the feof_unlocked function. */ +/* #undef HAVE_FEOF_UNLOCKED */ + +/* Define if you have the fgets_unlocked function. */ +/* #undef HAVE_FGETS_UNLOCKED */ + +/* Define if you have the fprintf_unlocked function. */ +/* #undef HAVE_FPRINTF_UNLOCKED */ + /* Define if you have the fputc_unlocked function. */ /* #undef HAVE_FPUTC_UNLOCKED */ /* Define if you have the fputs_unlocked function. */ /* #undef HAVE_FPUTS_UNLOCKED */ +/* Define if you have the fwrite_unlocked function. */ +/* #undef HAVE_FWRITE_UNLOCKED */ + /* Define if you have the getcwd function. */ #define HAVE_GETCWD 1 +/* Define if you have the getegid function. */ +#define HAVE_GETEGID 1 + +/* Define if you have the geteuid function. */ +#define HAVE_GETEUID 1 + +/* Define if you have the getgid function. */ +#define HAVE_GETGID 1 + /* Define if you have the getpagesize function. */ #define HAVE_GETPAGESIZE 1 @@ -147,11 +150,8 @@ /* Define if you have the getrusage function. */ #define HAVE_GETRUSAGE 1 -/* Define if you have the gettimeofday function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define if you have the isascii function. */ -#define HAVE_ISASCII 1 +/* Define if you have the getuid function. */ +#define HAVE_GETUID 1 /* Define if you have the kill function. */ #define HAVE_KILL 1 @@ -159,15 +159,15 @@ /* Define if you have the lstat function. */ #define HAVE_LSTAT 1 +/* Define if you have the mempcpy function. */ +/* #undef HAVE_MEMPCPY */ + /* Define if you have the munmap function. */ #define HAVE_MUNMAP 1 /* Define if you have the nl_langinfo function. */ #define HAVE_NL_LANGINFO 1 -/* Define if you have the popen function. */ -#define HAVE_POPEN 1 - /* Define if you have the putc_unlocked function. */ /* #undef HAVE_PUTC_UNLOCKED */ @@ -195,21 +195,21 @@ /* Define if you have the strdup function. */ #define HAVE_STRDUP 1 -/* Define if you have the strrchr function. */ -#define HAVE_STRRCHR 1 - /* Define if you have the strsignal function. */ #define HAVE_STRSIGNAL 1 -/* Define if you have the strstr function. */ -#define HAVE_STRSTR 1 - /* Define if you have the strtoul function. */ #define HAVE_STRTOUL 1 /* Define if you have the sysconf function. */ #define HAVE_SYSCONF 1 +/* Define if you have the times function. */ +#define HAVE_TIMES 1 + +/* Define if you have the tsearch function. */ +#define HAVE_TSEARCH 1 + /* Define if you have the header file. */ /* #undef HAVE_ARGZ_H */ @@ -234,9 +234,6 @@ /* Define if you have the header file. */ #define HAVE_NL_TYPES_H 1 -/* Define if you have the header file. */ -#define HAVE_STAB_H 1 - /* Define if you have the header file. */ #define HAVE_STDDEF_H 1 @@ -273,9 +270,6 @@ /* Define if you have the header file. */ #define HAVE_UNISTD_H 1 -/* Define if you have the i library (-li). */ -/* #undef HAVE_LIBI */ - /* Define to enable the use of a default linker. */ /* #undef DEFAULT_LINKER */ @@ -283,7 +277,7 @@ /* #undef DEFAULT_ASSEMBLER */ #ifdef WANT_COMPILER_INVARIANTS -/* #warning WANT_COMPILER_INVARIANTS turned on*/ +//#warning WANT_COMPILER_INVARIANTS turned on /* Define if you want more run-time sanity checks. This one gets a grab bag of miscellaneous but relatively cheap checks. */ @@ -308,35 +302,81 @@ every opportunity. This is extremely expensive. */ #define ENABLE_GC_ALWAYS_COLLECT 1 -#endif +#endif /* WANT_COMPILER_INVARIANTS */ /* Define if you want the C and C++ compilers to support multibyte character sets for source code. */ /* #undef MULTIBYTE_CHARS */ +/* Define if your compiler understands volatile. */ +#define HAVE_VOLATILE 1 + /* Define if your compiler supports the `long double' type. */ #define HAVE_LONG_DOUBLE 1 +/* Define if your compiler supports the `long long' type. */ +#define HAVE_LONG_LONG 1 + +/* Define if your compiler supports the `__int64' type. */ +/* #undef HAVE___INT64 */ + /* Define if the `_Bool' type is built-in. */ /* #undef HAVE__BOOL */ +/* The number of bytes in type short */ +#define SIZEOF_SHORT 2 + +/* The number of bytes in type int */ +#define SIZEOF_INT 4 + +/* The number of bytes in type long */ +/* #define SIZEOF_LONG 4 */ +#if defined(__i386__) || defined(__powerpc__) || defined(__strongarm__) +#define SIZEOF_LONG SIZEOF_INT +#elif defined(__alpha__) || defined(__sparc64__) || defined(__ia64__) +#define SIZEOF_LONG SIZEOF_LONG_LONG +#else +#error "I don't know what arch this is." +#endif + +/* The number of bytes in type long long */ +#define SIZEOF_LONG_LONG 8 + +/* The number of bytes in type __int64 */ +/* #undef SIZEOF___INT64 */ + +/* Define if the host execution character set is EBCDIC. */ +/* #undef HOST_EBCDIC */ + /* Always define this when using the GNU C Library */ /* #undef _GNU_SOURCE */ -/* Define if your compiler understands volatile. */ -#define HAVE_VOLATILE 1 - /* Define if you have a working header file. */ #define HAVE_STDBOOL_H 1 /* Define if you can safely include both and . */ #define STRING_WITH_STRINGS 1 -/* Define if you have a working header file. */ -/* #undef HAVE_INTTYPES_H */ +/* Define as the number of bits in a byte, if `limits.h' doesn't. */ +/* #undef CHAR_BIT */ -/* Define if enumerated bitfields are treated as unsigned values. */ -#define ENUM_BITFIELDS_ARE_UNSIGNED 1 +/* Define if the host machine stores words of multi-word integers in + big-endian order. */ +/* #undef HOST_WORDS_BIG_ENDIAN */ + +/* Define to the floating point format of the host machine, if not IEEE. */ +/* #undef HOST_FLOAT_FORMAT */ + +/* Define to 1 if the host machine stores floating point numbers in + memory with the word containing the sign bit at the lowest address, + or to 0 if it does it the other way around. + + This macro should not be defined if the ordering is the same as for + multi-word integers. */ +/* #undef HOST_FLOAT_WORDS_BIG_ENDIAN */ + +/* Define if you have a working header file. */ +#define HAVE_INTTYPES_H 1 /* Define if printf supports %p. */ #define HAVE_PRINTF_PTR 1 @@ -356,9 +396,6 @@ /* Define as const if the declaration of iconv() needs const. */ /* #undef ICONV_CONST */ -/* Define to 1 if we found this declaration otherwise define to 0. */ -#define HAVE_DECL_BCOPY 1 - /* Define to 1 if we found this declaration otherwise define to 0. */ #define HAVE_DECL_GETENV 1 @@ -389,11 +426,17 @@ /* Define to 1 if we found this declaration otherwise define to 0. */ #define HAVE_DECL_FPUTS_UNLOCKED 0 +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_FWRITE_UNLOCKED 0 + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_FPRINTF_UNLOCKED 0 + /* Define to 1 if we found this declaration otherwise define to 0. */ #define HAVE_DECL_STRSTR 1 /* Define to 1 if we found this declaration otherwise define to 0. */ -#define HAVE_DECL_ENVIRON 0 +#define HAVE_DECL_ERRNO 1 /* Define to 1 if we found this declaration otherwise define to 0. */ #define HAVE_DECL_MALLOC 1 @@ -413,6 +456,9 @@ /* Define to 1 if we found this declaration otherwise define to 0. */ #define HAVE_DECL_GETOPT 1 +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_CLOCK 1 + /* Define to 1 if we found this declaration otherwise define to 0. */ #define HAVE_DECL_GETRLIMIT 1 @@ -422,21 +468,50 @@ /* Define to 1 if we found this declaration otherwise define to 0. */ #define HAVE_DECL_GETRUSAGE 1 +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_TIMES 1 + +/* Define if defines struct tms. */ +#define HAVE_STRUCT_TMS 1 + +/* Define if defines clock_t. */ +#define HAVE_CLOCK_T 1 + /* Define if host mkdir takes a single argument. */ /* #undef MKDIR_TAKES_ONE_ARG */ -/* Define to the name of the distribution. */ -#define PACKAGE "gcc" +/* Define if you have the iconv() function. */ +/* #undef HAVE_ICONV */ -/* Define to the version of the distribution. */ -#define VERSION "3.0.1" +/* Define as const if the declaration of iconv() needs const. */ +/* #undef ICONV_CONST */ + +/* Define if you have and nl_langinfo(CODESET). */ +#define HAVE_LANGINFO_CODESET 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if translation of program messages to the user's native language + is requested. */ +/* #define ENABLE_NLS 1 */ + +/* Define if you have the header file. */ +/* #undef HAVE_LIBINTL_H */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to use the libintl included with this package instead of any + version in the system libraries. */ +/* #define USE_INCLUDED_LIBINTL 1 */ /* Define to 1 if installation paths should be looked up in Windows32 Registry. Ignored on non windows32 hosts. */ -#define ENABLE_WIN32_REGISTRY 1 +/* #undef ENABLE_WIN32_REGISTRY */ /* Define to be the last portion of registry key on windows hosts. */ -#define WIN32_REGISTRY_KEY "3.0.1" +/* #undef WIN32_REGISTRY_KEY */ /* Define if your assembler supports .subsection and .subsection -1 starts emitting at the beginning of your section. */ @@ -454,23 +529,42 @@ /* Define if your assembler mis-optimizes .eh_frame data. */ /* #undef USE_AS_TRADITIONAL_FORMAT */ +/* Define if your assembler supports marking sections with SHF_MERGE flag. */ +#define HAVE_GAS_SHF_MERGE 1 + +/* Define if your assembler supports explicit relocations. */ +/* #undef HAVE_AS_EXPLICIT_RELOCS */ + /* Define if your assembler supports .register. */ /* #undef HAVE_AS_REGISTER_PSEUDO_OP */ /* Define if your assembler supports -relax option. */ /* #undef HAVE_AS_RELAX_OPTION */ +/* Define if your assembler and linker support unaligned PC relative relocs. */ +/* #undef HAVE_AS_SPARC_UA_PCREL */ + /* Define if the assembler supports 64bit sparc. */ /* #undef AS_SPARC64_FLAG */ /* Define if your assembler supports offsetable %lo(). */ /* #undef HAVE_AS_OFFSETABLE_LO10 */ -/* Define if your assembler supports dwarf2 .file/.loc directives. */ +/* Define true if the assembler supports '.long foo@GOTOFF'. */ +#define HAVE_AS_GOTOFF_IN_DATA 1 + +/* Define if your assembler supports dwarf2 .file/.loc directives, + and preserves file table indices exactly as given. */ /* #undef HAVE_AS_DWARF2_DEBUG_LINE */ -/* Define to 1 if you want to enable namespaces (-fhonor-std) by default. */ -#define ENABLE_STD_NAMESPACE 1 +/* Define if your assembler supports the --gdwarf2 option. */ +#define HAVE_AS_GDWARF2_DEBUG_FLAG 1 + +/* Define if your assembler supports the --gstabs option. */ +#define HAVE_AS_GSTABS_DEBUG_FLAG 1 + +/* Define if your linker supports --eh-frame-hdr option. */ +#define HAVE_LD_EH_FRAME_HDR 1 /* Define 0/1 to force the choice for exception handling model. */ /* #undef CONFIG_SJLJ_EXCEPTIONS */ From 5d8d0d50cad1643b2a9f6cb88d609d8b7d7eb3e1 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sat, 6 Apr 2002 19:13:25 +0000 Subject: [PATCH 23/47] Deal with new TarGeT-specific CRT files. (sparc64 introduced the first) --- gnu/lib/csu/Makefile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gnu/lib/csu/Makefile b/gnu/lib/csu/Makefile index 27412de8f66..5e9a5999fe5 100644 --- a/gnu/lib/csu/Makefile +++ b/gnu/lib/csu/Makefile @@ -3,20 +3,27 @@ GCCDIR= ${.CURDIR}/../../../contrib/gcc .PATH: ${GCCDIR} -SRCS= crtstuff.c tconfig.h +CCDIR= ${.CURDIR}/../../usr.bin/cc +.include "${CCDIR}/Makefile.tgt" +SRCS= crtstuff.c tconfig.h OBJS= crtbegin.o crtend.o SOBJS= crtbegin.So crtend.So CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR CFLAGS+= -finhibit-size-directive -fno-inline-functions \ -fno-exceptions -fno-omit-frame-pointer CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \ - -I${.CURDIR}/../../usr.bin/cc/cc_tools + -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O ${PICFLAG} MKDEPCMD= CC=${CC} MKDEP_CPP_OPTS="-M -DCRT_BEGIN" mkdep INTERNALLIB= true -all: ${OBJS} ${SOBJS} +.if ${TARGET_ARCH} == "sparc64" +.PATH: ${GCCDIR}/config/${GCC_CPU} +TGTOBJS= crtfastmath.o +.endif + +all: ${OBJS} ${SOBJS} ${TGTOBJS} crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS} @@ -37,11 +44,11 @@ crtend.So: -c -o ${.TARGET} ${.ALLSRC:N*.h} CLEANFILES= tconfig.h -tconfig.h: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile +tconfig.h: ${CCDIR}/cc_tools/Makefile ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} ${.TARGET} realinstall: -.for file in ${OBJS} ${SOBJS} +.for file in ${OBJS} ${SOBJS} ${TGTOBJS} ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${file} ${DESTDIR}${LIBDIR}/${file:S/.So$/S.o/} .endfor From 4e6aeb72b4312c4c9bfb14910ff904403a004d40 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Sat, 6 Apr 2002 23:16:27 +0000 Subject: [PATCH 24/47] This commit was manufactured by cvs2svn to create branch 'WIP_GCC31'. --- gnu/usr.bin/cc/Makefile.fe | 1 + gnu/usr.bin/cc/Makefile.tgt | 1 + gnu/usr.bin/cc/collect2/Makefile | 30 ++++++++++++++++++++++++++++++ gnu/usr.bin/cc/protoize/Makefile | 7 +++++++ 4 files changed, 39 insertions(+) create mode 100644 gnu/usr.bin/cc/Makefile.fe create mode 100644 gnu/usr.bin/cc/Makefile.tgt create mode 100644 gnu/usr.bin/cc/collect2/Makefile create mode 100644 gnu/usr.bin/cc/protoize/Makefile diff --git a/gnu/usr.bin/cc/Makefile.fe b/gnu/usr.bin/cc/Makefile.fe new file mode 100644 index 00000000000..e8c0da7a1d7 --- /dev/null +++ b/gnu/usr.bin/cc/Makefile.fe @@ -0,0 +1 @@ +# $FreeBSD$ diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt new file mode 100644 index 00000000000..e8c0da7a1d7 --- /dev/null +++ b/gnu/usr.bin/cc/Makefile.tgt @@ -0,0 +1 @@ +# $FreeBSD$ diff --git a/gnu/usr.bin/cc/collect2/Makefile b/gnu/usr.bin/cc/collect2/Makefile new file mode 100644 index 00000000000..8b285161736 --- /dev/null +++ b/gnu/usr.bin/cc/collect2/Makefile @@ -0,0 +1,30 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ${GCCDIR} + +PROG= collect2 +SRCS= collect2.c cplus-dem.c tlink.c underscore.c +BINDIR= /usr/libexec +NOMAN= +NOSHARED?=yes + +DPADD+= ${LIBCC_INT} +LDADD+= ${LIBCC_INT} + +CLEANFILES= tmp-dum.c tmp-dum.s underscore.c +underscore.c: Makefile + echo "int xxy_us_dummy;" >tmp-dum.c + ${CC} -S tmp-dum.c + echo '/*WARNING: This file is automatically generated!*/' >underscore.c + if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \ + echo "int prepends_underscore = 1;" >>underscore.c; \ + else \ + echo "int prepends_underscore = 0;" >>underscore.c; \ + fi + # wrong to do this here, but easiest way out to duplicate gcc.c. + echo "char *xstrerror(int e) { return strerror(e); }" >>underscore.c + rm -f tmp-dum.c tmp-dum.s + +.include diff --git a/gnu/usr.bin/cc/protoize/Makefile b/gnu/usr.bin/cc/protoize/Makefile new file mode 100644 index 00000000000..08f29efefb2 --- /dev/null +++ b/gnu/usr.bin/cc/protoize/Makefile @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ${GCCDIR} + +.include From 9e3b0010176971fc4da7fd68991a816118053288 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sat, 6 Apr 2002 23:18:01 +0000 Subject: [PATCH 25/47] Bmake bits for GCC 3.1. --- gnu/usr.bin/cc/Makefile | 31 +++++ gnu/usr.bin/cc/Makefile.fe | 4 + gnu/usr.bin/cc/Makefile.inc | 4 +- gnu/usr.bin/cc/Makefile.tgt | 15 +++ gnu/usr.bin/cc/c++/Makefile | 20 +++ gnu/usr.bin/cc/c++filt/Makefile | 15 +-- gnu/usr.bin/cc/cc/Makefile | 22 ++++ gnu/usr.bin/cc/cc1/Makefile | 19 +-- gnu/usr.bin/cc/cc1obj/Makefile | 20 +-- gnu/usr.bin/cc/cc1plus/Makefile | 21 +-- gnu/usr.bin/cc/cc_drv/Makefile | 20 +++ gnu/usr.bin/cc/cc_fbsd/Makefile | 18 +++ gnu/usr.bin/cc/cc_int/Makefile | 50 +++++-- gnu/usr.bin/cc/cc_tools/Makefile | 158 ++++++++++++----------- gnu/usr.bin/cc/cc_tools/freebsd-native.h | 3 +- gnu/usr.bin/cc/cccp/Makefile | 20 ++- gnu/usr.bin/cc/collect2/Makefile | 20 +-- gnu/usr.bin/cc/cpp/Makefile | 18 +++ gnu/usr.bin/cc/cpp0/Makefile | 22 +++- gnu/usr.bin/cc/doc/Makefile | 19 +++ gnu/usr.bin/cc/f77/Makefile | 23 ++++ gnu/usr.bin/cc/f771/Makefile | 16 +-- gnu/usr.bin/cc/f77doc/Makefile | 13 ++ gnu/usr.bin/cc/gcov/Makefile | 5 +- gnu/usr.bin/cc/protoize/Makefile | 16 ++- 25 files changed, 423 insertions(+), 169 deletions(-) create mode 100644 gnu/usr.bin/cc/Makefile create mode 100644 gnu/usr.bin/cc/c++/Makefile create mode 100644 gnu/usr.bin/cc/cc/Makefile create mode 100644 gnu/usr.bin/cc/cc_drv/Makefile create mode 100644 gnu/usr.bin/cc/cc_fbsd/Makefile create mode 100644 gnu/usr.bin/cc/cpp/Makefile create mode 100644 gnu/usr.bin/cc/doc/Makefile create mode 100644 gnu/usr.bin/cc/f77/Makefile create mode 100644 gnu/usr.bin/cc/f77doc/Makefile diff --git a/gnu/usr.bin/cc/Makefile b/gnu/usr.bin/cc/Makefile new file mode 100644 index 00000000000..7b0fec3ec99 --- /dev/null +++ b/gnu/usr.bin/cc/Makefile @@ -0,0 +1,31 @@ +# $FreeBSD$ + +# The order of some of these are rather important. Some depend on previous +# subdirs. + +SUBDIR= cc_fbsd cc_tools cc_int cccp cc1 cc protoize + +.if !defined(NO_CPP) +SUBDIR+= cpp +.endif + +.if !defined(NO_CXX) +SUBDIR+= cc1plus c++ c++filt doc +.if !defined(NO_COLLECT2) +SUBDIR+= collect2 +.endif +.endif + +.if !defined(NO_OBJC) +SUBDIR+= cc1obj +.endif + +.if !defined(NO_FORTRAN) +SUBDIR+= f77 f771 f77doc +.endif + +.if !defined(NO_GCOV) +SUBDIR+= gcov +.endif + +.include diff --git a/gnu/usr.bin/cc/Makefile.fe b/gnu/usr.bin/cc/Makefile.fe index e8c0da7a1d7..c4a02f88bf2 100644 --- a/gnu/usr.bin/cc/Makefile.fe +++ b/gnu/usr.bin/cc/Makefile.fe @@ -1 +1,5 @@ # $FreeBSD$ + +# Front-end-only bits + +version!= sed -n /version_string/p ${GCCDIR}/version.c | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index d074f9af688..d4918055542 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -6,14 +6,12 @@ .if !defined(GCCDIR) GCCDIR= ${.CURDIR}/../../../../contrib/gcc -TARGET_ARCH?= ${MACHINE_ARCH} +.include "Makefile.tgt" # Machine description. MD_FILE= ${GCCDIR}/config/${TARGET_ARCH}/${TARGET_ARCH}.md target= ${TARGET_ARCH}-unknown-freebsd -version!= sed -n /version_string/p ${GCCDIR}/version.c | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' - CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\" CFLAGS+= -DWANT_COMPILER_INVARIANTS diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt index e8c0da7a1d7..19dc3fa4c38 100644 --- a/gnu/usr.bin/cc/Makefile.tgt +++ b/gnu/usr.bin/cc/Makefile.tgt @@ -1 +1,16 @@ # $FreeBSD$ + +TARGET_ARCH?= ${MACHINE_ARCH} + +.if ${TARGET_ARCH} == "alpha" +GCC_CPU= alpha +.elif ${TARGET_ARCH} == "arm" +GCC_CPU= arm +.elif ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "x86-64" +GCC_CPU= i386 +.elif ${TARGET_ARCH} == "powerpc" +GCC_CPU= rs6000 +.elif ${TARGET_ARCH} == "sparc64" +GCC_CPU= sparc +TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc +.endif diff --git a/gnu/usr.bin/cc/c++/Makefile b/gnu/usr.bin/cc/c++/Makefile new file mode 100644 index 00000000000..be231122fa9 --- /dev/null +++ b/gnu/usr.bin/cc/c++/Makefile @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.include "../Makefile.inc" +.include "../Makefile.fe" + +.PATH: ${GCCDIR}/cp ${GCCDIR} + +PROG= c++ +SRCS= gcc.c g++spec.c +LINKS= ${BINDIR}/c++ ${BINDIR}/g++ +LINKS+= ${BINDIR}/c++ ${BINDIR}/CC +NOMAN= 1 + +CFLAGS+= -DDEFAULT_TARGET_VERSION=\"$(version)\" +CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"$(target)\" + +DPADD+= ${LIBCC_INT} ${LIBCC_FBSD} +LDADD+= ${LIBCC_INT} ${LIBCC_FBSD} + +.include diff --git a/gnu/usr.bin/cc/c++filt/Makefile b/gnu/usr.bin/cc/c++filt/Makefile index 30ed4fe22a3..0f2ba7a68d9 100644 --- a/gnu/usr.bin/cc/c++filt/Makefile +++ b/gnu/usr.bin/cc/c++filt/Makefile @@ -5,7 +5,7 @@ .PATH: ${GCCDIR} PROG= c++filt -SRCS= cp-demangle.c cplus-dem+%DIKED.c getopt.c getopt1.c underscore.c +SRCS= cp-demangle.c cplus-dem+%DIKED.c BINDIR= /usr/libexec/${OBJFORMAT} NOMAN= 1 @@ -14,19 +14,6 @@ CFLAGS+= -DMAIN -DIN_GCC -DVERSION=\"$(version)\" DPADD+= ${LIBCC_INT} LDADD+= ${LIBCC_INT} -CLEANFILES= tmp-dum.c tmp-dum.s underscore.c - -underscore.c: - echo "int xxy_us_dummy;" >tmp-dum.c - ${CC} -S tmp-dum.c - echo '/*WARNING: This file is automatically generated!*/' >underscore.c - if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \ - echo "int prepends_underscore = 1;" >>underscore.c; \ - else \ - echo "int prepends_underscore = 0;" >>underscore.c; \ - fi - rm -f tmp-dum.c tmp-dum.s - cplus-dem+%DIKED.c: cplus-dem.c sed \ -e 's/^xmalloc[ ]/_DONT_xmalloc /g' \ diff --git a/gnu/usr.bin/cc/cc/Makefile b/gnu/usr.bin/cc/cc/Makefile new file mode 100644 index 00000000000..09556c1f9e8 --- /dev/null +++ b/gnu/usr.bin/cc/cc/Makefile @@ -0,0 +1,22 @@ +# $FreeBSD$ + +.include "../Makefile.inc" +.include "../Makefile.fe" + +.PATH: ${GCCDIR} + +PROG= cc +MAN= gcc.1 +SRCS= gcc.c gccspec.c +NOSHARED?=yes + +LINKS= ${BINDIR}/cc ${BINDIR}/gcc +MLINKS= gcc.1 cc.1 gcc.1 c++.1 gcc.1 g++.1 gcc.1 CC.1 + +CFLAGS+= -DDEFAULT_TARGET_VERSION=\"$(version)\" +CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"$(target)\" + +DPADD+= ${LIBCC_INT} ${LIBCC_FBSD} +LDADD+= ${LIBCC_INT} ${LIBCC_FBSD} + +.include diff --git a/gnu/usr.bin/cc/cc1/Makefile b/gnu/usr.bin/cc/cc1/Makefile index 9c5f37cc7aa..ccb3923be2f 100644 --- a/gnu/usr.bin/cc/cc1/Makefile +++ b/gnu/usr.bin/cc/cc1/Makefile @@ -5,12 +5,10 @@ .PATH: ../cc_tools ${GCCDIR} PROG= cc1 -SRCS= c-parse.c c-parse.h c-lang.c -# Ugh, compiled twice... -SRCS+= c-decl.c c-lex.c c-typeck.c +SRCS= main.c c-parse.c c-lang.c c-decl.c BINDIR= /usr/libexec NOMAN= 1 -NOSHARED=yes +NOSHARED?=yes CFLAGS+= -I. @@ -19,15 +17,18 @@ LDADD+= ${LIBCC_INT} #----------------------------------------------------------------------- # C parser -.ORDER: c-parse.c c-parse.h -c-parse.c c-parse.h: c-parse.in +.ORDER: c-parse.c +c-parse.c: c-parse.in sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ -e "/^ifc$$/d" \ -e "/^end ifc$$/d" \ - ${.ALLSRC} > c-parse.y - ${YACC} -d -o c-parse.c c-parse.y + ${GCCDIR}/c-parse.in > c-parse.y + ${YACC} -o c-parse.c.in c-parse.y + sed -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + c-parse.c.in >c-parse.c -CLEANFILES+= c-parse.c c-parse.h c-parse.y # insurance +CLEANFILES+= c-parse.c c-parse.y # insurance #----------------------------------------------------------------------- diff --git a/gnu/usr.bin/cc/cc1obj/Makefile b/gnu/usr.bin/cc/cc1obj/Makefile index dd2ad3efd4b..8c585c9d36b 100644 --- a/gnu/usr.bin/cc/cc1obj/Makefile +++ b/gnu/usr.bin/cc/cc1obj/Makefile @@ -5,12 +5,10 @@ .PATH: ../cc_tools ${GCCDIR}/objc ${GCCDIR} PROG= cc1obj -SRCS= objc-parse.c c-parse.h objc-act.c -# Ugh, compiled twice... -SRCS+= c-decl.c c-lex.c c-typeck.c +SRCS= objc-parse.c objc-act.c objc-lang.c main.c c-decl.c BINDIR= /usr/libexec NOMAN= 1 -NOSHARED=yes +NOSHARED?=yes CFLAGS+= -I${GCCDIR}/objc -I. @@ -19,16 +17,18 @@ LDADD+= ${LIBCC_INT} #----------------------------------------------------------------------- # objc parser -.ORDER: objc-parse.c c-parse.h -objc-parse.c c-parse.h: c-parse.in +.ORDER: objc-parse.c +objc-parse.c: c-parse.in sed -e "/^ifc$$/,/^end ifc$$/d" \ -e "/^ifobjc$$/d" \ -e "/^end ifobjc$$/d" \ - ${.ALLSRC} > objc-parse.y - ${YACC} -d -o objc-parse.c objc-parse.y - mv objc-parse.h c-parse.h + ${GCCDIR}/c-parse.in > objc-parse.y + ${YACC} -o objc-parse.c.in objc-parse.y + sed -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + objc-parse.c.in >objc-parse.c -CLEANFILES+= objc-parse.c c-parse.h objc-parse.y # insurance +CLEANFILES+= objc-parse.c objc-parse.y # insurance #----------------------------------------------------------------------- diff --git a/gnu/usr.bin/cc/cc1plus/Makefile b/gnu/usr.bin/cc/cc1plus/Makefile index 0be4cda9670..236c3f946e4 100644 --- a/gnu/usr.bin/cc/cc1plus/Makefile +++ b/gnu/usr.bin/cc/cc1plus/Makefile @@ -5,26 +5,29 @@ .PATH: ${GCCDIR}/cp ${GCCDIR} PROG= cc1plus -SRCS= parse.c parse.h cfns.h -SRCS+= call.c class.c cvt.c decl.c decl2.c errfn.c error.c except.c expr.c \ +SRCS= parse.c cfns.h +SRCS+= main.c cp-lang.c +SRCS+= call.c class.c cvt.c decl.c decl2.c error.c except.c expr.c \ friend.c init.c lex.c mangle.c method.c pt.c ptree.c repo.c rtti.c \ - search.c semantics.c spew.c tree.c typeck.c typeck2.c xref.c dump.c optimize.c + search.c semantics.c spew.c tree.c typeck.c typeck2.c dump.c optimize.c BINDIR= /usr/libexec NOMAN= 1 -NOSHARED=yes +NOSHARED?=yes CFLAGS+= -I${GCCDIR}/cp -I. DPADD+= ${LIBCC_INT} LDADD+= ${LIBCC_INT} -.ORDER: parse.c parse.h -parse.c parse.h: parse.y - ${YACC} -d -o parse.c ${.ALLSRC} - grep '^#define[ ]*YYEMPTY' parse.c >>parse.h +.ORDER: parse.c +parse.c: parse.y + ${YACC} -o parse.c.in ${.ALLSRC} + sed -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + parse.c.in >parse.c -CLEANFILES+= parse.c parse.h cfns.h +CLEANFILES+= parse.c cfns.h cfns.h: gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' \ diff --git a/gnu/usr.bin/cc/cc_drv/Makefile b/gnu/usr.bin/cc/cc_drv/Makefile new file mode 100644 index 00000000000..332b37ae5e9 --- /dev/null +++ b/gnu/usr.bin/cc/cc_drv/Makefile @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ../cc_tools ${GCCDIR} + +LIB= cc_drv +NOPROFILE= YES +NOPIC= YES + +SRCS= multilib.h choose-temp.c obstack.c prefix.c pexecute.c version.c + +CFLAGS+= -DIN_GCC + +install: + @true + +${OUT_OBJ}.o ${OUT_OBJ}.so: ${OUT_FILE} + +.include diff --git a/gnu/usr.bin/cc/cc_fbsd/Makefile b/gnu/usr.bin/cc/cc_fbsd/Makefile new file mode 100644 index 00000000000..5aad7fff551 --- /dev/null +++ b/gnu/usr.bin/cc/cc_fbsd/Makefile @@ -0,0 +1,18 @@ +# $FreeBSD$ + +LIBCDIR= ${.CURDIR}/../../../../lib/libc + +.PATH: ${LIBCDIR}/gen ${LIBCDIR}/stdio + +LIB= cc_fbsd +NOPROFILE= YES +NOPIC= YES + +SRCS= getobjformat.c mktemp.c + +CFLAGS+= -D_open=open + +install: + @true + +.include diff --git a/gnu/usr.bin/cc/cc_int/Makefile b/gnu/usr.bin/cc/cc_int/Makefile index 59051ae22dd..d0c463c6e99 100644 --- a/gnu/usr.bin/cc/cc_int/Makefile +++ b/gnu/usr.bin/cc/cc_int/Makefile @@ -2,7 +2,7 @@ .include "../Makefile.inc" -.PATH: ../cc_tools ${GCCDIR}/config/${TARGET_ARCH} ${GCCDIR} +.PATH: ../cc_tools ${GCCDIR}/config/${GCC_CPU} ${GCCDIR} LIB= cc_int NOPROFILE= YES @@ -10,9 +10,9 @@ NOPIC= YES # dbxout.c dwarfout.c emit-rtl.c explow.c expmed.c expr.c \ # alias.c bitmap.c dwarf2out.c dyn-string.c \ -SRCS= c-aux-info.c c-common.c c-convert.c c-format.c \ +SRCS= c-common.c c-format.c \ c-pragma.c c-semantics.c \ - c-dump.c c-errors.c \ + \ caller-save.c calls.c combine.c convert.c cse.c \ dbxout.c dwarfout.c dwarf2out.c dwarf2asm.c emit-rtl.c explow.c expmed.c expr.c \ final.c flow.c fold-const.c function.c getpwd.c global.c graph.c \ @@ -24,11 +24,12 @@ SRCS= c-aux-info.c c-common.c c-convert.c c-format.c \ toplev.c tree.c unroll.c varasm.c version.c xcoffout.c \ alias.c bitmap.c dyn-string.c \ gcse.c genrtl.c profile.c regmove.c varray.c \ - ${TARGET_ARCH}.c + attribs.c cselib.c debug.c rtl-error.c tree-dump.c tree-inline.c \ + ${GCC_CPU}.c SRCS+= bb-reorder.c conflict.c ggc-common.c \ ggc-page.c ifcvt.c lists.c predict.c regrename.c resource.c sibcall.c \ - simplify-rtx.c ssa.c timevar.c + simplify-rtx.c ssa.c timevar.c ssa-dce.c ssa-ccp.c df.c fibheap.c # insn-* gunk -- headers are built in cc_tools, as they are used by the # "build-tools" @@ -40,24 +41,47 @@ insn-$F.c: ${.OBJDIR}/../cc_tools/gen$F ${MD_FILE} .endfor # shared between the drivers -SRCS+= multilib.h choose-temp.c obstack.c prefix.c pexecute.c version.c mbchar.c +SRCS+= multilib.h choose-temp.c obstack.c prefix.c pexecute.c version.c mbchar.c concat.c make-temp-file.c underscore.c +# C_AND_OBJC_OBJS +#SRCS+= attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \ +# c-convert.o c-aux-info.o c-common.o c-format.o c-semantics.o \ +# c-objc-common.o + +# XXX: shared by cc1, cc1obj & cpp0 +# cc1plus seems to be able to tolerate these here, +# BUT only if the right .o's are specified in cc1plus/Makefile +SRCS+= c-lex.c c-typeck.c \ + c-errors.o c-pragma.o c-convert.o c-aux-info.o c-common.o c-format.o c-semantics.o c-objc-common.o # libbackend -SRCS+= builtins.c dce.c diagnostic.c doloop.c dominance.c except.c gcse.c params.c sched-deps.c sched-vis.c sched-rgn.c sched-ebb.c \ - stringpool.c c-lex.c -# shared by cc1/cc1obj -SRCS+= #c-decl.c -SRCS+= c-typeck.c +SRCS+= builtins.c diagnostic.c doloop.c dominance.c except.c gcse.c params.c sched-deps.c sched-vis.c sched-rgn.c sched-ebb.c \ + stringpool.c c-lex.c langhooks.c hashtable.c \ + hooks.c \ + cfg.c cfganal.c cfgbuild.c cfgcleanup.c cfglayout.c cfgloop.c cfgrtl.c # libcpp SRCS+= cppdefault.c cpperror.c cppexp.c cppfiles.c cppinit.c cpphash.c \ - cpplex.c cpplib.c cppmacro.c mkdeps.c + cpplex.c cpplib.c cppmacro.c mkdeps.c line-map.c # stuff that makes libiberty now required (2.95) and shouldn't be... -SRCS+= obstack.c splay-tree.c hashtab.c partition.c lbasename.c md5.c +SRCS+= obstack.c splay-tree.c hashtab.c partition.c lbasename.c md5.c hex.c getopt.c getopt1.c CFLAGS+= -DHAVE_CONFIG_H CFLAGS+= -DTARGET_NAME=\"${target}\" -DIN_GCC +.if defined(TARGET_CPU_DEFAULT) +CFLAGS+= -DTARGET_CPU_DEFAULT=${TARGET_CPU_DEFAULT} +.endif + +.if ${OBJFORMAT} == aout +UNDERSCORES= 1 +.else +UNDERSCORES= 0 +.endif +SRCS+= underscore.c +CLEANFILES+= underscore.c +underscore.c: Makefile + echo '/*WARNING: This file is automatically generated!*/' >${.TARGET} + echo "int prepends_underscore = ${UNDERSCORES};" >>${.TARGET} install: @true diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile index 4818c9d37e8..b141afbd701 100644 --- a/gnu/usr.bin/cc/cc_tools/Makefile +++ b/gnu/usr.bin/cc/cc_tools/Makefile @@ -11,23 +11,17 @@ # Prevent mkdep from using it, so that we don't have to give rules for # aliases of generated headers. -CFLAGS+= -DGENERATOR_FILE -I. +CFLAGS+= -I. .include "../Makefile.inc" .PATH: ${GCCDIR} ${GCCDIR}/cp +CFLAGS+= -static -DGENERATOR_FILE + #----------------------------------------------------------------------- # insn-* gunk -CLEANFILES+= gensupport+%DIKED.c -gensupport+%DIKED.c: gensupport.c - sed \ - -e 's/^xmalloc/DONT_xmalloc/g' \ - -e 's/^xrealloc/DONT_xrealloc/g' \ - -e 's/^xstrdup/DONT_xstrdup/g' \ - ${.ALLSRC} > ${.TARGET} - .for F in attr codes config flags insn-$F.h: gen$F ${MD_FILE} ./gen$F ${MD_FILE} > insn-$F.h @@ -41,8 +35,8 @@ gen-time-stamp: genattrtab genemit genextract genopinit genoutput genpeep genrec .for F in attr codes config emit extract flags opinit output peep recog build-tools: gen$F -gen$F: gen$F.o rtl.o obstack.o print-rtl.o bitmap.o errors.o gensupport+%DIKED.o ggc-none.o hashtab.o #safe-ctype.o - ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +gen$F: gen$F.o rtl.o obstack.o print-rtl.o bitmap.o errors.o gensupport.o ggc-none.o hashtab.o read-rtl.o + ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c CLEANFILES+= gen$F @@ -51,20 +45,20 @@ CLEANFILES+= gen$F .for F in attrtab build-tools: gen$F -gen$F: gen$F.o rtl.o print-rtl.o obstack.o bitmap.o errors.o gensupport+%DIKED.o ggc-none.o hashtab.o - ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +gen$F: gen$F.o rtl.o print-rtl.o obstack.o bitmap.o errors.o gensupport.o ggc-none.o hashtab.o read-rtl.o + ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c CLEANFILES+= gen$F .endfor -SRCS+= bitmap.c errors.c gensupport+%DIKED.c ggc-none.c hashtab.c obstack.c print-rtl.c regclass.c rtl.c rtlanal.c +SRCS+= bitmap.c errors.c gensupport.c ggc-none.c hashtab.c obstack.c print-rtl.c regclass.c rtl.c rtlanal.c read-rtl.c -.for F in check genrtl +.for F in check genrtl preds build-tools: gen$F gen$F: gen$F.o - ${CC} -static -DGENERATOR_FILE ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} + ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} GENSRCS+= gen$F.c CLEANFILES+= gen$F @@ -84,33 +78,31 @@ tree-check.h: gencheck ./gencheck > ${.TARGET} GENSRCS+= tree-check.h +#----------------------------------------------------------------------- +# Predicates stuff. + +tm-preds.h: genpreds + ./genpreds > ${.TARGET} +GENSRCS+= tm-preds.h + #----------------------------------------------------------------------- # the host/target compiler config. -COMMONHDRS= config.h hconfig.h multilib.h options.h specs.h tconfig.h tm.h \ +COMMONHDRS= config.h hconfig.h multilib.h options.h specs.h tconfig.h \ tm_p.h configargs.h safe-ctype.h GENSRCS+= ${COMMONHDRS} gencheck.h -${COMMONHDRS}: ${.CURDIR}/Makefile +MFILE?= ${.CURDIR}/Makefile +${COMMONHDRS}: ${MFILE} configargs.h: echo 'static const char configuration_arguments[] =' > ${.TARGET} echo ' "FreeBSD/${TARGET_ARCH} system compiler";' >> ${.TARGET} echo 'static const char thread_model[] = "posix";' >> ${.TARGET} -config.h hconfig.h: - echo '#include "auto-host.h"' > ${.TARGET} - echo '#include "gansidecl.h"' >> ${.TARGET} - echo '#include "${TARGET_ARCH}/xm-${TARGET_ARCH}.h"' >> ${.TARGET} - echo '#include "defaults.h"' >> ${.TARGET} - echo '#include "hwint.h"' >> ${.TARGET} - echo '#ifndef POSIX' >> ${.TARGET} - echo '# define POSIX' >> ${.TARGET} - echo '#endif' >> ${.TARGET} - echo '#ifndef GENERATOR_FILE' >> ${.TARGET} - echo '#include "insn-codes.h"' >> ${.TARGET} - echo '#include "insn-flags.h"' >> ${.TARGET} - echo '#endif' >> ${.TARGET} +hconfig.h: + echo '#include "auto-host.h"' > ${.TARGET} + echo '#include ' >> ${.TARGET} gencheck.h: echo '#include "cp/cp-tree.def"' > ${.TARGET} @@ -135,45 +127,73 @@ specs.h: echo '#include "f/lang-specs.h"' >> ${.TARGET} echo '#include "objc/lang-specs.h"' >> ${.TARGET} -tconfig.h: - echo '#include "gansidecl.h"' > ${.TARGET} - echo '#include "${TARGET_ARCH}/xm-${TARGET_ARCH}.h"' >> ${.TARGET} - echo '#include "defaults.h"' >> ${.TARGET} - echo '#ifndef GENERATOR_FILE' >> ${.TARGET} - echo '#include "insn-codes.h"' >> ${.TARGET} - echo '#include "insn-flags.h"' >> ${.TARGET} - echo '#endif' >> ${.TARGET} - echo '#define USING_SJLJ_EXCEPTIONS 0' >> ${.TARGET} +config.h: + echo '#include ' > ${.TARGET} + echo '#ifndef GENERATOR_FILE' >> ${.TARGET} + echo '#include "insn-codes.h"' >> ${.TARGET} + echo '#include "insn-flags.h"' >> ${.TARGET} + echo '#endif' >> ${.TARGET} # KEEP THIS IN SYNC with src/gcc/lib/libgcc/Makefile !! -tm.h: - echo '#include "gansidecl.h"' > ${.TARGET} - echo '#include "${TARGET_ARCH}/${TARGET_ARCH}.h"' >> ${.TARGET} +tconfig.h: + echo '#ifdef IN_GCC' > ${.TARGET} + echo 'struct rtx_def;' >> ${.TARGET} + echo 'typedef struct rtx_def *rtx;' >> ${.TARGET} + echo 'struct rtvec_def;' >> ${.TARGET} + echo 'typedef struct rtvec_def *rtvec;' >> ${.TARGET} + echo 'union tree_node;' >> ${.TARGET} + echo 'typedef union tree_node *tree;' >> ${.TARGET} + echo '' >> ${.TARGET} + echo '#include "ansidecl.h"' >> ${.TARGET} + echo '#include "${GCC_CPU}/${GCC_CPU}.h"' >> ${.TARGET} .if ${TARGET_ARCH} == "i386" - echo '#include "${TARGET_ARCH}/att.h"' >> ${.TARGET} + echo '#include "${GCC_CPU}/att.h"' >> ${.TARGET} .endif - echo '#include ' >> ${.TARGET} - echo '#include ' >> ${.TARGET} -.if exists(${GCCDIR}/config/${TARGET_ARCH}/elf.h) - echo '#include "${TARGET_ARCH}/elf.h"' >> ${.TARGET} +.if ${TARGET_ARCH} != "alpha" + echo '#include "dbxelf.h"' >> ${.TARGET} + echo '#include "elfos.h"' >> ${.TARGET} .endif - echo '#include "${TARGET_ARCH}/freebsd.h"' >> ${.TARGET} -.if ${TARGET_ARCH} == "i386" - echo '#include "${TARGET_ARCH}/perform.h"' >> ${.TARGET} + echo '#include ' >> ${.TARGET} + echo '#include "freebsd-spec.h"' >> ${.TARGET} + echo '#include "freebsd.h"' >> ${.TARGET} +.if ${TARGET_ARCH} == "alpha" + echo '#include "${GCC_CPU}/elf.h"' >> ${.TARGET} .endif - echo '#include "defaults.h"' >> ${.TARGET} - echo '#ifndef GENERATOR_FILE' >> ${.TARGET} - echo '#include "insn-codes.h"' >> ${.TARGET} - echo '#include "insn-flags.h"' >> ${.TARGET} - echo '#endif' >> ${.TARGET} +.if ${TARGET_ARCH} != "i386" +.if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h) + echo '#include "${GCC_CPU}/sysv4.h"' >> ${.TARGET} +.endif +.endif + echo '#include "${GCC_CPU}/freebsd.h"' >> ${.TARGET} + echo '#include "defaults.h"' >> ${.TARGET} + echo '#ifndef POSIX' >> ${.TARGET} + echo '# define POSIX' >> ${.TARGET} + echo '#endif' >> ${.TARGET} + echo '#define CONFIG_SJLJ_EXCEPTIONS 0' >> ${.TARGET} + echo '#endif /* IN_GCC */' >> ${.TARGET} tm_p.h: - echo '#include "${TARGET_ARCH}/${TARGET_ARCH}-protos.h"' > ${.TARGET} - echo '#include ' >> ${.TARGET} - echo '#ifndef GENERATOR_FILE' >> ${.TARGET} - echo '#include "insn-codes.h"' >> ${.TARGET} - echo '#include "insn-flags.h"' >> ${.TARGET} + echo '#ifdef IN_GCC' > ${.TARGET} + echo '#include "${GCC_CPU}/${GCC_CPU}-protos.h"' >> ${.TARGET} echo '#endif' >> ${.TARGET} + echo '#include "tm-preds.h"' >> ${.TARGET} + +safe-ctype.h: Makefile + echo '#include ' > ${.TARGET} +.for Z in TOUPPER TOLOWER ISDIGIT ISXDIGIT ISUPPER ISLOWER ISALPHA ISALNUM \ + ISSPACE ISPUNCT ISGRAPH ISBLANK ISPRINT ISCNTRL + echo '#define ${Z} ${Z:L}' >> ${.TARGET} +.endfor + echo "#define ISIDST(x) \ + ((x) == '_' || isalpha(x))" >> ${.TARGET} + echo "#define ISIDNUM(x) \ + (isdigit(x) || ISIDST(x))" >> ${.TARGET} + echo "#define IS_VSPACE(x) \ + ((x) == '\n' || (x) == '\r')" >> ${.TARGET} + echo "#define IS_NVSPACE(x) \ + (!IS_VSPACE(x) && (isspace(x) || (x) == '\0'))" >> ${.TARGET} + echo "#define IS_SPACE_OR_NUL(x) \ + (isspace(x) || (x) == '\0')" >> ${.TARGET} #----------------------------------------------------------------------- # General things. @@ -200,7 +220,7 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} # all headers. Filter out the objects that would cause problems (i.e., # objects that will be used to create programs that will generate headers). # -${OBJS:Nbitmap.o:Nerrors.o:Ngenattr.o:Ngencheck.o:Ngencodes.o:Ngenconfig.o:Ngenflags.o:Ngengenrtl.o:Ngensupport+%DIKED.o:Nggc-none.o:Nhashtab.o:Nobstack.o:Nprint-rtl.o:Nrtl.o}: ${SRCS:M*.h} +${OBJS:Nbitmap.o:Nerrors.o:Ngenattr.o:Ngencheck.o:Ngencodes.o:Ngenconfig.o:Ngenflags.o:Ngengenrtl.o:Ngenpreds.o:Ngensupport.o:Nggc-none.o:Nhashtab.o:Nobstack.o:Nprint-rtl.o:Nread-rtl.o:Nrtl.o}: ${SRCS:M*.h} # Next, make each of the problematic objects depend on only most headers. # Filter out the headers that would cause problems (and a few more when it @@ -210,17 +230,5 @@ bitmap.o genattr.o gencodes.o genconfig.o genflags.o obstack.o print-rtl.o \ rtl.o: ${SRCS:M*.h:Ninsn-*.h} gencheck.o: gencheck.h ${SRCS:M*.h:Ngenrtl.h:Ntree-check.h:Ninsn-*.h} gengenrtl.o: ${SRCS:M*.h:Ngenrtl.h:Ninsn-*.h} +genpreds.o: ${COMMONHDRS} .endif - -#GENSRCS+= safe-ctype.h -${OBJS} gensupport+%DIKED.o: safe-ctype.h -safe-ctype.h: Makefile - echo '#include ' > ${.TARGET} -.for Z in TOUPPER TOLOWER ISDIGIT ISXDIGIT ISUPPER ISLOWER ISALPHA ISALNUM ISSPACE ISPUNCT ISGRAPH ISBLANK ISPRINT ISCNTRL - echo '#define ${Z} ${Z:L}' >> ${.TARGET} -.endfor - echo "#define ISIDST(x) ((x) == '_' || isalpha(x))" >> ${.TARGET} - echo "#define ISIDNUM(x) (isdigit(x) || ISIDST(x))" >> ${.TARGET} - echo "#define IS_VSPACE(x) ((x) == '\n' || (x) == '\r')" >> ${.TARGET} - echo "#define IS_NVSPACE(x) (!IS_VSPACE(x) && (isspace(x) || (x) == '\0'))" >> ${.TARGET} - echo "#define IS_SPACE_OR_NUL(x) (isspace(x) || (x) == '\0')" >> ${.TARGET} diff --git a/gnu/usr.bin/cc/cc_tools/freebsd-native.h b/gnu/usr.bin/cc/cc_tools/freebsd-native.h index 8c9bd204eab..bd9a2effe9a 100644 --- a/gnu/usr.bin/cc/cc_tools/freebsd-native.h +++ b/gnu/usr.bin/cc/cc_tools/freebsd-native.h @@ -10,7 +10,6 @@ #define FBSD_MAJOR 5 #undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ -#undef GCC_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. */ @@ -33,7 +32,7 @@ */ #undef TOOLDIR_BASE_PREFIX /* Old?? This is not documented. */ #define STANDARD_EXEC_PREFIX PREFIX"/libexec/" -#define MD_EXEC_PREFIX /* We don't want one. */ +#undef MD_EXEC_PREFIX /* We don't want one. */ /* Under FreeBSD, the normal location of the various *crt*.o files is the /usr/lib directory. */ diff --git a/gnu/usr.bin/cc/cccp/Makefile b/gnu/usr.bin/cc/cccp/Makefile index 70e1aba0140..15f5d327d28 100644 --- a/gnu/usr.bin/cc/cccp/Makefile +++ b/gnu/usr.bin/cc/cccp/Makefile @@ -5,12 +5,30 @@ .PATH: ${GCCDIR} PROG= cpp0 -SRCS= cppmain.c +SRCS= cppmain.c c-parse.c c-lang.c c-decl.c BINDIR= /usr/libexec NOMAN= 1 +NOSHARED?=yes DPADD+= ${LIBCC_INT} LDADD+= ${LIBCC_INT} +#----------------------------------------------------------------------- +# C parser +.ORDER: c-parse.c +c-parse.c: c-parse.in + sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ + -e "/^ifc$$/d" \ + -e "/^end ifc$$/d" \ + ${GCCDIR}/c-parse.in > c-parse.y + ${YACC} -o c-parse.c.in c-parse.y + sed -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + c-parse.c.in >c-parse.c + +CLEANFILES+= c-parse.c c-parse.y # insurance + +#----------------------------------------------------------------------- + .include diff --git a/gnu/usr.bin/cc/collect2/Makefile b/gnu/usr.bin/cc/collect2/Makefile index 8b285161736..314caf722df 100644 --- a/gnu/usr.bin/cc/collect2/Makefile +++ b/gnu/usr.bin/cc/collect2/Makefile @@ -2,29 +2,13 @@ .include "../Makefile.inc" -.PATH: ${GCCDIR} +.PATH: ${GCCDIR} ${GCCDIR}/../libiberty PROG= collect2 -SRCS= collect2.c cplus-dem.c tlink.c underscore.c -BINDIR= /usr/libexec +SRCS= collect2.c cp-demangle.c cplus-dem.c tlink.c NOMAN= -NOSHARED?=yes DPADD+= ${LIBCC_INT} LDADD+= ${LIBCC_INT} -CLEANFILES= tmp-dum.c tmp-dum.s underscore.c -underscore.c: Makefile - echo "int xxy_us_dummy;" >tmp-dum.c - ${CC} -S tmp-dum.c - echo '/*WARNING: This file is automatically generated!*/' >underscore.c - if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \ - echo "int prepends_underscore = 1;" >>underscore.c; \ - else \ - echo "int prepends_underscore = 0;" >>underscore.c; \ - fi - # wrong to do this here, but easiest way out to duplicate gcc.c. - echo "char *xstrerror(int e) { return strerror(e); }" >>underscore.c - rm -f tmp-dum.c tmp-dum.s - .include diff --git a/gnu/usr.bin/cc/cpp/Makefile b/gnu/usr.bin/cc/cpp/Makefile new file mode 100644 index 00000000000..27e49835b34 --- /dev/null +++ b/gnu/usr.bin/cc/cpp/Makefile @@ -0,0 +1,18 @@ +# $FreeBSD$ + +.include "../Makefile.inc" +.include "../Makefile.fe" + +.PATH: ${GCCDIR} + +PROG= cpp +SRCS= gcc.c cppspec.c +NOMAN= 1 + +CFLAGS+= -DDEFAULT_TARGET_VERSION=\"$(version)\" +CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"$(target)\" + +DPADD+= ${LIBCC_INT} ${LIBCC_FBSD} +LDADD+= ${LIBCC_INT} ${LIBCC_FBSD} + +.include diff --git a/gnu/usr.bin/cc/cpp0/Makefile b/gnu/usr.bin/cc/cpp0/Makefile index 4dfea5f8f23..7a962b68816 100644 --- a/gnu/usr.bin/cc/cpp0/Makefile +++ b/gnu/usr.bin/cc/cpp0/Makefile @@ -5,12 +5,30 @@ .PATH: ${GCCDIR} PROG= cpp0 -SRCS= cppdefault.c cpperror.c cppexp.c cppfiles.c cpphash.c cppinit.c cpplex.c cpplib.c \ - cppmain.c cppulp.c mkdeps.c +SRCS= cppmain.c c-parse.c c-lang.c c-decl.c + BINDIR= /usr/libexec NOMAN= 1 +NOSHARED?=yes DPADD+= ${LIBCC_INT} LDADD+= ${LIBCC_INT} +#----------------------------------------------------------------------- +# C parser +.ORDER: c-parse.c +c-parse.c: c-parse.in + sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ + -e "/^ifc$$/d" \ + -e "/^end ifc$$/d" \ + ${.ALLSRC} > c-parse.y + ${YACC} -o c-parse.c.in c-parse.y + sed -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + c-parse.c.in >c-parse.c + +CLEANFILES+= c-parse.c c-parse.y # insurance + +#----------------------------------------------------------------------- + .include diff --git a/gnu/usr.bin/cc/doc/Makefile b/gnu/usr.bin/cc/doc/Makefile new file mode 100644 index 00000000000..5e44319015b --- /dev/null +++ b/gnu/usr.bin/cc/doc/Makefile @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ${GCCDIR}/cp ${GCCDIR} + +INFO= gcc cpp gxxint + +INFOSECTION= "Gcc Documentation" +INFOENTRY_gcc= "* gcc: (gcc). The EGCS GNU C compiler." +INFOENTRY_cpp= "* cpp: (cpp). The EGCS GNU C pre-processor." +INFOENTRY_gxxint= "* gxxint: (gxxint). The EGCS GNU compiler family internal documentation." + +gcc.info: gcc.texi invoke.texi install.texi extend.texi gcov.texi rtl.texi \ + md.texi tm.texi + +MAKEINFOFLAGS+= -I ${GCCDIR} -I ${GCCDIR}/cp + +.include diff --git a/gnu/usr.bin/cc/f77/Makefile b/gnu/usr.bin/cc/f77/Makefile new file mode 100644 index 00000000000..717a983118a --- /dev/null +++ b/gnu/usr.bin/cc/f77/Makefile @@ -0,0 +1,23 @@ +# $FreeBSD$ + +.include "../Makefile.inc" +.include "../Makefile.fe" + +.PATH: ${GCCDIR}/f ${GCCDIR} + +PROG= f77 +SRCS= gcc.c g77spec.c version.c +NOMAN= # not while compile from GCC repo checkout + +CFLAGS+= -DDEFAULT_TARGET_VERSION=\"$(version)\" +CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"$(target)\" + +DPADD= ${LIBCC_INT} ${LIBCC_FBSD} +LDADD= ${LIBCC_INT} ${LIBCC_FBSD} + +CLEANFILES= f77.1 + +f77.1: g77.1 + ln -sf ${.ALLSRC} ${.TARGET} + +.include diff --git a/gnu/usr.bin/cc/f771/Makefile b/gnu/usr.bin/cc/f771/Makefile index 5e97d14c492..d5c065e6c91 100644 --- a/gnu/usr.bin/cc/f771/Makefile +++ b/gnu/usr.bin/cc/f771/Makefile @@ -2,13 +2,13 @@ .include "${.CURDIR}/../Makefile.inc" -.PATH: ${GCCDIR}/f +.PATH: ${GCCDIR}/f ${GCCDIR} PROG= f771 SRCS= bad.c bit.c bld.c com.c data.c equiv.c expr.c global.c implic.c info.c \ - intrin.c lab.c lex.c malloc.c name.c parse.c proj.c src.c st.c sta.c \ + intrin.c lab.c lex.c malloc.c name.c parse.c src.c st.c sta.c \ stb.c stc.c std.c ste.c storag.c stp.c str.c sts.c stt.c stu.c stv.c \ - stw.c symbol.c target.c top.c type.c version.c where.c + stw.c symbol.c target.c top.c type.c version.c where.c main.c BINDIR= /usr/libexec NOMAN= @@ -18,16 +18,10 @@ DPADD= ${LIBCC_INT} LDADD= ${LIBCC_INT} build-tools: fini - -# The use of ``proj+%BT.o'' is to get around bogus dependacy information -# created for build-tools sources. -fini: fini.o proj+%BT.o # ${GCCDIR}/safe-ctype.c +fini: fini.o ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -proj+%BT.o: proj.c - ${CC} ${CFLAGS} -o ${.TARGET} -c ${.ALLSRC} - -CLEANFILES+= fini fini.o proj+%BT.o +CLEANFILES+= fini fini.o #----------------------------------------------------------------------- # str-* gunk diff --git a/gnu/usr.bin/cc/f77doc/Makefile b/gnu/usr.bin/cc/f77doc/Makefile new file mode 100644 index 00000000000..d6e6384dbb4 --- /dev/null +++ b/gnu/usr.bin/cc/f77doc/Makefile @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ${GCCDIR}/f + +INFO= g77 + +MAKEINFOFLAGS+= -I ${GCCDIR}/f + +g77.info: g77.texi intdoc.texi + +.include diff --git a/gnu/usr.bin/cc/gcov/Makefile b/gnu/usr.bin/cc/gcov/Makefile index e8be4693165..adb2ac1cfbc 100644 --- a/gnu/usr.bin/cc/gcov/Makefile +++ b/gnu/usr.bin/cc/gcov/Makefile @@ -5,6 +5,9 @@ .PATH: ${GCCDIR} ${GCCDIR}/doc PROG= gcov -SRCS= gcov.c +SRCS= gcov.c version.c + +DPADD= ${LIBCC_INT} +LDADD= ${LIBCC_INT} .include diff --git a/gnu/usr.bin/cc/protoize/Makefile b/gnu/usr.bin/cc/protoize/Makefile index 08f29efefb2..eba576cd5c6 100644 --- a/gnu/usr.bin/cc/protoize/Makefile +++ b/gnu/usr.bin/cc/protoize/Makefile @@ -2,6 +2,20 @@ .include "../Makefile.inc" -.PATH: ${GCCDIR} +.PATH: ${.CURDIR}/../cc_tools ${GCCDIR} ${GCCDIR}/../libiberty + +PROG= protoize +NOMAN= + +# things are rather hard-coded, we work around that here +CFLAGS+= -DDEFAULT_TARGET_VERSION=\"\" +CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"../libdata/gcc\" + +DPADD= ${LIBCC_INT} +LDADD= ${LIBCC_INT} + +CLEANFILES= config.h +config.h: auto-host.h freebsd-native.h + cat ${.ALLSRC} >${.TARGET} .include From bf4990bb7668994c9886e573949b64a44f2df723 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sun, 7 Apr 2002 08:05:33 +0000 Subject: [PATCH 26/47] Fix search path. --- gnu/usr.bin/cc/collect2/Makefile | 2 +- gnu/usr.bin/cc/protoize/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/usr.bin/cc/collect2/Makefile b/gnu/usr.bin/cc/collect2/Makefile index 314caf722df..976146a3bf7 100644 --- a/gnu/usr.bin/cc/collect2/Makefile +++ b/gnu/usr.bin/cc/collect2/Makefile @@ -2,7 +2,7 @@ .include "../Makefile.inc" -.PATH: ${GCCDIR} ${GCCDIR}/../libiberty +.PATH: ${GCCDIR} PROG= collect2 SRCS= collect2.c cp-demangle.c cplus-dem.c tlink.c diff --git a/gnu/usr.bin/cc/protoize/Makefile b/gnu/usr.bin/cc/protoize/Makefile index eba576cd5c6..500dd03fa49 100644 --- a/gnu/usr.bin/cc/protoize/Makefile +++ b/gnu/usr.bin/cc/protoize/Makefile @@ -2,7 +2,7 @@ .include "../Makefile.inc" -.PATH: ${.CURDIR}/../cc_tools ${GCCDIR} ${GCCDIR}/../libiberty +.PATH: ${.CURDIR}/../cc_tools ${GCCDIR} PROG= protoize NOMAN= From af968949b10123abc8886a7ce119cbe7eb78eaa4 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sun, 7 Apr 2002 09:30:05 +0000 Subject: [PATCH 27/47] Bmake bits for GCC 3.1. Sponsored by: bribe from peter --- gnu/lib/libobjc/Makefile | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 gnu/lib/libobjc/Makefile diff --git a/gnu/lib/libobjc/Makefile b/gnu/lib/libobjc/Makefile new file mode 100644 index 00000000000..b3ffc0b2471 --- /dev/null +++ b/gnu/lib/libobjc/Makefile @@ -0,0 +1,42 @@ +# $FreeBSD$ + +OBJCDIR=${.CURDIR}/../../../contrib/libobjc +GCCDIR= ${.CURDIR}/../../../contrib/gcc + +.PATH: ${OBJCDIR}/objc ${OBJCDIR} + +LIB= objc +NOMAN= sorry +NOPIC= works but method lookup slowdown is significant + +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-single.c \ + NXConstStr.m Object.m Protocol.m linking.m + +HDRS= encoding.h hash.h objc-api.h objc-list.h objc.h runtime.h \ + sarray.h thr.h typedstream.h NXConstStr.h Object.h Protocol.h + +CFLAGS+= -fgnu-runtime -DHAVE_GTHR_DEFAULT -DIN_TARGET_LIBS +CFLAGS+= -I. -I${.CURDIR}/../../usr.bin/cc/cc_tools +CFLAGS+= -I${OBJCDIR}/objc -I${OBJCDIR} +CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} + +beforeinstall: + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${HDRS:S;^;${OBJCDIR}/objc/;} ${DESTDIR}/usr/include/objc + +GENHDRS= runtime-info.h tconfig.h +CLEANFILES+= ${GENHDRS} +SRCS+= ${GENHDRS} + +${OBJS}: ${GENHDRS} + +runtime-info.h: + `${CC} --print-prog-name=cc1obj` -print-objc-runtime-info \ + < /dev/null > ${.TARGET} + +tconfig.h: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile + ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} ${.TARGET} + +.include From 8f5dad4aa07eced5fcb01832c56ecc44a7a2865f Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Thu, 11 Apr 2002 02:56:30 +0000 Subject: [PATCH 28/47] Update infodoc building for GCC 3.1. --- gnu/usr.bin/cc/doc/Makefile | 29 +++++++++++++++++++++-------- gnu/usr.bin/cc/f77doc/Makefile | 5 +++-- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/gnu/usr.bin/cc/doc/Makefile b/gnu/usr.bin/cc/doc/Makefile index 5e44319015b..bc2cd1c18ba 100644 --- a/gnu/usr.bin/cc/doc/Makefile +++ b/gnu/usr.bin/cc/doc/Makefile @@ -2,18 +2,31 @@ .include "../Makefile.inc" -.PATH: ${GCCDIR}/cp ${GCCDIR} +.PATH: ${GCCDIR}/doc -INFO= gcc cpp gxxint +INFO= gcc cpp gccint cppinternals INFOSECTION= "Gcc Documentation" -INFOENTRY_gcc= "* gcc: (gcc). The EGCS GNU C compiler." -INFOENTRY_cpp= "* cpp: (cpp). The EGCS GNU C pre-processor." -INFOENTRY_gxxint= "* gxxint: (gxxint). The EGCS GNU compiler family internal documentation." +INFOENTRY_gcc= "* gcc: (gcc). The GNU C compiler." +INFOENTRY_cpp= "* cpp: (cpp). The GNU C pre-processor." +INFOENTRY_gccint= "* gccint: (gccint). The GNU compiler family internal documentation." +INFOENTRY_cppinternals= "* cppinternals: (cppinternals). The GNU compiler preprocessor internal documentation." -gcc.info: gcc.texi invoke.texi install.texi extend.texi gcov.texi rtl.texi \ - md.texi tm.texi +gcc.info: gcc.texi include/gcc-common.texi frontends.texi standards.texi \ + invoke.texi extend.texi md.texi objc.texi gcov.texi trouble.texi \ + bugreport.texi service.texi contribute.texi vms.texi \ + include/funding.texi gnu.texi include/gpl.texi include/fdl.texi \ + contrib.texi cppenv.texi cppopts.texi -MAKEINFOFLAGS+= -I ${GCCDIR} -I ${GCCDIR}/cp +gccint.info: gccint.texi include/gcc-common.texi contribute.texi \ + makefile.texi configterms.texi portability.texi interface.texi \ + passes.texi c-tree.texi rtl.texi md.texi tm.texi hostconfig.texi \ + fragments.texi configfiles.texi collect2.texi headerdirs.texi \ + include/funding.texi gnu.texi include/gpl.texi include/fdl.texi \ + contrib.texi languages.texi sourcebuild.texi + +cpp.info: cpp.texi include/fdl.texi cppenv.texi cppopts.texi + +MAKEINFOFLAGS+= -I ${GCCDIR}/doc -I ${GCCDIR}/doc/include .include diff --git a/gnu/usr.bin/cc/f77doc/Makefile b/gnu/usr.bin/cc/f77doc/Makefile index d6e6384dbb4..1dd59de1397 100644 --- a/gnu/usr.bin/cc/f77doc/Makefile +++ b/gnu/usr.bin/cc/f77doc/Makefile @@ -6,8 +6,9 @@ INFO= g77 -MAKEINFOFLAGS+= -I ${GCCDIR}/f +MAKEINFOFLAGS+= -I ${GCCDIR}/f -I ${GCCDIR}/doc/include -g77.info: g77.texi intdoc.texi +g77.info: g77.texi intdoc.texi ffe.texi invoke.texi news.texi bugs.texi \ + ../doc/include/gpl.texi ../doc/include/fdl.texi ../doc/include/funding.texi .include From d99ab028e50f1c1f74070bbd68c8d8e109afcf47 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Mon, 15 Apr 2002 03:39:20 +0000 Subject: [PATCH 29/47] Note that HAVE_GAS_SHF_MERGE is a new feature, and it can be surprising if one does not know about it. Experienced by: peter --- gnu/usr.bin/cc/cc_tools/auto-host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/usr.bin/cc/cc_tools/auto-host.h b/gnu/usr.bin/cc/cc_tools/auto-host.h index 3c0c3eaa20f..d14c345c79b 100644 --- a/gnu/usr.bin/cc/cc_tools/auto-host.h +++ b/gnu/usr.bin/cc/cc_tools/auto-host.h @@ -530,7 +530,7 @@ /* #undef USE_AS_TRADITIONAL_FORMAT */ /* Define if your assembler supports marking sections with SHF_MERGE flag. */ -#define HAVE_GAS_SHF_MERGE 1 +#define HAVE_GAS_SHF_MERGE 1 /* XXX:DEO new, caused Peter IA-64 trouble until he adjusted sys/boot/efi/libefi/arch/ia64/ldscript.ia64 */ /* Define if your assembler supports explicit relocations. */ /* #undef HAVE_AS_EXPLICIT_RELOCS */ From 9d838dbb4718b909020dd23b1b9ed530884f2eb3 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Mon, 15 Apr 2002 03:41:47 +0000 Subject: [PATCH 30/47] Remove the #ifdef IN_GCC junk. We *know* we are building GCC with these bits. Also remove comment about keeping in sync with other instances in the source tree -- it was too easy to get out of sync, so the other instances now use this instance. --- gnu/usr.bin/cc/cc_tools/Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile index b141afbd701..a8b18197931 100644 --- a/gnu/usr.bin/cc/cc_tools/Makefile +++ b/gnu/usr.bin/cc/cc_tools/Makefile @@ -134,10 +134,8 @@ config.h: echo '#include "insn-flags.h"' >> ${.TARGET} echo '#endif' >> ${.TARGET} -# KEEP THIS IN SYNC with src/gcc/lib/libgcc/Makefile !! tconfig.h: - echo '#ifdef IN_GCC' > ${.TARGET} - echo 'struct rtx_def;' >> ${.TARGET} + echo 'struct rtx_def;' > ${.TARGET} echo 'typedef struct rtx_def *rtx;' >> ${.TARGET} echo 'struct rtvec_def;' >> ${.TARGET} echo 'typedef struct rtvec_def *rtvec;' >> ${.TARGET} @@ -170,12 +168,9 @@ tconfig.h: echo '# define POSIX' >> ${.TARGET} echo '#endif' >> ${.TARGET} echo '#define CONFIG_SJLJ_EXCEPTIONS 0' >> ${.TARGET} - echo '#endif /* IN_GCC */' >> ${.TARGET} tm_p.h: - echo '#ifdef IN_GCC' > ${.TARGET} echo '#include "${GCC_CPU}/${GCC_CPU}-protos.h"' >> ${.TARGET} - echo '#endif' >> ${.TARGET} echo '#include "tm-preds.h"' >> ${.TARGET} safe-ctype.h: Makefile From 57f6dc86bd05e1197a8539d7e9cf51f7e1b60d75 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Mon, 6 May 2002 21:10:08 +0000 Subject: [PATCH 31/47] Make life a little bit easier with a trimmed down list of bits. --- gnu/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 gnu/Makefile diff --git a/gnu/Makefile b/gnu/Makefile new file mode 100644 index 00000000000..bdd57d51297 --- /dev/null +++ b/gnu/Makefile @@ -0,0 +1,6 @@ +# @(#)Makefile 5.33.1.1 (Berkeley) 5/6/91 +# $FreeBSD$ + +SUBDIR= usr.bin/cc lib + +.include From bc2fcd34bc2669d7fcd94f69cb4305412a3f58c8 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Mon, 6 May 2002 22:07:27 +0000 Subject: [PATCH 32/47] This commit was manufactured by cvs2svn to create branch 'WIP_GCC31'. --- gnu/lib/libsupc++/Makefile | 1 + 1 file changed, 1 insertion(+) create mode 100644 gnu/lib/libsupc++/Makefile diff --git a/gnu/lib/libsupc++/Makefile b/gnu/lib/libsupc++/Makefile new file mode 100644 index 00000000000..e8c0da7a1d7 --- /dev/null +++ b/gnu/lib/libsupc++/Makefile @@ -0,0 +1 @@ +# $FreeBSD$ From df411a300f197f9e90f7df507d664853e72fc417 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 7 May 2002 00:08:30 +0000 Subject: [PATCH 33/47] Fix to work on sparc64 (which has an extra crt .o file). --- gnu/lib/csu/Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gnu/lib/csu/Makefile b/gnu/lib/csu/Makefile index 5e9a5999fe5..e4ba7191c00 100644 --- a/gnu/lib/csu/Makefile +++ b/gnu/lib/csu/Makefile @@ -16,11 +16,12 @@ CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \ -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O ${PICFLAG} MKDEPCMD= CC=${CC} MKDEP_CPP_OPTS="-M -DCRT_BEGIN" mkdep -INTERNALLIB= true +NOLIB= true .if ${TARGET_ARCH} == "sparc64" .PATH: ${GCCDIR}/config/${GCC_CPU} -TGTOBJS= crtfastmath.o +TGTOBJS= crtfastmath.o +SRCS+= crtfastmath.c .endif all: ${OBJS} ${SOBJS} ${TGTOBJS} @@ -29,23 +30,23 @@ crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS} crtbegin.o: ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:M*crtstuff*} crtbegin.So: ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:M*crtstuff*} crtend.o: ${CC} ${CFLAGS} -g0 -DCRT_END \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:M*crtstuff*} crtend.So: ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:M*crtstuff*} CLEANFILES= tconfig.h tconfig.h: ${CCDIR}/cc_tools/Makefile - ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} ${.TARGET} + ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET} realinstall: .for file in ${OBJS} ${SOBJS} ${TGTOBJS} From 4466867fd82c7e473073d4bb4fb30be07f6b7a88 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 7 May 2002 00:55:51 +0000 Subject: [PATCH 34/47] Update for GCC 3.1. Tested on: alpha, sparc64, i386 --- gnu/lib/libgcc/Makefile | 335 +++++++++++++++++++--------------------- 1 file changed, 161 insertions(+), 174 deletions(-) diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile index 974bc1a0623..e9a885b0251 100644 --- a/gnu/lib/libgcc/Makefile +++ b/gnu/lib/libgcc/Makefile @@ -1,182 +1,94 @@ # $FreeBSD$ -# ex:ts=8 + +TARGET_ARCH?= ${MACHINE_ARCH} GCCDIR= ${.CURDIR}/../../../contrib/gcc - -.PATH: ${GCCDIR}/cp ${GCCDIR} +.PATH: ${GCCDIR}/config/${TARGET_ARCH} ${GCCDIR} # allow to be overridden for the a.out case .if !defined(LIB) || ${LIB} != "gcc_r" LIB= gcc .endif +SHLIB_MAJOR= 3.1 +SHLIB_MINOR= 0 + .if ${OBJFORMAT} == aout # Install libgcc_pic.a, since ld.so uses it. INSTALL_PIC_ARCHIVE= yes .endif +# +# XXX This is a hack, but it seems to work. +# 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 +CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \ + -DFINE_GRAINED_LIBRARIES .if ${OBJFORMAT} != aout CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK .endif +CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \ + -I${GCCDIR}/config -I${GCCDIR} -I. -all: lib${LIB}.a - -CLEANFILES+= lib${LIB}.a -lib${LIB}.a: libgcc_build.a - cp -p ${.ALLSRC} ${.TARGET} - -# -# fake out to semi-follow what is done in GCC's Makefile.in -# -srcdir= ${GCCDIR} -GCC_FOR_TARGET= ${CC} -LIBGCC2_CFLAGS= ${CFLAGS} -INCLUDES= -I${GCCDIR}/config \ - -I${GCCDIR} \ - -I. \ - -I${.CURDIR}/../../usr.bin/cc/cc_tools - -COMMONHDRS= config.h tconfig.h tm.h -CLEANFILES+= ${COMMONHDRS} -SRCS+= ${COMMONHDRS} - -config.h: - echo '#include "auto-host.h"' > ${.TARGET} - echo '#include "gansidecl.h"' >> ${.TARGET} - echo '#include <${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h>' >> ${.TARGET} - echo '#include ' >> ${.TARGET} - echo '#include "defaults.h"' >> ${.TARGET} - echo '#include "hwint.h"' >> ${.TARGET} - echo '#ifndef POSIX' >> ${.TARGET} - echo '# define POSIX' >> ${.TARGET} - echo '#endif' >> ${.TARGET} - - -tconfig.h: - echo '#include "gansidecl.h"' > ${.TARGET} - echo '#include "${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h"' >> ${.TARGET} - echo '#include "defaults.h"' >> ${.TARGET} - - -# KEEP THIS IN SYNC with src/gcc/usr.bin/cc/cc_tools/Makefile !! -tm.h: - echo '#include "gansidecl.h"' > ${.TARGET} - echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' >> ${.TARGET} -.if ${MACHINE_ARCH} == "i386" - echo '#include "${MACHINE_ARCH}/att.h"' >> ${.TARGET} +# Remove any objects from LIB2FUNCS and LIB2_DIVMOD_FUNCS that are +# defined as optimized assembly code in LIB1ASMFUNCS. +.if defined(LIB1ASMFUNCS) +.for sym in ${LIB1ASMFUNCS} +LIB2FUNCS_1= ${LIB2FUNCS_1:S/${sym}//g} +LIB2FUNCS_2= ${LIB2FUNCS_2:S/${sym}//g} +LIB2_DIVMOD_FUNCS= ${LIB2_DIVMOD_FUNCS:S/${sym}//g} +.endfor .endif - echo '#include ' >> ${.TARGET} - echo '#include ' >> ${.TARGET} -.if exists(${MACHINE_ARCH}/config/${MACHINE_ARCH}/elf.h) - echo '#include "${MACHINE_ARCH}/elf.h"' >> ${.TARGET} + +SYMS= ${LIB1ASMFUNCS} \ + ${LIB2FUNCS_1} \ + ${LIB2FUNCS_2} \ + ${LIB2_DIVMOD_FUNCS} +.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64" +SYMS+= ${FPBIT_FUNCS} ${DPBIT_FUNCS} .endif - echo '#include "${MACHINE_ARCH}/freebsd.h"' >> ${.TARGET} -.if ${MACHINE_ARCH} == "i386" - echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET} -.endif - echo '#include "defaults.h"' >> ${.TARGET} +SYMS_ST= ${LIB2FUNCS_ST} \ + ${LIB2ADD_ST} +OBJS_T= ${SYMS:S/$/.o/} ${SYMS_ST:S/$/.o/} +OBJS_P= ${SYMS:S/$/.po/} ${SYMS_ST:S/$/.po/} +OBJS_S= ${SYMS:S/$/.So/} +OBJS= ${SYMS:S/$/.o/} +STATICOBJS= ${SYMS_ST:S/$/.o/} +SRCS= ${LIB2ADD} ${LIB2ADDEH} + +#--------------------------------------------------------------------------- # -# XXX Make sure changes in GCC's Makefile.in are synced here !! -# - -libgcc_build.a: ${COMMONHDRS} libgcc.mk - $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ - AR_FOR_TARGET="ar" \ - AR_CREATE_FOR_TARGET="ar rc" \ - AR_FLAGS_FOR_TARGET="" \ - OLDCC="${CC}" CCLIBFLAGS="-O" \ - CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ - RANLIB_FOR_TARGET="ranlib" \ - RANLIB_TEST_FOR_TARGET="true" \ - NM_FOR_TARGET="nm" AWK="awk" \ - LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" \ - INCLUDES="$(INCLUDES)" MAYBE_USE_COLLECT2="$(MAYBE_USE_COLLECT2)" \ - CONFIG_H="${COMMONHDRS}" MACHMODE_H="$(MACHMODE_H)" \ - LIB1ASMSRC='$(LIB1ASMSRC)' \ - -f libgcc.mk ./libgcc_build.a - -# -# XXX Make sure changes in GCC's Makefile.in are synced here !! -# - -libgcc.mk: mklibgcc - objext='.o' \ - OLDCC='${CC}' \ - LIBGCC1='libgcc1.a' \ - LIB1FUNCS='$(LIB1FUNCS)' \ - LIB1ASMFUNCS='$(LIB1ASMFUNCS)' \ - LIB1FUNCS_EXTRA='$(LIB1FUNCS_EXTRA)' \ - LIB2FUNCS='$(LIB2FUNCS)' \ - LIB2FUNCS_ST='$(LIB2FUNCS_ST)' \ - LIB2ADD='$(LIB2ADD)' \ - LIB2ADDEH='$(LIB2ADDEH)' \ - LIB2ADDEHDEP='$(LIB2ADDEHDEP)' \ - LIB2ADD_ST='$(LIB2ADD_ST)' \ - FPBIT='$(FPBIT)' \ - FPBIT_FUNCS='$(FPBIT_FUNCS)' \ - DPBIT='$(DPBIT)' \ - DPBIT_FUNCS='$(DPBIT_FUNCS)' \ - MULTILIBS='.;' \ - EXTRA_MULTILIB_PARTS='$(EXTRA_MULTILIB_PARTS)' \ - SHLIB_LINK='$(SHLIB_LINK)' \ - SHLIB_INSTALL='$(SHLIB_INSTALL)' \ - SHLIB_EXT='$(SHLIB_EXT)' \ - SHLIB_MULTILIB='$(SHLIB_MULTILIB)' \ - SHLIB_MKMAP='$(SHLIB_MKMAP)' \ - SHLIB_MAPFILES='$(SHLIB_MAPFILES)' \ - SHLIB_NM_FLAGS='$(SHLIB_NM_FLAGS)' \ - $(SHELL) mklibgcc > tmp-libgcc.mk - echo ".PATH: ${GCCDIR}" > ${.TARGET} - sed -e 's|libgcc/\./||g' tmp-libgcc.mk >> ${.TARGET} - rm tmp-libgcc.mk - touch config.status stmp-int-hdrs - -mklibgcc: mklibgcc.in - sed \ - -e 's|libgcc\.a|libgcc_build.a|g' \ - -e 's|@srcdir@|${GCCDIR}|g' \ - -e 's|@build_canonical@|${MACHINE_ARCH}-deo-freebsd5.0|g' \ - -e 's|@target@|${MACHINE_ARCH}-deo-freebsd5.0|g' \ - -e 's|@enable_shared@|no|g' \ - -e 's|@NO_MINUS_C_MINUS_O@||g' \ - ${.ALLSRC} > ${.TARGET} - -CLEANFILES+= mklibgcc libgcc.mk config.status \ - stmp-int-hdrs tmp-libgcc.mk stmp-dirs \ - libgcc_build.a - -# -# XXX This is a hack, but it seems to work. # When upgrading GCC, get the following defintions straight from Makefile.in # -# Members of libgcc1.a. -LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \ - _lshrsi3 _ashrsi3 _ashlsi3 \ - _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \ - _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \ - _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \ - _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \ - _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2 - # Library members defined in libgcc2.c. -LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \ - _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \ - _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \ - _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \ - _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \ - _fixtfdi _fixunstfdi _floatditf \ - _clear_cache _trampoline __main _exit \ - _absvsi2 _absvdi2 _addvsi3 _addvdi3 _subvsi3 _subvdi3 \ - _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 \ - _ctors +# Variable length limited to 255 charactes when passed to a shell script. +LIB2FUNCS_1 = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \ + _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \ + _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi + +LIB2FUNCS_2 = _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf \ + _clear_cache _trampoline __main _exit _absvsi2 _absvdi2 _addvsi3 \ + _addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors # Defined in libgcc2.c, included only in the static library. -LIB2FUNCS_ST = _eprintf _bb __gcc_bcmp +LIB2FUNCS_ST = _eprintf _bb __gcc_bcmp FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \ _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \ @@ -188,41 +100,116 @@ DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \ _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \ _df_to_sf _thenan_df _df_to_usi _usi_to_df -# Build libgcc.a. +# These might cause a divide overflow trap and so are compiled with +# unwinder info. +LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4 + +MACHMODE_H = machmode.h machmode.def + LIB2ADD = $(LIB2FUNCS_EXTRA) LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA) # Additional sources to handle exceptions; overridden on ia64. -LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ - $(srcdir)/unwind-sjlj.c -LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h - -MACHMODE_H = machmode.h machmode.def - -# nm flags to list global symbols in libgcc object files. -SHLIB_NM_FLAGS = -pg +LIB2ADDEH = unwind-dw2.c unwind-dw2-fde.c unwind-sjlj.c +#----------------------------------------------------------------------- # -# Bmake'ed tweaks for the GCC Makefile.in barrowed bits. +# Platform specific bits. +# When upgrading GCC, get the following defintions from config//t-* # -.for objfile in ${LIB1FUNCS} ${LIB2FUNCS} ${LIB2FUNCS_ST} ${FPBIT_FUNCS} \ - ${DPBIT_FUNCS} -CLEANFILES+= ${objfile}.o -.endfor +.if ${TARGET_ARCH} == "alpha" +# from config/alpha/t-alpha +LIB2FUNCS_EXTRA = qrnnd.asm +.endif -CLEANFILES+= ${LIB2ADDEH:S/.c/.o/g:S/$(srcdir)\///g} +.if ${TARGET_ARCH} == "arm" +# from config/arm/t-strongarm-elf +LIB1ASMSRC = arm/lib1funcs.asm +LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func +# We want fine grained libraries, so use the new code to build the +# floating point emulation libraries. +XXX fix this +NEED_FP_EMULATION set to "yes" with different rules per platform +.endif -CLEANDIRS+= libgcc +.if ${TARGET_ARCH} == "ia64" +# from config/ia64/t-ia64 +LIB1ASMSRC = ia64/lib1funcs.asm +LIB1ASMFUNCS = __divtf3 __divdf3 __divsf3 \ + __divdi3 __moddi3 __udivdi3 __umoddi3 \ + __divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \ + __nonlocal_goto __restore_stack_nonlocal __trampoline +LIB2ADDEH = unwind-ia64.c unwind-sjlj.c +.endif -# -# Need to supply an `install' target as we aren't using bsd.lib.mk. -# +.if ${TARGET_ARCH} == "powerpc" +# from config/rs6000/t-ppccomm +LIB2FUNCS_EXTRA = tramp.S +# This one can't end up in shared libgcc +LIB2FUNCS_STATIC_EXTRA = eabi.S +# We want fine grained libraries, so use the new code to build the +# floating point emulation libraries. +XXX fix this +NEED_FP_EMULATION set to "yes" with different rules per platform +OBJS+= dp-bit.o fp-bit.o +.endif -install: - ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR} +.if ${TARGET_ARCH} == "sparc64" +# from config/sparc/t-elf +# We want fine grained libraries, so use the new code to build the +# floating point emulation libraries. +LIB1ASMSRC = sparc/lb1spc.asm +LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 +OBJS+= dp-bit.o fp-bit.o +.endif -.include -.include -.include +dp-bit.o: config/fp-bit.c + ${XCC} -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*} + +dp-bit.So: config/fp-bit.c + ${XCC} ${PICFLAG} -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*} + +dp-bit.po: config/fp-bit.c + ${XCC} -p -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*} + +fp-bit.o: config/fp-bit.c + ${XCC} -DFLOAT=1 -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*} + +fp-bit.So: config/fp-bit.c + ${XCC} ${PICFLAG} -DFLOAT=1 -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*} + +fp-bit.po: config/fp-bit.c + ${XCC} -p -DFLOAT=1 -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*} + +#----------------------------------------------------------------------- + +COMMONHDRS= tconfig.h +SRCS+= ${COMMONHDRS} +CLEANFILES+= ${COMMONHDRS} + +tconfig.h: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile + ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET} + +${OBJS} beforedepend: ${COMMONHDRS} + +${OBJS_T}: libgcc2.c + ${XCC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET} + @mv ${.TARGET}.tmp ${.TARGET} + +.if !defined(NOPIC) +${OBJS_S}: libgcc2.c + ${XCC} -c ${PICFLAG} ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET} + @mv ${.TARGET}.tmp ${.TARGET} +.endif + +.if !defined(NOPROFILE) +${OBJS_P}: libgcc2.c + ${XCC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + @${LD} -o ${.TARGET}.tmp -X -r ${.TARGET} + @mv ${.TARGET}.tmp ${.TARGET} +.endif + +.include From ae889c62a2ab4c95f87bea4a4e826b1d566ffb1a Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 7 May 2002 00:58:49 +0000 Subject: [PATCH 35/47] Dependencies on tconfig.h work better if we set GCCDIR when shelling to other Makefiles. --- gnu/lib/libobjc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/lib/libobjc/Makefile b/gnu/lib/libobjc/Makefile index b3ffc0b2471..65c5c639011 100644 --- a/gnu/lib/libobjc/Makefile +++ b/gnu/lib/libobjc/Makefile @@ -37,6 +37,6 @@ runtime-info.h: < /dev/null > ${.TARGET} tconfig.h: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile - ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} ${.TARGET} + ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET} .include From 68866c8c5bed42344c2a137f4f2af45fda3d07c3 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 7 May 2002 01:01:38 +0000 Subject: [PATCH 36/47] Mostly filled in contents for GCC 3.1. Bribed by: peter --- gnu/lib/libsupc++/Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/lib/libsupc++/Makefile b/gnu/lib/libsupc++/Makefile index e8c0da7a1d7..a35befcd10a 100644 --- a/gnu/lib/libsupc++/Makefile +++ b/gnu/lib/libsupc++/Makefile @@ -1 +1,28 @@ # $FreeBSD$ + +SRCDIR= ${.CURDIR}/../../../contrib/libstdc++-v3 +.PATH: ${SRCDIR} ${SRCDIR}/../../gcc + +LIB= stdc++ +SRCS= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc \ + eh_alloc.cc eh_aux_runtime.cc eh_catch.cc eh_exception.cc \ + eh_globals.cc eh_personality.cc eh_terminate.cc eh_throw.cc eh_type.cc \ + new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc \ + pure.cc tinfo.cc tinfo2.cc vec.cc + +# from libiberty: +SRCS+= cp-demangle.c dyn-string.c + +CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H +CFLAGS+= -I${SRCDIR}/../../gcc +CXXFLAGS+= -nostdinc++ \ + -fno-implicit-templates -ffunction-sections -fdata-sections + +HDRS= exception new typeinfo cxxabi.h exception_defines.h + +beforeinstall: + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${HDRS:S;^;${SRCDIR}/;} \ + ${DESTDIR}/usr/include/g++-v3 + +.include From a7b4ff14b9b34317e9421f4b58751bea559dd649 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Tue, 7 May 2002 01:03:52 +0000 Subject: [PATCH 37/47] This commit was manufactured by cvs2svn to create branch 'WIP_GCC31'. --- gnu/lib/libstdc++/config.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 gnu/lib/libstdc++/config.h diff --git a/gnu/lib/libstdc++/config.h b/gnu/lib/libstdc++/config.h new file mode 100644 index 00000000000..da23dbe43a4 --- /dev/null +++ b/gnu/lib/libstdc++/config.h @@ -0,0 +1 @@ +/* $FreeBSD$ */ From ca15bbbfe3b55770885bbae9ef00b9674a078f24 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 7 May 2002 01:13:32 +0000 Subject: [PATCH 38/47] Fill in the missing. Bribed by: peter --- gnu/lib/libstdc++/config.h | 1075 ++++++++++++++++++++++++++++++++++++ 1 file changed, 1075 insertions(+) diff --git a/gnu/lib/libstdc++/config.h b/gnu/lib/libstdc++/config.h index da23dbe43a4..645d0ac5c0d 100644 --- a/gnu/lib/libstdc++/config.h +++ b/gnu/lib/libstdc++/config.h @@ -1 +1,1076 @@ /* $FreeBSD$ */ + +/* config.h. Generated automatically by configure. */ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +// Define if GCC supports weak symbols. +#define _GLIBCPP_SUPPORTS_WEAK __GXX_WEAK__ + +// Define if gthr-default.h exists (meaning that threading support is enabled). +#define HAVE_GTHR_DEFAULT 1 + +// Include I/O support for 'long long' and 'unsigned long long'. +#define _GLIBCPP_USE_LONG_LONG 1 + +// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed. +/* #undef _GLIBCPP_USE_C99 */ + +// Define if code specialized for wchar_t should be used. +/* #undef _GLIBCPP_USE_WCHAR_T */ + +// Define if using setrlimit to limit memory usage during 'make check'. +/* #undef _GLIBCPP_MEM_LIMITS */ + +// Define to use concept checking code from the boost libraries. +/* #undef _GLIBCPP_CONCEPT_CHECKS */ + +// Define if mbstate_t exists in wchar.h. +#define HAVE_MBSTATE_T 1 + +// Define if you have the modff function. +#define HAVE_MODFF 1 + +// Define if you have the modfl function. +/* #undef HAVE_MODFL */ + +// Define if you have the expf function. +#define HAVE_EXPF 1 + +// Define if you have the expl function. +/* #undef HAVE_EXPL */ + +// Define if you have the hypotf function. +#define HAVE_HYPOTF 1 + +// Define if you have the hypotl function. +/* #undef HAVE_HYPOTL */ + +// Define if the compiler/host combination has __builtin_abs +#define HAVE___BUILTIN_ABS 1 + +// Define if the compiler/host combination has __builtin_labs +#define HAVE___BUILTIN_LABS 1 + +// Define if the compiler/host combination has __builtin_cos +/* #undef HAVE___BUILTIN_COS */ + +// Define if the compiler/host combination has __builtin_cosf +/* #undef HAVE___BUILTIN_COSF */ + +// Define if the compiler/host combination has __builtin_cosl +/* #undef HAVE___BUILTIN_COSL */ + +// Define if the compiler/host combination has __builtin_fabs +#define HAVE___BUILTIN_FABS 1 + +// Define if the compiler/host combination has __builtin_fabsf +#define HAVE___BUILTIN_FABSF 1 + +// Define if the compiler/host combination has __builtin_fabsl +#define HAVE___BUILTIN_FABSL 1 + +// Define if the compiler/host combination has __builtin_sin +/* #undef HAVE___BUILTIN_SIN */ + +// Define if the compiler/host combination has __builtin_sinf +/* #undef HAVE___BUILTIN_SINF */ + +// Define if the compiler/host combination has __builtin_sinl +/* #undef HAVE___BUILTIN_SINL */ + +// Define if the compiler/host combination has __builtin_sqrt +/* #undef HAVE___BUILTIN_SQRT */ + +// Define if the compiler/host combination has __builtin_sqrtf +/* #undef HAVE___BUILTIN_SQRTF */ + +// Define if the compiler/host combination has __builtin_sqrtl +/* #undef HAVE___BUILTIN_SQRTL */ + +// Define if LC_MESSAGES is available in . +#define HAVE_LC_MESSAGES 1 + +/* Define if you have the __signbit function. */ +/* #undef HAVE___SIGNBIT */ + +/* Define if you have the __signbitf function. */ +/* #undef HAVE___SIGNBITF */ + +/* Define if you have the __signbitl function. */ +/* #undef HAVE___SIGNBITL */ + +/* Define if you have the _acosf function. */ +/* #undef HAVE__ACOSF */ + +/* Define if you have the _acosl function. */ +/* #undef HAVE__ACOSL */ + +/* Define if you have the _asinf function. */ +/* #undef HAVE__ASINF */ + +/* Define if you have the _asinl function. */ +/* #undef HAVE__ASINL */ + +/* Define if you have the _atan2f function. */ +/* #undef HAVE__ATAN2F */ + +/* Define if you have the _atan2l function. */ +/* #undef HAVE__ATAN2L */ + +/* Define if you have the _atanf function. */ +/* #undef HAVE__ATANF */ + +/* Define if you have the _atanl function. */ +/* #undef HAVE__ATANL */ + +/* Define if you have the _ceilf function. */ +/* #undef HAVE__CEILF */ + +/* Define if you have the _ceill function. */ +/* #undef HAVE__CEILL */ + +/* Define if you have the _copysign function. */ +/* #undef HAVE__COPYSIGN */ + +/* Define if you have the _copysignl function. */ +/* #undef HAVE__COPYSIGNL */ + +/* Define if you have the _cosf function. */ +/* #undef HAVE__COSF */ + +/* Define if you have the _coshf function. */ +/* #undef HAVE__COSHF */ + +/* Define if you have the _coshl function. */ +/* #undef HAVE__COSHL */ + +/* Define if you have the _cosl function. */ +/* #undef HAVE__COSL */ + +/* Define if you have the _expf function. */ +/* #undef HAVE__EXPF */ + +/* Define if you have the _expl function. */ +/* #undef HAVE__EXPL */ + +/* Define if you have the _fabsf function. */ +/* #undef HAVE__FABSF */ + +/* Define if you have the _fabsl function. */ +/* #undef HAVE__FABSL */ + +/* Define if you have the _finite function. */ +/* #undef HAVE__FINITE */ + +/* Define if you have the _finitef function. */ +/* #undef HAVE__FINITEF */ + +/* Define if you have the _finitel function. */ +/* #undef HAVE__FINITEL */ + +/* Define if you have the _floorf function. */ +/* #undef HAVE__FLOORF */ + +/* Define if you have the _floorl function. */ +/* #undef HAVE__FLOORL */ + +/* Define if you have the _fmodf function. */ +/* #undef HAVE__FMODF */ + +/* Define if you have the _fmodl function. */ +/* #undef HAVE__FMODL */ + +/* Define if you have the _fpclass function. */ +/* #undef HAVE__FPCLASS */ + +/* Define if you have the _frexpf function. */ +/* #undef HAVE__FREXPF */ + +/* Define if you have the _frexpl function. */ +/* #undef HAVE__FREXPL */ + +/* Define if you have the _hypot function. */ +/* #undef HAVE__HYPOT */ + +/* Define if you have the _hypotf function. */ +/* #undef HAVE__HYPOTF */ + +/* Define if you have the _hypotl function. */ +/* #undef HAVE__HYPOTL */ + +/* Define if you have the _isinf function. */ +/* #undef HAVE__ISINF */ + +/* Define if you have the _isinff function. */ +/* #undef HAVE__ISINFF */ + +/* Define if you have the _isinfl function. */ +/* #undef HAVE__ISINFL */ + +/* Define if you have the _isnan function. */ +/* #undef HAVE__ISNAN */ + +/* Define if you have the _isnanf function. */ +/* #undef HAVE__ISNANF */ + +/* Define if you have the _isnanl function. */ +/* #undef HAVE__ISNANL */ + +/* Define if you have the _ldexpf function. */ +/* #undef HAVE__LDEXPF */ + +/* Define if you have the _ldexpl function. */ +/* #undef HAVE__LDEXPL */ + +/* Define if you have the _log10f function. */ +/* #undef HAVE__LOG10F */ + +/* Define if you have the _log10l function. */ +/* #undef HAVE__LOG10L */ + +/* Define if you have the _logf function. */ +/* #undef HAVE__LOGF */ + +/* Define if you have the _logl function. */ +/* #undef HAVE__LOGL */ + +/* Define if you have the _modff function. */ +/* #undef HAVE__MODFF */ + +/* Define if you have the _modfl function. */ +/* #undef HAVE__MODFL */ + +/* Define if you have the _powf function. */ +/* #undef HAVE__POWF */ + +/* Define if you have the _powl function. */ +/* #undef HAVE__POWL */ + +/* Define if you have the _qfpclass function. */ +/* #undef HAVE__QFPCLASS */ + +/* Define if you have the _sincos function. */ +/* #undef HAVE__SINCOS */ + +/* Define if you have the _sincosf function. */ +/* #undef HAVE__SINCOSF */ + +/* Define if you have the _sincosl function. */ +/* #undef HAVE__SINCOSL */ + +/* Define if you have the _sinf function. */ +/* #undef HAVE__SINF */ + +/* Define if you have the _sinhf function. */ +/* #undef HAVE__SINHF */ + +/* Define if you have the _sinhl function. */ +/* #undef HAVE__SINHL */ + +/* Define if you have the _sinl function. */ +/* #undef HAVE__SINL */ + +/* Define if you have the _sqrtf function. */ +/* #undef HAVE__SQRTF */ + +/* Define if you have the _sqrtl function. */ +/* #undef HAVE__SQRTL */ + +/* Define if you have the _tanf function. */ +/* #undef HAVE__TANF */ + +/* Define if you have the _tanhf function. */ +/* #undef HAVE__TANHF */ + +/* Define if you have the _tanhl function. */ +/* #undef HAVE__TANHL */ + +/* Define if you have the _tanl function. */ +/* #undef HAVE__TANL */ + +/* Define if you have the acosf function. */ +#define HAVE_ACOSF 1 + +/* Define if you have the acosl function. */ +/* #undef HAVE_ACOSL */ + +/* Define if you have the asinf function. */ +#define HAVE_ASINF 1 + +/* Define if you have the asinl function. */ +/* #undef HAVE_ASINL */ + +/* Define if you have the atan2f function. */ +#define HAVE_ATAN2F 1 + +/* Define if you have the atan2l function. */ +/* #undef HAVE_ATAN2L */ + +/* Define if you have the atanf function. */ +#define HAVE_ATANF 1 + +/* Define if you have the atanl function. */ +/* #undef HAVE_ATANL */ + +/* Define if you have the btowc function. */ +/* #undef HAVE_BTOWC */ + +/* Define if you have the ceilf function. */ +#define HAVE_CEILF 1 + +/* Define if you have the ceill function. */ +/* #undef HAVE_CEILL */ + +/* Define if you have the copysign function. */ +#define HAVE_COPYSIGN 1 + +/* Define if you have the copysignf function. */ +#define HAVE_COPYSIGNF 1 + +/* Define if you have the copysignl function. */ +/* #undef HAVE_COPYSIGNL */ + +/* Define if you have the cosf function. */ +#define HAVE_COSF 1 + +/* Define if you have the coshf function. */ +#define HAVE_COSHF 1 + +/* Define if you have the coshl function. */ +/* #undef HAVE_COSHL */ + +/* Define if you have the cosl function. */ +/* #undef HAVE_COSL */ + +/* Define if you have the drand48 function. */ +#define HAVE_DRAND48 1 + +/* Define if you have the expf function. */ +#define HAVE_EXPF 1 + +/* Define if you have the expl function. */ +/* #undef HAVE_EXPL */ + +/* Define if you have the fabsf function. */ +#define HAVE_FABSF 1 + +/* Define if you have the fabsl function. */ +/* #undef HAVE_FABSL */ + +/* Define if you have the fgetwc function. */ +/* #undef HAVE_FGETWC */ + +/* Define if you have the fgetws function. */ +/* #undef HAVE_FGETWS */ + +/* Define if you have the finite function. */ +#define HAVE_FINITE 1 + +/* Define if you have the finitef function. */ +#define HAVE_FINITEF 1 + +/* Define if you have the finitel function. */ +/* #undef HAVE_FINITEL */ + +/* Define if you have the floorf function. */ +#define HAVE_FLOORF 1 + +/* Define if you have the floorl function. */ +/* #undef HAVE_FLOORL */ + +/* Define if you have the fmodf function. */ +#define HAVE_FMODF 1 + +/* Define if you have the fmodl function. */ +/* #undef HAVE_FMODL */ + +/* Define if you have the fpclass function. */ +/* #undef HAVE_FPCLASS */ + +/* Define if you have the fputwc function. */ +/* #undef HAVE_FPUTWC */ + +/* Define if you have the fputws function. */ +/* #undef HAVE_FPUTWS */ + +/* Define if you have the frexpf function. */ +#define HAVE_FREXPF 1 + +/* Define if you have the frexpl function. */ +/* #undef HAVE_FREXPL */ + +/* Define if you have the fwide function. */ +/* #undef HAVE_FWIDE */ + +/* Define if you have the fwprintf function. */ +/* #undef HAVE_FWPRINTF */ + +/* Define if you have the fwscanf function. */ +/* #undef HAVE_FWSCANF */ + +/* Define if you have the getpagesize function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define if you have the getwc function. */ +/* #undef HAVE_GETWC */ + +/* Define if you have the getwchar function. */ +/* #undef HAVE_GETWCHAR */ + +/* Define if you have the hypot function. */ +#define HAVE_HYPOT 1 + +/* Define if you have the hypotf function. */ +#define HAVE_HYPOTF 1 + +/* Define if you have the hypotl function. */ +/* #undef HAVE_HYPOTL */ + +/* Define if you have the iconv function. */ +/* #undef HAVE_ICONV */ + +/* Define if you have the iconv_close function. */ +/* #undef HAVE_ICONV_CLOSE */ + +/* Define if you have the iconv_open function. */ +/* #undef HAVE_ICONV_OPEN */ + +/* Define if you have the isinf function. */ +#define HAVE_ISINF 1 + +/* Define if you have the isinff function. */ +/* #undef HAVE_ISINFF */ + +/* Define if you have the isinfl function. */ +/* #undef HAVE_ISINFL */ + +/* Define if you have the isnan function. */ +#define HAVE_ISNAN 1 + +/* Define if you have the isnanf function. */ +#define HAVE_ISNANF 1 + +/* Define if you have the isnanl function. */ +/* #undef HAVE_ISNANL */ + +/* Define if you have the ldexpf function. */ +#define HAVE_LDEXPF 1 + +/* Define if you have the ldexpl function. */ +/* #undef HAVE_LDEXPL */ + +/* Define if you have the log10f function. */ +#define HAVE_LOG10F 1 + +/* Define if you have the log10l function. */ +/* #undef HAVE_LOG10L */ + +/* Define if you have the logf function. */ +#define HAVE_LOGF 1 + +/* Define if you have the logl function. */ +/* #undef HAVE_LOGL */ + +/* Define if you have the mbrlen function. */ +/* #undef HAVE_MBRLEN */ + +/* Define if you have the mbrtowc function. */ +/* #undef HAVE_MBRTOWC */ + +/* Define if you have the mbsinit function. */ +/* #undef HAVE_MBSINIT */ + +/* Define if you have the mbsrtowcs function. */ +/* #undef HAVE_MBSRTOWCS */ + +/* Define if you have the modff function. */ +#define HAVE_MODFF 1 + +/* Define if you have the modfl function. */ +/* #undef HAVE_MODFL */ + +/* Define if you have the nan function. */ +/* #undef HAVE_NAN */ + +/* Define if you have the nl_langinfo function. */ +#define HAVE_NL_LANGINFO 1 + +/* Define if you have the powf function. */ +#define HAVE_POWF 1 + +/* Define if you have the powl function. */ +/* #undef HAVE_POWL */ + +/* Define if you have the putwc function. */ +/* #undef HAVE_PUTWC */ + +/* Define if you have the putwchar function. */ +/* #undef HAVE_PUTWCHAR */ + +/* Define if you have the qfpclass function. */ +/* #undef HAVE_QFPCLASS */ + +/* Define if you have the setenv function. */ +#define HAVE_SETENV 1 + +/* Define if you have the sincos function. */ +/* #undef HAVE_SINCOS */ + +/* Define if you have the sincosf function. */ +/* #undef HAVE_SINCOSF */ + +/* Define if you have the sincosl function. */ +/* #undef HAVE_SINCOSL */ + +/* Define if you have the sinf function. */ +#define HAVE_SINF 1 + +/* Define if you have the sinhf function. */ +#define HAVE_SINHF 1 + +/* Define if you have the sinhl function. */ +/* #undef HAVE_SINHL */ + +/* Define if you have the sinl function. */ +/* #undef HAVE_SINL */ + +/* Define if you have the sqrtf function. */ +#define HAVE_SQRTF 1 + +/* Define if you have the sqrtl function. */ +/* #undef HAVE_SQRTL */ + +/* Define if you have the strtof function. */ +/* #undef HAVE_STRTOF */ + +/* Define if you have the strtold function. */ +/* #undef HAVE_STRTOLD */ + +/* Define if you have the swprintf function. */ +/* #undef HAVE_SWPRINTF */ + +/* Define if you have the swscanf function. */ +/* #undef HAVE_SWSCANF */ + +/* Define if you have the tanf function. */ +#define HAVE_TANF 1 + +/* Define if you have the tanhf function. */ +#define HAVE_TANHF 1 + +/* Define if you have the tanhl function. */ +/* #undef HAVE_TANHL */ + +/* Define if you have the tanl function. */ +/* #undef HAVE_TANL */ + +/* Define if you have the ungetwc function. */ +/* #undef HAVE_UNGETWC */ + +/* Define if you have the vfwprintf function. */ +/* #undef HAVE_VFWPRINTF */ + +/* Define if you have the vfwscanf function. */ +/* #undef HAVE_VFWSCANF */ + +/* Define if you have the vswprintf function. */ +/* #undef HAVE_VSWPRINTF */ + +/* Define if you have the vswscanf function. */ +/* #undef HAVE_VSWSCANF */ + +/* Define if you have the vwprintf function. */ +/* #undef HAVE_VWPRINTF */ + +/* Define if you have the vwscanf function. */ +/* #undef HAVE_VWSCANF */ + +/* Define if you have the wcrtomb function. */ +/* #undef HAVE_WCRTOMB */ + +/* Define if you have the wcscat function. */ +#define HAVE_WCSCAT 1 + +/* Define if you have the wcschr function. */ +#define HAVE_WCSCHR 1 + +/* Define if you have the wcscmp function. */ +#define HAVE_WCSCMP 1 + +/* Define if you have the wcscoll function. */ +/* #undef HAVE_WCSCOLL */ + +/* Define if you have the wcscpy function. */ +#define HAVE_WCSCPY 1 + +/* Define if you have the wcscspn function. */ +#define HAVE_WCSCSPN 1 + +/* Define if you have the wcsftime function. */ +/* #undef HAVE_WCSFTIME */ + +/* Define if you have the wcslen function. */ +#define HAVE_WCSLEN 1 + +/* Define if you have the wcsncat function. */ +#define HAVE_WCSNCAT 1 + +/* Define if you have the wcsncmp function. */ +#define HAVE_WCSNCMP 1 + +/* Define if you have the wcsncpy function. */ +#define HAVE_WCSNCPY 1 + +/* Define if you have the wcspbrk function. */ +#define HAVE_WCSPBRK 1 + +/* Define if you have the wcsrchr function. */ +#define HAVE_WCSRCHR 1 + +/* Define if you have the wcsrtombs function. */ +/* #undef HAVE_WCSRTOMBS */ + +/* Define if you have the wcsspn function. */ +#define HAVE_WCSSPN 1 + +/* Define if you have the wcsstr function. */ +#define HAVE_WCSSTR 1 + +/* Define if you have the wcstod function. */ +/* #undef HAVE_WCSTOD */ + +/* Define if you have the wcstof function. */ +/* #undef HAVE_WCSTOF */ + +/* Define if you have the wcstok function. */ +/* #undef HAVE_WCSTOK */ + +/* Define if you have the wcstol function. */ +/* #undef HAVE_WCSTOL */ + +/* Define if you have the wcstoul function. */ +/* #undef HAVE_WCSTOUL */ + +/* Define if you have the wcsxfrm function. */ +/* #undef HAVE_WCSXFRM */ + +/* Define if you have the wctob function. */ +/* #undef HAVE_WCTOB */ + +/* Define if you have the wmemchr function. */ +#define HAVE_WMEMCHR 1 + +/* Define if you have the wmemcmp function. */ +#define HAVE_WMEMCMP 1 + +/* Define if you have the wmemcpy function. */ +#define HAVE_WMEMCPY 1 + +/* Define if you have the wmemmove function. */ +#define HAVE_WMEMMOVE 1 + +/* Define if you have the wmemset function. */ +#define HAVE_WMEMSET 1 + +/* Define if you have the wprintf function. */ +/* #undef HAVE_WPRINTF */ + +/* Define if you have the wscanf function. */ +/* #undef HAVE_WSCANF */ + +/* Define if you have the header file. */ +/* #undef HAVE_ENDIAN_H */ + +/* Define if you have the header file. */ +#define HAVE_FLOAT_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_FP_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_GCONV_H */ + +/* Define if you have the header file. */ +#define HAVE_IEEEFP_H 1 + +/* Define if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define if you have the header file. */ +#define HAVE_MACHINE_ENDIAN_H 1 + +/* Define if you have the header file. */ +#define HAVE_MACHINE_PARAM_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_NAN_H */ + +/* Define if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_ISA_DEFS_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_MACHINE_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +/* Define if you have the m library (-lm). */ +#define HAVE_LIBM 1 + +/* Name of package */ +#define PACKAGE "libstdc++" + +/* Version number of package */ +#define VERSION "3.1.0" + +/* Define if the compiler is configured for setjmp/longjmp exceptions. */ +/* #undef _GLIBCPP_SJLJ_EXCEPTIONS */ + +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + +/* Only used in build directory testsuite_hooks.h. */ +#define HAVE_MEMLIMIT_DATA 0 + +/* Only used in build directory testsuite_hooks.h. */ +#define HAVE_MEMLIMIT_RSS 0 + +/* Only used in build directory testsuite_hooks.h. */ +#define HAVE_MEMLIMIT_VMEM 0 + +/* Only used in build directory testsuite_hooks.h. */ +#define HAVE_MEMLIMIT_AS 0 + +// +// Systems that have certain non-standard functions prefixed with an +// underscore, we'll handle those here. Must come after config.h.in. +// +#if defined (HAVE__ISNAN) && ! defined (HAVE_ISNAN) +# define HAVE_ISNAN 1 +# define isnan _isnan +#endif + +#if defined (HAVE__ISNANF) && ! defined (HAVE_ISNANF) +# define HAVE_ISNANF 1 +# define isnanf _isnanf +#endif + +#if defined (HAVE__ISNANL) && ! defined (HAVE_ISNANL) +# define HAVE_ISNANL 1 +# define isnanl _isnanl +#endif + +#if defined (HAVE__ISINF) && ! defined (HAVE_ISINF) +# define HAVE_ISINF 1 +# define isinf _isinf +#endif + +#if defined (HAVE__ISINFF) && ! defined (HAVE_ISINFF) +# define HAVE_ISINFF 1 +# define isinff _isinff +#endif + +#if defined (HAVE__ISINFL) && ! defined (HAVE_ISINFL) +# define HAVE_ISINFL 1 +# define isinfl _isinfl +#endif + +#if defined (HAVE__COPYSIGN) && ! defined (HAVE_COPYSIGN) +# define HAVE_COPYSIGN 1 +# define copysign _copysign +#endif + +#if defined (HAVE__COPYSIGNL) && ! defined (HAVE_COPYSIGNL) +# define HAVE_COPYSIGNL 1 +# define copysignl _copysignl +#endif + +#if defined (HAVE__COSF) && ! defined (HAVE_COSF) +# define HAVE_COSF 1 +# define cosf _cosf +#endif + +#if defined (HAVE__ACOSF) && ! defined (HAVE_ACOSF) +# define HAVE_ACOSF 1 +# define acosf _acosf +#endif + +#if defined (HAVE__ACOSL) && ! defined (HAVE_ACOSL) +# define HAVE_ACOSL 1 +# define acosl _acosl +#endif + +#if defined (HAVE__ASINF) && ! defined (HAVE_ASINF) +# define HAVE_ASINF 1 +# define asinf _asinf +#endif + +#if defined (HAVE__ASINL) && ! defined (HAVE_ASINL) +# define HAVE_ASINL 1 +# define asinl _asinl +#endif + +#if defined (HAVE__ATANF) && ! defined (HAVE_ATANF) +# define HAVE_ATANF 1 +# define atanf _atanf +#endif + +#if defined (HAVE__ATANL) && ! defined (HAVE_ATANL) +# define HAVE_ATANL 1 +# define atanl _atanl +#endif + +#if defined (HAVE__CEILF) && ! defined (HAVE_CEILF) +# define HAVE_CEILF 1 +# define aceil _ceilf +#endif + +#if defined (HAVE__CEILL) && ! defined (HAVE_CEILL) +# define HAVE_CEILL 1 +# define aceil _ceill +#endif + +#if defined (HAVE__COSHF) && ! defined (HAVE_COSHF) +# define HAVE_COSHF 1 +# define coshf _coshf +#endif + +#if defined (HAVE__COSL) && ! defined (HAVE_COSL) +# define HAVE_COSL 1 +# define cosl _cosl +#endif + +#if defined (HAVE__LOGF) && ! defined (HAVE_LOGF) +# define HAVE_LOGF 1 +# define logf _logf +#endif + +#if defined (HAVE__COSHL) && ! defined (HAVE_COSHL) +# define HAVE_COSHL 1 +# define coshl _coshl +#endif + +#if defined (HAVE__EXPF) && ! defined (HAVE_EXPF) +# define HAVE_EXPF 1 +# define expf _expf +#endif + +#if defined (HAVE__EXPL) && ! defined (HAVE_EXPL) +# define HAVE_EXPL 1 +# define expl _expl +#endif + +#if defined (HAVE__FABSF) && ! defined (HAVE_FABSF) +# define HAVE_FABSF 1 +# define fabsf _fabsf +#endif + +#if defined (HAVE__FABSL) && ! defined (HAVE_FABSL) +# define HAVE_FABSL 1 +# define fabsl _fabsl +#endif + +#if defined (HAVE__FLOORF) && ! defined (HAVE_FLOORF) +# define HAVE_FLOORF 1 +# define floorf _floorf +#endif + +#if defined (HAVE__FLOORL) && ! defined (HAVE_FLOORL) +# define HAVE_FLOORL 1 +# define floorl _floorl +#endif + +#if defined (HAVE__FMODF) && ! defined (HAVE_FMODF) +# define HAVE_FMODF 1 +# define fmodf _fmodf +#endif + +#if defined (HAVE__FMODL) && ! defined (HAVE_FMODL) +# define HAVE_FMODL 1 +# define fmodl _fmodl +#endif + +#if defined (HAVE__FREXPF) && ! defined (HAVE_FREXPF) +# define HAVE_FREXPF 1 +# define frexpf _frexpf +#endif + +#if defined (HAVE__FREXPL) && ! defined (HAVE_FREXPL) +# define HAVE_FREXPL 1 +# define frexpl _frexpl +#endif + +#if defined (HAVE__LDEXPF) && ! defined (HAVE_LDEXPF) +# define HAVE_LDEXPF 1 +# define ldexpf _ldexpf +#endif + +#if defined (HAVE__LDEXPL) && ! defined (HAVE_LDEXPL) +# define HAVE_LDEXPL 1 +# define ldexpl _ldexpl +#endif + +#if defined (HAVE__LOG10F) && ! defined (HAVE_LOG10F) +# define HAVE_LOG10F 1 +# define log10f _log10f +#endif + +#if defined (HAVE__LOGL) && ! defined (HAVE_LOGL) +# define HAVE_LOGL 1 +# define logl _logl +#endif + +#if defined (HAVE__POWF) && ! defined (HAVE_POWF) +# define HAVE_POWF 1 +# define powf _powf +#endif + +#if defined (HAVE__LOG10L) && ! defined (HAVE_LOG10L) +# define HAVE_LOG10L 1 +# define log10l _log10l +#endif + +#if defined (HAVE__MODF) && ! defined (HAVE_MODF) +# define HAVE_MODF 1 +# define modf _modf +#endif + +#if defined (HAVE__MODL) && ! defined (HAVE_MODL) +# define HAVE_MODL 1 +# define modl _modl +#endif + +#if defined (HAVE__SINF) && ! defined (HAVE_SINF) +# define HAVE_SINF 1 +# define sinf _sinf +#endif + +#if defined (HAVE__POWL) && ! defined (HAVE_POWL) +# define HAVE_POWL 1 +# define powl _powl +#endif + +#if defined (HAVE__SINHF) && ! defined (HAVE_SINHF) +# define HAVE_SINHF 1 +# define sinhf _sinhf +#endif + +#if defined (HAVE__SINL) && ! defined (HAVE_SINL) +# define HAVE_SINL 1 +# define sinl _sinl +#endif + +#if defined (HAVE__SQRTF) && ! defined (HAVE_SQRTF) +# define HAVE_SQRTF 1 +# define sqrtf _sqrtf +#endif + +#if defined (HAVE__SINHL) && ! defined (HAVE_SINHL) +# define HAVE_SINHL 1 +# define sinhl _sinhl +#endif + +#if defined (HAVE__TANF) && ! defined (HAVE_TANF) +# define HAVE_TANF 1 +# define tanf _tanf +#endif + +#if defined (HAVE__SQRTL) && ! defined (HAVE_SQRTL) +# define HAVE_SQRTL 1 +# define sqrtl _sqrtl +#endif + +#if defined (HAVE__TANHF) && ! defined (HAVE_TANHF) +# define HAVE_TANHF 1 +# define tanhf _tanhf +#endif + +#if defined (HAVE__TANL) && ! defined (HAVE_TANL) +# define HAVE_TANF 1 +# define tanf _tanf +#endif + +#if defined (HAVE__STRTOF) && ! defined (HAVE_STRTOF) +# define HAVE_STRTOF 1 +# define strtof _strtof +#endif + +#if defined (HAVE__TANHL) && ! defined (HAVE_TANHL) +# define HAVE_TANHL 1 +# define tanhl _tanhl +#endif + +#if defined (HAVE__STRTOLD) && ! defined (HAVE_STRTOLD) +# define HAVE_STRTOLD 1 +# define strtold _strtold +#endif + +#if defined (HAVE__SINCOS) && ! defined (HAVE_SINCOS) +# define HAVE_SINCOS 1 +# define sincos _sincos +#endif + +#if defined (HAVE__SINCOSF) && ! defined (HAVE_SINCOSF) +# define HAVE_SINCOSF 1 +# define sincosf _sincosf +#endif + +#if defined (HAVE__SINCOSL) && ! defined (HAVE_SINCOSL) +# define HAVE_SINCOSL 1 +# define sincosl _sincosl +#endif + +#if defined (HAVE__FINITE) && ! defined (HAVE_FINITE) +# define HAVE_FINITE 1 +# define finite _finite +#endif + +#if defined (HAVE__FINITEF) && ! defined (HAVE_FINITEF) +# define HAVE_FINITEF 1 +# define finitef _finitef +#endif + +#if defined (HAVE__FINITEL) && ! defined (HAVE_FINITEL) +# define HAVE_FINITEL 1 +# define finitel _finitel +#endif + +#if defined (HAVE__QFINITE) && ! defined (HAVE_QFINITE) +# define HAVE_QFINITE 1 +# define qfinite _qfinite +#endif + +#if defined (HAVE__FPCLASS) && ! defined (HAVE_FPCLASS) +# define HAVE_FPCLASS 1 +# define fpclass _fpclass +#endif + +#if defined (HAVE__QFPCLASS) && ! defined (HAVE_QFPCLASS) +# define HAVE_QFPCLASS 1 +# define qfpclass _qfpclass +#endif + From dbda0c7715c6db0a05fa6d5baf8bef131520f15e Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 7 May 2002 01:16:04 +0000 Subject: [PATCH 39/47] Mostly filled in contents for GCC 3.1. Bribed by: peter --- gnu/lib/libstdc++/Makefile | 105 +++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 gnu/lib/libstdc++/Makefile diff --git a/gnu/lib/libstdc++/Makefile b/gnu/lib/libstdc++/Makefile new file mode 100644 index 00000000000..3e7e94397d9 --- /dev/null +++ b/gnu/lib/libstdc++/Makefile @@ -0,0 +1,105 @@ +# $FreeBSD$ + +SRCDIR= ${.CURDIR}/../../../contrib/libstdc++-v3/src +.PATH: ${SRCDIR}/src ${SRCDIR}/libmath ${SRCDIR}/config/io \ + ${SRCDIR}/config/locale/generic ${SRCDIR} + +SUBDIR= doc + +LIB= stdc++ +SHLIB_MAJOR= 4 +SHLIB_MINOR= 0 + +CFLAGS+= -DHAVE_CONFIG_H +CFLAGS+= -I${.CURDIR} -I${SRCDIR}/include -I. +CXXFLAGS+= -nostdinc++ \ + -fno-implicit-templates -ffunction-sections -fdata-sections +LDFLAGS+= -version-info 4:0:0 -Wl,--version-script=linker.map + +LDADD+= -lm -lsupc++ +DPADD+= ${LIBM} ${LIBSUPCXX} + +# libstdc++ sources (libstdc++-v3/src/Makefile.in, do not reorder) +SRCS+= globals.cc limits.cc basic_file_stdio.cc complex_io.cc ios.cc \ + strstream.cc cmath.cc bitset.cc functexcept.cc stdexcept.cc \ + vterminate.cc c_locale.cc locale.cc localename.cc codecvt.cc \ + collate_members.cc ctype_members.cc messages_members.cc \ + monetary_members.cc numeric_members.cc time_members.cc concept-inst.cc \ + locale-inst.cc misc-inst.cc stl-inst.cc string-inst.cc wstring-inst.cc \ + valarray-inst.cc ext-inst.cc + +# C parts of math +SRCS+= nan.c signbit.c signbitf.c signbitl.c # stubs.c + +#------------------------------------------------------------------------------ +# From libstdc++-v3/include/Makefile.am + +BITHDRS=basic_ios.h basic_ios.tcc basic_string.h basic_string.tcc \ + boost_concept_check.h char_traits.h codecvt.h concept_check.h \ + cpp_type_traits.h fpos.h fstream.tcc functexcept.h generic_shadow.h \ + gslice.h gslice_array.h indirect_array.h ios_base.h istream.tcc \ + locale_facets.h locale_facets.tcc localefwd.h mask_array.h ostream.tcc \ + pthread_allocimpl.h stream_iterator.h streambuf_iterator.h slice.h \ + slice_array.h sstream.tcc \ + stl_algo.h stl_algobase.h stl_alloc.h stl_bvector.h stl_construct.h \ + stl_deque.h stl_function.h stl_heap.h stl_iterator.h \ + stl_iterator_base_funcs.h stl_iterator_base_types.h stl_list.h \ + stl_map.h stl_multimap.h stl_multiset.h stl_numeric.h stl_pair.h \ + stl_pthread_alloc.h stl_queue.h stl_raw_storage_iter.h stl_relops.h \ + stl_set.h stl_stack.h stl_tempbuf.h stl_threads.h stl_tree.h \ + stl_uninitialized.h stl_vector.h \ + streambuf.tcc stringfwd.h type_traits.h valarray_array.h \ + valarray_array.tcc valarray_meta.h + +BKWHDRS=complex.h iomanip.h istream.h ostream.h stream.h streambuf.h algo.h \ + algobase.h alloc.h bvector.h defalloc.h deque.h function.h hash_map.h \ + hash_set.h hashtable.h heap.h iostream.h iterator.h list.h map.h \ + multimap.h new.h multiset.h pair.h queue.h rope.h set.h slist.h \ + stack.h tempbuf.h tree.h vector.h fstream.h strstream.h strstream \ + backward_warning.h + +EXTHDRS=algorithm functional hash_map hash_set iterator memory numeric \ + rb_tree rope ropeimpl.h slist stl_hash_fun.h stl_hashtable.h stl_rope.h + +# This is the common subset of files that all three "C" header models use. +BASEDHDRS=std_cassert.h std_cctype.h std_cerrno.h std_cfloat.h std_ciso646.h \ + std_climits.h std_clocale.h std_cmath.h std_csetjmp.h std_csignal.h \ + std_cstdarg.h std_cstddef.h std_cstdio.h std_cstdlib.h std_cstring.h \ + std_ctime.h std_cwchar.h std_cwctype.h \ + cmath.tcc + +STDHDRS=std_algorithm.h std_bitset.h std_complex.h std_deque.h std_fstream.h \ + std_functional.h std_iomanip.h std_ios.h std_iosfwd.h std_iostream.h \ + std_istream.h std_iterator.h std_limits.h std_list.h std_locale.h \ + std_map.h std_memory.h std_numeric.h std_ostream.h std_queue.h \ + std_set.h std_sstream.h std_stack.h std_stdexcept.h std_streambuf.h \ + std_string.h std_utility.h std_valarray.h std_vector.h + +TGTHDRS=ctype_base.h ctype_inline.h ctype_noninline.h os_defines.h \ + atomicity.h cpu_limits.h + +# These extra_target_headers files are all built with ad hoc naming rules. +XTGHDRS=basic_file.h c++config.h c++io.h c++locale.h messages_members.h \ + codecvt_specializations.h + +THDHDRS=gthr.h gthr-single.h gthr-posix.h gthr-default.h + +BASEDHDRS_renamed= ${BASEDHDRS:Mstd_*:S/std_//g:S/.h//g} +STDHDRS_renamed= ${STDHDRS:Mstd_*:S/std_//g:S/.h//g} + +#------------------------------------------------------------------------------ + +# gxx_include_dir = $(prefix)/include/g++-v3 +beforeinstall: + mkdir -p ${DESTDIR}/usr/include/g++/{backward,ext} + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${.CURDIR}/_G_config.h \ + ${HDRS:S;^;${SRCDIR}/;} \ + ${IHDRS:S;^;${SRCDIR}/../libio/;} \ + ${STLHDRS:S;^;${SRCDIR}/stl/;} \ + ${DESTDIR}/usr/include/g++ + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${STDHDRS:S;^;${SRCDIR}/std/;} \ + ${DESTDIR}/usr/include/g++/std + +.include From 66ecbefa3d04f10368733c8f791c708bf6498e0a Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 7 May 2002 01:19:56 +0000 Subject: [PATCH 40/47] The HAVE_AS_GOTOFF_IN_DATA definition needs to depend on obj format. --- gnu/usr.bin/cc/cc_tools/auto-host.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/usr.bin/cc/cc_tools/auto-host.h b/gnu/usr.bin/cc/cc_tools/auto-host.h index d14c345c79b..51230283690 100644 --- a/gnu/usr.bin/cc/cc_tools/auto-host.h +++ b/gnu/usr.bin/cc/cc_tools/auto-host.h @@ -551,7 +551,8 @@ /* #undef HAVE_AS_OFFSETABLE_LO10 */ /* Define true if the assembler supports '.long foo@GOTOFF'. */ -#define HAVE_AS_GOTOFF_IN_DATA 1 +/* DEO:XXX match TARGET_ELF definition in i386/freebsd.h. */ +#define HAVE_AS_GOTOFF_IN_DATA ((target_flags & MASK_AOUT) == 0) /* Define if your assembler supports dwarf2 .file/.loc directives, and preserves file table indices exactly as given. */ From baef823236d9ae5583e0fc50d0b4182d7e623a69 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 7 May 2002 01:26:58 +0000 Subject: [PATCH 41/47] The GCC target name does not always match our platform's name. MFC: rev 1.61 (needed a different way to keep from multiple inclusion) --- gnu/usr.bin/cc/Makefile.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index d4918055542..85aa3862f73 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -3,14 +3,16 @@ .include "../Makefile.inc" # Sometimes this is .include'd several times... -.if !defined(GCCDIR) -GCCDIR= ${.CURDIR}/../../../../contrib/gcc +.if !defined(__CC_MAKEFILE_INC__) +__CC_MAKEFILE_INC__= ${MFILE} + +GCCDIR= ${.CURDIR}/../../../../contrib/gcc .include "Makefile.tgt" # Machine description. -MD_FILE= ${GCCDIR}/config/${TARGET_ARCH}/${TARGET_ARCH}.md -target= ${TARGET_ARCH}-unknown-freebsd +MD_FILE= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md +target= ${TARGET_ARCH}-undermydesk-freebsd CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\" @@ -50,4 +52,4 @@ LIBCC_INT= ${.OBJDIR}/../cc_int/libcc_int.a LIBCC_INT= ${.CURDIR}/../cc_int/libcc_int.a .endif -.endif # !GCCDIR +.endif # !__CC_MAKEFILE_INC__ From 672528fa3ddd030a31490fc8415f339580a660af Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 7 May 2002 01:41:46 +0000 Subject: [PATCH 42/47] Make the YACC'ing more bullet proof. --- gnu/usr.bin/cc/cc1plus/Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gnu/usr.bin/cc/cc1plus/Makefile b/gnu/usr.bin/cc/cc1plus/Makefile index 236c3f946e4..6b7c49d4d05 100644 --- a/gnu/usr.bin/cc/cc1plus/Makefile +++ b/gnu/usr.bin/cc/cc1plus/Makefile @@ -5,7 +5,7 @@ .PATH: ${GCCDIR}/cp ${GCCDIR} PROG= cc1plus -SRCS= parse.c cfns.h +SRCS= parse.y cfns.h SRCS+= main.c cp-lang.c SRCS+= call.c class.c cvt.c decl.c decl2.c error.c except.c expr.c \ friend.c init.c lex.c mangle.c method.c pt.c ptree.c repo.c rtti.c \ @@ -20,14 +20,18 @@ CFLAGS+= -I${GCCDIR}/cp -I. DPADD+= ${LIBCC_INT} LDADD+= ${LIBCC_INT} -.ORDER: parse.c +CLEANFILES+= parse.c parse.h y.tab.c y.tab.h cfns.h + +.ORDER: parse.c parse.h parse.c: parse.y - ${YACC} -o parse.c.in ${.ALLSRC} + ${YACC} ${YFLAGS} ${GCCDIR}/cp/${.TARGET:S/c$/y/} sed -e "s/malloc/xmalloc/g" \ -e "s/realloc/xrealloc/g" \ - parse.c.in >parse.c + y.tab.c >${.TARGET} -CLEANFILES+= parse.c cfns.h +parse.h: parse.c y.tab.h + cp -pf y.tab.h ${.TARGET} + grep '^#define[ ]*YYEMPTY' ${.TARGET:S/h$/c/} >>${.TARGET} cfns.h: gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' \ From b9b736e42259c35e29df5dbe95f2c7e0eb1b908e Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Wed, 8 May 2002 02:46:10 +0000 Subject: [PATCH 43/47] Using ${.ALLSRC} here is dangerious as it sometimes picks up more "sources" than desired. --- gnu/usr.bin/cc/cpp0/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/usr.bin/cc/cpp0/Makefile b/gnu/usr.bin/cc/cpp0/Makefile index 7a962b68816..15f5d327d28 100644 --- a/gnu/usr.bin/cc/cpp0/Makefile +++ b/gnu/usr.bin/cc/cpp0/Makefile @@ -21,7 +21,7 @@ c-parse.c: c-parse.in sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ -e "/^ifc$$/d" \ -e "/^end ifc$$/d" \ - ${.ALLSRC} > c-parse.y + ${GCCDIR}/c-parse.in > c-parse.y ${YACC} -o c-parse.c.in c-parse.y sed -e "s/malloc/xmalloc/g" \ -e "s/realloc/xrealloc/g" \ From ff24f7832c922573575366c021ae5afab89db648 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Thu, 9 May 2002 00:52:10 +0000 Subject: [PATCH 44/47] This commit was manufactured by cvs2svn to create branch 'WIP_GCC31'. --- gnu/usr.bin/cc/tradcpp0/Makefile | 1 + 1 file changed, 1 insertion(+) create mode 100644 gnu/usr.bin/cc/tradcpp0/Makefile diff --git a/gnu/usr.bin/cc/tradcpp0/Makefile b/gnu/usr.bin/cc/tradcpp0/Makefile new file mode 100644 index 00000000000..e8c0da7a1d7 --- /dev/null +++ b/gnu/usr.bin/cc/tradcpp0/Makefile @@ -0,0 +1 @@ +# $FreeBSD$ From dd7731cf37ebfa826c18891cf860e2969451cc62 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Fri, 10 May 2002 02:36:12 +0000 Subject: [PATCH 45/47] Bmake bits for GCC 3.1. --- gnu/usr.bin/cc/tradcpp0/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnu/usr.bin/cc/tradcpp0/Makefile b/gnu/usr.bin/cc/tradcpp0/Makefile index e8c0da7a1d7..9a6b085ad6a 100644 --- a/gnu/usr.bin/cc/tradcpp0/Makefile +++ b/gnu/usr.bin/cc/tradcpp0/Makefile @@ -1 +1,22 @@ # $FreeBSD$ + +.include "../Makefile.inc" + +.PATH: ${GCCDIR} + +PROG= tradcpp0 +SRCS= tradcpp.c tradcif.c +BINDIR= /usr/libexec +NOMAN= 1 + +DPADD+= ${LIBCC_INT} +LDADD+= ${LIBCC_INT} + +# ${YACC} ${GCCDIR}/tradcif.y +tradcif.c: tradcif.y + ${YACC} ${.ALLSRC} + sed -e "s/malloc/xmalloc/g" \ + -e "s/realloc/xrealloc/g" \ + y.tab.c >${.TARGET} + +.include From 7b4716843d5d7ba8ab4ecc096f306027875c2212 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Fri, 10 May 2002 08:41:46 +0000 Subject: [PATCH 46/47] Use MD_EXEC_PREFIX now to get us thru `buildworld'. The problem is the GCC driver now turns STANDARD_EXEC_PREFIX into a relative path -- "/../../libexec" for our normal install location. However, in the middle of `buildworld' we need "/../../../../libexec" due to the prefix we tell the GCC driver. But either the GCC driver is buggy, or we are confusing it, as it tries to exec "/../../libexec/cpp0" as if it were installed in the normal place (but isn't). MD_EXEC_PREFIX is still absolute, so I'll use that for now. I would like to later make it so MD_EXEC_PREFIX is set only for `buildworld', as MD_EXEC_PREFIX is also in the search path for libraries. Don't ask me why! Another way is to add ${OBJFORMAT_PATH} (as set in CROSSENV) to the PATH in src/Makefile.inc's WMAKEENV. --- gnu/usr.bin/cc/cc_tools/freebsd-native.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/usr.bin/cc/cc_tools/freebsd-native.h b/gnu/usr.bin/cc/cc_tools/freebsd-native.h index bd9a2effe9a..729fbb80764 100644 --- a/gnu/usr.bin/cc/cc_tools/freebsd-native.h +++ b/gnu/usr.bin/cc/cc_tools/freebsd-native.h @@ -32,7 +32,7 @@ */ #undef TOOLDIR_BASE_PREFIX /* Old?? This is not documented. */ #define STANDARD_EXEC_PREFIX PREFIX"/libexec/" -#undef MD_EXEC_PREFIX /* We don't want one. */ +#define MD_EXEC_PREFIX PREFIX"/libexec/" /* Under FreeBSD, the normal location of the various *crt*.o files is the /usr/lib directory. */ From 94083430d854a244046a44083ab9cf69ea729dc9 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Fri, 10 May 2002 08:52:41 +0000 Subject: [PATCH 47/47] Need to build libgcc.so with -nostdlib -- otherwise we try linking with ourself. --- gnu/lib/libgcc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile index e9a885b0251..38ad854dca0 100644 --- a/gnu/lib/libgcc/Makefile +++ b/gnu/lib/libgcc/Makefile @@ -35,7 +35,7 @@ XCC= ${CC} XCXX= ${CXX} -CFLAGS+= -fexceptions +CFLAGS+= -nostdlib -fexceptions CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \ -DFINE_GRAINED_LIBRARIES .if ${OBJFORMAT} != aout