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

Re: [Minios-devel] [UNIKRAFT PATCHv4 01/43] build: Adjust sed script to avoid treating arm64 as arm



Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 06.07.2018 11:03, Wei Chen wrote:
We are using the sed scripts to parse target architecture from
compiler's output. But for arm64, the HOSTARCH and UK_ARCH would
be formatted to arm by mistake. That is because of the order of
sed's scripts:
-e 's/arm64.*/arm64/' -e 's/aarch64.*/arm64/' \
-e 's/arm.*/arm/'
The first line's output "arm64" will be formatted to "arm" by the
second line. So we have to give some reserve characters in second
line to prevent transfer "arm64" to "arm"

Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx>
---
  Makefile | 7 +++----
  1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index c205506..adeaac9 100644
--- a/Makefile
+++ b/Makefile
@@ -289,13 +289,12 @@ export HOSTARCH := $(shell LC_ALL=C $(HOSTCC_NOCCACHE) -v 
2>&1 | \
                       -e 's/i.86/x86/' \
                       -e 's/sun4u/sparc64/' \
                       -e 's/arm64.*/arm64/' -e 's/aarch64.*/arm64/' \
-                      -e 's/arm.*/arm/' \
+                      -e '/arm64/! s/arm.*/arm/' \
                       -e 's/sa110/arm/' \
                       -e 's/ppc64/powerpc64/' \
                       -e 's/ppc/powerpc/' \
                       -e 's/macppc/powerpc/' \
                       -e 's/sh.*/sh/' )
-
  export HOSTAR HOSTAS HOSTCC HOSTCC_VERSION HOSTCXX HOSTLD HOSTARCH
  export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
@@ -314,7 +313,7 @@ export CONFIG_UK_ARCH ?= $(shell echo "$(call qstrip,$(ARCH))" | \
                       -e 's/i.86/x86/' \
                       -e 's/sun4u/sparc64/' \
                       -e 's/arm64.*/arm64/' -e 's/aarch64.*/arm64/' \
-                      -e 's/arm.*/arm/' \
+                      -e '/arm64/! s/arm.*/arm/' \
                       -e 's/sa110/arm/' \
                       -e 's/ppc64/powerpc64/' \
                       -e 's/ppc/powerpc/' \
@@ -328,7 +327,7 @@ export CONFIG_UK_ARCH       ?= $(shell echo "$(HOSTARCH)" | 
\
                       -e 's/i.86/x86/' \
                       -e 's/sun4u/sparc64/' \
                       -e 's/arm64.*/arm64/' -e 's/aarch64.*/arm64/' \
-                      -e 's/arm.*/arm/' \
+                      -e '/arm64/! s/arm.*/arm/' \
                       -e 's/sa110/arm/' \
                       -e 's/ppc64/powerpc64/' \
                       -e 's/ppc/powerpc/' \


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.