Re: [PATCH] lib/raid6: Let $(UNROLL) rules work with BSD userland.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 16, 2020 at 2:46 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
>
> Does it depend on the awk version?
>
> I tried this in FreeBSD 12.
>
> masahiro@:~ $ cat test.awk
> BEGIN {  print N }
> masahiro@:~ $ awk --version
> awk version 20121220 (FreeBSD)
> masahiro@:~ $ awk -ftest.awk -vN=1
> 1
>
> It worked for me.
>

Yes, it appears to be version dependent. Apologies for the confusion
-- I didn't realize there were multiple dialects of BSD awk.

On FreeBSD and OpenBSD awk works with the existing command. On NetBSD
and macOS awk fails with the following error:

$ touch unroll.awk input.c
$ awk -f./unroll.awk -vN=0 < input.c
awk: can't open file -vN=0
 source line number 1 source file -vN=0
 context is
>>>  <<<
$

My patch lets the $(UNROLL) command support the NetBSD/macOS variant
-- this is needed to support building the Linux kernel on a macOS host
machine.



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux