libatomic_ops: use -DAO_USE_PTHREAD_DEFS on ARMv5
This commit is contained in:
parent
849bf5f0c6
commit
73b5e99c72
49
gc-7.2alpha6-libatomic_ops_arm5.patch
Normal file
49
gc-7.2alpha6-libatomic_ops_arm5.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From 2a28e66d5603dae37031ff8105fdf6acb649b46d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Niels de Vos <devos@fedoraproject.org>
|
||||||
|
Date: Fri, 2 Mar 2012 21:06:58 +0100
|
||||||
|
Subject: [PATCH] Fallback to pthread implementation on ARMv5 and earlier
|
||||||
|
|
||||||
|
ARMv6 and newer has optimized code, earlier versions need to fall back to
|
||||||
|
the pthread implementation.
|
||||||
|
|
||||||
|
Signed-off-by: Niels de Vos <devos@fedoraproject.org>
|
||||||
|
---
|
||||||
|
src/atomic_ops.h | 18 ++++++++++++------
|
||||||
|
1 files changed, 12 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/atomic_ops.h b/src/atomic_ops.h
|
||||||
|
index 3f9000d..af09501 100644
|
||||||
|
--- a/src/atomic_ops.h
|
||||||
|
+++ b/src/atomic_ops.h
|
||||||
|
@@ -193,16 +193,22 @@
|
||||||
|
# define AO_compiler_barrier() asm("")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if defined(AO_USE_PTHREAD_DEFS)
|
||||||
|
-# include "atomic_ops/sysdeps/generic_pthread.h"
|
||||||
|
-#endif /* AO_USE_PTHREAD_DEFS */
|
||||||
|
-
|
||||||
|
#if (defined(__CC_ARM) || defined(__ARMCC__)) && !defined(__GNUC__) \
|
||||||
|
&& !defined(AO_USE_PTHREAD_DEFS)
|
||||||
|
-# include "atomic_ops/sysdeps/armcc/arm_v6.h"
|
||||||
|
-# define AO_GENERALIZE_TWICE
|
||||||
|
+# if __TARGET_ARCH_ARM >= 6
|
||||||
|
+ /* ARMv6 and newer has optimized code, earlier versions */
|
||||||
|
+ /* need to fall back to the pthread implementation. */
|
||||||
|
+# include "atomic_ops/sysdeps/armcc/arm_v6.h"
|
||||||
|
+# define AO_GENERALIZE_TWICE
|
||||||
|
+# else
|
||||||
|
+# define AO_USE_PTHREAD_DEFS
|
||||||
|
+# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if defined(AO_USE_PTHREAD_DEFS)
|
||||||
|
+# include "atomic_ops/sysdeps/generic_pthread.h"
|
||||||
|
+#endif /* AO_USE_PTHREAD_DEFS */
|
||||||
|
+
|
||||||
|
#if defined(__GNUC__) && !defined(AO_USE_PTHREAD_DEFS) \
|
||||||
|
&& !defined(__INTEL_COMPILER)
|
||||||
|
# if defined(__i386__)
|
||||||
|
--
|
||||||
|
1.7.3.4
|
||||||
|
|
14
gc.spec
14
gc.spec
@ -4,7 +4,7 @@
|
|||||||
Summary: A garbage collector for C and C++
|
Summary: A garbage collector for C and C++
|
||||||
Name: gc
|
Name: gc
|
||||||
Version: 7.2
|
Version: 7.2
|
||||||
Release: 0.6.%{pre}%{?dist}
|
Release: 0.7.%{pre}%{?dist}
|
||||||
|
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -13,9 +13,11 @@ Source0: http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-%{version}%{?
|
|||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
## upstreamable patches
|
## upstreamable patches
|
||||||
Patch50: gc-7.1-dup_cpp_headers.patch
|
# use AO_USE_PTHREAD_DEFS on ARMv5
|
||||||
|
Patch51: gc-7.2alpha6-libatomic_ops_arm5.patch
|
||||||
|
|
||||||
## upstream patches
|
## upstream patches
|
||||||
|
Patch100: gc-7.1-dup_cpp_headers.patch
|
||||||
|
|
||||||
BuildRequires: automake libtool
|
BuildRequires: automake libtool
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
@ -52,7 +54,10 @@ that involves minimum overhead across a variety of architectures.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n gc-%{version}%{?pre}
|
%setup -q -n gc-%{version}%{?pre}
|
||||||
|
|
||||||
%patch50 -p1 -b .dup_cpp_headers
|
pushd libatomic_ops
|
||||||
|
%patch51 -p1 -b .libatomic_ops_arm5
|
||||||
|
popd
|
||||||
|
%patch100 -p1 -b .dup_cpp_headers
|
||||||
# refresh auto*/libtool to purge rpaths
|
# refresh auto*/libtool to purge rpaths
|
||||||
rm -f libtool libtool.m4
|
rm -f libtool libtool.m4
|
||||||
autoreconf -i -f
|
autoreconf -i -f
|
||||||
@ -140,6 +145,9 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 02 2012 Rex Dieter <rdieter@fedoraproject.org> 7.2-0.7.alpha6
|
||||||
|
- libatomic_ops: use -DAO_USE_PTHREAD_DEFS on ARMv5
|
||||||
|
|
||||||
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.2-0.6.alpha6
|
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.2-0.6.alpha6
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user