Author: bdrewery Date: Tue Oct 31 00:03:36 2017 New Revision: 325181 URL: https://svnweb.freebsd.org/changeset/base/325181
Log: 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 Added: head/lib/libgcc_eh/Makefile.depend (contents, props changed) head/lib/libgcc_s/Makefile.depend (contents, props changed) Modified: head/lib/libgcc_eh/Makefile.inc head/share/mk/local.dirdeps.mk head/share/mk/local.gendirdeps.mk head/targets/pseudo/userland/gnu/Makefile.depend head/targets/pseudo/userland/lib/Makefile.depend Added: head/lib/libgcc_eh/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libgcc_eh/Makefile.depend Tue Oct 31 00:03:36 2017 (r325181) @@ -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 Modified: head/lib/libgcc_eh/Makefile.inc ============================================================================== --- head/lib/libgcc_eh/Makefile.inc Tue Oct 31 00:03:32 2017 (r325180) +++ head/lib/libgcc_eh/Makefile.inc Tue Oct 31 00:03:36 2017 (r325181) @@ -29,7 +29,8 @@ CXXFLAGS+= -std=c++11 .endif CXXFLAGS+= -fno-rtti STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC +# Probably need to just move this earlier or use CXXFLAGS .if ${MK_DIRDEPS_BUILD} == "yes" # Avoid dependency on lib/libc++ -CFLAGS+= -I${SRCTOP}/contrib/libc++/include +CFLAGS+= -isystem ${SRCTOP}/contrib/libc++/include -nostdinc++ .endif Added: head/lib/libgcc_s/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libgcc_s/Makefile.depend Tue Oct 31 00:03:36 2017 (r325181) @@ -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 Modified: head/share/mk/local.dirdeps.mk ============================================================================== --- head/share/mk/local.dirdeps.mk Tue Oct 31 00:03:32 2017 (r325180) +++ head/share/mk/local.dirdeps.mk Tue Oct 31 00:03:36 2017 (r325181) @@ -76,6 +76,19 @@ DIRDEPS += \ cddl/usr.bin/ctfmerge.host .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* # 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 @@ -124,7 +137,6 @@ _SRCS= ${SRCS} ${_PROGS_SRCS} # Has C files. The C_DIRDEPS are shared with C++ files as well. C_DIRDEPS= \ gnu/lib/csu \ - gnu/lib/libgcc \ include \ include/arpa \ include/protocols \ @@ -135,6 +147,7 @@ C_DIRDEPS= \ lib/libc \ lib/libcompiler_rt \ +# libgcc is needed as well but is added later. .if ${MK_GSSAPI} != "no" C_DIRDEPS+= include/gssapi Modified: head/share/mk/local.gendirdeps.mk ============================================================================== --- head/share/mk/local.gendirdeps.mk Tue Oct 31 00:03:32 2017 (r325180) +++ head/share/mk/local.gendirdeps.mk Tue Oct 31 00:03:36 2017 (r325181) @@ -10,6 +10,9 @@ GENDIRDEPS_FILTER+= \ Ngnu/lib/libssp/libssp_nonshared \ Ncddl/usr.bin/ctf* \ Nlib/libc_nonshared \ + Ngnu/lib/libgcc \ + Nlib/libgcc_eh \ + Nlib/libgcc_s \ Ntargets/pseudo/stage* \ Ntools/* Modified: head/targets/pseudo/userland/gnu/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/gnu/Makefile.depend Tue Oct 31 00:03:32 2017 (r325180) +++ head/targets/pseudo/userland/gnu/Makefile.depend Tue Oct 31 00:03:36 2017 (r325181) @@ -9,7 +9,6 @@ DIRDEPS = \ gnu/lib/csu \ gnu/lib/libdialog \ - gnu/lib/libgcc \ gnu/lib/libgcov \ gnu/lib/libgomp \ gnu/lib/libreadline/history/doc \ @@ -43,6 +42,10 @@ DIRDEPS = \ .if ${MK_GPL_DTC} != "no" DIRDEPS+= gnu/usr.bin/dtc +.endif + +.if ${MK_LLVM_LIBUNWIND} == "no" +DIRDEPS+= gnu/lib/libgcc .endif .include <dirdeps.mk> Modified: head/targets/pseudo/userland/lib/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/lib/Makefile.depend Tue Oct 31 00:03:32 2017 (r325180) +++ head/targets/pseudo/userland/lib/Makefile.depend Tue Oct 31 00:03:36 2017 (r325181) @@ -224,6 +224,12 @@ DIRDEPS+= lib/libgpio DIRDEPS+= lib/libefivar .endif +.if ${MK_LLVM_LIBUNWIND} != "no" +DIRDEPS+= \ + lib/libgcc_eh \ + lib/libgcc_s +.endif + .if ${MK_OFED} != "no" DIRDEPS+= \ contrib/ofed/usr.lib/libcxgb4 \ _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"