aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/cacao/cacao-2d6f6c14daf9
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/cacao/cacao-2d6f6c14daf9')
-rw-r--r--recipes-core/cacao/cacao-2d6f6c14daf9/cacao-1.6.1-do-not-rely-on-absolute-paths.patch41
-rw-r--r--recipes-core/cacao/cacao-2d6f6c14daf9/system-boehm-gc.patch60
2 files changed, 101 insertions, 0 deletions
diff --git a/recipes-core/cacao/cacao-2d6f6c14daf9/cacao-1.6.1-do-not-rely-on-absolute-paths.patch b/recipes-core/cacao/cacao-2d6f6c14daf9/cacao-1.6.1-do-not-rely-on-absolute-paths.patch
new file mode 100644
index 0000000..2b046cf
--- /dev/null
+++ b/recipes-core/cacao/cacao-2d6f6c14daf9/cacao-1.6.1-do-not-rely-on-absolute-paths.patch
@@ -0,0 +1,41 @@
+java.in: Do not use hardcode paths
+
+Cacao uses hardcoded paths to various files, if these paths are not
+provided. This causes issues when sharing sstate with otherwise
+identical workers, if build time paths are not identical.
+
+Signed-off-by: Erkka Kääriä <erkka.kaaria@intel.com>
+
+Upstream-Status: Inappropriate [Yocto-specific fixes]
+
+---
+ cacao-1.6.1/src/scripts/java.in | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git cacao-1.6.1/src/scripts/java.in cacao-1.6.1/src/scripts/java.in
+index 0790f02..2118de7 100644
+--- cacao-1.6.1/src/scripts/java.in
++++ cacao-1.6.1/src/scripts/java.in
+@@ -22,5 +22,17 @@
+ ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ ## 02110-1301, USA.
+
+-IFS=""
+-exec $(dirname ${0})/cacao ${1+"$@"}
++SH_DIR=`dirname "$0"`
++CURRENT_DIR=`cd "${SH_DIR}" && pwd`
++
++# if this shell script is invoked through symlink, we get invalid paths. As getting the real path to this file is
++# very painful using only /bin/sh, python is used instead.
++PYTHON_STR="import os; print os.path.dirname(os.path.realpath(os.readlink(\"${CURRENT_DIR}/java\"))) if os.path.islink(\"${CURRENT_DIR}/java\") else \"${CURRENT_DIR}\""
++REAL_DIR=`python -c "${PYTHON_STR}"`
++
++PARENT_DIR=`dirname ${REAL_DIR}`
++
++export BOOTCLASSPATH="${PARENT_DIR}/share/cacao/vm.zip:${PARENT_DIR}/share/classpath/glibj.zip"
++LIBRARY_PATH="-Djava.library.path=${PARENT_DIR}/lib/classpath"
++exec ${REAL_DIR}/cacao ${LIBRARY_PATH} ${1+"$@"}
++
+--
+2.7.4
+
diff --git a/recipes-core/cacao/cacao-2d6f6c14daf9/system-boehm-gc.patch b/recipes-core/cacao/cacao-2d6f6c14daf9/system-boehm-gc.patch
new file mode 100644
index 0000000..c30f5be
--- /dev/null
+++ b/recipes-core/cacao/cacao-2d6f6c14daf9/system-boehm-gc.patch
@@ -0,0 +1,60 @@
+cacao: use system's boehm garbage collector
+
+This is a Gentoo's patch [1] to force the use of system's bdwgc.
+
+Cacao was installing an internal version of bdwgc which conflicts
+with the system's version.
+
+[1] https://gitweb.gentoo.org/proj/java.git/plain/dev-java/cacao/files/system-boehm-gc.patch
+
+Upstream-Status: Inappropriate [not author]
+
+Signed-off-by: Hugo Vasconcelos Saldanha <hugo.saldanha@aker.com.br>
+
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -691,6 +691,8 @@
+
+ AC_CHECK_ENABLE_PIC_ASM
+
++PKG_CHECK_MODULES([BOEHM], bdw-gc,,AC_MSG_ERROR[boehm-gc not found])
++
+ dnl Define version numbers.
+ AC_VERSION_DETAIL
+ AC_VERSION_CONFIG
+@@ -793,12 +795,6 @@
+ )
+
+
+-dnl We only build the shared library objects but we use it as
+-dnl noinst_LTLIBRARIES.
+-ac_configure_args="$ac_configure_args --disable-static"
+-AC_CONFIG_SUBDIRS(src/mm/boehm-gc)
+-
+-
+ AC_OUTPUT
+
+
+diff --git a/src/mm/Makefile.am b/src/mm/Makefile.am
+--- a/src/mm/Makefile.am
++++ b/src/mm/Makefile.am
+@@ -35,14 +35,13 @@
+ endif
+
+ if ENABLE_GC_BOEHM
+-SUBDIRS = \
+- boehm-gc
+-
+ GC_FILE = \
+ gc-boehm.cpp
+
+-GC_LIB = \
+- $(top_builddir)/src/mm/boehm-gc/libgc.la
++AM_CPPFLAGS += $(BOEHM_CFLAGS)
++
++GC_LIB = $(BOEHM_LIBS)
++
+ endif
+
+ if ENABLE_GC_CACAO