Re: svn commit: r230622 - head

2012-01-31 Thread Rafal Jaworowski

On 2012-01-31, at 14:53, Dimitry Andric wrote:

> On 2012-01-31 14:20, Rafal Jaworowski wrote:
>> On 2012-01-30, at 22:56, Dimitry Andric wrote:
> ...
>>> That said, I still don't understand why the generated aicasm_scan.c file
>>> is still defining the input() function.  Rafal, just to be sure, can you
>>> please paste the file that was generated during your buildkernel?
>> 
>> Problem identified: the auto-gen'd aicasm files would not get updated in the 
>> preexisting kernel OBJ subdir. After wiping out the OBJ sub dir entirely 
>> make buildkernel works fine.
>> 
>> Do you know why would the generated aicasm* files not get a refresh in the 
>> kernel OBJ dir?
> 
> Well, in general, incremental building is difficult to get working for
> all corner cases, like this particular one.  The lexer and scanner .c
> files are generated from .l and .y files, so if the latter did not get
> an updated timestamp, the .c files will not be regenerated either.
> 
> The only way to fix this would be to add a dependency on the actual lex
> and yacc executables.  But that is probably overkill: if you wanted to
> be consistent, you would also have to relink every executable if ld gets
> updated, recompile every object file if cc gets updated, and so on.
> 
> It's probably easier to just clean out your object tree, and build from
> scratch. :)

Sure, I was just curious. Thanks for help!

Rafal

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r230622 - head

2012-01-31 Thread Dimitry Andric

On 2012-01-31 14:20, Rafal Jaworowski wrote:

On 2012-01-30, at 22:56, Dimitry Andric wrote:

...

That said, I still don't understand why the generated aicasm_scan.c file
is still defining the input() function.  Rafal, just to be sure, can you
please paste the file that was generated during your buildkernel?


Problem identified: the auto-gen'd aicasm files would not get updated in the 
preexisting kernel OBJ subdir. After wiping out the OBJ sub dir entirely make 
buildkernel works fine.

Do you know why would the generated aicasm* files not get a refresh in the 
kernel OBJ dir?


Well, in general, incremental building is difficult to get working for
all corner cases, like this particular one.  The lexer and scanner .c
files are generated from .l and .y files, so if the latter did not get
an updated timestamp, the .c files will not be regenerated either.

The only way to fix this would be to add a dependency on the actual lex
and yacc executables.  But that is probably overkill: if you wanted to
be consistent, you would also have to relink every executable if ld gets
updated, recompile every object file if cc gets updated, and so on.

It's probably easier to just clean out your object tree, and build from
scratch. :)

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r230622 - head

2012-01-31 Thread Rafal Jaworowski

On 2012-01-30, at 22:56, Dimitry Andric wrote:

> On 2012-01-30 21:48, Ian Lepore wrote:
>> On Mon, 2012-01-30 at 21:08 +0100, Dimitry Andric wrote:
>>> On 2012-01-30 20:27, Rafal Jaworowski wrote:
>>> ...
>   Fix this by setting PATH to ${BPATH}:${PATH} in stage 2.3, so the
>   bootstrap tools directories are searched before the regular ones.
 
 Is this supposed to work for cross building as well? I'm still 
 encountering problems on a 7.3 host build:
 
 1. Cross world builds fine
 make -j 8 buildworld TARGET_ARCH=arm
 
 2. Kernel fails w/ the aicasm
 make buildkernel TARGET_ARCH=arm KERNCONF=SHEEVAPLUG
 [...]
 cc -O2 -pipe -nostdinc -I/usr/include -I. 
 -I/home/raj/work/svn/base/head/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
 /home/raj/work/svn/base/head/sys/dev/aic7xxx/aicasm/aicasm_scan.l:837: 
 warning: function declaration isn't a prototype
>>> 
>>> Can you please try doing "make buildenv TARGET_ARCH=arm", then run
>>> "which lex" and "which yacc"?
>> 
>> Shouldn't lex and yacc be listed in the Makefile.inc1 bootstrap-tools
>> target for this to be fully effective?  It looks like neither is in
>> RELENG_7 and lex is only conditionally listed in RELENG_8.
> 
> It is, for head at least (but I think I will MFC this change, if it
> turns out to work correctly).  Look in Makefile.inc1, around line 1030:
> 
> .if ${BOOTSTRAPPING} < 96
> _lex= usr.bin/lex
> _yacc=usr.bin/yacc
> .endif
> 
> I have assumed Rafal is building a head checkout on 7.3 release.  Since
> BOOTSTRAPPING will most likely be 703000, the lex and yacc targets are
> built during the bootstrap-tools stage.
> 
> That said, I still don't understand why the generated aicasm_scan.c file
> is still defining the input() function.  Rafal, just to be sure, can you
> please paste the file that was generated during your buildkernel?

