[coreutils] fix factor on AArch64 (M.Salter, #917735)
Ondrej Vasik
ovasik at fedoraproject.org
Mon Mar 4 17:23:38 UTC 2013
commit 76ade64f4b56d18ae40b598d531f45e7f4194137
Author: Ondřej Vašík <ovasik at redhat.com>
Date: Mon Mar 4 18:23:34 2013 +0100
fix factor on AArch64 (M.Salter, #917735)
coreutils-aarch64-longlong.patch | 35 +++++++++++++++++++++++++++++++++++
coreutils.spec | 12 ++++++------
2 files changed, 41 insertions(+), 6 deletions(-)
---
diff --git a/coreutils-aarch64-longlong.patch b/coreutils-aarch64-longlong.patch
new file mode 100644
index 0000000..323759b
--- /dev/null
+++ b/coreutils-aarch64-longlong.patch
@@ -0,0 +1,35 @@
+diff --git a/src/longlong.h b/src/longlong.h
+index e880587..023f47e 100644
+--- a/src/longlong.h
++++ b/src/longlong.h
+@@ -530,23 +530,16 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype);
+ #endif /* __arm__ */
+
+ #if defined (__aarch64__) && W_TYPE_SIZE == 64
++/* FIXME: Extend the immediate range for the low word by using both
++ ADDS and SUBS, since they set carry in the same way. */
+ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+- __asm__ ("adds\t%1, %4, %5\n\tadc\t%0, %2, %3" \
++ __asm__ ("adds\t%1, %x4, %5\n\tadc\t%0, %x2, %x3" \
+ : "=r" (sh), "=&r" (sl) \
+- : "r" (ah), "rZ" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
++ : "rZ" (ah), "rZ" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
+ #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+- do { \
+- if (__builtin_constant_p (bl)) \
+- { \
+- __asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3" \
+- : "=r" (sh), "=&r" (sl) \
+- : "r" (ah), "r" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \
+- } \
+- else /* only bh might be a constant */ \
+- __asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3" \
+- : "=r" (sh), "=&r" (sl) \
+- : "r" (ah), "rZ" (bh), "r" (al), "rI" (bl) __CLOBBER_CC);\
+- } while (0)
++ __asm__ ("subs\t%1, %x4, %5\n\tsbc\t%0, %x2, %x3" \
++ : "=r,r" (sh), "=&r,&r" (sl) \
++ : "rZ,rZ" (ah), "rZ,rZ" (bh), "r,Z" (al), "rI,r" (bl) __CLOBBER_CC)
+ #define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ UDItype __m0 = (m0), __m1 = (m1); \
diff --git a/coreutils.spec b/coreutils.spec
index 46b0463..4dd7094 100644
--- a/coreutils.spec
+++ b/coreutils.spec
@@ -1,11 +1,10 @@
Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils
Version: 8.21
-Release: 7%{?dist}
+Release: 8%{?dist}
License: GPLv3+
Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
Source101: coreutils-DIR_COLORS
Source102: coreutils-DIR_COLORS.lightbgcolor
@@ -15,6 +14,7 @@ Source106: coreutils-colorls.csh
# From upstream
Patch1: coreutils-8.21-install-strip.patch
+Patch2: coreutils-aarch64-longlong.patch
# Our patches
#general patch to workaround koji build system issues
@@ -128,6 +128,7 @@ the old GNU fileutils, sh-utils, and textutils packages.
# From upstream
%patch1 -p1 -b .strip
+%patch2 -p1 -b .aarch64
# Our patches
%patch100 -p1 -b .configure
@@ -186,7 +187,6 @@ sed -i -e 's,/etc/utmp,/var/run/utmp,g;s,/etc/wtmp,/var/run/wtmp,g' doc/coreutil
make check
%install
-rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
# man pages are not installed with make install
@@ -237,9 +237,6 @@ find %{buildroot}%{_datadir}/locale -type l | \
# (sb) Deal with Installed (but unpackaged) file(s) found
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%pre
# We must deinstall these info files since they're merged in
# coreutils.info. else their postun'll be run too late
@@ -378,6 +375,9 @@ fi
%{_sbindir}/chroot
%changelog
+* Mon Mar 04 2013 Ondrej Vasik <ovasik at redhat.com> 8.21-8
+- fix factor on AArch64 (M.Salter, #917735)
+
* Fri Mar 01 2013 Ondrej Vasik <ovasik at redhat.com> 8.21-7
- ls: colorize several new archive/compressed types (#868510)
More information about the scm-commits
mailing list