From c580bc45b40d7782754e14e11b79085acdb9be8d Mon Sep 17 00:00:00 2001
From: licihua <licihua@huawei.com>
Date: Thu, 20 Oct 2022 20:37:44 +0800
Subject: [PATCH 05/22] bugfix rpm 4.11.3 add aarch64_ilp32 arch

---
 installplatform | 7 +++++++
 rpmrc.in        | 9 +++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/installplatform b/installplatform
index 4391691..dd9effb 100755
--- a/installplatform
+++ b/installplatform
@@ -180,6 +180,13 @@ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do
 	CANONARCH=riscv64
 	CANONCOLOR=3
 	;;
+    aarch64_ilp32)
+        ISANAME=aarch
+        ISABITS=32
+        CANONARCH=aarch64
+        CANONCOLOR=0
+        LIB=libilp32
+        ;;
     loongarch64)
 	ISANAME=loongarch64
 	ISABITS=64
diff --git a/rpmrc.in b/rpmrc.in
index 2975a3a..f541b0e 100644
--- a/rpmrc.in
+++ b/rpmrc.in
@@ -101,7 +101,7 @@ optflags: sh4 -O2 -g -mieee
 optflags: sh4a -O2 -g -mieee
 
 optflags: aarch64 -O2 -g
-
+optflags: aarch64_ilp32 -O2 -g -mabi=ilp32
 optflags: riscv64 -O2 -g
 
 optflags: loongarch64 -O2 -g
@@ -154,7 +154,7 @@ archcolor: sh3 1
 archcolor: sh4 1
 
 archcolor: aarch64 2
-
+archcolor: aarch64_ilp32 1
 archcolor: riscv64 2
 
 
@@ -253,6 +253,7 @@ arch_canon:	sh4: sh4	17
 arch_canon:	sh4a: sh4a	17
 arch_canon:	xtensa: xtensa	18
 arch_canon:	aarch64: aarch64 19
+arch_canon:     aarch64_ilp32: aarch64 19
 
 arch_canon:	mipsr6: mipsr6	20
 arch_canon:	mipsr6el: mipsr6el	20
@@ -391,6 +392,7 @@ buildarchtranslate: sh4: sh4
 buildarchtranslate: sh4a: sh4
 
 buildarchtranslate: aarch64: aarch64
+buildarchtranslate: aarch64_ilp32: aarch64_ilp32
 
 buildarchtranslate: riscv: riscv64
 buildarchtranslate: riscv64: riscv64
@@ -504,6 +506,8 @@ arch_compat: sh4: noarch
 arch_compat: sh4a: sh4
 
 arch_compat: aarch64: noarch
+arch_compat: aarch64_ilp32: aarch64 noarch
+arch_compat: aarch64: aarch64_ilp32 noarch
 
 arch_compat: riscv: noarch
 arch_compat: riscv64: noarch
@@ -542,6 +546,7 @@ arch_compat: loongarch64: noarch
 buildarch_compat: ia64: noarch
 
 buildarch_compat: aarch64: noarch
+buildarch_compat: aarch64_ilp32: noarch
 
 buildarch_compat: riscv: noarch
 buildarch_compat: riscv64: noarch
-- 
2.26.2

