aboutsummaryrefslogtreecommitdiff
path: root/targets
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2015-05-27 01:19:58 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2015-05-27 01:19:58 +0000
commit98e0ffaefb0f241cda3a72395d3be04192ae0d47 (patch)
tree55c065b6730aaac2afb6c29933ee6ec5fa4c4249 /targets
parentb17ff922d4072ae132ece458f5b5d74a236880ac (diff)
parente81032ad243db32b8fd615b2d55ee94b9f6a5b6a (diff)
downloadsrc-98e0ffaefb0f241cda3a72395d3be04192ae0d47.tar.gz
src-98e0ffaefb0f241cda3a72395d3be04192ae0d47.zip
Merge sync of head
Notes
Notes: svn path=/projects/bmake/; revision=283595
Diffstat (limited to 'targets')
-rw-r--r--targets/Makefile23
-rw-r--r--targets/pseudo/bootstrap-tools/Makefile21
-rw-r--r--targets/pseudo/clang/Makefile.depend73
-rw-r--r--targets/pseudo/toolchain/Makefile.depend17
-rw-r--r--targets/pseudo/userland/Makefile.depend1
5 files changed, 46 insertions, 89 deletions
diff --git a/targets/Makefile b/targets/Makefile
index e0d7fa3f1e9a..b5be7d245f5a 100644
--- a/targets/Makefile
+++ b/targets/Makefile
@@ -44,9 +44,11 @@ target_dirs = targets targets/pseudo
target_prefix = pkg- build-
DIRDEPS := ${.TARGETS:Nall:${target_prefix:@p@S,^$p,,@:ts:}:@t@${target_dirs:@d@$d/$t@}@:@d@${exists(${SRCTOP}/$d):?$d:}@}
+all_machine_list = ${ALL_MACHINE_LIST} host common
+
.if ${DIRDEPS:Mtargets/pseudo/*} != ""
# all bets are off
-PKG_MACHINE_LIST = ${ALL_MACHINE_LIST}
+PKG_MACHINE_LIST = ${all_machine_list}
.endif
.if make(check-commit)
@@ -60,12 +62,11 @@ SHIPDIR = no
.else
-all_machine_list = ${ALL_MACHINE_LIST} host common
.if defined(ALL_MACHINES)
DIRDEPS := ${DIRDEPS:O:u:@d@${all_machine_list:O:u:@m@${exists(${SRCTOP}/$d/${.MAKE.DEPENDFILE_PREFIX:T}.$m):?$d.$m:}@}@}
.undef ALL_MACHINES
PKG_MACHINE_LIST ?= ${DIRDEPS:E:O:u}
-.elif defined(HOST_MACHINE) && ${MACHINE} == ${HOST_MACHINE}
+.elif empty(REQUESTED_MACHINE)
# the above may be insufficient.
# some packages only support one machine which may not be ${MACHINE}
# some support multiple, in which case unless ALL_MACHINES is defined
@@ -94,7 +95,7 @@ PKG_MACHINE_LIST := ${PKG_MACHINE_LIST}
# this is a variant of the logic above, we want plain
# but need to filter the qualified DIRDEPS to REQUESTED_MACHINE
plain := ${DIRDEPS:@d@${exists(${SRCTOP}/$d/${.MAKE.DEPENDFILE_PREFIX:T}):?$d:}@}
-.if ${plain} != ${DIRDEPS}
+.if !empty(plain) && ${plain} != ${DIRDEPS}
qual := ${DIRDEPS:${plain:${M_ListToSkip}}:M*.${REQUESTED_MACHINE}}
.if empty(qual)
qual := ${DIRDEPS:@d@${exists(${SRCTOP}/$d/${.MAKE.DEPENDFILE:T}):?$d.${.MAKE.DEPENDFILE:E}:}@}
@@ -102,7 +103,7 @@ qual := ${DIRDEPS:@d@${exists(${SRCTOP}/$d/${.MAKE.DEPENDFILE:T}):?$d.${.MAKE.DE
DIRDEPS := ${plain} ${qual}
.endif
.if empty(DIRDEPS)
-.error ${REQUESTED_MACHINE} is not appropriate for ${DEP_RELDIR:T}
+.error ${REQUESTED_MACHINE} is not appropriate for ${.TARGETS}
.endif
.endif
@@ -120,13 +121,15 @@ $v = yes
# This allows us to work out how long reading
# Makefile.depend* takes.
.if ${.MAKEFLAGS:M-V} == ""
+.if ${BUILD_DIRDEPS_CACHE:Uno} == "no"
.info ${.newline}${TIME_STAMP} Start ${.TARGETS}
+.endif
now_utc = ${%s:L:gmtime}
start_utc := ${now_utc}
.endif
-_begin = count-makefiles
-
+_begin =
+.if ${BUILD_DIRDEPS_CACHE:Uno} == "no"
__DEFAULT_YES_OPTIONS+= \
CLEAN_ERROR_LOGS
@@ -139,6 +142,7 @@ _begin += clean-error-logs
.if !empty(_begin) && !make(clean*)
dirdeps: ${_begin} .WAIT
.endif
+.endif
.include "Makefile.inc"
@@ -150,12 +154,11 @@ $t: dirdeps
elapsed_time= seconds=`expr ${now_utc} - ${start_utc}`
-count-makefiles: .NOMETA
- @echo "${TIME_STAMP} Makefiles read: total=${.MAKE.MAKEFILES:[#]} depend=${.MAKE.MAKEFILES:M*depend*:[#]} dirdeps=${.ALLTARGETS:M${SRCTOP}*:O:u:[#]} ${elapsed_time}"
-
+.if ${BUILD_DIRDEPS_CACHE:Uno} == "no"
.END: _build_finish
_build_finish: .NOMETA
@echo "${TIME_STAMP} Finished ${.TARGETS} ${elapsed_time}"
+.endif
.ERROR: _build_failed
_build_failed: .NOMETA
diff --git a/targets/pseudo/bootstrap-tools/Makefile b/targets/pseudo/bootstrap-tools/Makefile
index 49fccde88661..a267e9573498 100644
--- a/targets/pseudo/bootstrap-tools/Makefile
+++ b/targets/pseudo/bootstrap-tools/Makefile
@@ -19,16 +19,28 @@ BSENV= \
unset MAKEOBJDIR; MAKEOBJDIRPREFIX=${BTOOLSDIR} \
MAKESYSPATH=${SRCTOP}/tools/build/mk:${SRCTOP}/share/mk \
TARGET=${HOST_MACHINE} TARGET_ARCH=${HOST_MACHINE_ARCH} \
- WITHOUT_STAGING=1 STAGE_ROOT= \
+ WITHOUT_STAGING=1 STAGE_ROOT= BOOTSTRAPPING_TOOLS=1 \
WORLDTMP=${BTOOLSDIR} LEGACY_TOOLS=${LEGACY_TOOLS}
+.if !defined(OSRELDATE)
+ord_h= /usr/include/osreldate.h
+.if exists(${ord_h})
+OSRELDATE!= sed -n '/define.*__FreeBSD_version/{s,^[^0-9]*,,p;q;}' ${ord_h}
+.endif
+OSRELDATE?= 0
+.endif
+
+# need to keep this in sync with src/Makefile.inc1
BSARGS= \
DESTDIR= \
+ BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= \
- MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \
+ MK_HTML=no NO_LINT=yes MK_MAN=no \
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
- -DWITH_CLANG_BOOTSTRAP \
- -DNO_CPU_CFLAGS -DNO_WARNS MK_CTF=no -DEARLY_BUILD MK_TESTS=no
+ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
+ MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \
+ MK_LLDB=no MK_TESTS=no \
+ MK_INCLUDES=yes
legacy: .MAKE .META
@@ -58,6 +70,7 @@ BSTCENV= \
BSTCARGS= \
${BSARGS} \
+ BUILD_DIRDEPS=yes \
-DWITH_STAGING \
-DWITH_TOOLSDIR
diff --git a/targets/pseudo/clang/Makefile.depend b/targets/pseudo/clang/Makefile.depend
index bd0c8db4c683..ae940107414f 100644
--- a/targets/pseudo/clang/Makefile.depend
+++ b/targets/pseudo/clang/Makefile.depend
@@ -5,79 +5,6 @@
DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
DIRDEPS = \
- lib/clang/libclanganalysis \
- lib/clang/libclangarcmigrate \
- lib/clang/libclangast \
- lib/clang/libclangbasic \
- lib/clang/libclangcodegen \
- lib/clang/libclangdriver \
- lib/clang/libclangedit \
- lib/clang/libclangfrontend \
- lib/clang/libclangfrontendtool \
- lib/clang/libclanglex \
- lib/clang/libclangparse \
- lib/clang/libclangrewritecore \
- lib/clang/libclangrewritefrontend \
- lib/clang/libclangsema \
- lib/clang/libclangserialization \
- lib/clang/libclangstaticanalyzercheckers \
- lib/clang/libclangstaticanalyzercore \
- lib/clang/libclangstaticanalyzerfrontend \
- lib/clang/libllvmanalysis \
- lib/clang/libllvmarchive \
- lib/clang/libllvmarmasmparser \
- lib/clang/libllvmarmcodegen \
- lib/clang/libllvmarmdesc \
- lib/clang/libllvmarmdisassembler \
- lib/clang/libllvmarminfo \
- lib/clang/libllvmarminstprinter \
- lib/clang/libllvmasmparser \
- lib/clang/libllvmasmprinter \
- lib/clang/libllvmbitreader \
- lib/clang/libllvmbitwriter \
- lib/clang/libllvmcodegen \
- lib/clang/libllvmcore \
- lib/clang/libllvmdebuginfo \
- lib/clang/libllvmexecutionengine \
- lib/clang/libllvminstcombine \
- lib/clang/libllvminstrumentation \
- lib/clang/libllvminterpreter \
- lib/clang/libllvmipa \
- lib/clang/libllvmipo \
- lib/clang/libllvmirreader \
- lib/clang/libllvmjit \
- lib/clang/libllvmlinker \
- lib/clang/libllvmmc \
- lib/clang/libllvmmcdisassembler \
- lib/clang/libllvmmcjit \
- lib/clang/libllvmmcparser \
- lib/clang/libllvmmipsasmparser \
- lib/clang/libllvmmipscodegen \
- lib/clang/libllvmmipsdesc \
- lib/clang/libllvmmipsdisassembler \
- lib/clang/libllvmmipsinfo \
- lib/clang/libllvmmipsinstprinter \
- lib/clang/libllvmobjcarcopts \
- lib/clang/libllvmobject \
- lib/clang/libllvmpowerpccodegen \
- lib/clang/libllvmpowerpcdesc \
- lib/clang/libllvmpowerpcinfo \
- lib/clang/libllvmpowerpcinstprinter \
- lib/clang/libllvmruntimedyld \
- lib/clang/libllvmscalaropts \
- lib/clang/libllvmselectiondag \
- lib/clang/libllvmsupport \
- lib/clang/libllvmtablegen \
- lib/clang/libllvmtarget \
- lib/clang/libllvmtransformutils \
- lib/clang/libllvmvectorize \
- lib/clang/libllvmx86asmparser \
- lib/clang/libllvmx86codegen \
- lib/clang/libllvmx86desc \
- lib/clang/libllvmx86disassembler \
- lib/clang/libllvmx86info \
- lib/clang/libllvmx86instprinter \
- lib/clang/libllvmx86utils \
lib/clang/include \
share/doc/llvm/clang \
usr.bin/clang/clang \
diff --git a/targets/pseudo/toolchain/Makefile.depend b/targets/pseudo/toolchain/Makefile.depend
index bb4bf7ec471a..b15598b87c21 100644
--- a/targets/pseudo/toolchain/Makefile.depend
+++ b/targets/pseudo/toolchain/Makefile.depend
@@ -8,7 +8,22 @@ DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
.include "${SRCTOP}/share/mk/src.opts.mk"
.endif
-DIRDEPS= usr.bin/xinstall
+DIRDEPS= \
+ usr.bin/xinstall \
+ gnu/usr.bin/binutils/addr2line \
+ gnu/usr.bin/binutils/ar \
+ gnu/usr.bin/binutils/as \
+ gnu/usr.bin/binutils/ld \
+ gnu/usr.bin/binutils/nm \
+ gnu/usr.bin/binutils/objcopy \
+ gnu/usr.bin/binutils/objdump \
+ gnu/usr.bin/binutils/ranlib \
+ gnu/usr.bin/binutils/readelf \
+ gnu/usr.bin/binutils/size \
+ gnu/usr.bin/binutils/strings \
+ gnu/usr.bin/binutils/strip \
+
+
.if ${MK_CLANG} == "yes"
DIRDEPS+= targets/pseudo/clang
.endif
diff --git a/targets/pseudo/userland/Makefile.depend b/targets/pseudo/userland/Makefile.depend
index 12c881f0f2ae..2d248e1822ff 100644
--- a/targets/pseudo/userland/Makefile.depend
+++ b/targets/pseudo/userland/Makefile.depend
@@ -13,7 +13,6 @@ DIRDEPS = \
targets/pseudo/gnu \
targets/pseudo/include \
targets/pseudo/kerberos5 \
- targets/pseudo/lib \
targets/pseudo/libexec \
targets/pseudo/sbin \
targets/pseudo/secure \