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

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


  • To: <minios-devel@xxxxxxxxxxxxxxxxxxxx>, <simon.kuenzer@xxxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Fri, 6 Jul 2018 09:03:14 +0000
  • Authentication-results: spf=fail (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=arm.com;
  • Cc: Kaly.Xin@xxxxxxx, nd@xxxxxxx, wei.chen@xxxxxxx
  • Delivery-date: Fri, 06 Jul 2018 09:04:19 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Nodisclaimer: True
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

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/' \
-- 
2.17.1


_______________________________________________
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®.