diff options
| author | mrg <mrg@NetBSD.org> | 2003-07-26 14:55:12 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2003-07-26 14:55:12 +0000 |
| commit | 5a9a1bb7686816a1ebd1f71e4b3296aa96b8ad44 (patch) | |
| tree | d49922dc264522d1fbf9da5c258f9094f560eb3b /gnu | |
| parent | 9a2ca8e117e2b5fcb4c096589c0172351ea541ef (diff) | |
- build/install a libsupc++.a
- clean up commented & wrong rules
- find the right bits/ headers for sparc64 & arm
- make sure libsupc++/libstdc++ have all the symbols from libiberty they want
- disable the build of libstdc++ for now (but keep the includes installing)
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/lib/Makefile | 4 | ||||
| -rw-r--r-- | gnu/lib/libgcc3/Makefile | 10 | ||||
| -rw-r--r-- | gnu/lib/libstdc++-v3/Makefile | 26 | ||||
| -rw-r--r-- | gnu/lib/libstdc++-v3/include/bits/Makefile | 16 | ||||
| -rw-r--r-- | gnu/lib/libsupc++/Makefile | 39 | ||||
| -rw-r--r-- | gnu/lib/libsupc++/Makefile.common | 22 |
6 files changed, 85 insertions, 32 deletions
diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile index 61822e03929..6131a515f30 100644 --- a/gnu/lib/Makefile +++ b/gnu/lib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.32 2003/07/25 16:57:06 mrg Exp $ +# $NetBSD: Makefile,v 1.33 2003/07/26 14:55:12 mrg Exp $ .include <bsd.own.mk> @@ -10,7 +10,7 @@ SUBDIR+= libopcodes libbfd libiberty . if ${USE_TOOLS_TOOLCHAIN} != "no" SUBDIR+= libg2c libgcc libobjc libstdc++ . else -SUBDIR+= libg2c3 libgcc3 libobjc3 libstdc++-v3 +SUBDIR+= libg2c3 libgcc3 libobjc3 libsupc++ libstdc++-v3 . endif .endif diff --git a/gnu/lib/libgcc3/Makefile b/gnu/lib/libgcc3/Makefile index a114458e275..1003ef02b94 100644 --- a/gnu/lib/libgcc3/Makefile +++ b/gnu/lib/libgcc3/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2003/07/25 19:20:07 mrg Exp $ +# $NetBSD: Makefile,v 1.3 2003/07/26 14:55:13 mrg Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -25,7 +25,7 @@ LIB2FUNCS= ${G_LIB2FUNCS_1:=.c} ${G_LIB2FUNCS_2:=.c} ${G_LIB2FUNCS_ST:=.c} LIB2DIVMOD= ${G_LIB2_DIVMOD_FUNCS:=.c} LIB2_EH= ${G_LIB2ADDEH:M*.c:T} -SRCS+= ${LIB2FUNCS} ${LIB2DIVMOD} ${G_LIB2ADD:M*.c:T} +SRCS+= ${LIB2FUNCS} ${LIB2DIVMOD} ${LIB2_EH} ${G_LIB2ADD:M*.c:T} CLEANFILES+= ${LIB2FUNCS} tconfig.h @@ -35,9 +35,6 @@ ${LIB2FUNCS}: ${.CURDIR}/Makefile ${LIB2DIVMOD}: ${.CURDIR}/Makefile printf '#define L${.PREFIX}\n#include <libgcc2.c>\n' >${.TARGET} -${LIB2_EH}: ${.CURDIR}/Makefile - printf '#define L${.PREFIX}\n#include <libgcc2.c>\n' >${.TARGET} - ${G_LIB2ADDEH:=.o}: ${COMPILE.c} ${CPICFLAGS} -fexceptions -o ${.TARGET} ${.IMPSRC} @@ -47,9 +44,6 @@ ${G_LIB2_DIVMOD_FUNCS:=.o}: dp-bit.c: ${.CURDIR}/Makefile printf '#define FLOAT\n#include <fp-bit.c>\n' >${.TARGET} -#INCS= exception new new.h typeinfo -#INCSDIR= /usr/include/g++ - .PATH: ${DIST}/gcc ${DIST}/gcc/cp ${DIST}/gcc/cp/inc ${DIST}/gcc/config \ ${G_CONFIGDIR} diff --git a/gnu/lib/libstdc++-v3/Makefile b/gnu/lib/libstdc++-v3/Makefile index 5d4e1122a17..20af7985a9b 100644 --- a/gnu/lib/libstdc++-v3/Makefile +++ b/gnu/lib/libstdc++-v3/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2003/07/25 16:32:45 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2003/07/26 14:55:14 mrg Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -15,32 +15,17 @@ SHLIB_MINOR= 0 SUBDIR= include -DIST= ${NETBSDSRCDIR}/gnu/dist/gcc -GNUHOSTDIST= ${DIST} - -LIBMATHSRCS= ${G_libmath_la_SOURCES} ${G_libmath_la_LIBADD:.lo=.c} -LIBSUPCXXSRCS= ${G_LIBSUPCXX_SOURCES} ${G_LIBSUPCXX_C_SOURCES} -LIBSTDCXXSRCS= ${G_SRC_SOURCES} - -SRCS= ${LIBMATHSRCS} ${LIBSUPCXXSRCS} ${LIBSTDCXXSRCS} INCS= c++config.h INCSDIR= /usr/include/g++ -# -I/home/mrg/f2/i386-unknown-netbsdelf1.6U/libstdc++-v3/include/i386-unknown-netbsdelf1.6U -# -I/home/mrg/f2/i386-unknown-netbsdelf1.6U/libstdc++-v3/include - -CPPFLAGS+= -nostdinc++ -I${.CURDIR}/arch/${MACHINE_ARCH} \ - -I${DIST}/gcc -I${DIST}/include -I${DIST}/libstdc++-v3/libsupc++ \ - -I${NETBSDSRCDIR}/gnu/usr.bin/gcc3/libiberty +.include "${.CURDIR}/../libsupc++/Makefile.common" +SRCS= ${LIBMATHSRCS} ${LIBSUPCXXSRCS} ${LIBSTDCXXSRCS} xmalloc.c # affects profiling; can't switch it off just for profiling easily. #CXXFLAGS+= ${G_SECTION_FLAGS} CONF= ${DIST}/libstdc++-v3/config -CLEANFILES+= cxa_demangle.c basic_file.cc c++locale.cc -cxa_demangle.c: ${DIST}/libiberty/cp-demangle.c - rm -f ${.TARGET} - ln -s $> ${.TARGET} +CLEANFILES+= basic_file.cc c++locale.cc basic_file.cc: ${CONF}/io/basic_file_stdio.cc cp $> ${.TARGET} c++locale.cc: ${CONF}/locale/generic/c_locale.cc @@ -49,7 +34,8 @@ c++locale.cc: ${CONF}/locale/generic/c_locale.cc COPTS.concept-inst.cc= -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates COPTS.strstream.cc= -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -.include <bsd.lib.mk> +# ARGH! +#.include <bsd.lib.mk> .include <bsd.subdir.mk> .include <bsd.info.mk> diff --git a/gnu/lib/libstdc++-v3/include/bits/Makefile b/gnu/lib/libstdc++-v3/include/bits/Makefile index 35134f7ef5d..a07880688c5 100644 --- a/gnu/lib/libstdc++-v3/include/bits/Makefile +++ b/gnu/lib/libstdc++-v3/include/bits/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2003/07/25 16:32:51 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2003/07/26 14:55:15 mrg Exp $ .include <bsd.own.mk> @@ -21,11 +21,23 @@ c++io.h: ${CONF}/io/c_io_stdio.h c++locale.h: ${CONF}/locale/generic/c_locale.h cp $> ${.TARGET} +# List of places to find cpu files; maybe do this differently from +# mknative? +BITS_CPUDIR.sparc64=sparc + +_DIR=${BITS_CPUDIR.${MACHINE_ARCH}} +.if ${_DIR} != "" +BITS_CPUDIR=${BITS_CPUDIR.${MACHINE_ARCH}} +.else +BITS_CPUDIR=${MACHINE_GNU_ARCH} +.endif + .PATH: ${DIST}/libstdc++-v3/include/bits \ ${DIST}/libstdc++-v3/include/c_std \ ${CONF}/os/bsd/netbsd \ ${CONF}/io \ - ${CONF}/cpu/${MACHINE_GNU_ARCH} \ + ${CONF}/cpu/${BITS_CPUDIR} \ + ${CONF}/cpu/generic \ ${CONF}/locale/generic \ ${.CURDIR}/../../arch/${MACHINE_ARCH} diff --git a/gnu/lib/libsupc++/Makefile b/gnu/lib/libsupc++/Makefile new file mode 100644 index 00000000000..36f9e79a00a --- /dev/null +++ b/gnu/lib/libsupc++/Makefile @@ -0,0 +1,39 @@ +# $NetBSD: Makefile,v 1.1 2003/07/26 14:55:15 mrg Exp $ + +REQUIRETOOLS= yes +NOLINT= # defined +NOPIC= # defined +NOPROFILE= # defined + +.include <bsd.own.mk> + +LIB= supc++ + +.if exists(${.CURDIR}/../libstdc++-v3/arch/${MACHINE_ARCH}/defs.mk) && ${MKGCC} != "no" +.include "${.CURDIR}/../libstdc++-v3/arch/${MACHINE_ARCH}/defs.mk" + +SHLIB_MAJOR= 0 +SHLIB_MINOR= 0 + +.include "${.CURDIR}/../libsupc++/Makefile.common" + +SRCS= ${LIBSUPCXXSRCS} xmalloc.c +CXXFLAGS+= ${G_SECTION_FLAGS} + +.include <bsd.lib.mk> + +.PATH: ${DIST}/libstdc++-v3/src \ + ${DIST}/libstdc++-v3/libmath \ + ${DIST}/libstdc++-v3/libsupc++ \ + ${DIST}/libiberty \ + ${.CURDIR}/../libstdc++-v3/arch/${MACHINE_ARCH} + +${OBJS}: ${.CURDIR}/../libstdc++-v3/arch/${MACHINE_ARCH}/defs.mk +.else +.include <bsd.prog.mk> # do nothing +.endif + +.if (${OBJECT_FMT} == "a.out") +LDADD= ${DESTDIR}/usr/lib/c++rt0.o +DPADD= ${DESTDIR}/usr/lib/c++rt0.o +.endif diff --git a/gnu/lib/libsupc++/Makefile.common b/gnu/lib/libsupc++/Makefile.common new file mode 100644 index 00000000000..15c147a1b58 --- /dev/null +++ b/gnu/lib/libsupc++/Makefile.common @@ -0,0 +1,22 @@ +# $NetBSD: Makefile.common,v 1.1 2003/07/26 14:55:17 mrg Exp $ + +DIST= ${NETBSDSRCDIR}/gnu/dist/gcc +GNUHOSTDIST= ${DIST} + +LIBMATHSRCS= ${G_libmath_la_SOURCES} ${G_libmath_la_LIBADD:.lo=.c} +LIBSTDCXXSRCS= ${G_SRC_SOURCES} +LIBSUPCXXSRCS= ${G_LIBSUPCXX_SOURCES} ${G_LIBSUPCXX_C_SOURCES} + +CPPFLAGS+= -nostdinc++ -I${.CURDIR}/../libstdc++-v3/arch/${MACHINE_ARCH} \ + -I${DIST}/gcc -I${DIST}/include \ + -I${DIST}/libstdc++-v3/libsupc++ \ + -I${NETBSDSRCDIR}/gnu/usr.bin/gcc3/libiberty \ + -DHAVE_STDLIB_H -DHAVE_STRING_H + +COPTS.cxa_demangle.c=-DIN_GLIBCPP_V3 +COPTS.dyn-string.c=-DIN_GLIBCPP_V3 + +CLEANFILES+= cxa_demangle.c +cxa_demangle.c: ${DIST}/libiberty/cp-demangle.c + rm -f ${.TARGET} + ln -s $> ${.TARGET} |
