From eeb1947c740cdedc42403c530f8f3eab01e56480 Mon Sep 17 00:00:00 2001 From: chentt_tt Date: Mon, 22 Mar 2021 14:25:16 +0800 Subject: [PATCH] fixed 3 arch classification issues and add tzdata ARM32-bit support --- .../gcc/spec/0001-gcc-add-arm32-support.patch | 28 +++++++----- ...upport-for-arm32-compilation-on-mock.patch | 23 ++++++---- .../spec/0001-glibc-add-arm32-support.patch | 44 ++++++++++++------- .../spec/0001-tzdata-add-arm32-support.patch | 44 +++++++++++++++++++ 4 files changed, 105 insertions(+), 34 deletions(-) create mode 100644 patches/tzdata/spec/0001-tzdata-add-arm32-support.patch diff --git a/patches/gcc/spec/0001-gcc-add-arm32-support.patch b/patches/gcc/spec/0001-gcc-add-arm32-support.patch index c46ce99..9cc1183 100644 --- a/patches/gcc/spec/0001-gcc-add-arm32-support.patch +++ b/patches/gcc/spec/0001-gcc-add-arm32-support.patch @@ -1,14 +1,14 @@ -From b437d3a951c0c454c3e7a0eb7d1358f81fa220cd Mon Sep 17 00:00:00 2001 +From cf336cff38c7c84bd10e59283613c11f71e08dde Mon Sep 17 00:00:00 2001 From: root -Date: Mon, 22 Feb 2021 18:35:26 +0800 +Date: Mon, 8 Mar 2021 16:23:42 +0800 Subject: [PATCH] gcc add arm32 support --- - gcc.spec | 19 ++++++++++++++++--- - 1 file changed, 16 insertions(+), 3 deletions(-) + gcc.spec | 24 ++++++++++++++++++++++-- + 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/gcc.spec b/gcc.spec -index f8796b4..4aee623 100644 +index f8796b4..f6348d4 100644 --- a/gcc.spec +++ b/gcc.spec @@ -12,11 +12,14 @@ @@ -43,20 +43,23 @@ index f8796b4..4aee623 100644 Name: gcc Version: 7.3.0 -Release: %{gcc_release}.h30 -+Release: %{gcc_release}.h31 ++Release: %{gcc_release}.h32 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD Group: Development/Languages #Source0: hcc-aarch64-linux-release.tar.bz2 -@@ -705,7 +712,7 @@ enablelada=,ada +@@ -705,7 +712,11 @@ enablelada=,ada %if %{build_go} enablelgo=,go %endif --OPT_FLAGS="$OPT_FLAGS -fPIE -Wl,-z,relro,-z,now" ++%ifarch armv7hl +OPT_FLAGS="$OPT_FLAGS -fPIE -Wl,-z,relro,-z,now -mfloat-abi=hard" ++%else + OPT_FLAGS="$OPT_FLAGS -fPIE -Wl,-z,relro,-z,now" ++%endif OPT_LDFLAGS="$OPT_LDFLAGS -Wl,-z,relro,-z,now" export extra_ldflags_libobjc="-Wl,-z,relro,-z,now" export FCFLAGS="$OPT_FLAGS" -@@ -725,6 +732,9 @@ CC="$CC" CFLAGS="$OPT_FLAGS" \ +@@ -725,6 +736,9 @@ CC="$CC" CFLAGS="$OPT_FLAGS" \ --enable-gnu-indirect-function --build=%{gcc_target_platform} \ --with-stage1-ldflags="$OPT_LDFLAGS" \ --with-boot-ldflags="$OPT_LDFLAGS" \ @@ -66,10 +69,13 @@ index f8796b4..4aee623 100644 %ifarch x86_64 --with-tune=generic \ --with-arch_32=x86-64 \ -@@ -3142,6 +3152,9 @@ fi +@@ -3142,6 +3156,12 @@ fi %changelog ++* Mon Mar 8 2021 chentt_tt - 7.3.0-20190804.h32 ++- gcc flag mfloat-abi needs to distinguish between x86 and arm ++ +* Mon Feb 22 2021 chentt_tt - 7.3.0-20190804.h31 +- add arm32 compilation support + @@ -77,5 +83,5 @@ index f8796b4..4aee623 100644 - Type:NA - ID:NA -- -2.20.1 +2.27.0 diff --git a/patches/gcc_secure/spec/0001-support-for-arm32-compilation-on-mock.patch b/patches/gcc_secure/spec/0001-support-for-arm32-compilation-on-mock.patch index 2ebaa55..08c106f 100644 --- a/patches/gcc_secure/spec/0001-support-for-arm32-compilation-on-mock.patch +++ b/patches/gcc_secure/spec/0001-support-for-arm32-compilation-on-mock.patch @@ -1,17 +1,17 @@ -From 9438fcc55c18c3388b7fc7911bb580aac0174112 Mon Sep 17 00:00:00 2001 +From 906add35c4e4391095c6a9ea341f206ef9ae2fc7 Mon Sep 17 00:00:00 2001 From: root -Date: Tue, 17 Nov 2020 21:40:00 -0500 -Subject: [PATCH] support for arm32 compilation on mock +Date: Mon, 22 Mar 2021 10:55:05 +0800 +Subject: [PATCH] support-for-arm32-compilation-on-mock --- - gcc_secure.spec | 23 ++++++++++++++++------- - 1 file changed, 16 insertions(+), 7 deletions(-) + gcc_secure.spec | 25 +++++++++++++++++-------- + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/gcc_secure.spec b/gcc_secure.spec -index a623aa4..4dc69da 100644 +index a623aa4..cf524dd 100644 --- a/gcc_secure.spec +++ b/gcc_secure.spec -@@ -1,3 +1,9 @@ +@@ -1,9 +1,15 @@ +%if 0%{?mock_build} +%global install_dir /var/tmp +%else @@ -21,6 +21,13 @@ index a623aa4..4dc69da 100644 Name: gcc_secure Summary: Build with gcov License: GPL + Group: System/Management + Version: 1.0 +-Release: 0.6 ++Release: 0.7 + BuildRoot: %{_tmppath}/%{name}-%{version} + #Source: %{name}-%{version}.tar.bz2 + @@ -29,11 +35,11 @@ mkdir -p %{buildroot}/opt/needgcov %pre @@ -77,5 +84,5 @@ index a623aa4..4dc69da 100644 - Type:enhancement - ID:NA -- -2.20.1 +2.27.0 diff --git a/patches/glibc/spec/0001-glibc-add-arm32-support.patch b/patches/glibc/spec/0001-glibc-add-arm32-support.patch index 47a66d6..6b8a065 100644 --- a/patches/glibc/spec/0001-glibc-add-arm32-support.patch +++ b/patches/glibc/spec/0001-glibc-add-arm32-support.patch @@ -1,14 +1,14 @@ -From 10b8cca9eb1dbb394bd89846748d0954e89bdd6e Mon Sep 17 00:00:00 2001 +From b4c94f921c9266e086d1ce9e7760eda7daa4968d Mon Sep 17 00:00:00 2001 From: root -Date: Mon, 22 Feb 2021 02:33:16 -0500 +Date: Mon, 22 Mar 2021 10:27:48 +0800 Subject: [PATCH] glibc-add-arm32-support --- - glibc.spec | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) + glibc.spec | 25 ++++++++++++++++++++----- + 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/glibc.spec b/glibc.spec -index 1dc2725..372ffa6 100644 +index 1dc2725..05ada9e 100644 --- a/glibc.spec +++ b/glibc.spec @@ -59,7 +59,7 @@ @@ -20,19 +20,18 @@ index 1dc2725..372ffa6 100644 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ -@@ -110,7 +110,11 @@ BuildRequires: gcc-c++ libstdc++-static glibc-devel libidn2 +@@ -110,7 +110,10 @@ BuildRequires: gcc-c++ libstdc++-static glibc-devel libidn2 Requires: glibc-common = %{version}-%{release} Requires: glibc-langpack = %{version}-%{release} -+%ifarch armv7hl -+Requires(pre): base-files -+%else ++ ++%ifnarch %{arm} Requires(pre): basesystem +%endif %description The GNU C Library project provides the core libraries for the GNU system and -@@ -528,7 +532,7 @@ pushd build-%{target} +@@ -528,7 +531,7 @@ pushd build-%{target} -I. -DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \ -L../build-%{target} \ -B../build-%{target}/csu/ -lc -lc_nonshared \ @@ -41,7 +40,7 @@ index 1dc2725..372ffa6 100644 -Wl,-rpath-link=.:./math:./elf:./dlfcn:./nss:./rt:./resolv:./mathvec:./support:./nptl libc.so.6 libc_nonshared.a \ -Wl,--as-needed $olddir/build-%{target}/elf/ld.so install -m 700 build-locale-archive $RPM_BUILD_ROOT%{_prefix}/sbin/build-locale-archive -@@ -735,8 +739,8 @@ fi +@@ -735,8 +738,8 @@ fi %verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf %verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf %verify(not md5 size mtime) %config(noreplace) /etc/rpc @@ -52,7 +51,22 @@ index 1dc2725..372ffa6 100644 %dir /etc/ld.so.conf.d %dir %{_prefix}/libexec/getconf %{_prefix}/libexec/getconf/* -@@ -902,7 +906,7 @@ fi +@@ -765,8 +768,14 @@ fi + %dir %{_prefix}/share/i18n + %dir %{_prefix}/share/i18n/charmaps + %dir %{_prefix}/share/i18n/locales ++%ifarch %{arm} ++%exclude %attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive.tmpl ++%exclude %attr(0644,root,root) %verify(not md5 size mtime mode) %ghost %config(missingok,noreplace) %{_prefix}/lib/locale/locale-archive ++%else + %attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive.tmpl + %attr(0644,root,root) %verify(not md5 size mtime mode) %ghost %config(missingok,noreplace) %{_prefix}/lib/locale/locale-archive ++%endif ++ + %{_prefix}/lib/locale/C.utf8 + %{_prefix}/lib/locale/zh_CN.utf8 + %{_prefix}/lib/locale/en_US.utf8 +@@ -902,7 +911,7 @@ fi %{_prefix}/bin/pcprofiledump %{_prefix}/bin/xtrace %{_prefix}/lib/debug/usr/bin/*.debug @@ -61,12 +75,12 @@ index 1dc2725..372ffa6 100644 %files help -@@ -918,6 +922,12 @@ fi +@@ -918,6 +927,12 @@ fi %changelog +* Mon Feb 22 2021 chentt_tt -2.28-38 -+- modify the dependent package basesystem to base-files ++- ifnoarch %{arm} dosen't depend on package basesystem + +* Thu Nov 17 2020 js_liangdong - 2.28-37 +- add arm32 compilation support @@ -75,5 +89,5 @@ index 1dc2725..372ffa6 100644 - fix build src.rpm error -- -2.20.1 +2.27.0 diff --git a/patches/tzdata/spec/0001-tzdata-add-arm32-support.patch b/patches/tzdata/spec/0001-tzdata-add-arm32-support.patch new file mode 100644 index 0000000..808d024 --- /dev/null +++ b/patches/tzdata/spec/0001-tzdata-add-arm32-support.patch @@ -0,0 +1,44 @@ +From 3f77873b444227a190ee041e598ba2a90ed854cc Mon Sep 17 00:00:00 2001 +From: root +Date: Mon, 22 Mar 2021 11:35:03 +0800 +Subject: [PATCH] tzdata-add-arm32-support + +--- + tzdata.spec | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/tzdata.spec b/tzdata.spec +index ecf7e5e..e6bcbeb 100644 +--- a/tzdata.spec ++++ b/tzdata.spec +@@ -1,6 +1,6 @@ + Name: tzdata + Version: 2019b +-Release: 10 ++Release: 11 + Summary: Timezone data + License: Public Domain + URL: https://www.iana.org/time-zones +@@ -21,7 +21,9 @@ Patch9005: remove-Israel-timezone.patch + BuildRequires: gawk glibc perl-interpreter + BuildRequires: java-devel + BuildRequires: glibc-common >= 2.5.90-7 ++%ifnarch %{arm} + BuildArchitectures: noarch ++%endif + + %description + This package contains data files with rules for various timezones around +@@ -118,6 +120,9 @@ install -p -m 644 tzdb.dat $RPM_BUILD_ROOT%{_datadir}/javazi-1.8/ + %{_datadir}/javazi-1.8 + + %changelog ++* Mon Mar 22 2021 chentt_tt - 2019b-11 ++- add arm32 support ++ + * Mon Mar 23 2020 liuchao - 2019b-10 + - Type:recommended + - ID:NA +-- +2.27.0 + -- Gitee