1 require ..
/gcc
/gcc
-common.inc
3 DESCRIPTION
= "Foreign Function Interface library"
7 inherit autotools gettext
11 PACKAGES
= "${PN}-dbg ${PN} ${PN}-dev"
13 FILES_$
{PN
} = "${libdir}/libffi.so.*"
15 FILES_$
{PN
}-dev
= "${includedir}/${TARGET_SYS}/ffi* \
20 GCC_VER
= "${@bb.data.getVar('PV',d,1).split('gcc')[1]}"
22 SRC_URI
= "${GNU_MIRROR}/gcc/gcc-${GCC_VER}/gcc-${GCC_VER}.tar.bz2 \
26 $
{GNU_MIRROR
}/gcc
/ http
://gcc.get
-software.com
/releases
/
27 $
{GNU_MIRROR
}/gcc
/ http
://mirrors.rcn.net
/pub
/sourceware
/gcc
/releases
/
30 S
= "${WORKDIR}/gcc-${GCC_VER}/libffi"
31 B
= "${S}/build.${HOST_SYS}.${TARGET_SYS}"
33 EXTRA_OECONF
= "--with-gnu-ld \
35 --enable-target-optspace \
36 --enable-languages=c,c++,f77 \
37 --enable-threads=posix \
41 --enable-symvers=gnu \
42 --program-prefix=${TARGET_PREFIX} \
44 ${EXTRA_OECONF_PATHS}"
46 EXTRA_OECONF_PATHS
= "--with-local-prefix=${prefix}/local \
47 --with-gxx-include-dir=${includedir}/c++/${PV}"
49 # Build uclibc compilers without cxa_atexit support
50 EXTRA_OECONF_append_linux
= " --enable-__cxa_atexit"
51 EXTRA_OECONF_append_linux
-gnueabi
= " --enable-__cxa_atexit"
52 EXTRA_OECONF_append_linux
-uclibc
= " --disable-__cxa_atexit"
53 EXTRA_OECONF_append_linux
-uclibceabi
= " --disable-__cxa_atexit"
54 EXTRA_OECONF_FPU
= "${@get_gcc_fpu_setting(bb, d)}"
56 #Somehow gcc doesn't set __SOFTFP__ when passing
-mfloatabi
=softp
:(
57 TARGET_CC_ARCH_append_armv6
= " -D__SOFTFP__"
58 TARGET_CC_ARCH_append_armv7a
= " -D__SOFTFP__"
62 (cd $
{S
}/..
&& gnu
-configize
) || die
"failure running gnu-configize"
67 install_libffi_headers
70 # Separate
function which can be disabled in the
-native recipe.
71 install_libffi_headers
() {
72 # follow Debian
and move this
to $includedir
/$
{TARGET_SYS
}
73 install
-d $
{D
}$
{includedir
}/$
{TARGET_SYS
}
74 mv $
{D
}$
{libdir
}/gcc
/$
{TARGET_SYS
}/$
{GCC_VER
}/include/ffitarget.h $
{D
}$
{includedir
}/$
{TARGET_SYS
}
75 mv $
{D
}$
{libdir
}/gcc
/$
{TARGET_SYS
}/$
{GCC_VER
}/include/ffi.h $
{D
}$
{includedir
}/$
{TARGET_SYS
}
78 ffi_include
= "ffi.h ffitarget.h"
81 oe_libinstall
-so
-C .libs libffi $
{STAGING_LIBDIR
}
83 mkdir
-p $
{STAGING_INCDIR
}/
84 for i in $
{ffi_include
}; do
85 install
-m
0644 include/$i $
{STAGING_INCDIR
}/
89 SRC_URI
[md5sum
] = "5dfac5da961ecd5f227c3175859a486d"
90 SRC_URI
[sha256sum
] = "bfbf487731ad5dca37efe480a837417de071bd67e685d5c1df6a290707575165"