Date: Thu, 12 Jan 2012 18:07:33 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Jung-uk Kim <jkim@FreeBSD.org> Cc: src-committers@freebsd.org, Rui Paulo <rpaulo@freebsd.org>, John Baldwin <jhb@freebsd.org>, svn-src-all@freebsd.org, Dmitry Morozovsky <marck@rinet.ru>, svn-src-head@freebsd.org, John Nielsen <john@jnielsen.net>, Peter Grehan <grehan@FreeBSD.org> Subject: Re: svn commit: r213765 - head/sys/dev/aic7xxx/aicasm Message-ID: <4F0F1355.2010709@FreeBSD.org> In-Reply-To: <201010141523.29842.jkim@FreeBSD.org> References: <201010131033.o9DAX1EE080534@svn.freebsd.org> <201010141505.14869.jkim@FreeBSD.org> <alpine.BSF.2.00.1010142308070.86954@woozle.rinet.ru> <201010141523.29842.jkim@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On 2010-10-14 21:23, Jung-uk Kim wrote:
> On Thursday 14 October 2010 03:11 pm, Dmitry Morozovsky wrote:
>> On Thu, 14 Oct 2010, Jung-uk Kim wrote:
...
>> cc -O2 -pipe -nostdinc -I/usr/include -I.
>> -I/FreeBSD/src.current.svn/sys/dev/aic7xxx/aicasm -std=gnu99
>> -Wsystem-headers -Werror -Wall -Wno-format-y2k -W
>> -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
>> -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
>> -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c
>> aicasm_scan.c
>> cc1: warnings being treated as errors
>> /FreeBSD/src.current.svn/sys/dev/aic7xxx/aicasm/aicasm_scan.l:840:
>> warning: function declaration isn't a prototype
...
> Hmm... That means "make buildkernel" did not pick up newly built lex.
> That's bad. :-(
I know it's very, very late to respond to this, but I just had an email
conversation with Peter Grehan, where he ran into this problem when
attempting to build -CURRENT on 8.1-RELEASE. This doesn't have the
followup r214779 yet, where the needed update to lex is merged.
Of course, I also know that building -CURRENT on 8.1-RELEASE is
officially not supported, but if there is a relatively simple fix to
make it work, it should not be a problem to apply, right? :)
The root of the problem is that, even if buildworld is completed, the
"stage 2.3: build tools" (kernel-specific) part of Makefile.inc1 uses
lex and yacc from /usr/bin, *not* the ones built under ${WORLDTMP}
(usually in /usr/obj/usr/src/tmp/legacy/usr/bin).
Therefore, I propose to set PATH to ${BPATH}:${PATH} in this stage, so
the "good" versions of lex and yacc are used. As per attached diff.
(NOTE: even with this diff applied, doing 'make buildkernel' without
first doing 'make buildworld' or 'make kernel-toolchain' will not work,
because there will be no copy of lex and yacc in /usr/obj.)
[-- Attachment #2 --]
Index: Makefile.inc1
===================================================================
--- Makefile.inc1 (revision 229979)
+++ Makefile.inc1 (working copy)
@@ -832,6 +832,7 @@
@echo ">>> stage 2.3: build tools"
@echo "--------------------------------------------------------------"
cd ${KRNLOBJDIR}/${_kernel}; \
+ PATH=${BPATH}:${PATH} \
MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \
${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \
-f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile
@@ -839,6 +840,7 @@
.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules)
.for target in obj depend all
cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \
+ PATH=${BPATH}:${PATH} \
MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \
${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target}
.endfor
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F0F1355.2010709>