Problem identified: the auto-gen'd aicasm files would not get updated in the 
preexisting kernel OBJ subdir. After wiping out the OBJ sub dir entirely make 
buildkernel works fine.

Do you know why would the generated aicasm* files not get a refresh in the 
kernel OBJ dir?

Rafal

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r230622 - head

2012-01-30 Thread Dimitry Andric

On 2012-01-30 21:48, Ian Lepore wrote:

On Mon, 2012-01-30 at 21:08 +0100, Dimitry Andric wrote:

On 2012-01-30 20:27, Rafal Jaworowski wrote:
...

   Fix this by setting PATH to ${BPATH}:${PATH} in stage 2.3, so the
   bootstrap tools directories are searched before the regular ones.


Is this supposed to work for cross building as well? I'm still encountering 
problems on a 7.3 host build:

1. Cross world builds fine
make -j 8 buildworld TARGET_ARCH=arm

2. Kernel fails w/ the aicasm
make buildkernel TARGET_ARCH=arm KERNCONF=SHEEVAPLUG
[...]
cc -O2 -pipe -nostdinc -I/usr/include -I. 
-I/home/raj/work/svn/base/head/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
/home/raj/work/svn/base/head/sys/dev/aic7xxx/aicasm/aicasm_scan.l:837: warning: 
function declaration isn't a prototype


Can you please try doing "make buildenv TARGET_ARCH=arm", then run
"which lex" and "which yacc"?


Shouldn't lex and yacc be listed in the Makefile.inc1 bootstrap-tools
target for this to be fully effective?  It looks like neither is in
RELENG_7 and lex is only conditionally listed in RELENG_8.


It is, for head at least (but I think I will MFC this change, if it
turns out to work correctly).  Look in Makefile.inc1, around line 1030:

.if ${BOOTSTRAPPING} < 96
_lex=   usr.bin/lex
_yacc=  usr.bin/yacc
.endif

I have assumed Rafal is building a head checkout on 7.3 release.  Since
BOOTSTRAPPING will most likely be 703000, the lex and yacc targets are
built during the bootstrap-tools stage.

That said, I still don't understand why the generated aicasm_scan.c file
is still defining the input() function.  Rafal, just to be sure, can you
please paste the file that was generated during your buildkernel?
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r230622 - head

2012-01-30 Thread Ian Lepore
On Mon, 2012-01-30 at 21:08 +0100, Dimitry Andric wrote:
> On 2012-01-30 20:27, Rafal Jaworowski wrote:
> ...
> >>   Fix this by setting PATH to ${BPATH}:${PATH} in stage 2.3, so the
> >>   bootstrap tools directories are searched before the regular ones.
> >
> > Is this supposed to work for cross building as well? I'm still encountering 
> > problems on a 7.3 host build:
> >
> > 1. Cross world builds fine
> > make -j 8 buildworld TARGET_ARCH=arm
> >
> > 2. Kernel fails w/ the aicasm
> > make buildkernel TARGET_ARCH=arm KERNCONF=SHEEVAPLUG
> > [...]
> > cc -O2 -pipe -nostdinc -I/usr/include -I. 
> > -I/home/raj/work/svn/base/head/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
> > /home/raj/work/svn/base/head/sys/dev/aic7xxx/aicasm/aicasm_scan.l:837: 
> > warning: function declaration isn't a prototype
> 
> Can you please try doing "make buildenv TARGET_ARCH=arm", then run
> "which lex" and "which yacc"?

Shouldn't lex and yacc be listed in the Makefile.inc1 bootstrap-tools
target for this to be fully effective?  It looks like neither is in
RELENG_7 and lex is only conditionally listed in RELENG_8.

-- Ian


___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r230622 - head

2012-01-30 Thread Rafal Jaworowski

On 2012-01-30, at 21:08, Dimitry Andric wrote:

> On 2012-01-30 20:27, Rafal Jaworowski wrote:
> ...
>>>  Fix this by setting PATH to ${BPATH}:${PATH} in stage 2.3, so the
>>>  bootstrap tools directories are searched before the regular ones.
>> 
>> Is this supposed to work for cross building as well? I'm still encountering 
>> problems on a 7.3 host build:
>> 
>> 1. Cross world builds fine
>> make -j 8 buildworld TARGET_ARCH=arm
>> 
>> 2. Kernel fails w/ the aicasm
>> make buildkernel TARGET_ARCH=arm KERNCONF=SHEEVAPLUG
>> [...]
>> cc -O2 -pipe -nostdinc -I/usr/include -I. 
>> -I/home/raj/work/svn/base/head/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
>> /home/raj/work/svn/base/head/sys/dev/aic7xxx/aicasm/aicasm_scan.l:837: 
>> warning: function declaration isn't a prototype
> 
> Can you please try doing "make buildenv TARGET_ARCH=arm", then run
> "which lex" and "which yacc"?


