From owner-freebsd-hackers@FreeBSD.ORG Wed May 1 16:57:04 2013 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8F8721CE for ; Wed, 1 May 2013 16:57:04 +0000 (UTC) (envelope-from prvs=18336b5b69=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 2018E1935 for ; Wed, 1 May 2013 16:57:03 +0000 (UTC) Received: from r2d2 ([46.65.172.4]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50003591690.msg for ; Wed, 01 May 2013 17:56:55 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Wed, 01 May 2013 17:56:55 +0100 (not processed: message from valid local sender) X-MDDKIM-Result: neutral (mail1.multiplay.co.uk) X-MDRemoteIP: 46.65.172.4 X-Return-Path: prvs=18336b5b69=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: hackers@freebsd.org Message-ID: From: "Steven Hartland" To: "Alfred Perlstein" , References: <51814686.2060805@ixsystems.com> <518146F1.9020609@mu.org> Subject: Re: potential future proofing fix for aicasm build. Date: Wed, 1 May 2013 17:57:31 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 May 2013 16:57:04 -0000 I don't believe aicasm is actually needed if you don't have a driver which requires e.g. ahd or ahc. It would be good to get that fixed too. Regards Steve ----- Original Message ----- From: "Alfred Perlstein" To: Sent: Wednesday, May 01, 2013 5:46 PM Subject: potential future proofing fix for aicasm build. > > Hey folks, > > I took a shot at fixing this issue with building aicasm as part of > "buildkernel" of an older 9.0 src on a machine running HEAD. > > aicasm.o: In function `__getCurrentRuneLocale': > > /usr/include/runetype.h:96: undefined reference to `_ThreadRuneLocale' > > The issue seems to be two-fold: > > 1) Paths are not fully set to pick up the bootstrap tools needed to build. > 2) include files use the host's instead of the build trees. > > The first problem is fixed by changing setting of PATH from > "${BPATH}:${PATH}" to ${TMPPATH}. > > The second is fixed by using -nostdinc and setting strict include paths > using -I directives to the compiler: > > CFLAGS="-nostdinc -I${WORLDTMP}/usr/include -I. -I${KERNSRCDIR}/dev/aic7xxx/aicasm" > > > > Can I get review on this patch? > > https://gist.github.com/anonymous/5493734 > > Inline: > > diff --git a/Makefile.inc1 b/Makefile.inc1 > index e850cda..785e3180 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -830,17 +830,18 @@ buildkernel: > @echo ">>> stage 2.3: build tools" > @echo "--------------------------------------------------------------" > cd ${KRNLOBJDIR}/${_kernel}; \ > - PATH=${BPATH}:${PATH} \ > + PATH=${TMPPATH} \ > MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ > - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \ > + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF > CFLAGS="-nostdinc -I${WORLDTMP}/usr/include -I. -I${KERNSRCDIR}/dev/aic7xxx/aicasm" \ > -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile > # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. > .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) > .for target in obj depend all > + @echo "---- aicasm: ${target} ----" > cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ > - PATH=${BPATH}:${PATH} \ > + PATH=${TMPPATH} \ > MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ > - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target} > + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF > CFLAGS="-nostdinc -I${WORLDTMP}/usr/include -I. -I${KERNSRCDIR}/dev/aic7xxx/aicasm" ${target} > .endfor > .endif > .if !defined(NO_KERNELDEPEND) > > > > > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.