FreeBSD Bugzilla – Attachment 247166 Details for
Bug 237290
build(7): PORTS_MODULES does not build in parallel
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch 14/stable
850cb985c9.patch (text/plain), 3.39 KB, created by
Ivan Rozhuk
on 2023-12-20 04:31:05 UTC
(
hide
)
Description:
patch 14/stable
Filename:
MIME Type:
Creator:
Ivan Rozhuk
Created:
2023-12-20 04:31:05 UTC
Size:
3.39 KB
patch
obsolete
>From 850cb985c936d2bcb488bcb65f9a328a580813aa Mon Sep 17 00:00:00 2001 >From: Rozhuk Ivan <rozhuk.im@gmail.com> >Date: Sun, 20 Dec 2020 08:22:41 +0300 >Subject: [PATCH] sys/conf/kern.post.mk: PORTS_MODULES does not build in > parallel, add FLAVOR support > >https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237290 > >Then some ports set via PORTS_MODULES then they builded with >single thread, with takes a lot of time. > >Reproduce: >Add to /etc/make.conf >PORTS_MODULES+= graphics/drm-fbsd12.0-kmod > >build kernel: >/usr/bin/time -h make -j`getconf NPROCESSORS_ONLN` -s -DALWAYS_CHECK_MAKE buildkernel > >top show only 1 cpu usage during drm-fbsd12.0-kmod port building. >--- > sys/conf/kern.post.mk | 33 ++++++++++++++++++++++++++++++--- > 1 file changed, 30 insertions(+), 3 deletions(-) > >diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk >index f42ec4a9564..5cda2c531cd 100644 >--- a/sys/conf/kern.post.mk >+++ b/sys/conf/kern.post.mk >@@ -107,11 +107,24 @@ SRC_BASE= ${SYSDIR:H:tA} > OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ > ${MAKEOBJDIRPREFIX}${SRC_BASE}/include/osreldate.h > .endif >+ >+# Read ports defaults. >+PORTSDIR?= $(${MAKE} -V PORTSDIR) >+DISTDIR?= $(${MAKE} -V DISTDIR) >+PORT_DBDIR?= $(${MAKE} -V PORT_DBDIR) >+OPTIONS_SET?= $(${MAKE} -V OPTIONS_SET) >+OPTIONS_UNSET?= $(${MAKE} -V OPTIONS_UNSET) >+NO_CCACHE?= $(${MAKE} -V NO_CCACHE) >+CCACHE_DIR?= $(${MAKE} -V CCACHE_DIR) >+WITH_CCACHE_BUILD?= $(${MAKE} -V WITH_CCACHE_BUILD) >+DEFAULT_VERSIONS?= $(${MAKE} -V DEFAULT_VERSIONS) >+WITH_DEBUG_PORTS?= $(${MAKE} -V WITH_DEBUG_PORTS) > # Keep the related ports builds in the obj directory so that they are only rebuilt once per kernel build > # > # Ports search for some dependencies in PATH, so add the location of the > # installed files > WRKDIRPREFIX?= ${.OBJDIR} >+MAKEFLAGS_PORTS=${MAKEFLAGS:M*:tW:S/^-m /-m_/g:S/ -m / -m_/g:S/^-j /-m_/g:S/ -j / -m_/g:S/^-J /-m_/g:S/ -J / -m_/g:tw:N-m_*:NMK_AUTO_OBJ=*} > PORTSMODULESENV=\ > env \ > -u CC \ >@@ -120,7 +133,18 @@ PORTSMODULESENV=\ > -u MAKESYSPATH \ > -u MK_AUTO_OBJ \ > -u MAKEOBJDIR \ >- MAKEFLAGS="${MAKEFLAGS:M*:tW:S/^-m /-m_/g:S/ -m / -m_/g:tw:N-m_*:NMK_AUTO_OBJ=*}" \ >+ PORTSDIR="${PORTSDIR}" \ >+ DISTDIR="${DISTDIR}" \ >+ PORT_DBDIR="${PORT_DBDIR}" \ >+ OPTIONS_SET="${OPTIONS_SET}" \ >+ OPTIONS_UNSET="${OPTIONS_UNSET}" \ >+ NO_CCACHE="${NO_CCACHE}" \ >+ CCACHE_DIR="${CCACHE_DIR}" \ >+ WITH_CCACHE_BUILD="${WITH_CCACHE_BUILD}" \ >+ DEFAULT_VERSIONS="${DEFAULT_VERSIONS}" \ >+ WITH_DEBUG_PORTS="${WITH_DEBUG_PORTS}" \ >+ MAKEFLAGS="${MAKEFLAGS_PORTS}" \ >+ MAKE_JOBS_NUMBER=${.MAKE.JOBS} \ > SYSDIR=${SYSDIR} \ > PATH=${PATH}:${LOCALBASE}/bin:${LOCALBASE}/sbin \ > SRC_BASE=${SRC_BASE} \ >@@ -132,7 +156,8 @@ PORTSMODULESENV=\ > all: > .for __i in ${PORTS_MODULES} > @${ECHO} "===> Ports module ${__i} (all)" >- cd ${PORTSDIR:U/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean build >+ ${PORTSMODULESENV} ${MAKE} -C "${PORTSDIR}/${__i:C/@.*//g}" \ >+ ${__i:M*@*:C/.*@/FLAVOR=/g} clean build > .endfor > > .for __target in install reinstall clean >@@ -140,7 +165,9 @@ ${__target}: ports-${__target} > ports-${__target}: > .for __i in ${PORTS_MODULES} > @${ECHO} "===> Ports module ${__i} (${__target})" >- cd ${PORTSDIR:U/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/(re)?install/deinstall reinstall/} >+ ${PORTSMODULESENV} ${MAKE} -C "${PORTSDIR}/${__i:C/@.*//g}" \ >+ ${__i:M*@*:C/.*@/FLAVOR=/g} \ >+ ${__target:C/(re)?install/deinstall reinstall/} > .endfor > .endfor > .endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
rozhuk.im
:
maintainer-approval?
Actions:
View
|
Diff
Attachments on
bug 237290
:
203705
|
203755
|
205980
|
234277
|
234307
|
247153
| 247166 |
252906