Re: [PATCH v2] CI: select CC based on CC_PACKAGE (again)

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

 



Carlo Arenas <carenas@xxxxxxxxx> writes:

>> -       CC="${CC:-gcc}"
>> +       CC="${CC_PACKAGE:-${CC:-gcc}}"
>
> minor nitpick, but most likely still relevant considering your other
> "bashism" fixes.
> the POSIX syntax doesn't use ":" (documented in CodingGuidelines)

You are reading the guideline wrong, I am afraid.

This is not a substring substitution, ${foo:0:3} picking three
characters from the beginning of foo.

It is "If CC_PACKAGE is UNSET OR SET TO EMPTY, then use the fallback
value that is ${CC:-gcc}", which is a bog standard bourne shell that
predates POSIX.  The colon before "-" is what adds "OR SET TO EMPTY"
part; without the colon, i.e. "${CC_PACKAGE-${CC-gcc}}", then you
get the same without "OR SET TO EMPTY" part.

And we do use that form.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux