From 9429b899966bef1dd6b97801ae11f65f3554da46 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?=
 <bernhard.rosenkraenzer.ext@huawei.com>
Date: Thu, 19 May 2022 03:02:02 +0200
Subject: [PATCH] gcc: Update to 12.1.0 final, rebase patches
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com>
---
 .../gcc/{gcc-12.0.inc => gcc-12.1.inc}        | 20 +++++++++----------
 ...ian_12.0.bb => gcc-cross-canadian_12.1.bb} |  0
 .../{gcc-cross_12.0.bb => gcc-cross_12.1.bb}  |  0
 ...-crosssdk_12.0.bb => gcc-crosssdk_12.1.bb} |  0
 ...cc-runtime_12.0.bb => gcc-runtime_12.1.bb} |  0
 ...itizers_12.0.bb => gcc-sanitizers_12.1.bb} |  0
 ...{gcc-source_12.0.bb => gcc-source_12.1.bb} |  0
 ...as-for-__cpu_indicator_init-instead-.patch | 10 +++++-----
 .../gcc/{gcc_12.0.bb => gcc_12.1.bb}          |  0
 ...initial_12.0.bb => libgcc-initial_12.1.bb} |  0
 .../gcc/{libgcc_12.0.bb => libgcc_12.1.bb}    |  0
 ...ibgfortran_12.0.bb => libgfortran_12.1.bb} |  0
 12 files changed, 15 insertions(+), 15 deletions(-)
 rename meta-oniro-staging/recipes-devtools/gcc/{gcc-12.0.inc => gcc-12.1.inc} (86%)
 rename meta-oniro-staging/recipes-devtools/gcc/{gcc-cross-canadian_12.0.bb => gcc-cross-canadian_12.1.bb} (100%)
 rename meta-oniro-staging/recipes-devtools/gcc/{gcc-cross_12.0.bb => gcc-cross_12.1.bb} (100%)
 rename meta-oniro-staging/recipes-devtools/gcc/{gcc-crosssdk_12.0.bb => gcc-crosssdk_12.1.bb} (100%)
 rename meta-oniro-staging/recipes-devtools/gcc/{gcc-runtime_12.0.bb => gcc-runtime_12.1.bb} (100%)
 rename meta-oniro-staging/recipes-devtools/gcc/{gcc-sanitizers_12.0.bb => gcc-sanitizers_12.1.bb} (100%)
 rename meta-oniro-staging/recipes-devtools/gcc/{gcc-source_12.0.bb => gcc-source_12.1.bb} (100%)
 rename meta-oniro-staging/recipes-devtools/gcc/{gcc_12.0.bb => gcc_12.1.bb} (100%)
 rename meta-oniro-staging/recipes-devtools/gcc/{libgcc-initial_12.0.bb => libgcc-initial_12.1.bb} (100%)
 rename meta-oniro-staging/recipes-devtools/gcc/{libgcc_12.0.bb => libgcc_12.1.bb} (100%)
 rename meta-oniro-staging/recipes-devtools/gcc/{libgfortran_12.0.bb => libgfortran_12.1.bb} (100%)

diff --git a/meta-oniro-staging/recipes-devtools/gcc/gcc-12.0.inc b/meta-oniro-staging/recipes-devtools/gcc/gcc-12.1.inc
similarity index 86%
rename from meta-oniro-staging/recipes-devtools/gcc/gcc-12.0.inc
rename to meta-oniro-staging/recipes-devtools/gcc/gcc-12.1.inc
index 3b7adf5c..baf95628 100644
--- a/meta-oniro-staging/recipes-devtools/gcc/gcc-12.0.inc
+++ b/meta-oniro-staging/recipes-devtools/gcc/gcc-12.1.inc
@@ -2,14 +2,14 @@ require gcc-common.inc
 
 # Third digit in PV should be incremented after a minor release
 
-PV = "12.0.1"
+PV = "12.1.0"
 
 # BINV should be incremented to a revision after a minor gcc release
 
