[OpenBIOS] [PATCH] switch-arch: Add non-standard compiler prefix support

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Mon May 11 22:41:25 CEST 2015


On 11/05/15 15:29, Lennart Sorensen wrote:

> On Mon, May 11, 2015 at 02:57:51PM +0200, Andreas Färber wrote:
>> Am 10.05.2015 um 23:37 schrieb Tarl Neustaedter:
>>> On 2015-May-10 17:08 , Programmingkid wrote:
>>> [...]
>>>> What advantage does the code  "if [ x"$CROSS_COMPILE" != "x" ];" have
>>>> over "if [ "$CROSS_COMPILE" ];"?
>>>
>>> I don't believe the latter form worked on the early versions of sh/test,
>>> there might still be systems where if [""]; produces a syntax error.
>>
>> Is 'if [ -z "$CROSS_COMPILE" ]' (untested) any more compatible?
> 
> Yes, but checks for empty rather than non empty.

FWIW I used the "if [ x"$CROSS_COMPILE" != "x" ];" version because
that's the existing convention used within the file to detect empty
variables and I'd like to keep everything consistent.


ATB,

Mark.




More information about the OpenBIOS mailing list