added patch for being careful when defining relatively generic symbols

This commit is contained in:
Dan Horák 2011-06-23 11:06:24 +02:00
parent ef8a313a6d
commit a95b47f910
2 changed files with 70 additions and 1 deletions

View File

@ -0,0 +1,63 @@
diff -up libffi-3.0.9/include/ffi.h.in.defines libffi-3.0.9/include/ffi.h.in
--- libffi-3.0.9/include/ffi.h.in.defines 2010-07-03 22:25:07.000000000 +0200
+++ libffi-3.0.9/include/ffi.h.in 2010-07-03 22:25:35.000000000 +0200
@@ -57,7 +57,9 @@ extern "C" {
#endif
/* Specify which architecture libffi is configured for. */
+#ifndef @TARGET@
#define @TARGET@
+#endif
/* ---- System configuration information --------------------------------- */
diff -up libffi-3.0.9/src/powerpc/ffitarget.h.defines libffi-3.0.9/src/powerpc/ffitarget.h
--- libffi-3.0.9/src/powerpc/ffitarget.h.defines 2010-07-03 22:26:56.000000000 +0200
+++ libffi-3.0.9/src/powerpc/ffitarget.h 2010-07-03 22:27:20.000000000 +0200
@@ -31,12 +31,18 @@
/* ---- System specific configurations ----------------------------------- */
#if defined (POWERPC) && defined (__powerpc64__) /* linux64 */
+#ifndef POWERPC64
#define POWERPC64
+#endif
#elif defined (POWERPC_DARWIN) && defined (__ppc64__) /* Darwin */
+#ifndef POWERPC64
#define POWERPC64
+#endif
#elif defined (POWERPC_AIX) && defined (__64BIT__) /* AIX64 */
+#ifndef POWERPC64
#define POWERPC64
#endif
+#endif
#ifndef LIBFFI_ASM
typedef unsigned long ffi_arg;
diff -up libffi-3.0.9/src/s390/ffitarget.h.defines libffi-3.0.9/src/s390/ffitarget.h
--- libffi-3.0.9/src/s390/ffitarget.h.defines 2010-07-03 22:27:41.000000000 +0200
+++ libffi-3.0.9/src/s390/ffitarget.h 2010-07-03 22:27:53.000000000 +0200
@@ -28,8 +28,10 @@
#define LIBFFI_TARGET_H
#if defined (__s390x__)
+#ifndef S390X
#define S390X
#endif
+#endif
/* ---- System specific configurations ----------------------------------- */
diff -up libffi-3.0.9/src/sparc/ffitarget.h.defines libffi-3.0.9/src/sparc/ffitarget.h
--- libffi-3.0.9/src/sparc/ffitarget.h.defines 2010-07-03 22:28:09.000000000 +0200
+++ libffi-3.0.9/src/sparc/ffitarget.h 2010-07-03 22:28:23.000000000 +0200
@@ -30,8 +30,10 @@
/* ---- System specific configurations ----------------------------------- */
#if defined(__arch64__) || defined(__sparcv9)
+#ifndef SPARC64
#define SPARC64
#endif
+#endif
#ifndef LIBFFI_ASM
typedef unsigned long ffi_arg;

View File

@ -1,12 +1,14 @@
Name: libffi
Version: 3.0.9
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A portable foreign function interface library
Group: System Environment/Libraries
License: BSD
URL: http://sourceware.org/libffi
Source0: http://sourceware.org/libffi/libffi-%{version}.tar.gz
# part of upstream commit 5feacad4
Patch0: %{name}-3.0.9-defines.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
@ -52,6 +54,7 @@ developing applications that use %{name}.
%prep
%setup -q
%patch0 -p1 -b .defines
%build
@ -97,6 +100,9 @@ fi
%{_infodir}/libffi.info.gz
%changelog
* Fri Mar 18 2011 Dan Horák <dan[at]danny.cz> - 3.0.9-3
- added patch for being careful when defining relatively generic symbols
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild