fix the patch for aarch64 support to be not patch of patch but real patch (sorry, simply, fix aarch64 build)

This commit is contained in:
Ondřej Vašík 2013-08-13 16:09:15 +02:00
parent bc35b8acdb
commit f4d0ef2c0b
2 changed files with 127 additions and 126 deletions

View File

@ -1,125 +1,122 @@
--- a/redhat-lsb-aarch64.patch diff --git a/redhat_lsb_trigger.c b/redhat_lsb_trigger.c
+++ a/redhat-lsb-aarch64.patch index 76db260..f76e5a5 100644
@@ -0,0 +1,122 @@ --- a/redhat_lsb_trigger.c
+diff --git a/redhat_lsb_trigger.c b/redhat_lsb_trigger.c +++ b/redhat_lsb_trigger.c
+index 76db260..f76e5a5 100644 @@ -424,6 +424,102 @@ register void *__thread_self __asm ("g7");
+--- a/redhat_lsb_trigger.c : inline_syscall_clobbers, "$20", "$21"); \
++++ b/redhat_lsb_trigger.c _sc_ret = _sc_0, _sc_err = _sc_19; \
+@@ -424,6 +424,102 @@ register void *__thread_self __asm ("g7"); }
+ : inline_syscall_clobbers, "$20", "$21"); \ +#elif defined __aarch64__
+ _sc_ret = _sc_0, _sc_err = _sc_19; \ +#undef SYS_ify
+ } +#define SYS_ify(syscall_name) (__NR_##syscall_name)
++#elif defined __aarch64__ +
++#undef SYS_ify +# undef INLINE_SYSCALL
++#define SYS_ify(syscall_name) (__NR_##syscall_name) +# define INLINE_SYSCALL(name, nr, args...) \
++ + ({ unsigned long _sys_result = INTERNAL_SYSCALL (name, , nr, args); \
++# undef INLINE_SYSCALL + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0))\
++# define INLINE_SYSCALL(name, nr, args...) \ + { \
++ ({ unsigned long _sys_result = INTERNAL_SYSCALL (name, , nr, args); \ + __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \
++ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0))\ + _sys_result = (unsigned long) -1; \
++ { \ + } \
++ __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \ + (long) _sys_result; })
++ _sys_result = (unsigned long) -1; \ +
++ } \ +# undef INTERNAL_SYSCALL_DECL
++ (long) _sys_result; }) +# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
++ +
++# undef INTERNAL_SYSCALL_DECL +# undef INTERNAL_SYSCALL_RAW
++# define INTERNAL_SYSCALL_DECL(err) do { } while (0) +# define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
++ + ({ unsigned long _sys_result; \
++# undef INTERNAL_SYSCALL_RAW + { \
++# define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ + LOAD_ARGS_##nr (args) \
++ ({ unsigned long _sys_result; \ + register long _x8 asm ("x8") = (name); \
++ { \ + asm volatile ("svc 0 // syscall " # name \
++ LOAD_ARGS_##nr (args) \ + : "+r" (_x0), "+r" (_x8) \
++ register long _x8 asm ("x8") = (name); \ + : ASM_ARGS_##nr \
++ asm volatile ("svc 0 // syscall " # name \ + : "memory", CLOBBER_ARGS_##nr); \
++ : "+r" (_x0), "+r" (_x8) \ + _sys_result = _x0; \
++ : ASM_ARGS_##nr \ + } \
++ : "memory", CLOBBER_ARGS_##nr); \ + (long) _sys_result; })
++ _sys_result = _x0; \ +
++ } \ +# undef INTERNAL_SYSCALL
++ (long) _sys_result; }) +# define INTERNAL_SYSCALL(name, err, nr, args...) \
++ + INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
++# undef INTERNAL_SYSCALL +
++# define INTERNAL_SYSCALL(name, err, nr, args...) \ +# undef INTERNAL_SYSCALL_ERROR_P
++ INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args) +# define INTERNAL_SYSCALL_ERROR_P(val, err) \
++ + ((unsigned long) (val) >= (unsigned long) -4095)
++# undef INTERNAL_SYSCALL_ERROR_P +
++# define INTERNAL_SYSCALL_ERROR_P(val, err) \ +# undef INTERNAL_SYSCALL_ERRNO
++ ((unsigned long) (val) >= (unsigned long) -4095) +# define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
++ +
++# undef INTERNAL_SYSCALL_ERRNO +# define CLOBBER_ARGS_0 CLOBBER_ARGS_1
++# define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) +# define CLOBBER_ARGS_1 "x1", CLOBBER_ARGS_2
++ +# define CLOBBER_ARGS_2 "x2", CLOBBER_ARGS_3
++# define CLOBBER_ARGS_0 CLOBBER_ARGS_1 +# define CLOBBER_ARGS_3 "x3", CLOBBER_ARGS_4
++# define CLOBBER_ARGS_1 "x1", CLOBBER_ARGS_2 +# define CLOBBER_ARGS_4 "x4", CLOBBER_ARGS_5
++# define CLOBBER_ARGS_2 "x2", CLOBBER_ARGS_3 +# define CLOBBER_ARGS_5 "x5", CLOBBER_ARGS_6
++# define CLOBBER_ARGS_3 "x3", CLOBBER_ARGS_4 +# define CLOBBER_ARGS_6 "x6", CLOBBER_ARGS_7
++# define CLOBBER_ARGS_4 "x4", CLOBBER_ARGS_5 +# define CLOBBER_ARGS_7 \
++# define CLOBBER_ARGS_5 "x5", CLOBBER_ARGS_6 + "x7", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18"
++# define CLOBBER_ARGS_6 "x6", CLOBBER_ARGS_7 +
++# define CLOBBER_ARGS_7 \ +# define LOAD_ARGS_0() \
++ "x7", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18" + register long _x0 asm ("x0");
++ +
++# define LOAD_ARGS_0() \ +# define ASM_ARGS_0
++ register long _x0 asm ("x0"); +# define LOAD_ARGS_1(x0) \
++ + long _x0tmp = (long) (x0); \
++# define ASM_ARGS_0 + LOAD_ARGS_0 () \
++# define LOAD_ARGS_1(x0) \ + _x0 = _x0tmp;
++ long _x0tmp = (long) (x0); \ +# define ASM_ARGS_1 "r" (_x0)
++ LOAD_ARGS_0 () \ +# define LOAD_ARGS_2(x0, x1) \
++ _x0 = _x0tmp; + long _x1tmp = (long) (x1); \
++# define ASM_ARGS_1 "r" (_x0) + LOAD_ARGS_1 (x0) \
++# define LOAD_ARGS_2(x0, x1) \ + register long _x1 asm ("x1") = _x1tmp;
++ long _x1tmp = (long) (x1); \ +# define ASM_ARGS_2 ASM_ARGS_1, "r" (_x1)
++ LOAD_ARGS_1 (x0) \ +# define LOAD_ARGS_3(x0, x1, x2) \
++ register long _x1 asm ("x1") = _x1tmp; + long _x2tmp = (long) (x2); \
++# define ASM_ARGS_2 ASM_ARGS_1, "r" (_x1) + LOAD_ARGS_2 (x0, x1) \
++# define LOAD_ARGS_3(x0, x1, x2) \ + register long _x2 asm ("x2") = _x2tmp;
++ long _x2tmp = (long) (x2); \ +# define ASM_ARGS_3 ASM_ARGS_2, "r" (_x2)
++ LOAD_ARGS_2 (x0, x1) \ +# define LOAD_ARGS_4(x0, x1, x2, x3) \
++ register long _x2 asm ("x2") = _x2tmp; + long _x3tmp = (long) (x3); \
++# define ASM_ARGS_3 ASM_ARGS_2, "r" (_x2) + LOAD_ARGS_3 (x0, x1, x2) \
++# define LOAD_ARGS_4(x0, x1, x2, x3) \ + register long _x3 asm ("x3") = _x3tmp;
++ long _x3tmp = (long) (x3); \ +# define ASM_ARGS_4 ASM_ARGS_3, "r" (_x3)
++ LOAD_ARGS_3 (x0, x1, x2) \ +# define LOAD_ARGS_5(x0, x1, x2, x3, x4) \
++ register long _x3 asm ("x3") = _x3tmp; + long _x4tmp = (long) (x4); \
++# define ASM_ARGS_4 ASM_ARGS_3, "r" (_x3) + LOAD_ARGS_4 (x0, x1, x2, x3) \
++# define LOAD_ARGS_5(x0, x1, x2, x3, x4) \ + register long _x4 asm ("x4") = _x4tmp;
++ long _x4tmp = (long) (x4); \ +# define ASM_ARGS_5 ASM_ARGS_4, "r" (_x4)
++ LOAD_ARGS_4 (x0, x1, x2, x3) \ +# define LOAD_ARGS_6(x0, x1, x2, x3, x4, x5) \
++ register long _x4 asm ("x4") = _x4tmp; + long _x5tmp = (long) (x5); \
++# define ASM_ARGS_5 ASM_ARGS_4, "r" (_x4) + LOAD_ARGS_5 (x0, x1, x2, x3, x4) \
++# define LOAD_ARGS_6(x0, x1, x2, x3, x4, x5) \ + register long _x5 asm ("x5") = _x5tmp;
++ long _x5tmp = (long) (x5); \ +# define ASM_ARGS_6 ASM_ARGS_5, "r" (_x5)
++ LOAD_ARGS_5 (x0, x1, x2, x3, x4) \ +# define LOAD_ARGS_7(x0, x1, x2, x3, x4, x5, x6)\
++ register long _x5 asm ("x5") = _x5tmp; + long _x6tmp = (long) (x6); \
++# define ASM_ARGS_6 ASM_ARGS_5, "r" (_x5) + LOAD_ARGS_6 (x0, x1, x2, x3, x4, x5) \
++# define LOAD_ARGS_7(x0, x1, x2, x3, x4, x5, x6)\ + register long _x6 asm ("x6") = _x6tmp;
++ long _x6tmp = (long) (x6); \ +# define ASM_ARGS_7 ASM_ARGS_6, "r" (_x6)
++ LOAD_ARGS_6 (x0, x1, x2, x3, x4, x5) \ +
++ register long _x6 asm ("x6") = _x6tmp; +# undef INTERNAL_SYSCALL_NCS
++# define ASM_ARGS_7 ASM_ARGS_6, "r" (_x6) +# define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
++ + INTERNAL_SYSCALL_RAW (number, err, nr, args)
++# undef INTERNAL_SYSCALL_NCS +
++# define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ #endif
++ INTERNAL_SYSCALL_RAW (number, err, nr, args)
++ #ifdef __i386__
+ #endif @@ -539,10 +635,14 @@ int main (int argc, char **argv)
+ p = mempcpy (p, LSBLDSO, sizeof LSBLDSO - 1);
+ #ifdef __i386__ *p++ = '.';
+@@ -539,10 +635,14 @@ int main (int argc, char **argv) strcpy (p, LSBVER);
+ p = mempcpy (p, LSBLDSO, sizeof LSBLDSO - 1); +#if defined(__NR_symlink)
+ *p++ = '.'; if (is_ia64 ())
+ strcpy (p, LSBVER); INTERNAL_SYSCALL (symlink, err, 2, "/emul/ia32-linux/lib/" LDSO, buf);
++#if defined(__NR_symlink) else
+ if (is_ia64 ()) INTERNAL_SYSCALL (symlink, err, 2, LDSO, buf);
+ INTERNAL_SYSCALL (symlink, err, 2, "/emul/ia32-linux/lib/" LDSO, buf); +#elif defined(__NR_symlinkat)
+ else + INTERNAL_SYSCALL (symlinkat, err, 3, AT_FDCWD, LDSO, buf);
+ INTERNAL_SYSCALL (symlink, err, 2, LDSO, buf); +#endif
++#elif defined(__NR_symlinkat) p = NULL;
++ INTERNAL_SYSCALL (symlinkat, err, 3, AT_FDCWD, LDSO, buf); }
++#endif INTERNAL_SYSCALL (exit, err, 1, 0);
+ p = NULL;
+ }
+ INTERNAL_SYSCALL (exit, err, 1, 0);

View File

@ -53,7 +53,7 @@
Summary: Implementation of Linux Standard Base specification Summary: Implementation of Linux Standard Base specification
Name: redhat-lsb Name: redhat-lsb
Version: 4.1 Version: 4.1
Release: 19%{?dist} Release: 20%{?dist}
URL: http://www.linuxfoundation.org/collaborate/workgroups/lsb URL: http://www.linuxfoundation.org/collaborate/workgroups/lsb
Source0: https://fedorahosted.org/releases/r/e/redhat-lsb/%{name}-%{version}-%{srcrelease}.tar.bz2 Source0: https://fedorahosted.org/releases/r/e/redhat-lsb/%{name}-%{version}-%{srcrelease}.tar.bz2
Patch0: lsb-release-3.1-update-init-functions.patch Patch0: lsb-release-3.1-update-init-functions.patch
@ -784,6 +784,10 @@ os.remove("%{_datadir}/lsb")
%changelog %changelog
* Tue Aug 13 2013 Ondrej Vasik <ovasik@redhat.com> - 4.1-20
- fix the patch for aarch64 support to be not patch of
patch but real patch (sorry, simply, fix aarch64 build)
* Thu Aug 08 2013 Ondrej Vasik <ovasik@redhat.com> - 4.1-19 * Thu Aug 08 2013 Ondrej Vasik <ovasik@redhat.com> - 4.1-19
- Require sil-abyssinica-fonts in supplemental(#994341) - Require sil-abyssinica-fonts in supplemental(#994341)
- Fully specify requirements on subpackages(#971386) - Fully specify requirements on subpackages(#971386)