From a95b47f910061a28669c3bd0d10655e2d261958c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 23 Jun 2011 11:06:24 +0200 Subject: [PATCH] added patch for being careful when defining relatively generic symbols --- libffi-3.0.9-defines.patch | 63 ++++++++++++++++++++++++++++++++++++++ libffi.spec | 8 ++++- 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 libffi-3.0.9-defines.patch diff --git a/libffi-3.0.9-defines.patch b/libffi-3.0.9-defines.patch new file mode 100644 index 0000000..7c76f7c --- /dev/null +++ b/libffi-3.0.9-defines.patch @@ -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; diff --git a/libffi.spec b/libffi.spec index 559477e..42b9ea1 100644 --- a/libffi.spec +++ b/libffi.spec @@ -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 - 3.0.9-3 +- added patch for being careful when defining relatively generic symbols + * Mon Feb 07 2011 Fedora Release Engineering - 3.0.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild