Signed-off-by: Lennert Buytenhek <buytenh@xxxxxxxxxxx> Signed-off-by: Kedar Sovani <kedars@xxxxxxxxxxx> --- glibc.spec | 4 +++ tzdata-update.c.arm.patch | 52 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 0 deletions(-) create mode 100644 tzdata-update.c.arm.patch diff --git a/glibc.spec b/glibc.spec index 9af5047..cc1c3f3 100644 --- a/glibc.spec +++ b/glibc.spec @@ -44,6 +44,7 @@ Source3: %{glibcname}-fedora-%{glibcdate}.tar.bz2 Source4: %{glibcname}-ports-%{glibcportsdate}.tar.bz2 Patch0: %{glibcname}-fedora.patch Patch1: %{name}-ia64-lib64.patch +Patch2: tzdata-update.c.arm.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Obsoletes: glibc-profile < 2.4 Provides: ldconfig @@ -237,6 +238,9 @@ mv %{glibcname}-ports-%{glibcportsdate} ports %endif %endif +%ifarch %{arm} +%patch2 -p1 +%endif # A lot of programs still misuse memcpy when they have to use # memmove. The memcpy implementation below is not tolerant at # all. diff --git a/tzdata-update.c.arm.patch b/tzdata-update.c.arm.patch new file mode 100644 index 0000000..830de33 --- /dev/null +++ b/tzdata-update.c.arm.patch @@ -0,0 +1,52 @@ +diff -up glibc-20071017T2029/fedora/tzdata-update.c.orig glibc-20071017T2029/fedora/tzdata-update.c +--- glibc-20071017T2029/fedora/tzdata-update.c.orig 2007-11-26 16:48:44.000000000 -0500 ++++ glibc-20071017T2029/fedora/tzdata-update.c 2007-11-26 16:51:38.000000000 -0500 +@@ -391,6 +391,35 @@ register void *__thread_self __asm ("g7" + : inline_syscall_clobbers, "$20", "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ + } ++#elif defined __arm__ && defined __ARM_EABI__ ++# define INTERNAL_SYSCALL_DECL(err) do { } while (0) ++# define INTERNAL_SYSCALL(name, err, nr, args...) \ ++ ({ \ ++ register int _r0 __asm__("r0"); \ ++ register int _nr __asm__("r7"); \ ++ LOAD_ARGS_##nr(args) \ ++ _nr = __NR_##name; \ ++ asm volatile ("swi\t0\t@ syscall " #name "\n\t" \ ++ : "=r" (_r0) \ ++ : "r" (_nr) ASM_ARGS_##nr \ ++ : "memory"); \ ++ _r0; }) ++# define INTERNAL_SYSCALL_ERROR_P(val, err) \ ++ ((unsigned int) (val) >= 0xfffff001u) ++# define ASM_ARGS_0 ++# define ASM_ARGS_1 , "r" (_r0) ++# define ASM_ARGS_2 , "r" (_r0), "r" (_r1) ++# define ASM_ARGS_3 , "r" (_r0), "r" (_r1), "r" (_r2) ++# define LOAD_ARGS_0() ++# define LOAD_ARGS_1(r0) \ ++ _r0 = (int)r0; ++# define LOAD_ARGS_2(r0, r1) \ ++ _r0 = (int)r0; \ ++ register int _r1 __asm__("r1") = (int)r1; ++# define LOAD_ARGS_3(r0, r1, r2) \ ++ _r0 = (int)r0; \ ++ register int _r1 __asm__("r1") = (int)r1; \ ++ register int _r2 __asm__("r2") = (int)r2; + #endif + + char buffer[32768], data[32768]; +@@ -543,6 +572,12 @@ void __libc_csu_fini (void) { } + pid_t __fork (void) { return -1; } + char thr_buf[65536]; + ++#if defined __arm__ ++/* Prevent pulling in libc-start.o (which also defines ++ * __libc_start_main.) */ ++unsigned int __stack_chk_guard = ~0U; ++#endif ++ + #ifndef __powerpc__ + int __libc_start_main (int (*main) (int argc, char **argv), + int argc, char **argv, -- 1.5.3.3 _______________________________________________ fedora-arm mailing list fedora-arm@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-arm