summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2011-05-19 05:13:25 +0000
committerimp <imp@FreeBSD.org>2011-05-19 05:13:25 +0000
commit4633a79407dfb12c35f652e3f1dc127ec2842696 (patch)
tree7b2019db9e3ff1e80536e1fe884377a2692f4388
parenta47ef66623a172a2eb328a57badab597eb5551ee (diff)
downloadFreeBSD-src-4633a79407dfb12c35f652e3f1dc127ec2842696.zip
FreeBSD-src-4633a79407dfb12c35f652e3f1dc127ec2842696.tar.gz
Implement WITH{,OUT}_{GCC,BINUTILS} to provide finer-grained control
over building gcc and binutils. They default to true, unless MK_TOOLCHAIN is no. Reviewed by: ru@
-rw-r--r--Makefile.inc112
-rw-r--r--gnu/usr.bin/Makefile6
-rw-r--r--share/mk/bsd.own.mk4
-rw-r--r--tools/build/options/WITHOUT_BINUTILS7
-rw-r--r--tools/build/options/WITHOUT_GCC6
5 files changed, 31 insertions, 4 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 1e613af..9ebc1e3 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1132,6 +1132,10 @@ _kgzip= usr.sbin/kgzip
.endif
.endif
+.if ${MK_BINUTILS} != "no"
+_binutils= gnu/usr.bin/binutils
+.endif
+
.if ${MK_CLANG} != "no"
.if ${CC:T:Mclang} == "clang"
_clang= usr.bin/clang
@@ -1139,12 +1143,16 @@ _clang_libs= lib/clang
.endif
.endif
+.if ${MK_GCC} != "no"
+_cc= gnu/usr.bin/cc
+.endif
+
cross-tools:
.for _tool in \
${_clang_libs} \
${_clang} \
- gnu/usr.bin/binutils \
- gnu/usr.bin/cc \
+ ${_binutils} \
+ ${_cc} \
usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \
${_btxld} \
${_crunchide} \
diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile
index 7eaad9f..0ee257f 100644
--- a/gnu/usr.bin/Makefile
+++ b/gnu/usr.bin/Makefile
@@ -47,12 +47,14 @@ _texinfo= texinfo
_rcs= rcs
.endif
-.if ${MK_TOOLCHAIN} != "no"
+.if ${MK_BINUTILS} != "no"
_binutils= binutils
+.endif
+.if ${MK_GCC} != "no"
_cc= cc
+.endif
.if ${MK_GDB} != "no"
_gdb= gdb
.endif
-.endif
.include <bsd.subdir.mk>
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index cbbe7c9..3669fac 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -297,6 +297,7 @@ __DEFAULT_YES_OPTIONS = \
BIND_MTREE \
BIND_NAMED \
BIND_UTILS \
+ BINUTILS \
BLUETOOTH \
BOOT \
BSD_CPIO \
@@ -317,6 +318,7 @@ __DEFAULT_YES_OPTIONS = \
FP_LIBC \
FREEBSD_UPDATE \
GAMES \
+ GCC \
GCOV \
GDB \
GNU \
@@ -529,7 +531,9 @@ MK_GROFF:= no
.endif
.if ${MK_TOOLCHAIN} == "no"
+MK_BINUTILS:= no
MK_CLANG:= no
+MK_GCC:= no
MK_GDB:= no
.endif
diff --git a/tools/build/options/WITHOUT_BINUTILS b/tools/build/options/WITHOUT_BINUTILS
new file mode 100644
index 0000000..9d57c62
--- /dev/null
+++ b/tools/build/options/WITHOUT_BINUTILS
@@ -0,0 +1,7 @@
+.\" $FreeBSD$
+Set to not install binutils (as, c++-filt, gconv, gnu-ar, gnu-randlib,
+ld, nm, objcopy, objdump, readelf, size and strip)
+.Bf -symbolic
+The option does not generally work for build targets, unless some alternative
+toolchain is enabled.
+.Ef
diff --git a/tools/build/options/WITHOUT_GCC b/tools/build/options/WITHOUT_GCC
new file mode 100644
index 0000000..5717f64
--- /dev/null
+++ b/tools/build/options/WITHOUT_GCC
@@ -0,0 +1,6 @@
+.\" $FreeBSD$
+Set to not install gcc and g++.
+.Bf -symbolic
+The option does not generally work for build targets, unless some alternative
+toolchain is enabled.
+.Ef
OpenPOWER on IntegriCloud