From 8d2f8e787dbcb8c873f4eb3fb457e33a069a910d Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Sun, 20 Jun 2004 20:59:21 +0000 Subject: [PATCH] For cc_tools, recurse into cc_prep when building dependencies to get the patched source tree. c++filt and gcov use getopt, add the libc version when bootrapping. The source and header file is copyied by cc_prep in that situation. Add an explicit directory order in the top-level Makefile. --- gnu/usr.bin/cc34/Makefile | 4 +++- gnu/usr.bin/cc34/c++filt/Makefile | 6 +++++- gnu/usr.bin/cc34/cc_prep/Makefile | 14 +++++++++++++- gnu/usr.bin/cc34/cc_tools/Makefile | 4 +++- gnu/usr.bin/cc34/gcov/Makefile | 6 +++++- 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/gnu/usr.bin/cc34/Makefile b/gnu/usr.bin/cc34/Makefile index 45be538f3d..a9e1d8d549 100644 --- a/gnu/usr.bin/cc34/Makefile +++ b/gnu/usr.bin/cc34/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc34/Makefile,v 1.1 2004/06/14 22:27:52 joerg Exp $ +# $DragonFly: src/gnu/usr.bin/cc34/Makefile,v 1.2 2004/06/20 20:59:21 joerg Exp $ SUBDIR= cc_prep cc_tools libbackend libcpp cc1 cc SUBDIR+= cpp @@ -7,4 +7,6 @@ SUBDIR+= cc1plus c++ c++filt SUBDIR+= f771 g77 SUBDIR+= cc1obj +.ORDER: ${SUBDIR} + .include diff --git a/gnu/usr.bin/cc34/c++filt/Makefile b/gnu/usr.bin/cc34/c++filt/Makefile index abd2863340..8c1f16815f 100644 --- a/gnu/usr.bin/cc34/c++filt/Makefile +++ b/gnu/usr.bin/cc34/c++filt/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc34/c++filt/Makefile,v 1.1 2004/06/14 22:27:53 joerg Exp $ +# $DragonFly: src/gnu/usr.bin/cc34/c++filt/Makefile,v 1.2 2004/06/20 20:59:21 joerg Exp $ .include "../Makefile.inc" @@ -11,6 +11,10 @@ NOMAN= 1 CFLAGS+= -DSTANDALONE_DEMANGLER -DIN_GCC -DVERSION=\"$(version)\" +.if defined(BOOTSTRAPPING) +SRCS+= getopt_long.c +.endif + DPADD+= ${LIBCC_INT} LDADD+= ${LIBCC_INT} diff --git a/gnu/usr.bin/cc34/cc_prep/Makefile b/gnu/usr.bin/cc34/cc_prep/Makefile index 51950adcbd..d2b0c41a34 100644 --- a/gnu/usr.bin/cc34/cc_prep/Makefile +++ b/gnu/usr.bin/cc34/cc_prep/Makefile @@ -1,10 +1,22 @@ -# $DragonFly: src/gnu/usr.bin/cc34/cc_prep/Makefile,v 1.2 2004/06/19 11:13:29 joerg Exp $ +# $DragonFly: src/gnu/usr.bin/cc34/cc_prep/Makefile,v 1.3 2004/06/20 20:59:21 joerg Exp $ .include "../Makefile.inc" PATCHES!= echo ${.CURDIR}/patches/*.patch CONTRIBDIR= ${GCCDIR}/gcc +.if defined(BOOTSTRAPPING) +getopt_long.c: ${.CURDIR}/../../../../lib/libc/stdlib/getopt_long.c + cp ${.ALLSRC} ${.TARGET} + +getopt.h: ${.CURDIR}/../../../../include/getopt.h + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= getopt_long.c getopt.h + +depend: getopt_long.c getopt.h +.endif + version_local.c: version.c Makefile sed -e 's/\(const char version.*".*\) (/\1 [DragonFly] (/' < ${.ALLSRC:M*c} > ${.TARGET} diff --git a/gnu/usr.bin/cc34/cc_tools/Makefile b/gnu/usr.bin/cc34/cc_tools/Makefile index d8e9d4b744..6a980907b4 100644 --- a/gnu/usr.bin/cc34/cc_tools/Makefile +++ b/gnu/usr.bin/cc34/cc_tools/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc34/cc_tools/Makefile,v 1.2 2004/06/20 00:19:51 joerg Exp $ +# $DragonFly: src/gnu/usr.bin/cc34/cc_tools/Makefile,v 1.3 2004/06/20 20:59:21 joerg Exp $ SUBDIR= gengenrtl genmodes gengtype genpreds gencheck genconstants SUBDIR+= genconditions genflags gencodes genattr genattrtab genemit @@ -11,4 +11,6 @@ depend: cc_prep cc_prep: .PHONY cd ${STOPDIR}/cc_prep; make depend +.ORDER: cc_prep ${SUBDIR} + .include diff --git a/gnu/usr.bin/cc34/gcov/Makefile b/gnu/usr.bin/cc34/gcov/Makefile index 95ced59429..c4ba8a627b 100644 --- a/gnu/usr.bin/cc34/gcov/Makefile +++ b/gnu/usr.bin/cc34/gcov/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc34/gcov/Makefile,v 1.1 2004/06/14 22:27:56 joerg Exp $ +# $DragonFly: src/gnu/usr.bin/cc34/gcov/Makefile,v 1.2 2004/06/20 20:59:21 joerg Exp $ .include "../Makefile.inc" .include "../cc_tools/Makefile.tools" @@ -10,6 +10,10 @@ SRCS= gcov.c intl.c version_local.c SRCS+= insn-constants.h gcov-iov.h insn-flags.h SRCS+= xexit.c xmalloc.c xstrdup.c +.if defined(BOOTSTRAPPING) +SRCS+= getopt_long.c +.endif + CFLAGS+= -I. CFLAGS+= -DDEFAULT_TARGET_VERSION=\"${version}\" CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"${target}\" -- 2.41.0