-BINV = "12.0.1"
+BINV = "12.1.0"
 
 MAJOR = "12"
-SNAPSHOT = "20220313"
+# SNAPSHOT = "20220313"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
 
@@ -26,11 +26,11 @@ LIC_FILES_CHKSUM = "\
     file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
 "
 
-#RELEASE ?= "5b2ac9b40c325e9209c0bd55955db84aad4a0cc5"
-#BASEURI ?= "https://github.com/gcc-mirror/gcc/archive/${RELEASE}.zip;downloadfilename=gcc-${PV}-${RELEASE}.zip"
+RELEASE ?= "1ea978e3066ac565a1ec28a96a4d61eaf38e2726"
+BASEURI ?= "https://github.com/gcc-mirror/gcc/archive/${RELEASE}.tar.gz;downloadfilename=gcc-${PV}-${RELEASE}.tar.gz"
 
-BASEURI ?= "https://mirror.koddos.net/gcc/snapshots/${MAJOR}-${SNAPSHOT}/gcc-${MAJOR}-${SNAPSHOT}.tar.xz \
-           "
+# For snapshots
+#BASEURI ?= "https://mirror.koddos.net/gcc/snapshots/${MAJOR}-${SNAPSHOT}/gcc-${MAJOR}-${SNAPSHOT}.tar.xz"
 SRC_URI = "\
            ${BASEURI} \
            file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
@@ -57,12 +57,12 @@ SRC_URI = "\
            file://0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch \
            file://0001-Fix-install-path-of-linux64.h.patch \
 "
-SRC_URI[sha256sum] = "979d8cbe9b2ed2ab4434f52097754e004a207cf6541aea3e167c5d0f74957633"
+SRC_URI[sha256sum] = "37f4815d27485cd84bfd725598a5afe53714ce4ecdfdef4bc266c086ae165367"
 
-S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${MAJOR}-${SNAPSHOT}"
+S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${RELEASE}"
 
 # For dev release snapshotting
-#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${RELEASE}"
+#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${MAJOR}-${SNAPSHOT}"
 #B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
 
 # Language Overrides
diff --git a/meta-oniro-staging/recipes-devtools/gcc/gcc-cross-canadian_12.0.bb b/meta-oniro-staging/recipes-devtools/gcc/gcc-cross-canadian_12.1.bb
similarity index 100%
rename from meta-oniro-staging/recipes-devtools/gcc/gcc-cross-canadian_12.0.bb
rename to meta-oniro-staging/recipes-devtools/gcc/gcc-cross-canadian_12.1.bb
diff --git a/meta-oniro-staging/recipes-devtools/gcc/gcc-cross_12.0.bb b/meta-oniro-staging/recipes-devtools/gcc/gcc-cross_12.1.bb
similarity index 100%
rename from meta-oniro-staging/recipes-devtools/gcc/gcc-cross_12.0.bb
rename to meta-oniro-staging/recipes-devtools/gcc/gcc-cross_12.1.bb
diff --git a/meta-oniro-staging/recipes-devtools/gcc/gcc-crosssdk_12.0.bb b/meta-oniro-staging/recipes-devtools/gcc/gcc-crosssdk_12.1.bb
similarity index 100%
rename from meta-oniro-staging/recipes-devtools/gcc/gcc-crosssdk_12.0.bb
rename to meta-oniro-staging/recipes-devtools/gcc/gcc-crosssdk_12.1.bb
diff --git a/meta-oniro-staging/recipes-devtools/gcc/gcc-runtime_12.0.bb b/meta-oniro-staging/recipes-devtools/gcc/gcc-runtime_12.1.bb
similarity index 100%
rename from meta-oniro-staging/recipes-devtools/gcc/gcc-runtime_12.0.bb
rename to meta-oniro-staging/recipes-devtools/gcc/gcc-runtime_12.1.bb
diff --git a/meta-oniro-staging/recipes-devtools/gcc/gcc-sanitizers_12.0.bb b/meta-oniro-staging/recipes-devtools/gcc/gcc-sanitizers_12.1.bb
similarity index 100%
rename from meta-oniro-staging/recipes-devtools/gcc/gcc-sanitizers_12.0.bb
rename to meta-oniro-staging/recipes-devtools/gcc/gcc-sanitizers_12.1.bb
diff --git a/meta-oniro-staging/recipes-devtools/gcc/gcc-source_12.0.bb b/meta-oniro-staging/recipes-devtools/gcc/gcc-source_12.1.bb
similarity index 100%
rename from meta-oniro-staging/recipes-devtools/gcc/gcc-source_12.0.bb
rename to meta-oniro-staging/recipes-devtools/gcc/gcc-source_12.1.bb
diff --git a/meta-oniro-staging/recipes-devtools/gcc/gcc/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/meta-oniro-staging/recipes-devtools/gcc/gcc/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
index 5970c2fc..d83d6bb1 100644
--- a/meta-oniro-staging/recipes-devtools/gcc/gcc/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
+++ b/meta-oniro-staging/recipes-devtools/gcc/gcc/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
@@ -43,17 +43,17 @@ diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
 index ac69eed4d32..ffaa44a16fc 100644
 --- a/gcc/config/i386/i386-expand.cc
 +++ b/gcc/config/i386/i386-expand.cc
-@@ -11038,10 +11038,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
+@@ -12338,10 +12338,10 @@ ix86_expand_builtin (tree exp, rtx targe
      {
      case IX86_BUILTIN_CPU_INIT:
        {
--	/* Make it call __cpu_indicator_init in libgcc. */
-+	/* Make it call __cpu_indicator_init_local in libgcc.a. */
+-	/* Make it call __cpu_indicator_init in libgcc.  */
++	/* Make it call __cpu_indicator_init_local in libgcc.a.  */
  	tree call_expr, fndecl, type;
-         type = build_function_type_list (integer_type_node, NULL_TREE); 
+ 	type = build_function_type_list (integer_type_node, NULL_TREE);
 -	fndecl = build_fn_decl ("__cpu_indicator_init", type);
 +	fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
- 	call_expr = build_call_expr (fndecl, 0); 
+ 	call_expr = build_call_expr (fndecl, 0);
  	return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
        }
 diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
diff --git a/meta-oniro-staging/recipes-devtools/gcc/gcc_12.0.bb b/meta-oniro-staging/recipes-devtools/gcc/gcc_12.1.bb
similarity index 100%
rename from meta-oniro-staging/recipes-devtools/gcc/gcc_12.0.bb
rename to meta-oniro-staging/recipes-devtools/gcc/gcc_12.1.bb
diff --git a/meta-oniro-staging/recipes-devtools/gcc/libgcc-initial_12.0.bb b/meta-oniro-staging/recipes-devtools/gcc/libgcc-initial_12.1.bb
similarity index 100%
rename from meta-oniro-staging/recipes-devtools/gcc/libgcc-initial_12.0.bb
rename to meta-oniro-staging/recipes-devtools/gcc/libgcc-initial_12.1.bb
diff --git a/meta-oniro-staging/recipes-devtools/gcc/libgcc_12.0.bb b/meta-oniro-staging/recipes-devtools/gcc/libgcc_12.1.bb
similarity index 100%
rename from meta-oniro-staging/recipes-devtools/gcc/libgcc_12.0.bb
rename to meta-oniro-staging/recipes-devtools/gcc/libgcc_12.1.bb
diff --git a/meta-oniro-staging/recipes-devtools/gcc/libgfortran_12.0.bb b/meta-oniro-staging/recipes-devtools/gcc/libgfortran_12.1.bb
similarity index 100%
rename from meta-oniro-staging/recipes-devtools/gcc/libgfortran_12.0.bb
rename to meta-oniro-staging/recipes-devtools/gcc/libgfortran_12.1.bb
-- 
GitLab