From f07510bf00357baffb1834bc00148f3c2e0b29c0 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 3 Aug 2009 00:12:35 +0200 Subject: [PATCH] Python dont find system-libffi, build with internal libffi, patch Pythons libffi to build with uClibc-master --- packages/lang/Python/build | 4 +-- .../Python_libffi_uClibc_long-long-max.diff | 25 +++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 packages/lang/Python/patches/Python_libffi_uClibc_long-long-max.diff diff --git a/packages/lang/Python/build b/packages/lang/Python/build index 8b024bcc80..0946e430fc 100755 --- a/packages/lang/Python/build +++ b/packages/lang/Python/build @@ -6,7 +6,7 @@ $SCRIPTS/build toolchain $SCRIPTS/build sqlite $SCRIPTS/build openssl $SCRIPTS/build zlib -$SCRIPTS/build libffi +#$SCRIPTS/build libffi PY_DISABLED_MODULES="readline _curses _curses_panel _tkinter nis gdbm bsddb _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk" PY_BUILD_DIR=`ls -d $ROOT/$PKG_BUILD` @@ -59,7 +59,7 @@ OPT="$TARGET_CFLAGS -fno-strict-aliasing" \ --without-fpectl \ --without-wctype-functions \ --without-cxx-main \ - --with-system-ffi \ +# --with-system-ffi \ make CC=$TARGET_CC \ GNU_HOST=$TARGET_NAME \ diff --git a/packages/lang/Python/patches/Python_libffi_uClibc_long-long-max.diff b/packages/lang/Python/patches/Python_libffi_uClibc_long-long-max.diff new file mode 100644 index 0000000000..abd715e7d2 --- /dev/null +++ b/packages/lang/Python/patches/Python_libffi_uClibc_long-long-max.diff @@ -0,0 +1,25 @@ +diff -Naur Python-2.6.2/Modules/_ctypes/libffi/include/ffi.h.in Python-2.6.2.patch/Modules/_ctypes/libffi/include/ffi.h.in +--- Python-2.6.2/Modules/_ctypes/libffi/include/ffi.h.in 2008-04-04 18:01:54.000000000 +0200 ++++ Python-2.6.2.patch/Modules/_ctypes/libffi/include/ffi.h.in 2009-08-01 23:31:01.102336818 +0200 +@@ -70,19 +70,8 @@ + #include + #include + +-/* LONG_LONG_MAX is not always defined (not if STRICT_ANSI, for example). +- But we can find it either under the correct ANSI name, or under GNU +- C's internal name. */ +-#ifdef LONG_LONG_MAX +-# define FFI_LONG_LONG_MAX LONG_LONG_MAX +-#else +-# ifdef LLONG_MAX +-# define FFI_LONG_LONG_MAX LLONG_MAX +-# else +-# ifdef __GNUC__ +-# define FFI_LONG_LONG_MAX __LONG_LONG_MAX__ +-# endif +-# endif ++#if defined __USE_ISOC99 && defined __GNUC__ ++# define FFI_LONG_LONG_MAX __LONG_LONG_MAX__ + #endif + + /* The closure code assumes that this works on pointers, i.e. a size_t */