Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Feb 2011 23:03:40 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r218359 - head/release/picobsd/build
Message-ID:  <201102052303.p15N3eL5044569@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luigi
Date: Sat Feb  5 23:03:40 2011
New Revision: 218359
URL: http://svn.freebsd.org/changeset/base/218359

Log:
  following the recent (218130) changes to Makefile and Makefile.inc1,
  we need to set TARGET and TARGET_ARCH to get a correct WMAKEENV.
  I am setting both to i386 since this is what picobsd is used for,
  though there might be a better fix.
  
  Add initial support for parallel make. This is disabled right now,
  because there are incorrect dependencies somewhere which require
  to run picobsd 2-3 times to complete a build.
  
  MFC after:	2 weeks

Modified:
  head/release/picobsd/build/picobsd

Modified: head/release/picobsd/build/picobsd
==============================================================================
--- head/release/picobsd/build/picobsd	Sat Feb  5 23:02:55 2011	(r218358)
+++ head/release/picobsd/build/picobsd	Sat Feb  5 23:03:40 2011	(r218359)
@@ -176,9 +176,9 @@ create_includes_and_libraries2() { # opt
     ( cd ${SRC};
     # make -DNOCLEAN -DNOPROFILE -DNOGAMES -DNOLIBC_R -DPICOBSD buildworld
     if [ -d "$1" ] ; then
-	cd $1 ; ${BINMAKE} $2	# specific target, e.g. ld-elf.so
+	cd $1 ; ${BINMAKE} ${o_par} $2	# specific target, e.g. ld-elf.so
     else
-	${BINMAKE} _+_= $no toolchain _includes _libraries
+	${BINMAKE} ${o_par} _+_= $no toolchain _includes _libraries
     fi
     )
 }
@@ -452,7 +452,7 @@ do_kernel() {		# OK
     (cd $MY_TREE; export name SRC BUILDDIR # used in this makefile ;
 	# export CONFIG
 	[ "${o_do_modules}" = "yes" ] && export MODULES=""
-	${BINMAKE} -v -f ${PICO_TREE}/build/Makefile.conf ) || \
+	${BINMAKE} ${o_par} -v -f ${PICO_TREE}/build/Makefile.conf ) || \
 	fail $? missing_kernel
 }
 
@@ -981,6 +981,7 @@ set_build_parameters() {
     log "OSVERSION is ${OSVERSION}"
     if [ ${OSVERSION} -ge 500035 ] ; then
 	export MAKEOBJDIRPREFIX=${l_objtree}
+	export TARGET_ARCH=i386 TARGET=i386
 	eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\""
 	eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV`
     fi
@@ -1020,6 +1021,8 @@ set_build_parameters() {
 # Main entry of the script. Initialize variables, parse command line
 # arguments.
 
+# o_par="-j 8"	# parallel make and other make options
+
 set_defaults
 while [ true ]; do
     log "Parsing $1"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102052303.p15N3eL5044569>