Binary files glibc-2.12-1.25.el6.src.rpm-rpmbuild/SOURCES/glibc-ports-2.12-26-gcf64098.tar.xz and glibc-2.12-1.25.el6.0.src.rpm-rpmbuild/SOURCES/glibc-ports-2.12-26-gcf64098.tar.xz differ
diff -ruN glibc-2.12-1.25.el6.src.rpm-rpmbuild/SOURCES/tzupdate2.patch glibc-2.12-1.25.el6.0.src.rpm-rpmbuild/SOURCES/tzupdate2.patch
--- glibc-2.12-1.25.el6.src.rpm-rpmbuild/SOURCES/tzupdate2.patch	1970-01-01 01:00:00.000000000 +0100
+++ glibc-2.12-1.25.el6.0.src.rpm-rpmbuild/SOURCES/tzupdate2.patch	2011-08-12 22:53:51.000000000 +0100
@@ -0,0 +1,52 @@
+diff -up ./fedora/tzdata-update.c.orig ./fedora/tzdata-update.c
+--- ./fedora/tzdata-update.c.orig	2010-11-05 21:04:06.000000000 -0400
++++ ./fedora/tzdata-update.c	2010-11-05 21:04:22.000000000 -0400
+@@ -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];
+@@ -563,6 +592,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,
diff -ruN glibc-2.12-1.25.el6.src.rpm-rpmbuild/SPECS/glibc.spec glibc-2.12-1.25.el6.0.src.rpm-rpmbuild/SPECS/glibc.spec
--- glibc-2.12-1.25.el6.src.rpm-rpmbuild/SPECS/glibc.spec	2011-04-05 09:00:35.000000000 +0100
+++ glibc-2.12-1.25.el6.0.src.rpm-rpmbuild/SPECS/glibc.spec	2011-08-16 15:23:17.000000000 +0100
@@ -1,4 +1,5 @@
 %define glibcsrcdir glibc-2.12-2-gc4ccff1
+%define glibcportsdir  glibc-ports-2.12-26-gcf64098
 %define glibcversion 2.12
 ### glibc.spec.in follows:
 %define run_glibc_tests 1
@@ -23,7 +24,7 @@
 Summary: The GNU libc libraries
 Name: glibc
 Version: %{glibcversion}
-Release: 1.25%{?dist}
+Release: 1.25%{?dist}.0
 # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
 # Things that are linked directly into dynamically linked programs
 # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
@@ -34,6 +35,7 @@
 URL: http://sources.redhat.com/glibc/
 Source0: %{?glibc_release_url}%{glibcsrcdir}.tar.bz2
 Source1: %{glibcsrcdir}-fedora.tar.bz2
+Source2: %{glibcportsdir}.tar.xz
 Patch0: %{name}-fedora.patch
 Patch1: %{name}-ia64-lib64.patch
 Patch2: glibc-rh587360.patch
@@ -71,6 +73,8 @@
 Patch34: glibc-rh689471.patch
 Patch35: glibc-rh692177.patch
 
+Patch10002: tzupdate2.patch
+
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Obsoletes: glibc-profile < 2.4
 Provides: ldconfig
@@ -212,7 +216,7 @@
 Group: System Environment/Daemons
 Requires: libselinux >= 1.17.10-1, audit-libs >= 1.1.3
 Requires: %{name} = %{version}-%{release}
-Requires(pre): /sbin/chkconfig, /usr/sbin/useradd, /usr/sbin/userdel, sh-utils
+Requires(pre): /sbin/chkconfig, /usr/sbin/useradd, /usr/sbin/userdel, coreutils
 
 %description -n nscd
 Nscd caches name service lookups and can dramatically improve
@@ -275,7 +279,8 @@
 %endif
 
 %prep
-%setup -q -n %{glibcsrcdir} -b1
+rm -rf %{glibcportsdir}
+%setup -q -n %{glibcsrcdir} -b1 -b2
 %patch0 -E -p1
 %ifarch ia64
 %if "%{_lib}" == "lib64"
@@ -316,6 +321,9 @@
 %patch33 -p1
 %patch34 -p1
 %patch35 -p1
+%ifarch %{arm}
+%patch10002 -p1
+%endif
 
 # A lot of programs still misuse memcpy when they have to use
 # memmove. The memcpy implementation below is not tolerant at
@@ -387,7 +395,13 @@
 GXX="g++ -m64"
 %endif
 
+#no-asynchronous-unwind needed for .init/.fini check to pass
+%ifarch %{arm}
+BuildFlags="$BuildFlags -fno-asynchronous-unwind-tables"
+%else
 BuildFlags="$BuildFlags -fasynchronous-unwind-tables"
+%endif
+
 # Add -DNDEBUG unless using a prerelease
 case %{version} in
   *.*.9[0-9]*) ;;
@@ -401,6 +415,15 @@
 %ifarch %{rtkaioarches}
 AddOns=,rtkaio$AddOns
 %endif
+%ifarch %{arm}
+AddOns=,../%{glibcportsdir}$AddOns
+#sed -i 's/-lgcc_eh//' Makeconfig
+%endif
+
+%ifarch %{arm}
+# -static-libgcc does not really work, __stach_chk_guard(libc.a) can not be found
+sed -i "s|libc_cv_gcc_static_libgcc=-static-libgcc|& -W,l:$PWD/build-armv5tel-linuxnptl/libc.a|" configure
+%endif
 
 build_nptl()
 {
@@ -413,8 +436,14 @@
 	--prefix=%{_prefix} \
 	--enable-add-ons=nptl$AddOns --without-cvs $EnableKernel \
 	--with-headers=%{_prefix}/include --enable-bind-now \
-	--with-tls --with-__thread --build %{nptl_target_cpu}-redhat-linux \
+	--with-tls --with-__thread \
+%ifarch %{arm}
+	--build %{nptl_target_cpu}-redhat-linux-gnueabi \
+	--host %{nptl_target_cpu}-redhat-linux-gnueabi \
+%else
+	--build %{nptl_target_cpu}-redhat-linux \
 	--host %{nptl_target_cpu}-redhat-linux \
+%endif
 %ifarch %{multiarcharches}
 	--enable-multi-arch \
 %endif
@@ -1103,6 +1132,12 @@
 %endif
 
 %changelog
+* Fri Aug  6 2011 Gordan Bobic <gordan@bobich.net> - 2.12-1.25.0
+- Apply patches for ARM from F13
+- Apply updated tzdata patch (#708452)
+- Spec patch to fix undefined reference to __stack_chk_guard (#726495)
+- Removed -fno-stack-protector from BuildFlags as it no longer needed
+
 * Thu Mar 31 2011 Andreas Schwab <schwab@redhat.com> - 2.12-1.25
 - Implement x86 cpuid handling of leaf4 for cache information
   (#692177)