make buildenv TARGET_ARCH=arm
Entering world for arm:arm
$ which lex
/home/raj/work/obj//arm.arm/home/raj/work/svn/base/head/tmp/legacy/usr/bin/lex
$ which yacc
/home/raj/work/obj//arm.arm/home/raj/work/svn/base/head/tmp/legacy/usr/bin/yacc
$ 

They seem freshly built (from the earlier buildworld run).

Rafal

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r230622 - head

2012-01-30 Thread Dimitry Andric

On 2012-01-30 20:27, Rafal Jaworowski wrote:
...

  Fix this by setting PATH to ${BPATH}:${PATH} in stage 2.3, so the
  bootstrap tools directories are searched before the regular ones.


Is this supposed to work for cross building as well? I'm still encountering 
problems on a 7.3 host build:

1. Cross world builds fine
make -j 8 buildworld TARGET_ARCH=arm

2. Kernel fails w/ the aicasm
make buildkernel TARGET_ARCH=arm KERNCONF=SHEEVAPLUG
[...]
cc -O2 -pipe -nostdinc -I/usr/include -I. 
-I/home/raj/work/svn/base/head/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
/home/raj/work/svn/base/head/sys/dev/aic7xxx/aicasm/aicasm_scan.l:837: warning: 
function declaration isn't a prototype


Can you please try doing "make buildenv TARGET_ARCH=arm", then run
"which lex" and "which yacc"?
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r230622 - head

2012-01-30 Thread Rafal Jaworowski

On 2012-01-27, at 19:29, Dimitry Andric wrote:

> Author: dim
> Date: Fri Jan 27 18:29:03 2012
> New Revision: 230622
> URL: http://svn.freebsd.org/changeset/base/230622
> 
> Log:
>  When the buildkernel stage 2.3 (build tools) runs, the PATH is still set
>  to the default from the top-level Makefile.  Therefore, invocations of
>  lex and yacc (used during building of aicasm) will use the executables
>  in /usr/bin, not those optionally built during the previous buildworld
>  or kernel-toolchain.  This makes kernel builds from older FreeBSD
>  releases more difficult than necessary.
> 
>  Fix this by setting PATH to ${BPATH}:${PATH} in stage 2.3, so the
>  bootstrap tools directories are searched before the regular ones.

Is this supposed to work for cross building as well? I'm still encountering 
problems on a 7.3 host build:

1. Cross world builds fine
make -j 8 buildworld TARGET_ARCH=arm

2. Kernel fails w/ the aicasm
make buildkernel TARGET_ARCH=arm KERNCONF=SHEEVAPLUG
[...]
cc -O2 -pipe -nostdinc -I/usr/include -I. 
-I/home/raj/work/svn/base/head/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
/home/raj/work/svn/base/head/sys/dev/aic7xxx/aicasm/aicasm_scan.l:837: warning: 
function declaration isn't a prototype
*** Error code 1

Stop in /home/raj/work/obj/arm.arm/home/raj/work/svn/base/head/sys/SHEEVAPLUG.
*** Error code 1

Stop in /home/raj/work/svn/base/head.
*** Error code 1

Stop in /home/raj/work/svn/base/head.

Do you know any workarounds to this?

Rafal

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r230622 - head

2012-01-27 Thread Dimitry Andric
Author: dim
Date: Fri Jan 27 18:29:03 2012
New Revision: 230622
URL: http://svn.freebsd.org/changeset/base/230622

Log:
  When the buildkernel stage 2.3 (build tools) runs, the PATH is still set
  to the default from the top-level Makefile.  Therefore, invocations of
  lex and yacc (used during building of aicasm) will use the executables
  in /usr/bin, not those optionally built during the previous buildworld
  or kernel-toolchain.  This makes kernel builds from older FreeBSD
  releases more difficult than necessary.
  
  Fix this by setting PATH to ${BPATH}:${PATH} in stage 2.3, so the
  bootstrap tools directories are searched before the regular ones.
  
  Silence from: svn-src-{all,head}
  MFC after:1 week

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Jan 27 18:21:40 2012(r230621)
+++ head/Makefile.inc1  Fri Jan 27 18:29:03 2012(r230622)
@@ -832,6 +832,7 @@ buildkernel:
@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 @@ buildkernel:
 .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
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"