DIRDEPS_BUILD: libgcc now depends on MK_LLVM_LIBUNWIND

The dependency on gnu/lib/libgcc or lib/libgcc* is determined
at 'make dirdeps' time.

Sponsored by:	Dell EMC Isilon
This commit is contained in:
bdrewery 2017-10-31 00:03:36 +00:00
parent d3c990c645
commit 215c814ffa
7 changed files with 58 additions and 3 deletions

View File

@ -0,0 +1,13 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -29,7 +29,8 @@ CXXFLAGS+= -std=c++11
.endif .endif
CXXFLAGS+= -fno-rtti CXXFLAGS+= -fno-rtti
STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC
# Probably need to just move this earlier or use CXXFLAGS
.if ${MK_DIRDEPS_BUILD} == "yes" .if ${MK_DIRDEPS_BUILD} == "yes"
# Avoid dependency on lib/libc++ # Avoid dependency on lib/libc++
CFLAGS+= -I${SRCTOP}/contrib/libc++/include CFLAGS+= -isystem ${SRCTOP}/contrib/libc++/include -nostdinc++
.endif .endif

View File

@ -0,0 +1,16 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -76,6 +76,19 @@ DIRDEPS += \
cddl/usr.bin/ctfmerge.host cddl/usr.bin/ctfmerge.host
.endif .endif
# Add in proper libgcc (gnu or LLVM) if not building libcc and libc is needed.
# Add both gcc_s and gcc_eh as dependencies as the decision to build
# -static or not is not known here.
.if ${DEP_RELDIR:M*libgcc*} == "" && ${DIRDEPS:Mlib/libc}
.if ${MK_LLVM_LIBUNWIND} == "yes"
DIRDEPS+= \
lib/libgcc_eh \
lib/libgcc_s
.else
DIRDEPS+= gnu/lib/libgcc
.endif
.endif
# Bootstrap support. Give hints to DIRDEPS if there is no Makefile.depend* # Bootstrap support. Give hints to DIRDEPS if there is no Makefile.depend*
# generated yet. This can be based on things such as SRC files and LIBADD. # generated yet. This can be based on things such as SRC files and LIBADD.
# These hints will not factor into the final Makefile.depend as only what is # These hints will not factor into the final Makefile.depend as only what is
@ -124,7 +137,6 @@ _SRCS= ${SRCS} ${_PROGS_SRCS}
# Has C files. The C_DIRDEPS are shared with C++ files as well. # Has C files. The C_DIRDEPS are shared with C++ files as well.
C_DIRDEPS= \ C_DIRDEPS= \
gnu/lib/csu \ gnu/lib/csu \
gnu/lib/libgcc \
include \ include \
include/arpa \ include/arpa \
include/protocols \ include/protocols \
@ -135,6 +147,7 @@ C_DIRDEPS= \
lib/libc \ lib/libc \
lib/libcompiler_rt \ lib/libcompiler_rt \
# libgcc is needed as well but is added later.
.if ${MK_GSSAPI} != "no" .if ${MK_GSSAPI} != "no"
C_DIRDEPS+= include/gssapi C_DIRDEPS+= include/gssapi

View File

@ -10,6 +10,9 @@ GENDIRDEPS_FILTER+= \
Ngnu/lib/libssp/libssp_nonshared \ Ngnu/lib/libssp/libssp_nonshared \
Ncddl/usr.bin/ctf* \ Ncddl/usr.bin/ctf* \
Nlib/libc_nonshared \ Nlib/libc_nonshared \
Ngnu/lib/libgcc \
Nlib/libgcc_eh \
Nlib/libgcc_s \
Ntargets/pseudo/stage* \ Ntargets/pseudo/stage* \
Ntools/* Ntools/*

View File

@ -9,7 +9,6 @@
DIRDEPS = \ DIRDEPS = \
gnu/lib/csu \ gnu/lib/csu \
gnu/lib/libdialog \ gnu/lib/libdialog \
gnu/lib/libgcc \
gnu/lib/libgcov \ gnu/lib/libgcov \
gnu/lib/libgomp \ gnu/lib/libgomp \
gnu/lib/libreadline/history/doc \ gnu/lib/libreadline/history/doc \
@ -45,4 +44,8 @@ DIRDEPS = \
DIRDEPS+= gnu/usr.bin/dtc DIRDEPS+= gnu/usr.bin/dtc
.endif .endif
.if ${MK_LLVM_LIBUNWIND} == "no"
DIRDEPS+= gnu/lib/libgcc
.endif
.include <dirdeps.mk> .include <dirdeps.mk>

View File

@ -224,6 +224,12 @@ DIRDEPS+= lib/libgpio
DIRDEPS+= lib/libefivar DIRDEPS+= lib/libefivar
.endif .endif
.if ${MK_LLVM_LIBUNWIND} != "no"
DIRDEPS+= \
lib/libgcc_eh \
lib/libgcc_s
.endif
.if ${MK_OFED} != "no" .if ${MK_OFED} != "no"
DIRDEPS+= \ DIRDEPS+= \
contrib/ofed/usr.lib/libcxgb4 \ contrib/ofed/usr.lib/libcxgb4 \