diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-support/bdwgc')
4 files changed, 178 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch new file mode 100644 index 000000000..8ef774f0f --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch @@ -0,0 +1,29 @@ +configure.ac: add check for NO_GETCONTEXT definition + +Signed-off-by: Samuel Martin <s.martin49@gmail.com> +[yann.morin.1998@free.fr: add a comment, change variable name, use + AS_IF, remove debug traces, use AC_CHECK_FUNCS (as suggested by + Thomas)] +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> +Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> + +--- +Upstream-Status: Pending + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- bdwgc-7.2f.orig/configure.ac 2014-06-01 19:00:47.000000000 +0200 ++++ bdwgc-7.2f/configure.ac 2014-12-23 14:13:11.585716713 +0100 +@@ -365,6 +365,12 @@ + AC_MSG_RESULT($ac_cv_fno_strict_aliasing) + fi + ++# Check for getcontext (uClibc can be configured without it, for example) ++AC_CHECK_FUNCS([getcontext]) ++AS_IF([test "$ac_cv_func_getcontext" = "no"], ++ [CFLAGS="$CFLAGS -DNO_GETCONTEXT" ++ CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"]) ++ + case "$host" in + # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64 + # and unnecessary everywhere. diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch new file mode 100644 index 000000000..ab907fca0 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch @@ -0,0 +1,35 @@ +From 829a89e7f5785239a9384e3afd46c900f9d76ada Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 31 Aug 2015 19:55:32 +0000 +Subject: [PATCH] fix build with musl + +signal.h already includes bits/sigcontext.h +Documentation seems to indicate that if you need the definitions in +sigcontext.h, you are supposed to include signal.h and not sigcontext.h. + +a good fix should be to remove glibc +specific understanding, in those ifdef's + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + os_dep.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/os_dep.c b/os_dep.c +index 08c501d..5cb7873 100644 +--- a/os_dep.c ++++ b/os_dep.c +@@ -41,7 +41,7 @@ + # else /* __GLIBC__ < 2 */ + /* libc5 doesn't have <sigcontext.h>: go directly with the kernel */ + /* one. Check LINUX_VERSION_CODE to see which we should reference. */ +-# include <asm/sigcontext.h> ++# include <signal.h> + # endif /* __GLIBC__ < 2 */ + # endif + #endif /* LINUX && !POWERPC */ +-- +2.5.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch new file mode 100644 index 000000000..c73c5400c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch @@ -0,0 +1,71 @@ +From 2571df0e30b4976d7a12dbc6fbec4f1c4027924d Mon Sep 17 00:00:00 2001 +From: Marek Vasut <marex@denx.de> +Date: Thu, 28 Jan 2016 04:13:13 +0100 +Subject: [PATCH] Altera NIOS2 support + +Add simple nios2 configuration support. + +* include/private/gcconfig.h (NIOS2): New macro. +* include/private/gcconfig.h (mach_type_known, CPP_WORDSZ, MACH_TYPE, +OS_TYPE, DYNAMIC_LOADING, _end, __data_start, DATASTART, DATAEND, +ALIGNMENT, HBLKSIZE, HBLKSIZE, LINUX_STACKBOTTOM, NO_GETCONTEXT): +Define for NIOS2. + +Signed-off-by: Marek Vasut <marex@denx.de> +Upstream-Status: Backport [ https://github.com/ivmai/bdwgc.git 2571df0e30b4976d7a12dbc6fbec4f1c4027924d ] +--- + include/private/gcconfig.h | 24 +++++++++++++++++++++++- + 1 file changed, 23 insertions(+), 1 deletion(-) + +diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h +index c467c26..92d4727 100644 +--- a/include/private/gcconfig.h ++++ b/include/private/gcconfig.h +@@ -181,6 +181,10 @@ + # endif + # define mach_type_known + # endif ++# if defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__) ++# define NIOS2 /* Altera NIOS2 */ ++# define mach_type_known ++# endif + # if defined(DGUX) && (defined(i386) || defined(__i386__)) + # define I386 + # ifndef _USING_DGUX +@@ -1658,6 +1662,24 @@ + # endif + # endif + ++# ifdef NIOS2 ++# define CPP_WORDSZ 32 ++# define MACH_TYPE "NIOS2" ++# ifdef LINUX ++# define OS_TYPE "LINUX" ++# define DYNAMIC_LOADING ++ extern int _end[]; ++ extern int __data_start[]; ++# define DATASTART ((ptr_t)(__data_start)) ++# define DATAEND ((ptr_t)(_end)) ++# define ALIGNMENT 4 ++# ifndef HBLKSIZE ++# define HBLKSIZE 4096 ++# endif ++# define LINUX_STACKBOTTOM ++# endif /* Linux */ ++# endif ++ + # ifdef HP_PA + # define MACH_TYPE "HP_PA" + # ifdef __LP64__ +@@ -2622,6 +2644,7 @@ + #if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \ + || defined(OPENBSD) || defined(ARM32) \ +- || defined(MIPS) || defined(AVR32))) \ ++ || defined(MIPS) || defined(AVR32) \ ++ || defined(NIOS2))) \ + || (defined(LINUX) && (defined(SPARC) || defined(M68K))) \ + || ((defined(RTEMS) || defined(PLATFORM_ANDROID)) && defined(I386))) \ + && !defined(NO_GETCONTEXT) +-- +2.7.0 + diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb new file mode 100644 index 000000000..8d4dab399 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb @@ -0,0 +1,43 @@ +SUMMARY = "A garbage collector for C and C++" + +DESCRIPTION = "The Boehm-Demers-Weiser conservative garbage collector can be\ + used as a garbage collecting replacement for C malloc or C++ new. It allows\ + you to allocate memory basically as you normally would, without explicitly\ + deallocating memory that is no longer useful. The collector automatically\ + recycles memory when it determines that it can no longer be otherwise\ + accessed.\ + The collector is also used by a number of programming language\ + implementations that either use C as intermediate code, want to facilitate\ + easier interoperation with C libraries, or just prefer the simple collector\ + interface.\ + Alternatively, the garbage collector may be used as a leak detector for C\ + or C++ programs, though that is not its primary goal.\ + Empirically, this collector works with most unmodified C programs, simply\ + by replacing malloc with GC_malloc calls, replacing realloc with GC_realloc\ + calls, and removing free calls." + +HOMEPAGE = "http://www.hboehm.info/gc/" +SECTION = "devel" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://README.QUICK;md5=55f5088f90a982fed7af9a4897047ef7" + +SRCREV = "e31cdc288ffbee5bf25f948e19deb5a7ce846971" +SRC_URI = "git://github.com/ivmai/bdwgc.git;branch=release-7_4 \ + file://0001-fix-build-with-musl.patch \ + file://0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch \ + file://0002-Altera-NIOS2-support.patch \ + " + +FILES_${PN}-doc = "${datadir}" + +S = "${WORKDIR}/git" + +ARM_INSTRUCTION_SET = "arm" + +inherit autotools pkgconfig + +# by default use external libatomic-ops +PACKAGECONFIG ??= "libatomic-ops" +PACKAGECONFIG[libatomic-ops] = "--with-libatomic-ops=yes,--with-libatomic-ops=no,libatomic-ops" + +BBCLASSEXTEND = "native nativesdk" |