Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175752875
D55923.id173862.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D55923.id173862.diff
View Options
Index: Makefile.inc1
===================================================================
--- Makefile.inc1
+++ Makefile.inc1
@@ -239,6 +239,12 @@
MK_LLD_BOOTSTRAP= no
.endif
+# If full paths to all standard bintuils are given, don't build LLVM binutils.
+.if ${XAR:M/*} && ${XNM:M/*} && ${XOBJCOPY:M/*} && ${XRANLIB:M/*} && \
+ ${XSIZE:M/*} && ${XSTRINGS:M/*} && ${XSTRIPBIN:M/*}
+MK_LLVM_BINUTILS_BOOTSTRAP= no
+.endif
+
# We also want the X_LINKER* variables if we are using an external toolchain.
_WANT_TOOLCHAIN_CROSS_VARS= t
.include "share/mk/bsd.linker.mk"
@@ -2701,7 +2707,8 @@
# llvm-tblgen is also needed for various llvm binutils (e.g. objcopy).
.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" || \
${MK_LLD_BOOTSTRAP} != "no" || ${MK_LLD} != "no" || \
- ${MK_LLDB} != "no" || ${MK_LLVM_BINUTILS} != "no"
+ ${MK_LLDB} != "no" || \
+ ${MK_LLVM_BINUTILS_BOOTSTRAP} != "no" || ${MK_LLVM_BINUTILS} != "no"
_clang_tblgen= \
lib/clang/libllvmminimal \
usr.bin/clang/llvm-min-tblgen \
@@ -3061,9 +3068,16 @@
.if ${MK_LLD_BOOTSTRAP} != "no"
_lld= usr.bin/clang/lld
.endif
-.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no"
+.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no" || \
+ ${MK_LLVM_BINUTILS_BOOTSTRAP} != "no"
_clang_libs= lib/clang
.endif
+.if ${MK_LLVM_BINUTILS_BOOTSTRAP}} != "no"
+_llvm_binutils= usr.bin/clang/llvm-ar \
+ usr.bin/clang/llvm-nm \
+ usr.bin/clang/llvm-objcopy \
+ usr.bin/clang/llvm-size
+.endif
.if ${MK_USB} != "no"
_usb_tools= stand/usb/tools
.endif
@@ -3079,6 +3093,7 @@
${_clang_libs} \
${_clang} \
${_lld} \
+ ${_llvm_binutils} \
${_elftctools} \
${_dtrace_tools} \
${_btxld} \
Index: share/mk/src.opts.mk
===================================================================
--- share/mk/src.opts.mk
+++ share/mk/src.opts.mk
@@ -124,6 +124,7 @@
LLD_BOOTSTRAP \
LLVM_ASSERTIONS \
LLVM_BINUTILS \
+ LLVM_BINUTILS_BOOTSTRAP \
LLVM_COV \
LOADER_BIOS_TEXTONLY \
LOADER_GELI \
Index: tools/build/options/WITHOUT_LLVM_BINUTILS_BOOTSTRAP
===================================================================
--- /dev/null
+++ tools/build/options/WITHOUT_LLVM_BINUTILS_BOOTSTRAP
@@ -0,0 +1,5 @@
+Do not build LLVM binary utilities during the bootstrap phase of
+the build.
+To be able to build the system alternate binary utilities must be provided via
+XAR, XNM, XOBJCOPY, XRANLIB, XSIZE, XSTRINGS, and XSTRIPBIN
+
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 14, 1:29 AM (4 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40779524
Default Alt Text
D55923.id173862.diff (2 KB)
Attached To
Mode
D55923: build: Boostrap LLVM_BINUTILS for cross-tools
Attached
Detach File
Event Timeline
Log In to Comment