aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGregor <dan.mcgregor@usask.ca>2014-11-24 08:00:34 -0600
committerDan McGregor <dan.mcgregor@usask.ca>2017-05-09 13:02:30 -0600
commit812c003e0711138e1ee868462aba60cac6a0fd54 (patch)
treec0fa987fc2cd377a6f6e6a1aa623555712d175fe
parent81e815349c75129da34b60e5aae8b8f8f1fba778 (diff)
downloadmeta-openembedded-contrib-812c003e0711138e1ee868462aba60cac6a0fd54.tar.gz
meta-openembedded-contrib-812c003e0711138e1ee868462aba60cac6a0fd54.tar.bz2
meta-openembedded-contrib-812c003e0711138e1ee868462aba60cac6a0fd54.zip
emacs: Un-blacklist, seems to work fine with new qemu
I've only tested the build with armv7 and x86, but the build doesn't segfault anymore. The last time this was tested was with qemu 1.5, we're now using 2.1. While here, don't copy stuff from the sysroot into the qemu tree just use the sysroot itself. Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
-rw-r--r--meta-oe/recipes-support/emacs/emacs-23.4/emacs-xgselect.patch26
-rw-r--r--meta-oe/recipes-support/emacs/emacs.inc104
-rw-r--r--meta-oe/recipes-support/emacs/emacs_23.4.bb3
3 files changed, 37 insertions, 96 deletions
diff --git a/meta-oe/recipes-support/emacs/emacs-23.4/emacs-xgselect.patch b/meta-oe/recipes-support/emacs/emacs-23.4/emacs-xgselect.patch
new file mode 100644
index 0000000000..c103dfab8d
--- /dev/null
+++ b/meta-oe/recipes-support/emacs/emacs-23.4/emacs-xgselect.patch
@@ -0,0 +1,26 @@
+diff -up emacs-23.4/src/xgselect.c.xgselect emacs-23.4/src/xgselect.c
+--- emacs-23.4/src/xgselect.c.xgselect 2011-11-25 14:05:03.963372281 +0100
++++ emacs-23.4/src/xgselect.c 2011-11-25 14:06:49.798049160 +0100
+@@ -53,12 +53,17 @@ xg_select (max_fds, rfds, wfds, efds, ti
+ g_main_context_pending (context);
+
+ do {
+- if (n_gfds > gfds_size)
++ if (n_gfds > gfds_size)
+ {
+- while (n_gfds > gfds_size)
+- gfds_size *= 2;
+- xfree (gfds);
+- gfds = xmalloc (sizeof (*gfds) * gfds_size);
++ if (gfds_size == 0)
++ xgselect_initialize ();
++ else
++ {
++ while (n_gfds > gfds_size)
++ gfds_size *= 2;
++ xfree (gfds);
++ gfds = xmalloc (sizeof (*gfds) * gfds_size);
++ }
+ }
+
+ n_gfds = g_main_context_query (context,
diff --git a/meta-oe/recipes-support/emacs/emacs.inc b/meta-oe/recipes-support/emacs/emacs.inc
index 5b905f93f9..38acbfaaca 100644
--- a/meta-oe/recipes-support/emacs/emacs.inc
+++ b/meta-oe/recipes-support/emacs/emacs.inc
@@ -6,7 +6,7 @@ SECTION = "editor"
# and it needs to run some generated binaries..
DEPENDS += "qemu-native"
-DEPENDS +=" liblockfile"
+DEPENDS +=" liblockfile ncurses"
X11DEPENDS = " \
libice libsm atk cairo dbus expat libffi fontconfig freetype gconf giflib \
@@ -21,10 +21,12 @@ EXTRA_OECONF = "--without-sound --with-crt-dir=${STAGING_LIBDIR} "
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
PACKAGECONFIG[x11] = "--with-x-toolkit=gtk,--without-x --without-dbus,${X11DEPENDS}"
+inherit autotools qemu
-inherit autotools
+PACKAGES =+ "${PN}-el ${PN}-grep-changelog"
-PACKAGES =+ "${PN}-el"
+RDEPENDS_${PN}-grep-changelog += "perl"
+FILES_${PN}-grep-changelog += "${bindir}/grep-changelog"
FILES_${PN}-el = "${datadir}/emacs/*/*/*.el.gz \
${datadir}/emacs/*/*/*/*.el.gz"
@@ -33,105 +35,19 @@ FILES_${PN} += "${datadir}/emacs ${datadir}/icons"
FILES_${PN}-dbg += "${libexecdir}/emacs/*/*/.debug ${datadir}/emacs/*/*/.debug"
-TREEDIR = "${WORKDIR}/qemu-treedir"
-
-QEMUARCH= "${TARGET_ARCH}"
-QEMUARCH_x86 = "i386"
-
# Large stack is required at least on x86_64 host, otherwise random segfaults appear:
-QEMU = "qemu-${QEMUARCH} ${QEMU_OPTIONS} -s 1048576 -L ${TREEDIR} "
-
-export LOGNAME = "$(whoami)"
+QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} "
+export QEMU_SET_ENV = "LD_LIBRARY_PATH=${STAGING_LIBDIR}:${STAGING_BASELIBDIR}"
+export QEMU_UNSET_ENV = "LD_PRELOAD"
+export QEMU_LD_PREFIX = "${STAGING_DIR_HOST}"
+export QEMU_STACK_SIZE = "2097152"
do_compile_prepend() {
sed -i ':1;s:\(START.* \|LIB_STANDARD.* \|LIBES.* \)/usr/lib:\1${STAGING_LIBDIR}:;t1' ${S}/src/s/gnu-linux.h `find "${S}" -name Makefile`
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${TOOLCHAIN_PATH}/${TARGET_SYS}/lib"
# Ugly hack, see files/use-qemu.patch for more:
ln -sf ../src/emacs lisp/emacs
ln -sf ../src/emacs lib-src/emacs
ln -sf ../src/emacs leim/emacs
-#copy STAGING_DIR_TARGET and libgcc_s.so* to WORKDIR/qemu-treedir #copied code from glibc-package.bbclass
- treedir=${TREEDIR}
- if [ -e $treedir ];then
- rm -rf $treedir
- fi
-
- mkdir -p $treedir/${base_libdir}
-
- if [ -f ${TOOLCHAIN_PATH}/${TARGET_SYS}/${base_libdir}/libgcc_s.so ]; then
- cp -pPR ${TOOLCHAIN_PATH}/${TARGET_SYS}/${base_libdir}/libgcc_s.so $treedir/${base_libdir}
- fi
- if [ -f ${TOOLCHAIN_PATH}/${TARGET_SYS}/${base_libdir}/libgcc_s.so.* ]; then
- cp -pPR ${TOOLCHAIN_PATH}/${TARGET_SYS}/${base_libdir}/libgcc_s.so.* $treedir/${base_libdir}
- fi
- # stupid hack, but without it, it tries to use /usr/lib/libc.so from host and fails
- # temacs: error while loading shared libraries: /usr/lib/libc.so: ELF file version does not match current one
- if [ ! -f $treedir/${base_libdir}/libc.so ]; then
- ln -s libc.so.6 $treedir/${base_libdir}/libc.so
- fi
-
- # copy only as much stuff as we need
- # before: 5.5G ../../qemu-treedir/
- # after: 17M ../../qemu-treedir/
- cp -pPR \
- ${STAGING_DIR_TARGET}/${base_libdir}/ld-* \
- ${STAGING_DIR_TARGET}/${base_libdir}/libc.* \
- ${STAGING_DIR_TARGET}/${base_libdir}/libc-* \
- ${STAGING_DIR_TARGET}/${base_libdir}/libm-* \
- ${STAGING_DIR_TARGET}/${base_libdir}/libm.* \
- ${STAGING_DIR_TARGET}/${base_libdir}/libtinfo.so.* \
- ${STAGING_DIR_TARGET}/${base_libdir}/libresolv* \
- ${STAGING_DIR_TARGET}/${base_libdir}/libdl* \
- ${STAGING_DIR_TARGET}/${base_libdir}/librt* \
- ${STAGING_DIR_TARGET}/${base_libdir}/libgcc_s.so.* \
- ${STAGING_DIR_TARGET}/${base_libdir}/libpthread* $treedir/${base_libdir}/
-
- if [ ! -z "${@bb.utils.filter('PACKAGECONFIG', 'x11', d)}" ]; then
- echo "X11 build enabled"
- # copy only as much stuff as we need
- # before: 5.5G ../../qemu-treedir/
- # after: 86M ../../qemu-treedir/
- cp -pPR \
- ${STAGING_DIR_TARGET}/${base_libdir}/libuuid.so.* \
- ${STAGING_DIR_TARGET}/${base_libdir}/libz.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libICE.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libSM.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libatk-1.0.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libcairo.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libdbus-1.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libdbus-glib-1.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libexpat.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libffi.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libfontconfig.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libfreetype.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libgconf-2.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libgif.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libjpeg.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/liblzma.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libpixman-1.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libpng1*.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/librsvg-2.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libstdc++.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libtiff.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libxml2.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libcroco-0.6.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libharfbuzz.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libicule.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libicuuc.so.* \
- ${STAGING_DIR_TARGET}/${libdir}/libicudata.so.* $treedir/${base_libdir}/
-
- # X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes Xft Xpm Xrandr Xrender
- cp -pPR ${STAGING_DIR_TARGET}/${libdir}/libX*.so.* $treedir/${base_libdir}/
-
- # gdk-x11 gdk_pixbuf gio glib gmodule gobject gthread gtk-x11
- cp -pPR ${STAGING_DIR_TARGET}/${libdir}/libg*-2.0.so.* $treedir/${base_libdir}/
-
- # pango pangocairo pangoft2
- cp -pPR ${STAGING_DIR_TARGET}/${libdir}/libpango*-1.0.so.* $treedir/${base_libdir}/
-
- # xcb-render xcb-shm xcb
- cp -pPR ${STAGING_DIR_TARGET}/${libdir}/libxcb*.so.* $treedir/${base_libdir}/
- fi
}
do_install_append() {
diff --git a/meta-oe/recipes-support/emacs/emacs_23.4.bb b/meta-oe/recipes-support/emacs/emacs_23.4.bb
index 3388ff01e4..005fcf72e8 100644
--- a/meta-oe/recipes-support/emacs/emacs_23.4.bb
+++ b/meta-oe/recipes-support/emacs/emacs_23.4.bb
@@ -2,9 +2,8 @@ require emacs.inc
PR = "r4"
-PNBLACKLIST[emacs] ?= "qemu: uncaught target signal 11 (Segmentation fault) - core dumped - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
SRC_URI = "${GNU_MIRROR}/emacs/emacs-${PV}.tar.gz;name=tarball \
+ file://emacs-xgselect.patch \
file://use-qemu.patch \
file://nostdlib-unwind.patch \
"