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>2016-07-06 12:57:45 -0600
commit9b0c19b94765108e9a966a129b4e6d6b6ab45d8c (patch)
tree373c270d5129f129fabe7ea33354539fdb2a4253
parent30662b849aad37c1d339327676706de2f9b71a9e (diff)
downloadmeta-openembedded-contrib-9b0c19b94765108e9a966a129b4e6d6b6ab45d8c.tar.gz
meta-openembedded-contrib-9b0c19b94765108e9a966a129b4e6d6b6ab45d8c.tar.bz2
meta-openembedded-contrib-9b0c19b94765108e9a966a129b4e6d6b6ab45d8c.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.inc106
-rw-r--r--meta-oe/recipes-support/emacs/emacs_23.4.bb3
3 files changed, 38 insertions, 97 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 ffb5c50c70..1246b38bdc 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 \
@@ -14,17 +14,19 @@ X11DEPENDS = " \
libx11 libxau libxcomposite libxcursor libxdamage libxdmcp libxext libxfixes \
libxft libxpm libxrandr libxrender \
gdk-pixbuf glib-2.0 gtk+ pango libxcb harfbuzz icu \
-"
+"
EXTRA_OECONF = "--without-sound --with-crt-dir=${STAGING_LIBDIR} "
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '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.contains('PACKAGECONFIG', 'x11', '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 a32482883b..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"
-
SRC_URI = "${GNU_MIRROR}/emacs/emacs-${PV}.tar.gz;name=tarball \
+ file://emacs-xgselect.patch \
file://use-qemu.patch \
file://nostdlib-unwind.patch \
"