Re: Officially vetted programming languages

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

 



On Tue, Jul 26, 2016 at 4:15 PM, Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:
> On 07/26/16 13:46, Jim Davis wrote:
>> On Mon, Jul 25, 2016 at 6:11 AM, Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:
>>> Do I understand correctly that POSIX sh and GNU make are
>>> the only acceptable languages in kernel build
>>> (ignoring optional scripts)?
>
> python is used in several optional areas (perf, gdb, some random scripts).
>
>> Well, Documentation/Changes mandates using GNU make (version 3.80 or
>> later, though 3.80 doesn't seem to work building the 4.6.4 version of
>> the kernel).  I don't know of a similar mandate for the shell; in
>> practice (as enshrined in the  top level Makefile) it's /bin/bash,
>> which is kind of sort of POSIX-y, except when it isn't.
>
> I don't see "/bin/bash".  Where is that?

I was thinking of this snippet from the top level Makefile

# SHELL used by kbuild
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
          else if [ -x /bin/bash ]; then echo /bin/bash; \
          else echo sh; fi ; fi)

Speaking of POSIX compliance,  I thought I'd been able to use
/bin/dash for a defconfig build on my desktop,  but checking again,

make -f ./scripts/Makefile.build obj=arch/x86/entry/syscalls all
  /bin/dash './arch/x86/entry/syscalls/syscalltbl.sh'
arch/x86/entry/syscalls/syscall_32.tbl
arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h
./arch/x86/entry/syscalls/syscalltbl.sh: 48: [: I386: unexpected operator
./arch/x86/entry/syscalls/syscalltbl.sh: 53: [: I386: unexpected operator
./arch/x86/entry/syscalls/syscalltbl.sh: 58: [: I386: unexpected operator

which points to

        if [ "$abi" == "COMMON" -o "$abi" == "64" ]; then

and it seems the test operator should use "=" instead of "=="  for
POSIX compliance.
-- 
Jim
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux