diff -ruN redhat-lsb-4.0-3.el6.src.rpm-rpmbuild/SOURCES/redhat-lsb-arm.patch redhat-lsb-4.0-3.el6.0.src.rpm-rpmbuild/SOURCES/redhat-lsb-arm.patch
--- redhat-lsb-4.0-3.el6.src.rpm-rpmbuild/SOURCES/redhat-lsb-arm.patch	1970-01-01 01:00:00.000000000 +0100
+++ redhat-lsb-4.0-3.el6.0.src.rpm-rpmbuild/SOURCES/redhat-lsb-arm.patch	2011-09-14 10:21:11.000000000 +0100
@@ -0,0 +1,45 @@
+--- redhat-lsb-3.2.orig/redhat_lsb_trigger.c	2008-04-16 13:50:14.000000000 -0400
++++ redhat-lsb-3.2/redhat_lsb_trigger.c	2009-02-03 04:39:06.000000000 -0500
+@@ -223,6 +223,42 @@ register void *__thread_self __asm ("g7"
+ # define ASMFMT_1 , "0" (gpr2)
+ # define ASMFMT_2 , "0" (gpr2), "d" (gpr3)
+ # define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4)
++#elif defined __arm__
++# if defined (__ARM_EABI__)
++#undef INTERNAL_SYSCALL_DECL
++#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
++#undef INTERNAL_SYSCALL_RAW
++#define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
++  ({								\
++       register int _a1 asm ("r0"), _nr asm ("r7");		\
++       LOAD_ARGS_##nr (args)					\
++       _nr = name;						\
++       asm volatile ("swi	0x0	@ syscall " #name	\
++		     : "=r" (_a1)				\
++		     : "r" (_nr) ASM_ARGS_##nr			\
++		     : "memory");				\
++       _a1; })
++
++#undef INTERNAL_SYSCALL
++#define INTERNAL_SYSCALL(name, err, nr, args...)		\
++	INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
++
++#define LOAD_ARGS_0()
++#define ASM_ARGS_0
++#define LOAD_ARGS_1(a1)				\
++  int _a1tmp = (int) (a1);			\
++  LOAD_ARGS_0 ()				\
++  _a1 = _a1tmp;
++#define ASM_ARGS_1	ASM_ARGS_0, "r" (_a1)
++#define LOAD_ARGS_2(a1, a2)			\
++  int _a2tmp = (int) (a2);			\
++  LOAD_ARGS_1 (a1)				\
++  register int _a2 asm ("a2") = _a2tmp;
++#define ASM_ARGS_2	ASM_ARGS_1, "r" (_a2)
++#undef SYS_ify
++#define SWI_BASE  (0x900000)
++#define SYS_ify(syscall_name)	(__NR_##syscall_name)
++#endif
+ #elif defined __sparc__
+ # ifndef __arch64__
+ #  define __INTERNAL_SYSCALL_STRING					\
diff -ruN redhat-lsb-4.0-3.el6.src.rpm-rpmbuild/SOURCES/redhat-lsb-trigger.patch redhat-lsb-4.0-3.el6.0.src.rpm-rpmbuild/SOURCES/redhat-lsb-trigger.patch
--- redhat-lsb-4.0-3.el6.src.rpm-rpmbuild/SOURCES/redhat-lsb-trigger.patch	2010-01-15 04:32:38.000000000 +0000
+++ redhat-lsb-4.0-3.el6.0.src.rpm-rpmbuild/SOURCES/redhat-lsb-trigger.patch	2011-09-14 11:51:18.000000000 +0100
@@ -1,6 +1,6 @@
---- redhat_lsb_trigger.c.jj	2008-04-16 19:50:14.000000000 +0200
-+++ redhat_lsb_trigger.c	2009-10-26 19:51:12.886058784 +0100
-@@ -423,10 +423,76 @@ is_ia64 (void)
+--- redhat_lsb_trigger.c.triggerfix	2008-04-16 18:50:14.000000000 +0100
++++ redhat_lsb_trigger.c	2011-09-14 11:50:42.563080000 +0100
+@@ -423,10 +423,76 @@
  #define is_ia64() 0
  #endif
  
@@ -79,10 +79,18 @@
    INTERNAL_SYSCALL_DECL (err);
    char lsbsover[] = LSBSOVER;
    char *LSBVER, *p = lsbsover;
-@@ -455,11 +521,18 @@ void __libc_csu_fini (void) { }
+@@ -450,15 +516,38 @@
+ int __libc_multiple_threads __attribute__((nocommon));
+ int __libc_enable_asynccancel (void) { return 0; }
+ void __libc_disable_asynccancel (int x) { }
++#ifndef __arm__
+ void __libc_csu_init (void) { }
+ void __libc_csu_fini (void) { }
++#endif
  pid_t __fork (void) { return -1; }
  char thr_buf[65536];
  
+-#ifndef __powerpc__
 +void
 +__attribute__ ((noreturn))
 +__stack_chk_fail (void)
@@ -92,16 +100,28 @@
 +    INTERNAL_SYSCALL (exit, err, 1, 1);
 +}
 +
- #ifndef __powerpc__
++#if defined __powerpc__
++
++struct startup_info
++{
++  void *sda_base;
++  int (*main) (int, char **, char **, void *);
++  int (*init) (int, char **, char **, void *);
++  void (*fini) (void);
++};
++
++int __libc_start_main (int argc, char **argv, char **ev,
++		       void *auxvec, void (*rtld_fini) (void),
++		       struct startup_info *stinfo,
++		       char **stack_on_entry)
++#elif defined __arm__
  
 -/* /usr/lib/gcc/ppc64-redhat-linux/4.1.2/../../../../lib64/libc.a(libc-start.o): In function `__libc_start_main':
 - *  * (.opd+0x10): multiple definition of `__libc_start_main'  */
--int ___libc_start_main (int (*main) (int argc, char **argv),
-+int __libc_start_main (int (*main) (int argc, char **argv),
+ int ___libc_start_main (int (*main) (int argc, char **argv),
                         int argc, char **argv,
  		       void (*init) (void), void (*fini) (void),
- 		       void (*rtld_fini) (void), void * stack_end)
-@@ -472,9 +545,7 @@ struct startup_info
+@@ -472,9 +561,7 @@
    void (*fini) (void);
  };
  
diff -ruN redhat-lsb-4.0-3.el6.src.rpm-rpmbuild/SPECS/redhat-lsb.spec redhat-lsb-4.0-3.el6.0.src.rpm-rpmbuild/SPECS/redhat-lsb.spec
--- redhat-lsb-4.0-3.el6.src.rpm-rpmbuild/SPECS/redhat-lsb.spec	2011-01-17 00:06:36.000000000 +0000
+++ redhat-lsb-4.0-3.el6.0.src.rpm-rpmbuild/SPECS/redhat-lsb.spec	2011-09-14 12:08:20.000000000 +0100
@@ -4,7 +4,7 @@
 # Define this to link to which library version  eg. /lib64/ld-lsb-x86-64.so.3
 %define lsbsover 3 
 
-%ifarch %{ix86}
+%ifarch %{ix86} %{arm}
 %define ldso ld-linux.so.2
 %define lsbldso ld-lsb.so
 %endif
@@ -52,13 +52,14 @@
 Summary: LSB base libraries support for Red Hat Enterprise Linux
 Name: redhat-lsb
 Version: 4.0
-Release: 3%{?dist}
+Release: 3%{?dist}.0
 URL: http://www.linuxfoundation.org/collaborate/workgroups/lsb
 Source0: %{name}-%{version}-%{srcrelease}.tar.bz2
 #Source1: http://prdownloads.sourceforge.net/lsb/lsb-release-%{upstreamlsbrelver}.tar.gz
 Patch0: lsb-release-3.1-update-init-functions.patch
 Patch1: redhat-lsb-lsb_start_daemon-fix.patch
 Patch2: redhat-lsb-trigger.patch
+Patch3: redhat-lsb-arm.patch
 License: GPL
 Group: System Environment/Base
 BuildRoot: %{_tmppath}/%{name}-root
@@ -87,15 +88,18 @@
 %ifarch x86_64
 %define archname amd64
 %endif
+%ifarch %{arm}
+%define archname arm
+%endif
 Provides: lsb-core-%{archname} = %{version}
 Provides: lsb-core-noarch = %{version}
 
 # split is great in theory, but "lsb" requires it all, for now
 Requires: redhat-lsb-graphics redhat-lsb-printing
 
-ExclusiveArch: %{ix86} ia64 x86_64 ppc ppc64 s390 s390x
+ExclusiveArch: %{ix86} ia64 x86_64 ppc ppc64 s390 s390x %{arm}
 
-%ifarch %{ix86}
+%ifarch %{ix86} %{arm}
 # archLSB IA32 Base Libraries
 Requires: libc.so.6
 Requires: libcrypt.so.1
@@ -367,7 +371,7 @@
 Provides: lsb-graphics-%{archname} = %{version}
 Provides: lsb-graphics-noarch = %{version}
 
-%ifarch %{ix86}
+%ifarch %{ix86} %{arm}
 # archLSB IA32 Graphics Libraries
 Requires: libatk-1.0.so.0
 Requires: libgdk-x11-2.0.so.0
@@ -622,6 +626,7 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p0 -b .triggerfix
+%patch3 -p1 -b .arm
 
 %build
 cd lsb-release-%{upstreamlsbrelver}
@@ -749,7 +754,10 @@
 
 
 %changelog
-* Sat Nov 6 2010 Lawrence Lim <llim@redhat.com> - 4.0-3
+* Wed Sep 14 2011 Gordan Bobic <gordan@bobich.net> - 4.0-3.0
+- Fix ARM build issues
+
+* Sat Nov  6 2010 Lawrence Lim <llim@redhat.com> - 4.0-3
 - apply redhat-lsb.spec.diff-stewb <Stew Benedict - stewb@linuxfoundation.org>
 - Resolved: Bug 585947
 
