[Sound-open-firmware] [PATCH 2/2] scripts: xtensa-build-all.sh: Support BXT/APL compiler alias

Pan, Xiuli xiuli.pan at linux.intel.com
Tue Jun 19 12:12:17 CEST 2018



On 6/19/2018 14:13, Pan, Xiuli wrote:
>
>
> On 6/18/2018 22:58, Liam Girdwood wrote:
>> On Mon, 2018-06-18 at 18:53 +0800, Pan, Xiuli wrote:
>>> On 6/14/2018 23:34, Liam Girdwood wrote:
>>>> BXT/APL compiler is the same but can be have either apl or bxt suffix.
>>>>
>>>> Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
>>>> ---
>>>>    scripts/xtensa-build-all.sh | 7 ++++++-
>>>>    1 file changed, 6 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/scripts/xtensa-build-all.sh b/scripts/xtensa-build-all.sh
>>>> index d873d7e..62b94b2 100755
>>>> --- a/scripts/xtensa-build-all.sh
>>>> +++ b/scripts/xtensa-build-all.sh
>>>> @@ -96,7 +96,12 @@ do
>>>>            PLATFORM="apollolake"
>>>>            XTENSA_CORE="X4H3I16w2D48w3a_2017_8"
>>>>            ROOT="$pwd/../xtensa-root/xtensa-bxt-elf"
>>>> -        HOST="xtensa-bxt-elf"
>>>> +        if [ -x xtensa-bxt-elf-gcc ]
>>> This -x could  not work on my machine.
>>> Even if I try to -x with vim or bash that was in /usr/bin this could 
>>> not
>>> return true, I think we need find some alternative method to check 
>>> if we
>>> have these compilers.
>>>
>>>
>> Can you try this on your PC :-
>>
>>  From 98e48d5cc5f38e4362642e5aa31ccf2dc1032c35 Mon Sep 17 00:00:00 2001
>> From: Liam Girdwood <liam.r.girdwood at linux.intel.com>
>> Date: Mon, 18 Jun 2018 15:57:26 +0100
>> Subject: [PATCH] scripts: xtensa-build: fix alias detection for 
>> bxt/apl gcc
>>
>> use bash builtin type instead of -x (requires full path)
>>
>> Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
>> ---
>>   scripts/xtensa-build-all.sh | 5 ++++-
>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/scripts/xtensa-build-all.sh b/scripts/xtensa-build-all.sh
>> index 62b94b2..7b7a8fa 100755
>> --- a/scripts/xtensa-build-all.sh
>> +++ b/scripts/xtensa-build-all.sh
>> @@ -96,7 +96,10 @@ do
>>           PLATFORM="apollolake"
>>           XTENSA_CORE="X4H3I16w2D48w3a_2017_8"
>>           ROOT="$pwd/../xtensa-root/xtensa-bxt-elf"
>> -        if [ -x xtensa-bxt-elf-gcc ]
>> +
>> +        # test APL compiler aliases
>> +        type xtensa-bxt-elf-gcc
> Type command works fine for me. This patch is good for me.
It can work fine if we have xtensa-bxt-elf. But if there is no 
xtensa-bxt-elf thus the `type` failed. The whole scripts will stop due 
the error.
We may need some other method for this.

Thanks
Xiuli
>
> Thanks
> Xiuli
>> +        if [ $? == 0 ]
>>           then
>>               HOST="xtensa-bxt-elf"
>>           else
>
> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware



More information about the Sound-open-firmware mailing list