From: Joerg Sonnenberger Date: Tue, 26 Oct 2004 11:27:46 +0000 (+0000) Subject: Add support to specify the default compiler and binutil version in X-Git-Tag: v2.0.1~9890 X-Git-Url: https://gitweb.dragonflybsd.org/~nant/dragonfly.git/commitdiff_plain/f29fb17dd751d7f8a9d82ed80620240f2de41015 Add support to specify the default compiler and binutil version in /etc/make.conf. Use entries of the form CCVER_DEFAULT= gcc34 BINUTILSVER_DEFAULT= binutils214 to use gcc34 and the new binutils by default. Add the DragonFly copyright to objformat.c. --- diff --git a/usr.bin/objformat/Makefile b/usr.bin/objformat/Makefile index 21c3b5b3eb..7fe61f86de 100644 --- a/usr.bin/objformat/Makefile +++ b/usr.bin/objformat/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/usr.bin/objformat/Makefile,v 1.15 1999/12/24 15:18:19 green Exp $ -# $DragonFly: src/usr.bin/objformat/Makefile,v 1.5 2004/02/02 05:43:16 dillon Exp $ +# $DragonFly: src/usr.bin/objformat/Makefile,v 1.6 2004/10/26 11:27:46 joerg Exp $ PROG= objformat CFLAGS+= -Wall @@ -8,6 +8,12 @@ NOSHARED?= YES CFLAGS+= -DTARGET_ARCH="${TARGET_ARCH}" .endif +.if defined(CCVER_DEFAULT) +CFLAGS+= -DCCVER_DEFAULT="\"${CCVER_DEFAULT}\"" +.endif +.if defined(BINUTILSVER_DEFAULT) +CFLAGS+= -DBINUTILSVER_DEFAULT="\"${BINUTILSVER_DEFAULT}\"" +.endif # These will exec /usr/libexec/${BINUTILSVER}// # LINKS+= ${BINDIR}/objformat ${BINDIR}/addr2line diff --git a/usr.bin/objformat/objformat.c b/usr.bin/objformat/objformat.c index d792f88aee..2b2ab0a6e6 100644 --- a/usr.bin/objformat/objformat.c +++ b/usr.bin/objformat/objformat.c @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2004, The DragonFly Project. All rights reserved. * Copyright (c) 1998, Peter Wemm * All rights reserved. * @@ -24,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/objformat/objformat.c,v 1.6 1998/10/24 02:01:30 jdp Exp $ - * $DragonFly: src/usr.bin/objformat/objformat.c,v 1.12 2004/06/20 22:19:51 dillon Exp $ + * $DragonFly: src/usr.bin/objformat/objformat.c,v 1.13 2004/10/26 11:27:46 joerg Exp $ */ #include