Changeset View
Standalone View
Makefile.inc1
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | |||||
.endif | .endif | ||||
.if ${TARGET} == "arm" | .if ${TARGET} == "arm" | ||||
.if ${TARGET_ARCH:Marmv[67]*} != "" && ${TARGET_CPUTYPE:M*soft*} == "" | .if ${TARGET_ARCH:Marmv[67]*} != "" && ${TARGET_CPUTYPE:M*soft*} == "" | ||||
TARGET_ABI= gnueabihf | TARGET_ABI= gnueabihf | ||||
.else | .else | ||||
TARGET_ABI= gnueabi | TARGET_ABI= gnueabi | ||||
.endif | .endif | ||||
.endif | .endif | ||||
MACHINE_ABI?= unknown | MACHINE_VENDOR?= unknown | ||||
MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd13.0 | TARGET_VENDOR?= unknown | ||||
imp: not an objection, per-se, but an observation that these same transforms are used 4 times in an… | |||||
Done Inline ActionsYou could have TARGET_TRIPLE_ARCH and MACHINE_TRIPLE_ARCH helper variables to at least cut it in half. jhb: You could have TARGET_TRIPLE_ARCH and MACHINE_TRIPLE_ARCH helper variables to at least cut it… | |||||
TARGET_ABI?= unknown | |||||
Done Inline Actionsany way of getting this automatically? imp: any way of getting this automatically? | |||||
Done Inline ActionsNot really, it's the version we are building as opposed to the build host, etc. We already have to bump this one when creating a new branch, this just centralizes it. I think Makefile.libcompat also hardcodes freebsd13 and it would be nice if we could fix that to use OS_VERSION as part of this change. jhb: Not really, it's the version we are building as opposed to the build host, etc. We already… | |||||
TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd13.0 | # The triple has the general format <arch><sub>-<vendor>-<sys>-<abi> | ||||
# See https://clang.llvm.org/docs/CrossCompilation.html#target-triple | |||||
arichardsonUnsubmitted Not Done Inline ActionsInternally llvm::Triple uses "environment" rather than "abi" because the last component can also contain suffixes like -elf to indicate the object format. If we were to use {TARGET,MACHINE}_TRIPLE_ENVIRONMENT (or {TARGET,MACHINE}_TRIPLE_ABI) instead, that would avoid conflicts with CheriBSD? arichardson: Internally llvm::Triple uses "environment" rather than "abi" because the last component can… | |||||
alfredoAuthorUnsubmitted Done Inline ActionsThe problem with {TARGET,MACHINE}_ABI is that its use appears to be incorrect. Actually users wanted to use {TARGET,MACHINE}_VENDOR instead, when following "<arch><sub>-<vendor>-<sys>-<abi>" format. (note we don't have {TARGET,MACHINE}_SUB, we append it to {TARGET,MACHINE}_ARCH value) I like your proposal of having {TARGET,MACHINE}_TRIPLE_ENVIRONMENT to customize compiler target triple (like {TARGET,MACHINE}_TRIPLE the overrides everything) alfredo: The problem with {TARGET,MACHINE}_ABI is that its use appears to be incorrect. Actually users… | |||||
.ifndef MACHINE_TRIPLE | |||||
MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_VENDOR}-freebsd${FREEBSD_REVISION} | |||||
. ifdef MACHINE_ABI | |||||
MACHINE_TRIPLE:=${MACHINE_TRIPLE}-${MACHINE_ABI} | |||||
. endif | |||||
.endif | |||||
.ifndef TARGET_TRIPLE | |||||
TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_VENDOR}-freebsd${FREEBSD_REVISION} | |||||
. ifdef TARGET_ABI | |||||
TARGET_TRIPLE:=${TARGET_TRIPLE}-${TARGET_ABI} | |||||
. endif | |||||
.endif | |||||
KNOWN_ARCHES?= aarch64/arm64 \ | KNOWN_ARCHES?= aarch64/arm64 \ | ||||
amd64 \ | amd64 \ | ||||
armv6/arm \ | armv6/arm \ | ||||
armv7/arm \ | armv7/arm \ | ||||
i386 \ | i386 \ | ||||
mips \ | mips \ | ||||
mipsel/mips \ | mipsel/mips \ | ||||
mips64el/mips \ | mips64el/mips \ | ||||
▲ Show 20 Lines • Show All 384 Lines • ▼ Show 20 Lines | OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ | ||||
/usr/include/osreldate.h | /usr/include/osreldate.h | ||||
.else | .else | ||||
OSRELDATE= 0 | OSRELDATE= 0 | ||||
.endif | .endif | ||||
.export OSRELDATE | .export OSRELDATE | ||||
.endif | .endif | ||||
# Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION. | # Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION. | ||||
.if !defined(_REVISION) | |||||
_REVISION!= ${MAKE} -C ${SRCDIR}/release MK_AUTO_OBJ=no -V REVISION | |||||
.export _REVISION | |||||
.endif | |||||
.if !defined(_BRANCH) | .if !defined(_BRANCH) | ||||
_BRANCH!= ${MAKE} -C ${SRCDIR}/release MK_AUTO_OBJ=no -V BRANCH | _BRANCH!= ${MAKE} -C ${SRCDIR}/release MK_AUTO_OBJ=no -V BRANCH | ||||
.export _BRANCH | .export _BRANCH | ||||
.endif | .endif | ||||
.if !defined(SRCRELDATE) | .if !defined(SRCRELDATE) | ||||
SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ | SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ | ||||
${SRCDIR}/sys/sys/param.h | ${SRCDIR}/sys/sys/param.h | ||||
.export SRCRELDATE | .export SRCRELDATE | ||||
.endif | .endif | ||||
.if !defined(VERSION) | .if !defined(VERSION) | ||||
VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} | VERSION= FreeBSD ${FREEBSD_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} | ||||
.export VERSION | .export VERSION | ||||
.endif | .endif | ||||
.if !defined(PKG_VERSION) | .if !defined(PKG_VERSION) | ||||
.if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*} | .if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*} | ||||
TIMENOW= %Y%m%d%H%M%S | TIMENOW= %Y%m%d%H%M%S | ||||
EXTRA_REVISION= .s${TIMENOW:gmtime} | EXTRA_REVISION= .s${TIMENOW:gmtime} | ||||
.elif ${_BRANCH:MALPHA*} | .elif ${_BRANCH:MALPHA*} | ||||
EXTRA_REVISION= _${_BRANCH:C/-ALPHA/.a/} | EXTRA_REVISION= _${_BRANCH:C/-ALPHA/.a/} | ||||
.elif ${_BRANCH:MBETA*} | .elif ${_BRANCH:MBETA*} | ||||
EXTRA_REVISION= _${_BRANCH:C/-BETA/.b/} | EXTRA_REVISION= _${_BRANCH:C/-BETA/.b/} | ||||
.elif ${_BRANCH:MRC*} | .elif ${_BRANCH:MRC*} | ||||
EXTRA_REVISION= _${_BRANCH:C/-RC/.r/} | EXTRA_REVISION= _${_BRANCH:C/-RC/.r/} | ||||
.elif ${_BRANCH:MPRERELEASE*} | .elif ${_BRANCH:MPRERELEASE*} | ||||
EXTRA_REVISION= _${_BRANCH:C/-PRERELEASE/.p/} | EXTRA_REVISION= _${_BRANCH:C/-PRERELEASE/.p/} | ||||
.elif ${_BRANCH:M*-p*} | .elif ${_BRANCH:M*-p*} | ||||
EXTRA_REVISION= _${_BRANCH:C/.*-p([0-9]+$)/\1/} | EXTRA_REVISION= _${_BRANCH:C/.*-p([0-9]+$)/\1/} | ||||
.endif | .endif | ||||
PKG_VERSION:= ${_REVISION}${EXTRA_REVISION} | PKG_VERSION:= ${FREEBSD_REVISION}${EXTRA_REVISION} | ||||
.endif | .endif | ||||
.endif # !defined(PKG_VERSION) | .endif # !defined(PKG_VERSION) | ||||
.if !defined(PKG_TIMESTAMP) | .if !defined(PKG_TIMESTAMP) | ||||
TIMEEPOCHNOW= %s | TIMEEPOCHNOW= %s | ||||
SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime} | SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime} | ||||
.else | .else | ||||
SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP} | SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP} | ||||
▲ Show 20 Lines • Show All 1,288 Lines • ▼ Show 20 Lines | |||||
packages: .PHONY | packages: .PHONY | ||||
${_+_}${MAKE} -C ${.CURDIR} PKG_VERSION=${PKG_VERSION} real-packages | ${_+_}${MAKE} -C ${.CURDIR} PKG_VERSION=${PKG_VERSION} real-packages | ||||
update-packages: .PHONY | update-packages: .PHONY | ||||
${_+_}${MAKE} -C ${.CURDIR} PKG_VERSION=${PKG_VERSION} real-update-packages | ${_+_}${MAKE} -C ${.CURDIR} PKG_VERSION=${PKG_VERSION} real-update-packages | ||||
package-pkg: .PHONY | package-pkg: .PHONY | ||||
rm -rf /tmp/ports.${TARGET} || : | rm -rf /tmp/ports.${TARGET} || : | ||||
env ${WMAKEENV:Q} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \ | env ${WMAKEENV:Q} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${FREEBSD_REVISION} \ | ||||
PKG_CMD=${PKG_CMD} PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} \ | PKG_CMD=${PKG_CMD} PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} \ | ||||
WSTAGEDIR=${WSTAGEDIR} \ | WSTAGEDIR=${WSTAGEDIR} \ | ||||
sh ${.CURDIR}/release/scripts/make-pkg-package.sh | sh ${.CURDIR}/release/scripts/make-pkg-package.sh | ||||
real-packages: stage-packages create-packages sign-packages .PHONY | real-packages: stage-packages create-packages sign-packages .PHONY | ||||
real-update-packages: stage-packages .PHONY | real-update-packages: stage-packages .PHONY | ||||
${_+_}${MAKE} -C ${.CURDIR} PKG_VERSION=${PKG_VERSION} create-packages | ${_+_}${MAKE} -C ${.CURDIR} PKG_VERSION=${PKG_VERSION} create-packages | ||||
▲ Show 20 Lines • Show All 1,605 Lines • ▼ Show 20 Lines | |||||
xdev-links: .PHONY | xdev-links: .PHONY | ||||
${_+_}cd ${XDDESTDIR}/usr/bin; \ | ${_+_}cd ${XDDESTDIR}/usr/bin; \ | ||||
mkdir -p ../../../../usr/bin; \ | mkdir -p ../../../../usr/bin; \ | ||||
for i in *; do \ | for i in *; do \ | ||||
ln -sf ../../${XDTP}/usr/bin/$$i \ | ln -sf ../../${XDTP}/usr/bin/$$i \ | ||||
../../../../usr/bin/${XDDIR}-$$i; \ | ../../../../usr/bin/${XDDIR}-$$i; \ | ||||
ln -sf ../../${XDTP}/usr/bin/$$i \ | ln -sf ../../${XDTP}/usr/bin/$$i \ | ||||
../../../../usr/bin/${XDDIR}${_REVISION}-$$i; \ | ../../../../usr/bin/${XDDIR}${FREEBSD_REVISION}-$$i; \ | ||||
done | done |
not an objection, per-se, but an observation that these same transforms are used 4 times in an identical fasion. Any way to make that more common?