Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Apr 2012 09:32:44 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r234782 - in head: gnu/usr.bin/binutils/ar gnu/usr.bin/binutils/as gnu/usr.bin/binutils/ld gnu/usr.bin/binutils/ranlib gnu/usr.bin/cc/cc gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus share/...
Message-ID:  <201204290932.q3T9Wi90007188@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Apr 29 09:32:44 2012
New Revision: 234782
URL: http://svn.freebsd.org/changeset/base/234782

Log:
  Add src.conf option WITH_SHARED_TOOLCHAIN to enable building the
  toolchain binaries as dynamically linked.  Option is disabled by
  default.
  
  Reviewed by:	ru (previous version)
  MFC after:	2 weeks

Added:
  head/tools/build/options/WITH_SHARED_TOOLCHAIN   (contents, props changed)
Modified:
  head/gnu/usr.bin/binutils/ar/Makefile
  head/gnu/usr.bin/binutils/as/Makefile
  head/gnu/usr.bin/binutils/ld/Makefile
  head/gnu/usr.bin/binutils/ranlib/Makefile
  head/gnu/usr.bin/cc/cc/Makefile
  head/gnu/usr.bin/cc/cc1/Makefile
  head/gnu/usr.bin/cc/cc1plus/Makefile
  head/share/mk/bsd.own.mk
  head/usr.bin/ar/Makefile
  head/usr.bin/make/Makefile

Modified: head/gnu/usr.bin/binutils/ar/Makefile
==============================================================================
--- head/gnu/usr.bin/binutils/ar/Makefile	Sun Apr 29 08:51:06 2012	(r234781)
+++ head/gnu/usr.bin/binutils/ar/Makefile	Sun Apr 29 09:32:44 2012	(r234782)
@@ -1,6 +1,7 @@
 # $FreeBSD$
 
 .include "../Makefile.inc0"
+.include <bsd.own.mk>
 
 .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc
 
@@ -16,7 +17,9 @@ CFLAGS+= -D_GNU_SOURCE
 CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
 CFLAGS+= -I${SRCDIR}/binutils
 CFLAGS+= -I${SRCDIR}/bfd
+.if ${MK_SHARED_TOOLCHAIN} == "no"
 NO_SHARED?= yes
+.endif
 DPADD=	${RELTOP}/libbinutils/libbinutils.a
 DPADD+=	${RELTOP}/libbfd/libbfd.a
 DPADD+=	${RELTOP}/libiberty/libiberty.a

Modified: head/gnu/usr.bin/binutils/as/Makefile
==============================================================================
--- head/gnu/usr.bin/binutils/as/Makefile	Sun Apr 29 08:51:06 2012	(r234781)
+++ head/gnu/usr.bin/binutils/as/Makefile	Sun Apr 29 09:32:44 2012	(r234782)
@@ -4,6 +4,7 @@
 # BINDIR
 .include "${.CURDIR}/../../Makefile.inc"
 .include "${.CURDIR}/../Makefile.inc0"
+.include <bsd.own.mk>
 
 .PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config
 
@@ -79,7 +80,9 @@ CFLAGS+= -D_GNU_SOURCE
 CFLAGS+= -I${SRCDIR}/gas -I${SRCDIR}/bfd -I${SRCDIR}/gas/config -I${SRCDIR}
 CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${TARGET_CPUARCH}-freebsd
 
+.if ${MK_SHARED_TOOLCHAIN} == "no"
 NO_SHARED?=	yes
+.endif
 
 DPADD=	${RELTOP}/libbfd/libbfd.a
 DPADD+=	${RELTOP}/libiberty/libiberty.a

Modified: head/gnu/usr.bin/binutils/ld/Makefile
==============================================================================
--- head/gnu/usr.bin/binutils/ld/Makefile	Sun Apr 29 08:51:06 2012	(r234781)
+++ head/gnu/usr.bin/binutils/ld/Makefile	Sun Apr 29 09:32:44 2012	(r234782)
@@ -1,6 +1,7 @@
 # $FreeBSD$
 
 .include "../Makefile.inc0"
+.include <bsd.own.mk>
 
 .PATH: ${SRCDIR}/ld
 
@@ -34,7 +35,9 @@ CFLAGS+= -DBINDIR=\"${BINDIR}\" -DTARGET
 CFLAGS+= -DTOOLBINDIR=\"${TOOLS_PREFIX}/${BINDIR}/libexec\"
 CFLAGS+= -D_GNU_SOURCE
 CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd
+.if ${MK_SHARED_TOOLCHAIN} == "no"
 NO_SHARED?= yes
+.endif
 DPADD=	${RELTOP}/libbfd/libbfd.a
 DPADD+=	${RELTOP}/libiberty/libiberty.a
 LDADD=	${DPADD}

Modified: head/gnu/usr.bin/binutils/ranlib/Makefile
==============================================================================
--- head/gnu/usr.bin/binutils/ranlib/Makefile	Sun Apr 29 08:51:06 2012	(r234781)
+++ head/gnu/usr.bin/binutils/ranlib/Makefile	Sun Apr 29 09:32:44 2012	(r234782)
@@ -1,6 +1,7 @@
 # $FreeBSD$
 
 .include "../Makefile.inc0"
+.include <bsd.own.mk>
 
 .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc
 
@@ -16,7 +17,9 @@ CFLAGS+= -D_GNU_SOURCE
 CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
 CFLAGS+= -I${SRCDIR}/binutils
 CFLAGS+= -I${SRCDIR}/bfd
+.if ${MK_SHARED_TOOLCHAIN} == "no"
 NO_SHARED?= yes
+.endif
 DPADD=	${RELTOP}/libbinutils/libbinutils.a
 DPADD+=	${RELTOP}/libbfd/libbfd.a
 DPADD+=	${RELTOP}/libiberty/libiberty.a

