diff options
author | Raúl Porcel <armin76@gentoo.org> | 2010-04-05 16:32:02 +0000 |
---|---|---|
committer | Raúl Porcel <armin76@gentoo.org> | 2010-04-05 16:32:02 +0000 |
commit | 68e595c0aff78b1666543bb29720da9496ce6883 (patch) | |
tree | 2b31f71fb54a2e08160ee134e77930c68df173cb | |
parent | Remove unrequired dev-python/ctypes rdepend. (diff) | |
download | gentoo-2-68e595c0aff78b1666543bb29720da9496ce6883.tar.gz gentoo-2-68e595c0aff78b1666543bb29720da9496ce6883.tar.bz2 gentoo-2-68e595c0aff78b1666543bb29720da9496ce6883.zip |
Add patch to make it work on sh
(Portage version: 2.1.7.17/cvs/Linux ia64)
-rw-r--r-- | dev-libs/libatomic_ops/ChangeLog | 6 | ||||
-rw-r--r-- | dev-libs/libatomic_ops/files/libatomic_ops-1.2-sh4.patch | 59 | ||||
-rw-r--r-- | dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild | 3 |
3 files changed, 66 insertions, 2 deletions
diff --git a/dev-libs/libatomic_ops/ChangeLog b/dev-libs/libatomic_ops/ChangeLog index e679d2be4df8..dc10112b2798 100644 --- a/dev-libs/libatomic_ops/ChangeLog +++ b/dev-libs/libatomic_ops/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-libs/libatomic_ops # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libatomic_ops/ChangeLog,v 1.18 2010/01/26 18:27:02 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libatomic_ops/ChangeLog,v 1.19 2010/04/05 16:32:02 armin76 Exp $ + + 05 Apr 2010; Raúl Porcel <armin76@gentoo.org> + libatomic_ops-1.2-r1.ebuild, +files/libatomic_ops-1.2-sh4.patch: + Add patch to make it work on sh 26 Jan 2010; Fabian Groffen <grobian@gentoo.org> libatomic_ops-1.2-r1.ebuild: diff --git a/dev-libs/libatomic_ops/files/libatomic_ops-1.2-sh4.patch b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-sh4.patch new file mode 100644 index 000000000000..4e8dd66a3554 --- /dev/null +++ b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-sh4.patch @@ -0,0 +1,59 @@ +--- libatomic_ops/src/atomic_ops.h ++++ libatomic_ops/src/atomic_ops.h +@@ -228,6 +228,10 @@ + # if defined(__cris__) || defined(CRIS) + # include "atomic_ops/sysdeps/gcc/cris.h" + # endif ++# if defined(__sh__) || defined(SH4) ++# include "atomic_ops/sysdeps/gcc/sh.h" ++# define AO_CAN_EMUL_CAS ++# endif /* __sh__ */ + #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */ + + #if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS) +only in patch2: +unchanged: +--- libatomic_ops/src/atomic_ops/sysdeps/Makefile.am ++++ libatomic_ops/src/atomic_ops/sysdeps/Makefile.am +@@ -29,6 +29,7 @@ + gcc/powerpc.h gcc/sparc.h \ + gcc/hppa.h gcc/m68k.h gcc/s390.h \ + gcc/ia64.h gcc/x86_64.h gcc/cris.h \ ++ gcc/sh.h \ + \ + icc/ia64.h \ + \ +--- libatomic_ops/src/atomic_ops/sysdeps/gcc/sh.h ++++ libatomic_ops/src/atomic_ops/sysdeps/gcc/sh.h +@@ -0,0 +1,31 @@ ++/* ++ * Copyright (c) 2009 by Takashi YOSHII. All rights reserved. ++ * ++ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED ++ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. ++ * ++ * Permission is hereby granted to use or copy this program ++ * for any purpose, provided the above notices are retained on all copies. ++ * Permission to modify the code and to distribute modified code is granted, ++ * provided the above notices are retained, and a notice that the code was ++ * modified is included with the above copyright notice. ++ */ ++ ++#include "../all_atomic_load_store.h" ++#include "../ordered.h" ++ ++/* sh has tas.b(byte) only */ ++#include "../test_and_set_t_is_char.h" ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_full(volatile AO_TS_t *addr) ++{ ++ int oldval; ++ __asm__ __volatile__( ++ "tas.b @%1; movt %0" ++ : "=r" (oldval) ++ : "r" (addr) ++ : "t", "memory"); ++ return oldval? AO_TS_CLEAR : AO_TS_SET; ++} ++#define AO_HAVE_test_and_set_full diff --git a/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild b/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild index f85b1b2f8d7b..f3aa47bcd8b5 100644 --- a/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild +++ b/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild,v 1.11 2010/01/26 18:27:02 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild,v 1.12 2010/04/05 16:32:02 armin76 Exp $ inherit eutils @@ -21,6 +21,7 @@ src_unpack(){ cd "${S}" epatch "${FILESDIR}"/${P}-ppc64-load_acquire.patch epatch "${FILESDIR}"/${P}-ppc-asm.patch + epatch "${FILESDIR}"/${P}-sh4.patch } src_install() { |