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

Liam Girdwood liam.r.girdwood at linux.intel.com
Mon Jun 18 16:58:24 CEST 2018


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
+		if [ $? == 0 ]
 		then
 			HOST="xtensa-bxt-elf"
 		else
-- 
2.17.1


More information about the Sound-open-firmware mailing list