diff options
author | vivian, zhang <vivian.zhang@intel.com> | 2012-06-03 11:36:11 +0800 |
---|---|---|
committer | vivian, zhang <vivian.zhang@intel.com> | 2012-06-03 11:36:11 +0800 |
commit | 2ea3addd3001ed339f0f0600d5c8845aa15d962e (patch) | |
tree | 22d5c87bdc38f47e4309166c81503afe0d6e09fc /packaging | |
parent | a2cc1325a624fb4155b158646444c1723ff19092 (diff) | |
download | libffi-1.0_post.tar.gz libffi-1.0_post.tar.bz2 libffi-1.0_post.zip |
Initial import package libffi: A portable foreign function interface libraryHEAD2.0_alphamaster2.0alpha1.0_post
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/0001-x86-Align-the-stack-to-16-bytes-before-making-the-ca.patch | 34 | ||||
-rw-r--r-- | packaging/Makefile | 6 | ||||
-rw-r--r-- | packaging/includedir.patch | 24 | ||||
-rw-r--r-- | packaging/libffi.changes | 33 | ||||
-rw-r--r-- | packaging/libffi.spec | 122 |
5 files changed, 219 insertions, 0 deletions
diff --git a/packaging/0001-x86-Align-the-stack-to-16-bytes-before-making-the-ca.patch b/packaging/0001-x86-Align-the-stack-to-16-bytes-before-making-the-ca.patch new file mode 100644 index 0000000..232f7f8 --- /dev/null +++ b/packaging/0001-x86-Align-the-stack-to-16-bytes-before-making-the-ca.patch @@ -0,0 +1,34 @@ +From f092b034d2253f29cf50bb38ad33f9534a89cfb8 Mon Sep 17 00:00:00 2001 +From: Neil Roberts <neil@linux.intel.com> +Date: Fri, 26 Feb 2010 14:42:49 +0000 +Subject: [PATCH] x86: Align the stack to 16-bytes before making the call + +If gcc is targetting i686 then it will use SSE registers for the +floating point operations. It will then sometimes use 16-byte +temporary variables on the stack to store the registers and it will +use aligned instructions to access them. This will segfault if the +variable is not aligned to 16-bytes. Apparently GCC assumes that the +stack is 16-byte aligned when a function is entered and it uses this +to position its temporary variables. Therefore libffi needs to align +the stack or the called function will crash in some circumstances. +--- + src/x86/sysv.S | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/src/x86/sysv.S b/src/x86/sysv.S +index f4b6c1e..81374cc 100644 +--- a/src/x86/sysv.S ++++ b/src/x86/sysv.S +@@ -48,6 +48,9 @@ ffi_call_SYSV: + movl 16(%ebp),%ecx + subl %ecx,%esp + ++ /* Align the stack pointer to 16-bytes */ ++ andl $0xfffffff0, %esp ++ + movl %esp,%eax + + /* Place all of the ffi_prep_args in position */ +-- +1.6.5.rc1.46.g4d818 + diff --git a/packaging/Makefile b/packaging/Makefile new file mode 100644 index 0000000..60ffa1c --- /dev/null +++ b/packaging/Makefile @@ -0,0 +1,6 @@ +PKG_NAME := libffi +SPECFILE = $(addsuffix .spec, $(PKG_NAME)) +YAMLFILE = $(addsuffix .yaml, $(PKG_NAME)) + +include /usr/share/packaging-tools/Makefile.common + diff --git a/packaging/includedir.patch b/packaging/includedir.patch new file mode 100644 index 0000000..b0fc125 --- /dev/null +++ b/packaging/includedir.patch @@ -0,0 +1,24 @@ +Index: libffi-3.0.9/libffi.pc.in +=================================================================== +--- libffi-3.0.9.orig/libffi.pc.in ++++ libffi-3.0.9/libffi.pc.in +@@ -1,7 +1,7 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ +-includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include ++includedir=@includedir@ + + Name: @PACKAGE_NAME@ + Description: Library supporting Foreign Function Interfaces +Index: libffi-3.0.9/include/Makefile.am +=================================================================== +--- libffi-3.0.9.orig/include/Makefile.am ++++ libffi-3.0.9/include/Makefile.am +@@ -5,5 +5,5 @@ AUTOMAKE_OPTIONS=foreign + DISTCLEANFILES=ffitarget.h + EXTRA_DIST=ffi.h.in ffi_common.h + +-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include ++includesdir = $(prefix)/include + nodist_includes_HEADERS = ffi.h ffitarget.h diff --git a/packaging/libffi.changes b/packaging/libffi.changes new file mode 100644 index 0000000..5da95cf --- /dev/null +++ b/packaging/libffi.changes @@ -0,0 +1,33 @@ +* Fri Jun 01 2012 vivian zhang <vivian.zhang@intel.com> - 3.0.9 +- Initial import for Tizen + +* Thu Mar 15 02:08:32 UTC 2012 - tracy.graydon@intel.com +- De-yamlfy + +* Mon May 02 2011 Anas Nashif <anas.nashif@intel.com> - 3.0.9 +- Apply patch to fix includesdir instead of hacking in spec file + +* Sun May 01 2011 Anas Nashif <anas.nashif@intel.com> - 3.0.9 +- Clean up spec file + +* Thu Apr 30 2011 Liu, Xinyun <xinyun.liu@intel.com> - 3.0.9 +- Fix for BMC 16784. +- Updated previous fix for libffi.pc. + +* Thu Apr 28 2011 Junfeng Dong <junfeng.dong@intel.com> - 3.0.9 +- Fix for BMC 16784: Move the header files to standard /usr/include. + +* Thu Mar 04 2010 Damien Lespiau <damien.lespiau@intel.com> 3.0.9 +- Really apply the alignment fix patch + +* Fri Feb 26 2010 Neil Roberts <neil@linux.intel.com> 3.0.9 +- Add a patch to fix alignment problems + This was causing problems when using libffi with gobject-introspection + +* Thu Jan 28 2010 Jian-feng Ding <jian-feng.ding@intel.com> 3.0.9 +- Upgrade to 3.0.9, and enabled spectacle + +* Thu Sep 27 2009 Austin Zhang <austin.zhang@intel.com> - 3.0.8 +- Update to 3.0.8 into moblin (libffi was there but was removed, + now, add it back). + diff --git a/packaging/libffi.spec b/packaging/libffi.spec new file mode 100644 index 0000000..7652125 --- /dev/null +++ b/packaging/libffi.spec @@ -0,0 +1,122 @@ +Name: libffi +Summary: A portable foreign function interface library +Version: 3.0.9 +Release: 100 +Group: System/Libraries +License: BSD +URL: http://sourceware.org/libffi +Source0: ftp://sourceware.org/pub/libffi/libffi-%{version}.tar.gz +Patch0: 0001-x86-Align-the-stack-to-16-bytes-before-making-the-ca.patch +Patch1: includedir.patch +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig + + +%description +Compilers for high level languages generate code that follow certain +conventions. These conventions are necessary, in part, for separate +compilation to work. One such convention is the "calling convention". +The calling convention is a set of assumptions made by the compiler +about where function arguments will be found on entry to a function. A +calling convention also specifies where the return value for a function +is found. + +Some programs may not know at the time of compilation what arguments +are to be passed to a function. For instance, an interpreter may be +told at run-time about the number and types of arguments used to call a +given function. `Libffi' can be used in such programs to provide a +bridge from the interpreter program to compiled code. + +The `libffi' library provides a portable, high level programming +interface to various calling conventions. This allows a programmer to +call any function specified by a call interface description at run time. + +FFI stands for Foreign Function Interface. A foreign function +interface is the popular name for the interface that allows code +written in one language to call code written in another language. The +`libffi' library really only provides the lowest, machine dependent +layer of a fully featured foreign function interface. A layer must +exist above `libffi' that handles type conversions for values passed +between the two languages. + + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires(post): /sbin/install-info +Requires(postun): /sbin/install-info + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + + +%prep +%setup -q -n %{name}-%{version} + +# 0001-x86-Align-the-stack-to-16-bytes-before-making-the-ca.patch +%patch0 -p1 +# includedir.patch +%patch1 -p1 +# >> setup +# << setup + +%build +# >> build pre +# << build pre + +%reconfigure --disable-static \ + --includedir=%{_includedir} + +make %{?jobs:-j%jobs} + +# >> build post +# << build post +%install +rm -rf %{buildroot} +# >> install pre +# << install pre +%make_install + +# >> install post +rm -f $RPM_BUILD_ROOT%{_infodir}/dir +# << install post + + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + + +%post devel +%install_info --info-dir=%_infodir %{_infodir}/libffi.info.gz + +%postun devel +if [ $1 = 0 ] ;then +%install_info_delete --info-dir=%{_infodir} %{_infodir}/libffi.info.gz +fi + +%files +%defattr(-,root,root,-) +# >> files +%doc LICENSE README +%{_libdir}/*.so.* +# << files + + +%files devel +%defattr(-,root,root,-) +# >> files devel +%{_prefix}/include/ffi.h +%{_prefix}/include/ffitarget.h +%{_libdir}/pkgconfig/*.pc +%{_libdir}/*.so +%doc %{_mandir}/man3/*.gz +%{_infodir}/libffi.info.gz +# << files devel + |