From 5078f49b0c9df10642122f1cae0ffcaa5907c870 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Tue, 10 May 2022 15:53:33 +0200 Subject: [PATCH] gcc update arch to be variable Signed-off-by: Toshaan Bharvani --- SPECS/gcc.spec | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec index 0345fee..1d709ef 100644 --- a/SPECS/gcc.spec +++ b/SPECS/gcc.spec @@ -48,7 +48,7 @@ %global build_d 0 %endif %endif -%ifarch %{ix86} x86_64 ia64 ppc64le +%ifarch %{ix86} x86_64 ia64 ppc64le ppc64 %global build_libquadmath 1 %else %global build_libquadmath 0 @@ -83,7 +83,7 @@ %else %global build_libitm 0 %endif -%if 0%{?rhel} > 8 +%if 0%{?rhel} > 10 %global build_isl 0 %else %global build_isl 1 @@ -94,7 +94,7 @@ %else %global attr_ifunc 0 %endif -%ifarch x86_64 ppc64le +%ifarch x86_64 ppc64le ppc64 %global build_offload_nvptx 1 %else %global build_offload_nvptx 0 @@ -875,7 +875,7 @@ fi rm -f gcc/testsuite/go.test/test/chan/goroutines.go # This test fails randomly. -%ifarch ppc64le +%ifarch ppc64le ppc64 rm -f libstdc++-v3/testsuite/30_threads/future/members/poll.cc %endif @@ -1051,7 +1051,7 @@ CONFIGURE_OPTS="\ %endif %ifarch ppc64le %if 0%{?rhel} == 9 - --with-cpu-32=power9 --with-tune-32=power9 --with-cpu-64=power9 --with-tune-64=power9 \ + --with-cpu-32=%{cpuarch} --with-tune-32=%{cpuarch} --with-cpu-64=%{cpuarch} --with-tune-64=%{cpuarch} \ %else --with-cpu-32=power8 --with-tune-32=power8 --with-cpu-64=power8 --with-tune-64=power8 \ %endif @@ -1065,20 +1065,20 @@ CONFIGURE_OPTS="\ %endif %if 0%{?rhel} >= 7 %ifarch %{ix86} - --with-arch=x86-64 \ + --with-arch=%{cpuarch} \ %endif %ifarch x86_64 %if 0%{?rhel} > 8 - --with-arch_64=x86-64-v2 \ + --with-arch_64=%{cpuarch} \ %endif - --with-arch_32=x86-64 \ + --with-arch_32=%{cpuarch} \ %endif %else %ifarch %{ix86} - --with-arch=i686 \ + --with-arch=%{cpuarch} \ %endif %ifarch x86_64 - --with-arch_32=i686 \ + --with-arch_32=%{cpuarch} \ %endif %endif %ifarch s390 s390x