Don't disable binutils/elftoolchain bootstrapping with external compiler.
This was a regression from r300349. Setting MK_CROSS_COMPILER=no forces the compiler bootstraping *and* the binutils/elftoolchain bootstrapping to be disabled in share/mk/src.opts.mk. The only intent with using an external compiler is to disable bootstrapping of the compiler. The binutils/elftoolchain bootstrapping must still occur unless XAS is set. This did not affect WITH_SYSTEM_COMPILER. Now that setting an external compiler sets both MK_CLANG_BOOTSTRAP and MK_GCC_BOOTSTRAP to no, and MK_CROSS_COMPILER does the same via share/mk/src/opts.mk, remove redundant logic that checks for MK_CROSS_COMPILER. It will not always be true now that MK_CROSS_COMPILER==no when an external compiler is used and --sysroot/-target is needed. Reported by: sbruno Pointyhat to: bdrewery MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
a92545878a
commit
7337126677
@ -74,7 +74,8 @@ X${COMPILER}?= ${${COMPILER}}
|
|||||||
# If a full path to an external cross compiler is given, don't build
|
# If a full path to an external cross compiler is given, don't build
|
||||||
# a cross compiler.
|
# a cross compiler.
|
||||||
.if ${XCC:N${CCACHE_BIN}:M/*}
|
.if ${XCC:N${CCACHE_BIN}:M/*}
|
||||||
MK_CROSS_COMPILER= no
|
MK_CLANG_BOOTSTRAP= no
|
||||||
|
MK_GCC_BOOTSTRAP= no
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
# Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early.
|
# Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early.
|
||||||
@ -116,7 +117,7 @@ WANT_COMPILER_VERSION!= \
|
|||||||
# If the expected vs CC is different then we can't skip.
|
# If the expected vs CC is different then we can't skip.
|
||||||
# GCC cannot be used for cross-arch yet. For clang we pass -target later if
|
# GCC cannot be used for cross-arch yet. For clang we pass -target later if
|
||||||
# TARGET_ARCH!=MACHINE_ARCH.
|
# TARGET_ARCH!=MACHINE_ARCH.
|
||||||
.if ${MK_SYSTEM_COMPILER} == "yes" && ${MK_CROSS_COMPILER} == "yes" && \
|
.if ${MK_SYSTEM_COMPILER} == "yes" && \
|
||||||
(${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \
|
(${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \
|
||||||
!make(showconfig) && !make(native-xtools) && !make(xdev*) && \
|
!make(showconfig) && !make(native-xtools) && !make(xdev*) && \
|
||||||
${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} && \
|
${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} && \
|
||||||
@ -550,8 +551,7 @@ BFLAGS+= -B${CROSS_BINUTILS_PREFIX}
|
|||||||
.endif
|
.endif
|
||||||
|
|
||||||
# External compiler needs sysroot and target flags.
|
# External compiler needs sysroot and target flags.
|
||||||
.if ${MK_CROSS_COMPILER} == "no" || \
|
.if ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no"
|
||||||
(${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no")
|
|
||||||
.if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX})
|
.if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX})
|
||||||
BFLAGS+= -B${WORLDTMP}/usr/bin
|
BFLAGS+= -B${WORLDTMP}/usr/bin
|
||||||
.endif
|
.endif
|
||||||
@ -579,7 +579,7 @@ TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd12.0
|
|||||||
XCFLAGS+= -target ${TARGET_TRIPLE}
|
XCFLAGS+= -target ${TARGET_TRIPLE}
|
||||||
.endif
|
.endif
|
||||||
XCFLAGS+= --sysroot=${WORLDTMP}
|
XCFLAGS+= --sysroot=${WORLDTMP}
|
||||||
.endif # ${MK_CROSS_COMPILER} == "no"
|
.endif # ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no"
|
||||||
|
|
||||||
.if !empty(BFLAGS)
|
.if !empty(BFLAGS)
|
||||||
XCFLAGS+= ${BFLAGS}
|
XCFLAGS+= ${BFLAGS}
|
||||||
@ -1820,7 +1820,6 @@ _elftctools= lib/libelftc \
|
|||||||
usr.bin/elfcopy
|
usr.bin/elfcopy
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${MK_CROSS_COMPILER} != "no"
|
|
||||||
.if ${MK_CLANG_BOOTSTRAP} != "no"
|
.if ${MK_CLANG_BOOTSTRAP} != "no"
|
||||||
_clang= usr.bin/clang
|
_clang= usr.bin/clang
|
||||||
_clang_libs= lib/clang
|
_clang_libs= lib/clang
|
||||||
@ -1828,7 +1827,6 @@ _clang_libs= lib/clang
|
|||||||
.if ${MK_GCC_BOOTSTRAP} != "no"
|
.if ${MK_GCC_BOOTSTRAP} != "no"
|
||||||
_cc= gnu/usr.bin/cc
|
_cc= gnu/usr.bin/cc
|
||||||
.endif
|
.endif
|
||||||
.endif
|
|
||||||
.if ${MK_USB} != "no"
|
.if ${MK_USB} != "no"
|
||||||
_usb_tools= sys/boot/usb/tools
|
_usb_tools= sys/boot/usb/tools
|
||||||
.endif
|
.endif
|
||||||
|
@ -81,8 +81,8 @@ LIBCOMPATCFLAGS+= -B${LIBCOMPATTMP}/usr/lib${libcompat}
|
|||||||
LIBCOMPATCFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include
|
LIBCOMPATCFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include
|
||||||
# Force using libc++ for external GCC.
|
# Force using libc++ for external GCC.
|
||||||
# XXX: This should be checking MK_GNUCXX == no
|
# XXX: This should be checking MK_GNUCXX == no
|
||||||
.if ${X_COMPILER_VERSION} >= 40800 && (${MK_CROSS_COMPILER} == "no" || \
|
.if ${X_COMPILER_VERSION} >= 40800 && \
|
||||||
(${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no"))
|
(${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no")
|
||||||
LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \
|
LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \
|
||||||
-nostdinc++ -L${LIBCOMPAT_OBJTREE}${.CURDIR}/lib/libc++
|
-nostdinc++ -L${LIBCOMPAT_OBJTREE}${.CURDIR}/lib/libc++
|
||||||
.endif
|
.endif
|
||||||
|
Loading…
Reference in New Issue
Block a user