Date: Tue, 05 Nov 2013 13:40:17 -0700 From: Ian Lepore <ian@FreeBSD.org> To: Gleb Smirnoff <glebius@FreeBSD.org> Cc: Outback Dingo <outbackdingo@gmail.com>, current@FreeBSD.org Subject: Re: CUURENT kernel build broken - make[2]: exec(aicasm) failed (No such file or directory) Message-ID: <1383684017.31172.166.camel@revolution.hippie.lan> In-Reply-To: <20131105151251.GC7577@glebius.int.ru> References: <CAKYr3zzkaF=aNp=P2HMR94c54xKan5f6Fe9u28fV7yy2A_Bz6A@mail.gmail.com> <1383611766.31172.153.camel@revolution.hippie.lan> <CAKYr3zy25fv3rCGeecgnJ0zOws2t8bV5e=_HJLAT0r2opsY11w@mail.gmail.com> <1383628194.31172.155.camel@revolution.hippie.lan> <20131105070146.GH1467@FreeBSD.org> <1383663652.31172.160.camel@revolution.hippie.lan> <20131105151251.GC7577@glebius.int.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1383684017.31172.166.camel>