Musl related and misc fixes
cover Musl related and misc fixes
Fix few more recipes to be able to build on musl Cleanup cruft left after pth removal
libtool-cross for PIE link issues
db to use cross libtool to avoid link errors exposed by clang boost VFP issues seen on qemuarm
The following changes since commit fd75637d97cc3d669229e59c1d21ce7038fc92d7:
native.bbclass: Set CXXFLAGS from BUILD_CXXFLAGS not BUILD_CFLAGS (2016-01-31 13:29:38 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib kraj/pu
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/pu
Khem Raj (8):
libnss-mdns: Check for nss.h before using
nss-myhostname: Fix build on musl
distutils: Consider S != B case
pth: Remove dead code
libtool-cross: Unset pre|post dep objects
db: Use cross libtool
local.conf.sample.extended: Document HOW-TO enable systemd or busbox
for init system
boost: Fix build on soft-float ABI arm systems
meta/classes/distutils.bbclass | 27 ++++-- meta/classes/distutils3.bbclass | 26 +++-- meta/conf/local.conf.sample | 25 +++-- meta/conf/local.conf.sample.extended | 28 +++++- .../libnss-mdns/0001-check-for-nss.h.patch | 56 +++++++++++ .../libnss-mdns/libnss-mdns_0.10.bb | 4 +- .../libtool/libtool-cross_2.4.6.bb | 6 +- .../boost/boost/consider-hardfp.patch | 19 ++++ meta/recipes-support/boost/boost_1.60.0.bb | 1 + meta/recipes-support/db/db_5.3.28.bb | 1 + meta/recipes-support/db/db_6.0.30.bb | 1 + ...tname-Check-for-nss.h-presense-before-use.patch | 51 ++++++++++ .../nss-myhostname/nss-myhostname_0.3.bb | 4 +- .../pth/files/pth-add-pkgconfig-support.patch | 105 --------------------- .../pth/files/pth-fix-parallel.patch | 48 ---------- 15 files changed, 211 insertions(+), 191 deletions(-) create mode 100644 meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch create mode 100644 meta/recipes-support/boost/boost/consider-hardfp.patch create mode 100644 meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch delete mode 100644 meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch delete mode 100644 meta/recipes-support/pth/files/pth-fix-parallel.patch
Signature · 1 line
2.7.0
PATCH 1/8 libnss-mdns: Check for nss.h before using
nss.h is not available on all libcs
so check for it and if its not there provide
the needed data types.
Fixed buil with musl../../nss-mdns-0.10/src/nss.c:32:17: fatal error: nss.h: No such file or directory
compilation terminated.
make[2]: *** [libnss_mdns4_la-nss.lo] Error 1
--- .../libnss-mdns/0001-check-for-nss.h.patch | 56 ++++++++++++++++++++++ .../libnss-mdns/libnss-mdns_0.10.bb | 4 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch
meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch new file +56 -0
@@ -0,0 +1,56 @@ +From bdf01a581d58eb5340e9238d143dbcac9db5b11c Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 30 Jan 2016 19:29:45 +0000 +Subject: [PATCH] check for nss.h + +nss.h may not available on all libc implementations, e.g. musl does not +have this header, this patch detects nss.h presence and defines the data +types that are required if nss.h is missing on platform + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + configure.ac | 2 +- + src/nss.c | 11 +++++++++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index aa66bc6..ce19b07 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -71,7 +71,7 @@ AC_PROG_LIBTOOL + + # Checks for header files. + AC_HEADER_STDC +-AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h]) ++AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h nss.h]) + + # Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +diff --git a/src/nss.c b/src/nss.c +index e48e315..406733b 100644 +--- a/src/nss.c ++++ b/src/nss.c +@@ -29,7 +29,18 @@ + #include <assert.h> + #include <netdb.h> + #include <sys/socket.h> ++#ifdef HAVE_NSS_H + #include <nss.h> ++#else ++enum nss_status { ++ NSS_STATUS_TRYAGAIN = -2, ++ NSS_STATUS_UNAVAIL, ++ NSS_STATUS_NOTFOUND, ++ NSS_STATUS_SUCCESS, ++ NSS_STATUS_RETURN ++}; ++#endif ++ + #include <stdio.h> + #include <stdlib.h> + +-- +2.7.0 +
meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb +3 -1
@@ -8,7 +8,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1" DEPENDS = "avahi" PR = "r7" -SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz" +SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz \ + file://0001-check-for-nss.h.patch \ + " SRC_URI[md5sum] = "03938f17646efbb50aa70ba5f99f51d7" SRC_URI[sha256sum] = "1e683c2e7c3921814706d62fbbd3e9cbf493a75fa00255e0e715508d8134fa6d"
Signature · 1 line
2.7.0
PATCH 2/8 nss-myhostname: Fix build on musl
provide needed data types if nss.h is not available
--- ...tname-Check-for-nss.h-presense-before-use.patch | 51 ++++++++++++++++++++++ .../nss-myhostname/nss-myhostname_0.3.bb | 4 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch
meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch new file +51 -0
@@ -0,0 +1,51 @@ +From d1345871b992f9a055c968963967e728da1a7ffb Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 30 Jan 2016 20:29:06 +0000 +Subject: [PATCH] nss-myhostname: Check for nss.h presense before use + +We do not have nss.h on musl e.g. and configury is already checking for +nss.h presence, use this to define needed data structures if nss.h is +missing on a given libc implementation on a platform + +include stdint.h for uint32_h definition + +Signed-off-by: Khem Raj <[email protected]> +--- + nss-myhostname.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/nss-myhostname.c b/nss-myhostname.c +index 293166c..6f287f5 100644 +--- a/nss-myhostname.c ++++ b/nss-myhostname.c +@@ -21,7 +21,27 @@ + ***/ + + #include <limits.h> ++#include <stdint.h> ++#ifdef HAVE_NSS_H + #include <nss.h> ++#else ++enum nss_status { ++ NSS_STATUS_TRYAGAIN = -2, ++ NSS_STATUS_UNAVAIL, ++ NSS_STATUS_NOTFOUND, ++ NSS_STATUS_SUCCESS, ++ NSS_STATUS_RETURN ++}; ++/* Data structure used for the 'gethostbyname4_r' function. */ ++struct gaih_addrtuple ++ { ++ struct gaih_addrtuple *next; ++ char *name; ++ int family; ++ uint32_t addr[4]; ++ uint32_t scopeid; ++ }; ++#endif + #include <sys/types.h> + #include <netdb.h> + #include <errno.h> +-- +2.7.0 +
meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb +3 -1
@@ -6,7 +6,9 @@ HOMEPAGE = "http://0pointer.de/lennart/projects/nss-myhostname/" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1" -SRC_URI = "http://0pointer.de/lennart/projects/nss-myhostname/nss-myhostname-${PV}.tar.gz" +SRC_URI = "http://0pointer.de/lennart/projects/nss-myhostname/nss-myhostname-${PV}.tar.gz \ + file://0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch \ + " SRC_URI[md5sum] = "d4ab9ac36c053ab8fb836db1cbd4a48f" SRC_URI[sha256sum] = "2ba744ea8d578d1c57c85884e94a3042ee17843a5294434d3a7f6c4d67e7caf2"
Signature · 1 line
2.7.0
PATCH 3/8 distutils: Consider S != B case
In reply to Khem Rajout of tree builds can break the assumption about setup.py being in the current directory, seen especially with devtool when using externalsrc many python modules cant build since it cant find setup.py in devtool workspace
--- meta/classes/distutils.bbclass | 27 +++++++++++++++++---------- meta/classes/distutils3.bbclass | 26 +++++++++++++++++++------- 2 files changed, 36 insertions(+), 17 deletions(-)
meta/classes/distutils.bbclass +17 -10
@@ -8,44 +8,51 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ --install-data=${D}/${datadir}" distutils_do_compile() { - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \ - bbfatal "${PYTHON_PN} setup.py build execution failed." + cwd=$PWD;cd ${S} + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py build --build-base=${B} ${DISTUTILS_BUILD_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py build execution failed." + cd $cwd } distutils_stage_headers() { + cwd=$PWD;cd ${S} install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install_headers execution failed." + cd $cwd } distutils_stage_all() { + cwd=$PWD;cd ${S} STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install (stage) execution failed." + cd $cwd } distutils_do_install() { + cwd=$PWD;cd ${S} install -d ${D}${PYTHON_SITEPACKAGES_DIR} STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install execution failed." # support filenames with *spaces* # only modify file if it contains path and recompile it find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \; -exec ${STAGING_BINDIR_NATIVE}/python-native/python -mcompileall {} \; - if test -e ${D}${bindir} ; then + if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
@@ -65,7 +72,6 @@ distutils_do_install() { rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py* - # # FIXME: Bandaid against wrong datadir computation #
@@ -79,6 +85,7 @@ distutils_do_install() { rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py; rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.pyc; fi + cd $cwd } EXPORT_FUNCTIONS do_compile do_install
meta/classes/distutils3.bbclass +19 -7
@@ -9,6 +9,8 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ --install-data=${D}/${datadir}" distutils3_do_compile() { + cwd=$PWD + cd ${S} if [ ${BUILD_SYS} != ${HOST_SYS} ]; then SYS=${MACHINE} else
@@ -17,13 +19,16 @@ distutils3_do_compile() { STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ - build ${DISTUTILS_BUILD_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py \ + build -build-base=${B} ${DISTUTILS_BUILD_ARGS} || \ bbfatal "${PYTHON_PN} setup.py build_ext execution failed." + cd $cwd } distutils3_do_compile[vardepsexclude] = "MACHINE" distutils3_stage_headers() { + cwd=$PWD + cd ${S} install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} if [ ${BUILD_SYS} != ${HOST_SYS} ]; then SYS=${MACHINE}
@@ -31,12 +36,15 @@ distutils3_stage_headers() { SYS=${HOST_SYS} fi BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install_headers execution failed." + cd $cwd } distutils3_stage_headers[vardepsexclude] = "MACHINE" distutils3_stage_all() { + cwd=$PWD + cd ${S} if [ ${BUILD_SYS} != ${HOST_SYS} ]; then SYS=${MACHINE} else
@@ -47,12 +55,15 @@ distutils3_stage_all() { install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install (stage) execution failed." + cd $cwd } distutils3_stage_all[vardepsexclude] = "MACHINE" distutils3_do_install() { + cwd=$PWD + cd ${S} install -d ${D}${PYTHON_SITEPACKAGES_DIR} if [ ${BUILD_SYS} != ${HOST_SYS} ]; then SYS=${MACHINE}
@@ -63,13 +74,13 @@ distutils3_do_install() { STAGING_LIBDIR=${STAGING_LIBDIR} \ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install execution failed." # support filenames with *spaces* find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \; - if test -e ${D}${bindir} ; then + if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
@@ -84,7 +95,7 @@ distutils3_do_install() { fi rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth - + # # FIXME: Bandaid against wrong datadir computation #
@@ -92,6 +103,7 @@ distutils3_do_install() { mv -f ${D}${datadir}/share/* ${D}${datadir}/ rmdir ${D}${datadir}/share fi + cd $cwd } distutils3_do_install[vardepsexclude] = "MACHINE"
Signature · 1 line
2.7.0
PATCH 4/8 pth: Remove dead code
In reply to Khem Rajrecipe is removed, delete remaining cruft
--- .../pth/files/pth-add-pkgconfig-support.patch | 105 --------------------- .../pth/files/pth-fix-parallel.patch | 48 ---------- 2 files changed, 153 deletions(-) delete mode 100644 meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch delete mode 100644 meta/recipes-support/pth/files/pth-fix-parallel.patch
meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch deleted +0 -105
@@ -1,105 +0,0 @@ -Upstream-Status: Pending - -Add pkgconfig support to pth. - -Signed-off-by: Chen Qi <[email protected]> - -Index: Makefile.in -=========================================================== ---- a/Makefile.in -+++ b/Makefile.in -@@ -47,6 +47,9 @@ datadir = @datadir@ - - DESTDIR = - -+pkgconfigdir = ${libdir}/pkgconfig -+pkgconfig_DATA = pth.pc -+ - ## - ## ____ TOOL DEFINITIONS ___________________________________________ - ## -@@ -216,7 +219,7 @@ test_pthread: test_pthread.o test_common.o libpthread.la - - # install the package - install: all-for-install -- @$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@ -+ @$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@ install-pkgconfigDATA - @touch .done-install >/dev/null 2>&1 || $(TRUE) - @$(MAKE) $(MKFLAGS) what-next - install-dirs: -@@ -227,6 +230,7 @@ install-dirs: - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1 - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man3 - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(datadir)/aclocal -+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(pkgconfigdir) - install-pth: - $(SHTOOL) install -c -m 755 pth-config $(DESTDIR)$(bindir)/pth-config - $(SHTOOL) install -c -m 644 $(S)pth-config.1 $(DESTDIR)$(mandir)/man1/pth-config.1 -@@ -242,12 +246,16 @@ install-pthread: - $(SHTOOL) install -c -m 644 $(S)pthread.3 $(DESTDIR)$(mandir)/man3/pthread.3 - @umask 022; $(LIBTOOL) --mode=install \ - $(SHTOOL) install -c libpthread.la $(DESTDIR)$(libdir)/libpthread.la -+install-pkgconfigDATA: $(pkgconfig_DATA) -+ $(SHTOOL) install -c -m 644 $(pkgconfig_DATA) $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA) - - # uninstall the package - uninstall: -- @$(MAKE) $(MKFLAGS) @UNINSTALL_PTHREAD@ uninstall-pth uninstall-dirs -+ @$(MAKE) $(MKFLAGS) uninstall-pkgconfigDATA @UNINSTALL_PTHREAD@ uninstall-pth uninstall-dirs - @touch .done-uninstall >/dev/null 2>&1 || $(TRUE) - @$(MAKE) $(MKFLAGS) what-next -+uninstall-pkgconfigDATA: -+ $(RM) $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA) - uninstall-pthread: - $(RM) $(DESTDIR)$(bindir)/pthread-config - $(RM) $(DESTDIR)$(mandir)/man1/pthread-config.1 -@@ -271,6 +279,7 @@ uninstall-dirs: - -$(RMDIR) $(DESTDIR)$(includedir) >/dev/null 2>&1 || $(TRUE) - -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE) - -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE) -+ -$(RMDIR) $(DESTDIR)$(pkgconfigdir) > /dev/null 2>&1 ||$(TRUE) - - # strip down the source tree to its minimum - striptease: -Index: configure.ac -=========================================================== ---- a/configure.ac -+++ b/configure.ac -@@ -656,6 +656,13 @@ pth_acmac.h dnl - chmod +rx pthread-config - chmod +rx pth-config - )dnl -+ -+PTH_VERSION=`echo $PTH_VERSION_STR | cut -d' ' -f1` -+AC_SUBST(PTH_VERSION) -+ -+AC_CONFIG_FILES([pth.pc]) -+AC_OUTPUT -+ - if test ".$enable_pthread" = .no; then - rm -f pthread-config - rm -f pthread.h -Index: pth.pc.in -=========================================================== ---- /dev/null -+++ b/pth.pc.in -@@ -0,0 +1,16 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+bindir=@bindir@ -+mandir=@mandir@ -+datadir=@datadir@ -+acdir=@datadir@/aclocal -+ -+Name: pth -+Description: GNU Portable Threads -+Requires: -+Version: @PTH_VERSION@ -+Libs: -L${libdir} -lpth -+Libs.private: -+Cflags: -I${includedir} --- -1.7.5.4 -
meta/recipes-support/pth/files/pth-fix-parallel.patch deleted +0 -48
48 lines not on this page · raw message
Signature · 1 line
2.7.0
PATCH 5/8 libtool-cross: Unset pre|post dep objects
In reply to Khem Rajpredep_objects and postdep_objects are specifying the duplicate objects which are better computed by gcc/g++ driver, since we want to generate PIE, PIC and non-PIC combinations, let gcc decide on this, since it knows best about linker options to use in each of these situations. When we defer the linker options to driver, we also need to remove -nostdlib from linker commandline options.
Remove duplicate directory creation for ${D}${bindir_crossscripts}/
This fixes a frequent problem we see during -fpie links e.g.
|/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/include/c++/5.3.0/iostream:74:
undefined reference to `__dso_handle'
| /home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld:.libs/cxx_channel.o: relocation R_X86_64_PC32 against undefined hidden
symbol `__dso_handle' can not be used when making a shared object
| /home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld:
final link failed: Bad value
After this change libtool gets changed as below
old_archive_from_expsyms_cmds=""
# Commands used to build a shared archive.
-archive_cmds="\$CC \$pic_flag -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname -o \$lib"
-archive_expsym_cmds="\$CC \$pic_flag -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname \$wl-retain-symbols-file \$wl\$export_symbols -o \$lib" +archive_cmds="\$CC \$pic_flag -shared \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname -o \$lib"
+archive_expsym_cmds="\$CC \$pic_flag -shared \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname \$wl-retain-symbols-file \$wl\$export_symbols -o \$lib"
# Commands used to build a loadable module if different from building
# a shared archive. @@ -11908,8 +11908,8 @@
# Dependencies to place before and after the objects being linked to
# create a shared library. -predep_objects="/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/Scrt1.o /home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/crti.o /home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/x86_64-oe-linux/5.3.0/crtbeginS.o" -postdep_objects="/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/x86_64-oe-linux/5.3.0/crtendS.o /home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/crtn.o" +predep_objects="" +postdep_objects="" predeps="" postdeps="-lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc"
--- meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +5 -1
@@ -16,7 +16,11 @@ do_configure_prepend () { do_install () { install -d ${D}${bindir_crossscripts}/ install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool - install -d ${D}${bindir_crossscripts}/ + sed -e 's@^\(predep_objects="\).*@\1"@' \ + -e 's@^\(postdep_objects="\).*@\1"@' \ + -i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool + sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool + sed -i '@^archive_expsym_cmds=@s@-nostdlib@@g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize chmod 0755 ${D}${bindir_crossscripts}/libtoolize install -d ${D}${target_datadir}/libtool/build-aux/
Signature · 1 line
2.7.0
PATCH 6/8 db: Use cross libtool
In reply to Khem Rajdb is not reconfigured like usual autotools based components so it generates its own libtool, and this libtool is not equipped to do cross builds, e.g. when building using clang on musl, it misdirects linker to use libstdc++.so from build host instead of target, the reason being it does not understand sysroot.
Use cross libtool instead to build the target versions
Fixes errors like below
| libtool: link: arm-oe-linux-musleabi-ranlib .libs/libdb-6.0.a
| /a/builder/mnt/build-oe/tmp-musl/sysroots/x86_64-linux/usr/bin/arm-oe-linux-musleabi/arm-oe-linux-musleabi-ld:
error: /usr/lib/libstdc++.so: incompatible target
--- meta/recipes-support/db/db_5.3.28.bb | 1 + meta/recipes-support/db/db_6.0.30.bb | 1 + 2 files changed, 2 insertions(+)
meta/recipes-support/db/db_5.3.28.bb +1 -0
@@ -76,6 +76,7 @@ MUTEX = "" MUTEX_arm = "${ARM_MUTEX}" MUTEX_armeb = "${ARM_MUTEX}" EXTRA_OECONF += "${MUTEX}" +EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" # Cancel the site stuff - it's set for db3 and destroys the # configure.
meta/recipes-support/db/db_6.0.30.bb +1 -0
@@ -83,6 +83,7 @@ MUTEX = "" MUTEX_arm = "${ARM_MUTEX}" MUTEX_armeb = "${ARM_MUTEX}" EXTRA_OECONF += "${MUTEX}" +EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" # Cancel the site stuff - it's set for db3 and destroys the # configure.
Signature · 1 line
2.7.0
PATCH 7/8 local.conf.sample.extended: Document HOW-TO enable systemd or busbox for init system
In reply to Khem RajOE core provides systemd,busybox as options for system init system along with sysvinit being the default. Document the needed settings to enable systemd and busybox as options if user wishes.
Remove trailing whitespaces as we are here.
--- meta/conf/local.conf.sample | 25 ++++++++++++------------- meta/conf/local.conf.sample.extended | 28 +++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 18 deletions(-)
meta/conf/local.conf.sample +12 -13
@@ -2,11 +2,11 @@ # This file is your local configuration file and is where all local user settings # are placed. The comments in this file give some guide to the options a new user # to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended +# be set in this file. More adventurous users can look at local.conf.extended # which contains other examples of configuration which can be placed in this file # but new users likely won't need any of them initially. # -# Lines starting with the '#' character are commented out and in some cases the +# Lines starting with the '#' character are commented out and in some cases the # default values are provided as comments to show people example syntax. Enabling # the option is a question of removing the # character and making any change to the # variable as required.
@@ -73,8 +73,8 @@ MACHINE ??= "qemux86" # # Package Management configuration # -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used # to generate the root filesystems. # Options are: # - 'package_deb' for debian style deb files
@@ -88,7 +88,7 @@ PACKAGE_CLASSES ?= "package_ipk" # SDK/ADT target architecture # # This variable specifies the architecture to build SDK/ADT items for and means -# you can build the SDK packages for architectures other than the machine you are +# you can build the SDK packages for architectures other than the machine you are # running the build on (i.e. building i686 packages on an x86_64 host). # Supported values are i686 and x86_64 #SDKMACHINE ?= "i686"
@@ -96,7 +96,7 @@ PACKAGE_CLASSES ?= "package_ipk" # # Extra image configuration defaults # -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated # images. Some of these options are added to certain image types automatically. The # variable can contain the following options: # "dbg-pkgs" - add -dbg packages for all installed packages
@@ -121,7 +121,7 @@ EXTRA_IMAGE_FEATURES = "debug-tweaks" # Additional image features # # The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable +# enable extra features. Some available options which can be included in this variable # are: # - 'buildstats' collect build statistics # - 'image-mklibs' to reduce shared library files size for an image
@@ -143,8 +143,8 @@ USER_CLASSES ?= "buildstats image-mklibs image-prelink" # # Interactive shell configuration # -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is # multithreaded and needs to be able to handle the case where more than one parallel # process may require the user's attention. The default is iterate over the available # terminal types to find one that works.
@@ -182,13 +182,13 @@ BB_DISKMON_DIRS = "\ # # Shared-state files from other locations # -# As mentioned above, shared state files are prebuilt cache data objects which can +# As mentioned above, shared state files are prebuilt cache data objects which can # used to accelerate build time. This variable can be used to configure the system # to search other mirror locations for these objects before it builds the data itself. # # This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the # cache locations to check for the shared objects. # NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH # at the end as shown in the examples below. This will be substituted with the
@@ -209,7 +209,6 @@ PACKAGECONFIG_append_pn-qemu-native = " sdl" PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" #ASSUME_PROVIDED += "libsdl-native" - # CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to # track the version of this file when it was generated. This can safely be ignored if # this doesn't mean anything to you.
meta/conf/local.conf.sample.extended +23 -5
@@ -57,7 +57,7 @@ # The following are used to control options related to debugging. # -# Uncomment this to change the optimization to make debugging easer, at the +# Uncomment this to change the optimization to make debugging easer, at the # possible cost of performance. # DEBUG_BUILD = "1" #
@@ -131,9 +131,9 @@ # build both the 32-bit and 64-bit wrapper libraries on a 64-bit build system. # # Pseudo will attempt to determine if a 32-bit wrapper is necessary, but -# it doesn't always guess properly. If you have 32-bit executables on -# your 64-bit build system, you likely want to set this to "0", -# otherwise you could end up with incorrect file attributes on the +# it doesn't always guess properly. If you have 32-bit executables on +# your 64-bit build system, you likely want to set this to "0", +# otherwise you could end up with incorrect file attributes on the # target filesystem. # # Default is to not build 32 bit libs on 64 bit systems, uncomment this
@@ -271,7 +271,7 @@ # # GCC/LD FLAGS to enable more secure code generation -# +# # By including the security_flags include file you enable flags # to the compiler and linker that cause them to generate more secure # code, this is enabled by default in the poky-lsb distro.
@@ -381,3 +381,21 @@ # PREFERRED_VERSION_rpm = "4.11.2" # PREFERRED_VERSION_rpm-native = "4.11.2" # RPMROOTFSDEPENDS_remove = "rpmresolve-native:do_populate_sysroot" + +# +# Use busybox/mdev for system initialization +# +#VIRTUAL-RUNTIME_dev_manager = "busybox-mdev" +#VIRTUAL-RUNTIME_login_manager = "busybox" +#VIRTUAL-RUNTIME_init_manager = "busybox" +#VIRTUAL-RUNTIME_initscripts = "initscripts" +#VIRTUAL-RUNTIME_keymaps = "keymaps" +#DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" + +# +# Use systemd for system initialization +# +#DISTRO_FEATURES_append = " systemd" +#DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" +#VIRTUAL-RUNTIME_init_manager = "systemd" +#VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
Signature · 1 line
2.7.0
PATCH 8/8 boost: Fix build on soft-float ABI arm systems
In reply to Khem RajWe get errors like ./boost/test/execution_monitor.hpp:490:27: error: 'FE_DIVBYZERO' was not declared in this scope
BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
on musl, rightly because FPU is not used on soft-float systems
--- .../recipes-support/boost/boost/consider-hardfp.patch | 19 +++++++++++++++++++ meta/recipes-support/boost/boost_1.60.0.bb | 1 + 2 files changed, 20 insertions(+) create mode 100644 meta/recipes-support/boost/boost/consider-hardfp.patch
meta/recipes-support/boost/boost/consider-hardfp.patch new file +19 -0
@@ -0,0 +1,19 @@ +When using soft-float, on ARM we should not expect the FE_* symbols + +Signed-off-by: Khem Raj <[email protected]> +Upstream-Status: Pending + +Index: boost_1_60_0/boost/test/execution_monitor.hpp +=================================================================== +--- boost_1_60_0.orig/boost/test/execution_monitor.hpp ++++ boost_1_60_0/boost/test/execution_monitor.hpp +@@ -484,7 +484,8 @@ enum masks { + BOOST_FPE_UNDERFLOW = EM_UNDERFLOW|EM_DENORMAL, + + BOOST_FPE_ALL = MCW_EM, +-#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) ++#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \ ++ || defined(__ARM_PCS) + BOOST_FPE_ALL = 1, + #else + BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
meta/recipes-support/boost/boost_1.60.0.bb +1 -0
@@ -4,4 +4,5 @@ include boost.inc SRC_URI += "\ file://arm-intrinsics.patch \ file://0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch;striplevel=2 \ + file://consider-hardfp.patch \ "
Signature · 1 line
2.7.0
Re: [PATCH 4/8] pth: Remove dead code
In reply to Khem RajQuoted 2 lines · Khem Raj
recipe is removed, delete remaining cruft
Please update the packagegroups that refer to pth.
Ross
Re: [PATCH 4/8] pth: Remove dead code
Quoted 2 lines · Ross
Please update the packagegroups that refer to pth.
Sorry, this was already merged by Richard and he pulled the fixed version that I'd made locally.
Ross
Re: [PATCH 4/8] pth: Remove dead code
Ross
Quoted 8 lines · Ross
Quoted 2 lines · Ross
Please update the packagegroups that refer to pth.
Sorry, this was already merged by Richard and he pulled the fixed version that I'd made locally.
This is patches files left overs. they are not merged yet.
http://git.openembedded.org/openembedded-core/commit/?id=22c0b4c5034f929a1b1145f49b835387856e80b1
did not delete them.
Quoted 2 lines
Ross
Re: [PATCH 5/8] libtool-cross: Unset pre|post dep objects
In reply to Khem RajQuoted 69 lines · Khem Raj
predep_objectsandpostdep_objectsare specifying the duplicate objects which are better computed by gcc/g++ driver, since we want to generate PIE, PIC and non-PIC combinations, let gcc decide on this, since it knows best about linker options to use in each of these situations. When we defer the linker options to driver, we also need to remove -nostdlib from linker commandline options.Remove duplicate directory creation for ${D}${bindir_crossscripts}/
This fixes a frequent problem we see during -fpie links e.g.
|
/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/include/c++/5.3.0/iostream:74:
undefined reference to `__dso_handle'
|/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld:.libs/cxx_channel.o: relocationR_X86_64_PC32against undefined hidden
symbol `__dso_handle' can not be used when making a shared object
|/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld:
final link failed: Bad valueAfter this change libtool gets changed as below
old_archive_from_expsyms_cmds=""
# Commands used to build a shared archive. -archive_cmds="\$CC \$pic_flag -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname -o \$lib"
-archive_expsym_cmds="\$CC \$pic_flag -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname \$wl-retain-symbols-file \$wl\$export_symbols -o \$lib" +archive_cmds="\$CC \$pic_flag -shared \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname -o \$lib"
+archive_expsym_cmds="\$CC \$pic_flag -shared \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname \$wl-retain-symbols-file \$wl\$export_symbols -o \$lib"# Commands used to build a loadable module if different from building
# a shared archive.(quoted diff) +0
-1@@ -11908,8 +11908,8 @@ # Dependencies to place before and after the objects being linked to # create a shared library. -predep_objects="/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/Scrt1.o
/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/crti.o/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/x86_64-oe-linux/5.3.0/crtbeginS.o" -postdep_objects="/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/x86_64-oe-linux/5.3.0/crtendS.o/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/crtn.o"(quoted diff) +2
-0+predep_objects="" +postdep_objects=""predeps=""
postdeps="-lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc"Signed-off-by Khem Raj <[email protected]>---
meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb | 6 +++++-1 file changed, 5 insertions(+), 1 deletion(-)meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +0
-0
meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb do_configure_prepend () { · line 23
Quoted 9 lines
meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +5
-1@@ -16,7 +16,11 @@ do_configure_prepend () { do_install () { install -d ${D}${bindir_crossscripts}/ install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool - install -d ${D}${bindir_crossscripts}/ + sed -e 's@^\(predep_objects="\).*@\1"@' \ + -e 's@^\(postdep_objects="\).*@\1"@' \ + -i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool + sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool + sed -i '@^archive_expsym_cmds=@s@-nostdlib@@g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
a self review after strong tea revealed that I did not commit my local change on top of this so this patch was wrong I have not squashed the local remaining change into this and updated the kraj/pu branch.
Quoted 6 lines
meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +0
-1GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize chmod 0755 ${D}${bindir_crossscripts}/libtoolize install -d ${D}${target_datadir}/libtool/build-aux/ --2.7.0
Re: [PATCH 3/8] distutils: Consider S != B case
In reply to Khem RajQuoted 6 lines · Khem Raj
out of tree builds can break the assumption about
setup.pybeing in the
current directory, seen especially with devtool when using externalsrc
many python modules cant build since it cant findsetup.pyin devtool workspace
Why do we need to "cd" in all cases, and put full paths to setup.py? Shouldn't one or the other suffice? The [dirs] option to the functions should alleviate the need to cd in most cases?
Cheers,
Richard
Quoted 221 lines
Signed-off-by Khem Raj <[email protected]>--- meta/classes/distutils.bbclass | 27 +++++++++++++++++---------- meta/classes/distutils3.bbclass | 26 +++++++++++++++++++------- 2 files changed, 36 insertions(+), 17 deletions(-)meta/classes/distutils.bbclass +9
-6@@ -8,44 +8,51 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ --install-data=${D}/${datadir}" distutils_do_compile() { - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \ - bbfatal "${PYTHON_PN} setup.py build execution failed." + cwd=$PWD;cd ${S} + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py build --build-base=${B} ${DISTUTILS_BUILD_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py build execution failed." + cd $cwd } distutils_stage_headers() { + cwd=$PWD;cd ${S} install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install_headers executionfailed."
meta/classes/distutils.bbclass +2
-1+ cd $cwd } distutils_stage_all() { + cwd=$PWD;cd ${S} STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}
setup.pyinstall ${DISTUTILS_STAGE_ALL_ARGS} || \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}${S}/setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install (stage) executionfailed."
meta/classes/distutils.bbclass +2
-1+ cd $cwd } distutils_do_install() { + cwd=$PWD;cd ${S} install -d ${D}${PYTHON_SITEPACKAGES_DIR} STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}
setup.pyinstall --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}${S}/setup.pyinstall --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
bbfatal "${PYTHON_PN}setup.pyinstall execution failed."# support filenames with *spaces*
# only modify file if it contains path and recompile it find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -imeta/classes/distutils.bbclass +2
-5-e s:${D}::g {} \; -exec ${STAGING_BINDIR_NATIVE}/python -native/python -mcompileall {} \; - if test -e ${D}${bindir} ; then + if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then sed -i -e s:${STAGING_BINDIR_NATIVE}/python -native/python:${bindir}/env\ python:g $i@@ -65,7 +72,6 @@ distutils_do_install() { rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py* - # # FIXME: Bandaid against wrong datadir computation #@@ -79,6 +85,7 @@ distutils_do_install() { rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py; rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.pyc; fi + cd $cwd } EXPORT_FUNCTIONS do_compile do_installmeta/classes/distutils3.bbclass +7
-2@@ -9,6 +9,8 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ --install-data=${D}/${datadir}" distutils3_do_compile() { + cwd=$PWD + cd ${S} if [ ${BUILD_SYS} != ${HOST_SYS} ]; then SYS=${MACHINE} else@@ -17,13 +19,16 @@ distutils3_do_compile() { STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ - build ${DISTUTILS_BUILD_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py \ + build -build-base=${B} ${DISTUTILS_BUILD_ARGS} || \ bbfatal "${PYTHON_PN} setup.py build_ext execution failed." + cd $cwd } distutils3_do_compile[vardepsexclude] = "MACHINE" distutils3_stage_headers() { + cwd=$PWD + cd ${S} install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}if [ ${BUILD_SYS} != ${HOST_SYS} ]; then SYS=${MACHINE}meta/classes/distutils3.bbclass +1
-1@@ -31,12 +36,15 @@ distutils3_stage_headers() { SYS=${HOST_SYS} fi BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install_headers executionfailed."
meta/classes/distutils3.bbclass +4
-1+ cd $cwd } distutils3_stage_headers[vardepsexclude] = "MACHINE" distutils3_stage_all() { + cwd=$PWD + cd ${S} if [ ${BUILD_SYS} != ${HOST_SYS} ]; then SYS=${MACHINE} else@@ -47,12 +55,15 @@ distutils3_stage_all() { install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install (stage) executionfailed."
meta/classes/distutils3.bbclass +7
-5+ cd $cwd } distutils3_stage_all[vardepsexclude] = "MACHINE" distutils3_do_install() { + cwd=$PWD + cd ${S} install -d ${D}${PYTHON_SITEPACKAGES_DIR} if [ ${BUILD_SYS} != ${HOST_SYS} ]; then SYS=${MACHINE}@@ -63,13 +74,13 @@ distutils3_do_install() { STAGING_LIBDIR=${STAGING_LIBDIR} \ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install execution failed." # support filenames with *spaces* find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \; - if test -e ${D}${bindir} ; then + if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN} -native/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i@@ -84,7 +95,7 @@ distutils3_do_install() { fi rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth - + # # FIXME: Bandaid against wrong datadir computation #@@ -92,6 +103,7 @@ distutils3_do_install() { mv -f ${D}${datadir}/share/* ${D}${datadir}/ rmdir ${D}${datadir}/share fi + cd $cwd } distutils3_do_install[vardepsexclude] = "MACHINE"Signature · 1 line
2.7.0
Re: [PATCH 3/8] distutils: Consider S != B case
Quoted 11 lines · Richard Purdie
Quoted 6 lines · Khem Raj
out of tree builds can break the assumption about
setup.pybeing in the
current directory, seen especially with devtool when using externalsrc
many python modules cant build since it cant findsetup.pyin devtool workspaceWhy do we need to "cd" in all cases, and put full paths to
setup.py? Shouldn't one or the other suffice? The [dirs] option to the functions should alleviate the need to cd in most cases?
I wanted to act safe. Real fix is to use --build-base which makes it use anything for B
there are some python components especially in rpi layer which use relative paths
I thought there could be more.
Quoted 226 lines
Cheers,
Richard
Quoted 221 lines
Signed-off-by Khem Raj <[email protected]>--- meta/classes/distutils.bbclass | 27 +++++++++++++++++---------- meta/classes/distutils3.bbclass | 26 +++++++++++++++++++------- 2 files changed, 36 insertions(+), 17 deletions(-)meta/classes/distutils.bbclass +9
-6@@ -8,44 +8,51 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ --install-data=${D}/${datadir}" distutils_do_compile() { - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \ - bbfatal "${PYTHON_PN} setup.py build execution failed." + cwd=$PWD;cd ${S} + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py build --build-base=${B} ${DISTUTILS_BUILD_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py build execution failed." + cd $cwd } distutils_stage_headers() { + cwd=$PWD;cd ${S} install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install_headers executionfailed."
meta/classes/distutils.bbclass +2
-1+ cd $cwd } distutils_stage_all() { + cwd=$PWD;cd ${S} STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}
setup.pyinstall ${DISTUTILS_STAGE_ALL_ARGS} || \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}${S}/setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install (stage) executionfailed."
meta/classes/distutils.bbclass +2
-1+ cd $cwd } distutils_do_install() { + cwd=$PWD;cd ${S} install -d ${D}${PYTHON_SITEPACKAGES_DIR} STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}
setup.pyinstall --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}${S}/setup.pyinstall --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
bbfatal "${PYTHON_PN}setup.pyinstall execution failed."# support filenames with *spaces*
# only modify file if it contains path and recompile it find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -imeta/classes/distutils.bbclass +2
-5-e s:${D}::g {} \; -exec ${STAGING_BINDIR_NATIVE}/python -native/python -mcompileall {} \; - if test -e ${D}${bindir} ; then + if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then sed -i -e s:${STAGING_BINDIR_NATIVE}/python -native/python:${bindir}/env\ python:g $i@@ -65,7 +72,6 @@ distutils_do_install() { rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py* - # # FIXME: Bandaid against wrong datadir computation #@@ -79,6 +85,7 @@ distutils_do_install() { rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py; rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.pyc; fi + cd $cwd } EXPORT_FUNCTIONS do_compile do_installmeta/classes/distutils3.bbclass +7
-2@@ -9,6 +9,8 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ --install-data=${D}/${datadir}" distutils3_do_compile() { + cwd=$PWD + cd ${S} if [ ${BUILD_SYS} != ${HOST_SYS} ]; then SYS=${MACHINE} else@@ -17,13 +19,16 @@ distutils3_do_compile() { STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ - build ${DISTUTILS_BUILD_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py \ + build -build-base=${B} ${DISTUTILS_BUILD_ARGS} || \ bbfatal "${PYTHON_PN} setup.py build_ext execution failed." + cd $cwd } distutils3_do_compile[vardepsexclude] = "MACHINE" distutils3_stage_headers() { + cwd=$PWD + cd ${S} install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}if [ ${BUILD_SYS} != ${HOST_SYS} ]; then SYS=${MACHINE}meta/classes/distutils3.bbclass +1
-1@@ -31,12 +36,15 @@ distutils3_stage_headers() { SYS=${HOST_SYS} fi BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install_headers executionfailed."
meta/classes/distutils3.bbclass +4
-1+ cd $cwd } distutils3_stage_headers[vardepsexclude] = "MACHINE" distutils3_stage_all() { + cwd=$PWD + cd ${S} if [ ${BUILD_SYS} != ${HOST_SYS} ]; then SYS=${MACHINE} else@@ -47,12 +55,15 @@ distutils3_stage_all() { install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install (stage) executionfailed."
meta/classes/distutils3.bbclass +7
-6+ cd $cwd } distutils3_stage_all[vardepsexclude] = "MACHINE" distutils3_do_install() { + cwd=$PWD + cd ${S} install -d ${D}${PYTHON_SITEPACKAGES_DIR} if [ ${BUILD_SYS} != ${HOST_SYS} ]; then SYS=${MACHINE}@@ -63,13 +74,13 @@ distutils3_do_install() { STAGING_LIBDIR=${STAGING_LIBDIR} \ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install execution failed." # support filenames with *spaces* find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \; - if test -e ${D}${bindir} ; then + if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN} -native/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i@@ -84,7 +95,7 @@ distutils3_do_install() { fi rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth - + # # FIXME: Bandaid against wrong datadir computation #@@ -92,6 +103,7 @@ distutils3_do_install() { mv -f ${D}${datadir}/share/* ${D}${datadir}/ rmdir ${D}${datadir}/share fi + cd $cwd } distutils3_do_install[vardepsexclude] = "MACHINE" --2.7.0
Re: [PATCH 2/8] nss-myhostname: Fix build on musl
In reply to Khem Rajmeta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch line 12
Quoted 13 lines · Khem Raj
meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch new file +12
-0+From d1345871b992f9a055c968963967e728da1a7ffb Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 30 Jan 2016 20:29:06 +0000 +Subject: [PATCH] nss-myhostname: Check for nss.h presense before use + +We do not have nss.h on musl e.g. and configury is already checking for +nss.h presence, use this to define needed data structures if nss.h is +missing on a given libc implementation on a platform + +include stdint.h for uint32_h definition + +Signed-off-by: Khem Raj <[email protected]>
No Upstream-Status.
Ross
Re: [PATCH 2/8] nss-myhostname: Fix build on musl
Quoted 4 lines · Ross
Quoted 1 line · Khem Raj
Quoted 15 lines
meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch line 12
Quoted 12 lines
meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch new file +12
-0+From d1345871b992f9a055c968963967e728da1a7ffb Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 30 Jan 2016 20:29:06 +0000 +Subject: [PATCH] nss-myhostname: Check for nss.h presense before use + +We do not have nss.h on musl e.g. and configury is already checking for +nss.h presence, use this to define needed data structures if nss.h is +missing on a given libc implementation on a platform + +include stdint.h for uint32_h definition + +Signed-off-by: Khem Raj <[email protected]>No Upstream-Status.
Thats embarrassing but I started to use devtool and recipe-update cmd ovewrites it from older patch. May be update recipe cmd should ask for it before transporting the patch to metadata
Quoted 2 lines
Ross
Re: [PATCH 8/8] boost: Fix build on soft-float ABI arm systems
In reply to Khem Rajmeta/recipes-support/boost/boost/consider-hardfp.patch line 17
Quoted 5 lines · Khem Raj
meta/recipes-support/boost/boost/consider-hardfp.patch new file +5
-0+ BOOST_FPE_ALL = MCW_EM, +-#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) ++#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \ ++ || defined(__ARM_PCS) + BOOST_FPE_ALL = 1,
This looks a bit bogus. Whether or not a particular fesetenv() flag is available is, or should be, orthogonal to the question of whether you are using the soft-float or hard-float ABI. I think it might be true that some libraries don't implement fesetenv() when using softfp (i.e. no VFP instructions at all) but that is not necessarily the same thing as the soft float ABI. What was the exact situation where you had a problem with this?
Anyway, if what you want to test is the availability of FE_DIVBYZERO, you can just use "#ifdef FE_DIVBYZERO" since FE_* are required to be macros.
p.
Re: [PATCH 8/8] boost: Fix build on soft-float ABI arm systems
Quoted 10 lines · Phil Blundell
meta/recipes-support/boost/boost/consider-hardfp.patch line 17
Quoted 5 lines · Khem Raj
meta/recipes-support/boost/boost/consider-hardfp.patch new file +5
-0+ BOOST_FPE_ALL = MCW_EM, +-#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) ++#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \ ++ || defined(__ARM_PCS) + BOOST_FPE_ALL = 1,This looks a bit bogus. Whether or not a particular
fesetenv()flag is available is, or should be, orthogonal to the question of whether you are using the soft-float or hard-float ABI.
it should be
I think it might be true
Quoted 3 lines
that some libraries don't implement
fesetenv()when using softfp (i.e. no VFP instructions at all) but that is not necessarily the same thing as the soft float ABI.
does glibc implement it correctly using soft-fp ? my tests failed for glibc thats why
I used the VFP detection logic
What was the exact situation where you had a
Quoted 1 line
problem with this?
using musl.
Quoted 4 lines
Anyway, if what you want to test is the availability of
FE_DIVBYZERO, you can just use "#ifdefFE_DIVBYZERO" since FE_* are required to be macros.
I think that could be a better solution, atleast glibc can keep doing whatever it was doing before.
Re: [PATCH 8/8] boost: Fix build on soft-float ABI arm systems
Quoted 9 lines · Khem Raj
On Wed, Feb 3, 2016 at 12:42 PM, Phil Blundell <[email protected]> wrote:
I think it might be trueQuoted 3 lines
that some libraries don't implement
fesetenv()when using softfp (i.e. no VFP instructions at all) but that is not necessarily the same thing as the soft float ABI.does glibc implement it correctly using soft-fp ? my tests failed for glibc thats why
I used the VFP detection logic
It depends what you mean by "correctly". If you don't have a VFP unit then fesetenv() will fail (return nonzero) but the symbols will be available and there should be no error at build time. If you do have a VFP unit and are using it then, irrespective of your ABI, fesetenv() should succeed and subsequent operations ought to behave correctly.
I think there is a possible hole in the case where you do have a VFP unit available but have compiled your code -msoft-float, have not installed a VFP optimized library, and hence are not actually using the VFP. In this situation, yes, I think it's quite conceivable that glibc might be doing the wrong thing. Fortunately I think this scenario is rare enough that we probably don't need to worry about it too much.
p.