From owner-freebsd-current@FreeBSD.ORG Tue Nov 5 20:40:27 2013 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C4149C34; Tue, 5 Nov 2013 20:40:27 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85BDF2516; Tue, 5 Nov 2013 20:40:26 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VdnQB-00090L-KA; Tue, 05 Nov 2013 20:40:19 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id rA5KeHwo062320; Tue, 5 Nov 2013 13:40:17 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19SAqj0dskr23qKOVMJBhBj Subject: Re: CUURENT kernel build broken - make[2]: exec(aicasm) failed (No such file or directory) From: Ian Lepore To: Gleb Smirnoff In-Reply-To: <20131105151251.GC7577@glebius.int.ru> References: <1383611766.31172.153.camel@revolution.hippie.lan> <1383628194.31172.155.camel@revolution.hippie.lan> <20131105070146.GH1467@FreeBSD.org> <1383663652.31172.160.camel@revolution.hippie.lan> <20131105151251.GC7577@glebius.int.ru> Content-Type: multipart/mixed; boundary="=-KNDFCbaGdLD3F4MnDDpX" Date: Tue, 05 Nov 2013 13:40:17 -0700 Message-ID: <1383684017.31172.166.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: Outback Dingo , current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 20:40:27 -0000 --=-KNDFCbaGdLD3F4MnDDpX Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, 2013-11-05 at 19:12 +0400, Gleb Smirnoff wrote: > On Tue, Nov 05, 2013 at 08:00:52AM -0700, Ian Lepore wrote: > I> > I> You were just unlucky that your updates bracketed my checkin that > I> > I> changed the build process for the aicasm tool so that it gets built as > I> > I> part of the toolchain rather than as part of the kernel now. > I> > > I> > Before this change, the toolchain was not required for kernel build if you > I> > aren't cross building. And now it is. This breaks the kernel build procedure > I> > documented in handbook for years, and brings a lot of discomfort to > I> > developers. > I> > > I> > Now to test a trivial change to kernel I need first to compile clang. > I> > > I> > I> I didn't realize the change would have that effect. Building aicasm > I> using the kernel build machinery just isn't an option anymore, it builds > I> in the wrong environment with the wrong header files and sometimes the > I> wrong toolchain when cross-building. But there should be a solution > I> that doesn't require building clang, I'll see what can be done. > > Thanks, Ian. While you are seekign solution we can sustain with depending > on toolchain build. > Okay, I think I've got a potential solution, please try the attached patch. Now the "make buildkernel" when the objdir is empty should build just the aicasm tool. (In retrospect, WTF was I thinking adding it to the cross-build tools? I guess cross-building is just too central to my world these days.) Maybe for testing you should rename your existing objdir rather than cleaning it out, just in case this doesn't work you can rename it back instead of building clang all over again. :) -- Ian --=-KNDFCbaGdLD3F4MnDDpX Content-Disposition: inline; filename="ktmake.diff" Content-Type: text/x-patch; name="ktmake.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Index: Makefile.inc1 =================================================================== --- Makefile.inc1 (revision 257712) +++ Makefile.inc1 (working copy) @@ -439,6 +439,16 @@ IMAKE_MTREE= MTREE_CMD="nmtree ${MTREEFLAGS}" KMAKEENV= ${WMAKEENV} KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME} +# kernel build-tools stage +KTMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ + ${WMAKEENV} ${MAKE} -f Makefile.inc1 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + DESTDIR= \ + BOOTSTRAPPING=${OSRELDATE} \ + SSP_CFLAGS= \ + -DNO_LINT \ + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD + # # buildworld # @@ -1019,7 +1029,7 @@ buildkernel: @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" - @# Currently no special kernel tools to build. + ${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools .if !defined(NO_KERNELDEPEND) @echo @echo "--------------------------------------------------------------" @@ -1347,6 +1357,23 @@ build-tools: .MAKE .endfor # +# kernel-tools: Build kernel-building tools +# +kernel-tools: .MAKE + mkdir -p ${WORLDTMP}/usr + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + -p ${WORLDTMP}/usr >/dev/null +.for _tool in \ + sys/dev/aic7xxx/aicasm + ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + cd ${.CURDIR}/${_tool} && \ + ${MAKE} DIRPRFX=${_tool}/ obj && \ + ${MAKE} DIRPRFX=${_tool}/ depend && \ + ${MAKE} DIRPRFX=${_tool}/ all && \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP} install +.endfor + +# # cross-tools: Build cross-building tools # .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035 @@ -1393,7 +1420,6 @@ cross-tools: .MAKE ${_btxld} \ ${_crunchide} \ ${_kgzip} \ - sys/dev/aic7xxx/aicasm ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ --=-KNDFCbaGdLD3F4MnDDpX--