Modified: head/gnu/usr.bin/cc/cc/Makefile
==============================================================================
--- head/gnu/usr.bin/cc/cc/Makefile	Sun Apr 29 08:51:06 2012	(r234781)
+++ head/gnu/usr.bin/cc/cc/Makefile	Sun Apr 29 09:32:44 2012	(r234782)
@@ -9,7 +9,9 @@ PROG=	gcc
 MAN=	gcc.1
 SRCS+=  gccspec.c
 
+.if ${MK_SHARED_TOOLCHAIN} == "no"
 NO_SHARED?=yes
+.endif
 
 MLINKS=	gcc.1 g++.1
 .if ${MK_CLANG_IS_CC} == "no"

Modified: head/gnu/usr.bin/cc/cc1/Makefile
==============================================================================
--- head/gnu/usr.bin/cc/cc1/Makefile	Sun Apr 29 08:51:06 2012	(r234781)
+++ head/gnu/usr.bin/cc/cc1/Makefile	Sun Apr 29 09:32:44 2012	(r234782)
@@ -1,14 +1,17 @@
 # $FreeBSD$
 
 .include "../Makefile.inc"
+NO_MAN=
+.include <bsd.own.mk>
 
 .PATH: ${GCCDIR}
 
 PROG=	cc1
 SRCS=	main.c c-parser.c c-lang.c
 BINDIR=	/usr/libexec
-NO_MAN=
+.if ${MK_SHARED_TOOLCHAIN} == "no"
 NO_SHARED?=yes
+.endif
 
 OBJS+=  ${PROG}-checksum.o
 DPADD=	${LIBBACKEND} ${LIBCPP} ${LIBDECNUMBER} ${LIBIBERTY}

Modified: head/gnu/usr.bin/cc/cc1plus/Makefile
==============================================================================
--- head/gnu/usr.bin/cc/cc1plus/Makefile	Sun Apr 29 08:51:06 2012	(r234781)
+++ head/gnu/usr.bin/cc/cc1plus/Makefile	Sun Apr 29 09:32:44 2012	(r234782)
@@ -1,6 +1,8 @@
 # $FreeBSD$
 
 .include "../Makefile.inc"
+NO_MAN=
+.include <bsd.own.mk>
 
 .PATH: ${GCCDIR}/cp ${GCCDIR}
 
@@ -13,8 +15,9 @@ SRCS+=	main.c cp-lang.c c-opts.c call.c 
 	cp-objcp-common.c cp-gimplify.c tree-mudflap.c
 
 BINDIR=	/usr/libexec
-NO_MAN=
+.if ${MK_SHARED_TOOLCHAIN} == "no"
 NO_SHARED?=yes
+.endif
 
 CFLAGS+= -I${GCCDIR}/cp -I.
 

Modified: head/share/mk/bsd.own.mk
==============================================================================
--- head/share/mk/bsd.own.mk	Sun Apr 29 08:51:06 2012	(r234781)
+++ head/share/mk/bsd.own.mk	Sun Apr 29 09:32:44 2012	(r234782)
@@ -425,7 +425,8 @@ __DEFAULT_NO_OPTIONS = \
     ICONV \
     IDEA \
     LIBCPLUSPLUS \
-    OFED
+    OFED \
+    SHARED_TOOLCHAIN
 
 #
 # Default behaviour of some options depends on the architecture.  Unfortunately

Added: head/tools/build/options/WITH_SHARED_TOOLCHAIN
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/build/options/WITH_SHARED_TOOLCHAIN	Sun Apr 29 09:32:44 2012	(r234782)
@@ -0,0 +1,6 @@
+.\" $FreeBSD$
+Set to build the toolchain binaries shared.
+The set includes
+.Xr cc 1 ,
+.Xr make 1
+and neccessary utilites like assembler, linker and library archive manager.

Modified: head/usr.bin/ar/Makefile
==============================================================================
--- head/usr.bin/ar/Makefile	Sun Apr 29 08:51:06 2012	(r234781)
+++ head/usr.bin/ar/Makefile	Sun Apr 29 09:32:44 2012	(r234782)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 PROG=	ar
 SRCS=	ar.c acplex.l acpyacc.y read.c util.c write.c y.tab.h
 
@@ -8,7 +10,9 @@ LDADD=	-larchive -lelf
 
 CFLAGS+=-I. -I${.CURDIR}
 
+.if ${MK_SHARED_TOOLCHAIN} == "no"
 NO_SHARED?=	yes
+.endif
 LINKS=	${BINDIR}/ar ${BINDIR}/ranlib
 MLINKS= ar.1 ranlib.1
 

Modified: head/usr.bin/make/Makefile
==============================================================================
--- head/usr.bin/make/Makefile	Sun Apr 29 08:51:06 2012	(r234781)
+++ head/usr.bin/make/Makefile	Sun Apr 29 09:32:44 2012	(r234782)
@@ -2,13 +2,17 @@
 #	$Id: Makefile,v 1.6 1994/06/30 05:33:39 cgd Exp $
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 PROG=	make
 CFLAGS+=-I${.CURDIR}
 SRCS=	arch.c buf.c cond.c dir.c for.c hash.c hash_tables.c job.c	\
 	lst.c main.c make.c parse.c proc.c shell.c str.c suff.c targ.c	\
 	util.c var.c
 
+.if ${MK_SHARED_TOOLCHAIN} == "no"
 NO_SHARED?=	YES
+.endif
 
 # Version has the RYYYYMMDDX format, where R is from RELENG_<R>
 CFLAGS+=-DMAKE_VERSION=\"5201111300\"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204290932.q3T9Wi90007188>