Skip to contentSkip to conversation

musl fixes part 3 & 4 combined

PATCH In review Khem Raj 3 participants 93 messages Jan 17, 2016 – Jan 22, 2016 exec and binfmt

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

cover musl fixes part 3 & 4 combined

This patchset rebases the last pull request on top of latest master since lot of recipes went in and the patches wont apply straight

core-image-weston/core-image-sato/core-image-full-cmdline build for all qemu machines work well.

No regressions seen on glibc based world builds

Here are some of world build results for qemu (musl)

http://errors.yoctoproject.org/Errors/Build/11636/
http://errors.yoctoproject.org/Errors/Build/11637/
http://errors.yoctoproject.org/Errors/Build/11638/

more to follow as the run finishes

One patch is for upgrading uclibc to 1.0.11

The following changes since commit b3b679d5be86f73d1a06c7230cb00872f0a407b5:

openssh: update to 7.1p2 (2016-01-15 15:44:51 +0000)

are available in the git repository at:

git://github.com/kraj/openembedded-core kraj/musl-fixes
https://github.com/kraj/openembedded-core/tree/kraj/musl-fixes

Khem Raj (72):
powertop: Include right headers for timval struct
blktrace: Include <sys/types.h for dev_t
ppp: Fix build with musl
tcp-wrappers: Fix build with musl
fts: Add recipe
connman: include config.h for HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR
libcgroup: Add dependency on fts when building on musl
linux-libc-headers: Port patches for linux-headers for musl
xserver-xorg: Fix build with musl
gdk-pixbuf: Fix latent build issue exposed by musl
argp-standalone: Add recipe
gnutls: Link with libargp on musl and depend on argp-standalone
util-linux: Fix ptest builds on musl
elfutils: Fix build with uclibc/musl
systemd: Update and fix build with uclibc packagegroup-self-hosted.bb: Move glibc-gconv-ibm850 to glibc only
case
guile: Fix build with uclibc
gnutls: Link with libuargp on uclibc
mtools: Fix build with uclibc
parted: Fix build with uclibc
net-tools: Link with libintl on uclibc
libdrm: Upgrade 2.4.65 -> 2.4.66
directfb: Fix build with musl
gzip: Fix build with musl
watchdog: Fix build with musl
xinetd: Fix build with musl
dpkg: Add musleabi to known architectures
puzzles: Zero'ise structs before use
apt: Add support for building for musl targets
libunwind: backtrace APIs are glibc specific
babeltrace: Add missing header for MAXNAMLEN define
sysklogd: untangle header inclusion maze
console-tools: Include sys/types.h for u_char and u_short defs
webkitgtk: Fix build with clang/musl
rt-tests: Fix build with non-gcc compilers
tar: Fix build for musl based targets
pax: Fix build with musl
iputils: Use member based initialization for mrghdr struct
libuser: Fix build when secure getenv is not there
iproute2: Fix build with musl
irda-utils: Fix header inclusions
nspr: Drop older glibc code
chkconfig: Avoid using caddr_t
tcf-agent: Implement canonicalize_file_name() for musl as well bsd-headers,musl: Add recipe for bsd missing features
nfs-utils: Disable tcp-wrappers for musl
portmap: Point to tirpc headers and libraries on musl
systemd: Skip parsing on musl based targets
libsolv: Update to 0.6.17+
db: Use cross libtool
kexec-tools: Define _GNU_SOURCE for getting loff_t definition
pcmciautils: Fix parallel build and include sys/types.h
btrfs-tools: Disable backtrace on musl
apmd: Fix build with musl
nss: Undefine HAVE_SYS_CDEFS_H
dosfstools: Correct cross-compile CFLAGS and fix build with musl
fts: Fix linker hash-style option
musl: Create ld.so as a relative symlink
bsd-headers: Package cdefs.h
guile: Fix build with musl
unfs3: Depend on libtirpc when building on musl
uclibc: Update to 1.0.11
acpid: Fix build on musl
grub: Backport fix for largefile detection/use
console-tools: Fix header inclusion when not using glibc
gpgme: Define __error_t_defined on musl
mdadm: Fix build with musl
eglinfo: Fix build on raspberrypi
puzzles: Silence warning on arm with clang
binutils: Fix gold linking errors due to unresolved R_ARM_MOVW_ABS_NC
syslinux: Set LD to avoid using build host ld
glib-2.0: Fix locale location on musl

Ross Burton (1):
oprofile: fix build with musl

 meta/recipes-bsp/acpid/acpid.inc                   |    2 +
 ...1-Define-isfdtype-if-libc-doesn-t-have-it.patch |   62 +
 ...-config.h-from-builddir-instead-of-srcdir.patch |   51 +
 meta/recipes-bsp/apmd/apmd/wexitcode.patch         |   26 +
 meta/recipes-bsp/apmd/apmd_3.2.2-15.bb             |    1 +
 ...ct-_llseek-code-and-require-long-filesyst.patch |   80 +
 meta/recipes-bsp/grub/grub-efi_2.00.bb             |    2 +
 ...-mfpmath-sse-as-well-when-SSE-is-disabled.patch |   46 +
 ...1-grub.d-10_linux.in-add-oe-s-kernel-name.patch |   56 +
 meta/recipes-bsp/grub/grub2.inc                    |    1 +
 meta/recipes-bsp/grub/grub_2.00.bb                 |    2 +
 meta/recipes-bsp/grub/grub_git.bb                  |   13 +-
 .../0001-fix-a-parallel-building-issue.patch       |   18 +-
 .../pcmciautils-018/lex_sys_types.patch            |   21 +
 meta/recipes-bsp/pcmciautils/pcmciautils_018.bb    |    1 +
 .../0003-Fix-header-inclusions-for-musl.patch      |   79 +-
 .../iproute2/iproute2/iproute2-4.3.0-musl.patch    |   97 +
 .../iproute2/iproute2_4.3.0.bb                     |    1 +
 .../irda-utils/irda-utils-0.9.18/musl.patch        |   29 +
 .../irda-utils/irda-utils_0.9.18.bb                |    1 +
 .../nfs-utils/nfs-utils_1.3.3.bb                   |    1 +
 meta/recipes-connectivity/portmap/portmap_6.0.bb   |    4 +
 .../ppp/ppp/0001-Fix-build-with-musl.patch         |  163 +
 meta/recipes-connectivity/ppp/ppp_2.4.7.bb         |    3 +
 meta/recipes-core/bsd-headers/bsd-headers.bb       |   27 +
 .../bsd-headers/bsd-headers/sys-cdefs.h            |   26 +
 .../bsd-headers/bsd-headers/sys-queue.h            |  846 +++
 .../bsd-headers/bsd-headers/sys-tree.h             |  761 +++
 .../0001-Cover-the-else-with-__GLIBC__.patch       |   51 +
 ...clude-sys-types.h-for-u_char-and-u_short-.patch |   44 +
 .../console-tools/console-tools_0.3.2.bb           |    4 +
 meta/recipes-core/fts/fts.bb                       |   45 +
 .../fts/fts/fts-header-correctness.patch           |   25 +
 meta/recipes-core/fts/fts/fts-uclibc.patch         |   50 +
 meta/recipes-core/fts/fts/gcc5.patch               | 1368 +++++
 meta/recipes-core/fts/fts/remove_cdefs.patch       |   69 +
 meta/recipes-core/fts/fts/stdint.patch             |   15 +
 ...{uclibc.patch => uclibc_musl_translation.patch} |   20 +-
 meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb      |    2 +-
 meta/recipes-core/glib-2.0/glib.inc                |    4 +
 .../libcgroup/libcgroup/musl-decls-compat.patch    |  235 +
 meta/recipes-core/libcgroup/libcgroup_0.41.bb      |    4 +
 ...dynamic-linker-a-relative-symlink-to-libc.patch |   34 +
 meta/recipes-core/musl/musl_git.bb                 |    4 +-
 .../packagegroups/packagegroup-self-hosted.bb      |    2 +-
 .../systemd/0001-define-exp10-if-missing.patch     |    4 +-
 ...r-getty-to-agetty-in-console-setup-system.patch |    4 +-
 ...pper-instead-of-looking-for-relative-opti.patch |   61 +
 ...v-when-secure-versions-are-not-available.patch} |   21 +-
 ...c-Change-the-default-device-timeout-to-2.patch} |    4 +-
 ...-install-dependency-links-at-install-tim.patch} |    6 +-
 ...eck-for-additional-features-that-uclibc-.patch} |   12 +-
 ...n-Use-execvpe-only-when-libc-supports-it.patch} |    4 +-
 ...unimplemented-_SC_PHYS_PAGES-system-conf.patch} |    4 +-
 ...010-implment-systemd-sysv-install-for-OE.patch} |    4 +-
 ...es-Build-conditionally-when-HAVE_MYHOSTN.patch} |    6 +-
 ...patch => 0012-rules-whitelist-hd-devices.patch} |    4 +-
 ...or-add-support-for-executing-scripts-und.patch} |    4 +-
 ...-Make-root-s-home-directory-configurable.patch} |   14 +-
 ...015-systemd-user-avoid-using-system-auth.patch} |    4 +-
 ...vert-rules-remove-firmware-loading-rules.patch} |    4 +-
 ...remove-userspace-firmware-loading-suppor.patch} |   16 +-
 ...sing.h-for-getting-secure_getenv-definiti.patch |   25 +
 ...il-don-t-fail-if-libc-doesn-t-support-IDN.patch |   34 +
 meta/recipes-core/systemd/systemd_228.bb           |   50 +-
 meta/recipes-core/uclibc/uclibc-git.inc            |    5 +-
 .../uclibc-git/0003-Add-argp-implementation.patch  | 5811 --------------------
 .../util-linux/uuid-test-error-api.patch           |   92 +
 meta/recipes-core/util-linux/util-linux_2.27.1.bb  |    1 +
 meta/recipes-devtools/apt/apt.inc                  |    1 +
 ....mak-musl-based-systems-can-generate-shar.patch |   29 +
 meta/recipes-devtools/apt/apt_1.0.10.1.bb          |    3 +-
 meta/recipes-devtools/binutils/binutils-2.25.1.inc |    1 +
 ...h-adds-IFUNC-support-for-arm-gold-backend.patch | 1004 ++++
 ...001-btrfs-corrupt-blocks-Include-limits.h.patch |   34 +
 .../btrfs-tools/btrfs-tools_4.3.1.bb               |    3 +
 .../0001-mkfs.fat-fix-incorrect-int-type.patch     |   46 +
 .../dosfstools/dosfstools/largefile.patch          |   19 +
 .../dosfstools/dosfstools_3.0.28.bb                |    7 +-
 ...0006-add-musleabi-to-known-target-tripets.patch |   42 +
 meta/recipes-devtools/dpkg/dpkg_1.18.2.bb          |    3 +-
 ...de-alternatives-for-glibc-assumptions-hel.patch | 1161 ++++
 .../elfutils/elfutils-0.164/aarch64_uio.patch      |   47 +
 .../elfutils/elfutils-0.164/shadow.patch           |   23 +
 .../elfutils/elfutils-0.164/uclibc-support.patch   |  129 +
 .../elfutils/elfutils/mempcpy.patch                |   24 -
 meta/recipes-devtools/elfutils/elfutils_0.148.bb   |    1 -
 meta/recipes-devtools/elfutils/elfutils_0.164.bb   |   13 +-
 ...guile-Check-for-strtol_l-during-configure.patch |   56 +
 .../guile/files/remove_strcase_l_funcs.patch       |   38 +
 meta/recipes-devtools/guile/guile_2.0.11.bb        |   13 +
 meta/recipes-devtools/mtools/mtools_4.0.18.bb      |    3 +
 meta/recipes-devtools/syslinux/syslinux_6.03.bb    |    4 +-
 ...nonicalize_file_name-is-specific-to-glibc.patch |   46 +
 meta/recipes-devtools/tcf-agent/tcf-agent_git.bb   |    1 +
 meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb   |    8 +-
 .../chkconfig/chkconfig/replace_caddr_t.patch      |   33 +
 .../recipes-extended/chkconfig/chkconfig_1.3.58.bb |    4 +-
 meta/recipes-extended/gzip/gzip.inc                |    7 +
 .../files/0001-Fix-header-inclusion-for-musl.patch |   92 +
 .../0001-Intialize-struct-elements-by-name.patch   |   52 +
 meta/recipes-extended/iputils/iputils_s20151218.bb |    2 +
 meta/recipes-extended/libsolv/libsolv_git.bb       |    4 +-
 .../libuser/libuser/0001-Check-for-issetugid.patch |   62 +
 .../libuser/0002-remove-unused-execinfo.h.patch    |   27 +
 meta/recipes-extended/libuser/libuser_0.62.bb      |    4 +-
 .../0001-Define-_POSIX_C_SOURCE-if-undefined.patch |   59 +
 meta/recipes-extended/mdadm/mdadm_3.3.4.bb         |    2 +-
 .../net-tools/net-tools/musl-fixes.patch           |  100 +
 .../net-tools/net-tools_1.60-26.bb                 |    3 +-
 meta/recipes-extended/parted/parted_3.2.bb         |    3 +-
 .../pax/pax/0001-Fix-build-with-musl.patch         | 1287 +++++
 .../pax/0001-use-strtoll-instead-of-strtoq.patch   |   33 +
 meta/recipes-extended/pax/pax_3.4.bb               |   10 +
 .../sysklogd/files/0001-Fix-build-with-musl.patch  |  132 +
 meta/recipes-extended/sysklogd/sysklogd.inc        |    1 +
 meta/recipes-extended/tar/tar/musl_dirent.patch    |   19 +
 meta/recipes-extended/tar/tar_1.28.bb              |    6 +
 .../tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch |   31 +
 .../tcp-wrappers/tcp-wrappers_7.6.bb               |    4 +
 ...d-issues-found-with-non-glibc-C-libraries.patch |   99 +
 meta/recipes-extended/watchdog/watchdog_5.14.bb    |    8 +-
 ...se-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch |  100 +
 meta/recipes-extended/xinetd/xinetd_2.3.15.bb      |    5 +
 .../gdk-pixbuf/gdk-pixbuf/libc_memfuncs.patch      |   63 +
 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb |    1 +
 meta/recipes-graphics/directfb/directfb.inc        |    3 +
 .../directfb/directfb/compar_fn_t.patch            |   62 +
 .../directfb/directfb/union-sigval.patch           |   19 +
 .../directfb/use-PTHREAD_MUTEX_RECURSIVE.patch     |  116 +
 ...tests-kms-steal-crtc-Include-sys-select.h.patch |   33 +
 .../recipes-graphics/drm/libdrm/installtests.patch |   24 +-
 .../drm/{libdrm_2.4.65.bb => libdrm_2.4.66.bb}     |    8 +-
 meta/recipes-graphics/eglinfo/eglinfo.inc          |    4 +-
 ...GING_INCDIR-to-searchpath-for-egl-headers.patch |   34 +
 .../xserver-xorg/musl-arm-inb-outb.patch           |   18 +
 .../xorg-xserver/xserver-xorg_1.18.0.bb            |    4 +-
 ...-include-sys-types.h-for-dev_t-definition.patch |   30 +
 meta/recipes-kernel/blktrace/blktrace_git.bb       |    4 +-
 .../0001-vmcore-dmesg-Define-_GNU_SOURCE.patch     |   31 +
 meta/recipes-kernel/kexec/kexec-tools_2.0.11.bb    |    1 +
 ...mpat.h-fix-some-issues-arising-from-in6.h.patch |   82 +
 ...t.h-prevent-redefinition-of-struct-ethhdr.patch |   59 +
 ...remove-inclusion-of-sysinfo.h-in-kernel.h.patch |   32 +
 .../linux-libc-headers/linux-libc-headers_4.1.bb   |    5 +
 ...Include-sys-param.h-for-MAXNAMLEN-definti.patch |   29 +
 meta/recipes-kernel/lttng/babeltrace_1.3.1.bb      |    5 +-
 meta/recipes-kernel/oprofile/oprofile.inc          |    2 +
 meta/recipes-kernel/oprofile/oprofile/musl.patch   |   46 +
 ...0001-include-rquired-headers-for-typedefs.patch |   47 +
 meta/recipes-kernel/powertop/powertop_2.8.bb       |    4 +-
 ...t-CC-AR-variable-only-if-it-doesn-t-have-.patch |   30 +
 meta/recipes-rt/rt-tests/rt-tests_0.96.bb          |    3 +-
 ...1-palisade-Fix-warnings-with-clang-on-arm.patch |   72 +
 ...mpiler-errors-about-uninitialized-use-of-.patch |   32 +
 meta/recipes-sato/puzzles/puzzles_git.bb           |    2 +
 ...nable-backtrace-on-linux-when-using-glibc.patch |   39 +
 ...x-build-with-non-glibc-libraries-on-linux.patch |   61 +
 meta/recipes-sato/webkit/webkitgtk/clang.patch     |   25 +
 meta/recipes-sato/webkit/webkitgtk_2.10.4.bb       |    3 +
 .../argp-standalone/argp-standalone_1.3.bb         |   28 +
 .../files/0001-throw-in-funcdef.patch              |   84 +
 .../argp-standalone/files/0002-isprint.patch       |   51 +
 meta/recipes-support/db/db_5.3.28.bb               |    1 +
 meta/recipes-support/db/db_6.0.30.bb               |    1 +
 meta/recipes-support/gnutls/gnutls.inc             |    5 +-
 meta/recipes-support/gpgme/gpgme_1.5.4.bb          |    1 +
 ...-backtrace-Use-only-with-glibc-and-uclibc.patch |   45 +
 meta/recipes-support/libunwind/libunwind_1.1.bb    |    1 +
 ...001-Remove-the-check-for-LINUX-glibc-case.patch |   35 +
 meta/recipes-support/nspr/nspr_4.11.bb             |    9 +
 meta/recipes-support/nss/nss_3.19.2.bb             |    4 +
 172 files changed, 10817 insertions(+), 6019 deletions(-)
 create mode 100644 meta/recipes-bsp/acpid/acpid/0001-Define-isfdtype-if-libc-doesn-t-have-it.patch
 create mode 100644 meta/recipes-bsp/acpid/acpid/0001-Use-config.h-from-builddir-instead-of-srcdir.patch
 create mode 100644 meta/recipes-bsp/apmd/apmd/wexitcode.patch
 create mode 100644 meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch
 create mode 100644 meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
 create mode 100644 meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
 create mode 100644 meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch
 create mode 100644 meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch
 create mode 100644 meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch
 create mode 100644 meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch
 create mode 100644 meta/recipes-core/bsd-headers/bsd-headers.bb
 create mode 100644 meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h
 create mode 100644 meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h
 create mode 100644 meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h
 create mode 100644 meta/recipes-core/console-tools/console-tools-0.3.2/0001-Cover-the-else-with-__GLIBC__.patch
 create mode 100644 meta/recipes-core/console-tools/console-tools-0.3.2/0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch
 create mode 100644 meta/recipes-core/fts/fts.bb
 create mode 100644 meta/recipes-core/fts/fts/fts-header-correctness.patch
 create mode 100644 meta/recipes-core/fts/fts/fts-uclibc.patch
 create mode 100644 meta/recipes-core/fts/fts/gcc5.patch
 create mode 100644 meta/recipes-core/fts/fts/remove_cdefs.patch
 create mode 100644 meta/recipes-core/fts/fts/stdint.patch
 rename meta/recipes-core/glib-2.0/glib-2.0/{uclibc.patch => uclibc_musl_translation.patch} (51%)
 create mode 100644 meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch
 create mode 100644 meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
 rename meta/recipes-core/systemd/systemd/{0003-Use-getenv-when-secure-versions-are-not-available.patch => 0004-Use-getenv-when-secure-versions-are-not-available.patch} (56%)
 rename meta/recipes-core/systemd/systemd/{0004-core-device.c-Change-the-default-device-timeout-to-2.patch => 0005-core-device.c-Change-the-default-device-timeout-to-2.patch} (88%)
 rename meta/recipes-core/systemd/systemd/{0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch => 0006-binfmt-Don-t-install-dependency-links-at-install-tim.patch} (92%)
 rename meta/recipes-core/systemd/systemd/{0006-configure-Check-for-additional-features-that-uclibc-.patch => 0007-configure-Check-for-additional-features-that-uclibc-.patch} (72%)
 rename meta/recipes-core/systemd/systemd/{0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch => 0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch} (89%)
 rename meta/recipes-core/systemd/systemd/{0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch => 0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch} (90%)
 rename meta/recipes-core/systemd/systemd/{0009-implment-systemd-sysv-install-for-OE.patch => 0010-implment-systemd-sysv-install-for-OE.patch} (91%)
 rename meta/recipes-core/systemd/systemd/{0010-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch => 0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch} (83%)
 rename meta/recipes-core/systemd/systemd/{0011-rules-whitelist-hd-devices.patch => 0012-rules-whitelist-hd-devices.patch} (91%)
 rename meta/recipes-core/systemd/systemd/{0012-sysv-generator-add-support-for-executing-scripts-und.patch => 0013-sysv-generator-add-support-for-executing-scripts-und.patch} (98%)
 rename meta/recipes-core/systemd/systemd/{0013-Make-root-s-home-directory-configurable.patch => 0014-Make-root-s-home-directory-configurable.patch} (95%)
 rename meta/recipes-core/systemd/systemd/{0014-systemd-user-avoid-using-system-auth.patch => 0015-systemd-user-avoid-using-system-auth.patch} (87%)
 rename meta/recipes-core/systemd/systemd/{0015-Revert-rules-remove-firmware-loading-rules.patch => 0016-Revert-rules-remove-firmware-loading-rules.patch} (84%)
 rename meta/recipes-core/systemd/systemd/{0016-Revert-udev-remove-userspace-firmware-loading-suppor.patch => 0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch} (96%)
 create mode 100644 meta/recipes-core/systemd/systemd/0018-include-missing.h-for-getting-secure_getenv-definiti.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
 delete mode 100644 meta/recipes-core/uclibc/uclibc-git/0003-Add-argp-implementation.patch
 create mode 100644 meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
 create mode 100644 meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch
 create mode 100644 meta/recipes-devtools/binutils/binutils/0016-This-patch-adds-IFUNC-support-for-arm-gold-backend.patch
 create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-corrupt-blocks-Include-limits.h.patch
 create mode 100644 meta/recipes-devtools/dosfstools/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch
 create mode 100644 meta/recipes-devtools/dosfstools/dosfstools/largefile.patch
 create mode 100644 meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch
 delete mode 100644 meta/recipes-devtools/elfutils/elfutils/mempcpy.patch
 create mode 100644 meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch
 create mode 100644 meta/recipes-devtools/guile/files/remove_strcase_l_funcs.patch
 create mode 100644 meta/recipes-devtools/tcf-agent/tcf-agent/0001-canonicalize_file_name-is-specific-to-glibc.patch
 create mode 100644 meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch
 create mode 100644 meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
 create mode 100644 meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
 create mode 100644 meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch
 create mode 100644 meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch
 create mode 100644 meta/recipes-extended/mdadm/files/0001-Define-_POSIX_C_SOURCE-if-undefined.patch
 create mode 100644 meta/recipes-extended/net-tools/net-tools/musl-fixes.patch
 create mode 100644 meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
 create mode 100644 meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
 create mode 100644 meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch
 create mode 100644 meta/recipes-extended/tar/tar/musl_dirent.patch
 create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch
 create mode 100644 meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
 create mode 100644 meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch
 create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/libc_memfuncs.patch
 create mode 100644 meta/recipes-graphics/directfb/directfb/compar_fn_t.patch
 create mode 100644 meta/recipes-graphics/directfb/directfb/union-sigval.patch
 create mode 100644 meta/recipes-graphics/directfb/directfb/use-PTHREAD_MUTEX_RECURSIVE.patch
 create mode 100644 meta/recipes-graphics/drm/libdrm/0001-tests-kms-steal-crtc-Include-sys-select.h.patch
 rename meta/recipes-graphics/drm/{libdrm_2.4.65.bb => libdrm_2.4.66.bb} (86%)
 create mode 100644 meta/recipes-graphics/eglinfo/files/0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch
 create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch
 create mode 100644 meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
 create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
 create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
 create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
 create mode 100644 meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch
 create mode 100644 meta/recipes-kernel/oprofile/oprofile/musl.patch
 create mode 100644 meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch
 create mode 100644 meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch
 create mode 100644 meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch
 create mode 100644 meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/clang.patch
 create mode 100644 meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
 create mode 100644 meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch
 create mode 100644 meta/recipes-support/argp-standalone/files/0002-isprint.patch
 create mode 100644 meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
 create mode 100644 meta/recipes-support/nspr/nspr/0001-Remove-the-check-for-LINUX-glibc-case.patch
Signature · 1 line
2.7.0
author
#1 lore raw

PATCH 1/73 powertop: Include right headers for timval struct

---
 ...0001-include-rquired-headers-for-typedefs.patch | 47 ++++++++++++++++++++++
 meta/recipes-kernel/powertop/powertop_2.8.bb       |  4 +-
 2 files changed, 50 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch
meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch new file +47 -0
new file mode 100644
index 0000000..0fd6310
@@ -0,0 +1,47 @@
+From 0856d8145d187a7e5a49625247abe43a13f95acc Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 15 Sep 2015 19:36:28 +0000
+Subject: [PATCH] include rquired headers for typedefs
+
+timeval struct needs to include sys/time.h and sprintf() usage requires
+to include stdio.h headers from system
+
+Fixes
+src/perf/perf_bundle.cpp:141:2: error: use of undeclared identifier 'sprintf'; did you mean 'vswprintf'?
+src/devices/devfreq.h:35:18: error: field has incomplete type 'struct timeval'
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ src/devices/devfreq.h    | 1 +
+ src/perf/perf_bundle.cpp | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/devices/devfreq.h b/src/devices/devfreq.h
+index 16a60fb..4bede7c 100644
+--- a/src/devices/devfreq.h
++++ b/src/devices/devfreq.h
+@@ -25,6 +25,7 @@
+ #ifndef _INCLUDE_GUARD_DEVFREQ_H
+ #define _INCLUDE_GUARD_DEVFREQ_H
+ 
++#include <sys/time.h>
+ #include "device.h"
+ #include "../parameters/parameters.h"
+ 
+diff --git a/src/perf/perf_bundle.cpp b/src/perf/perf_bundle.cpp
+index cf1ae11..232f894 100644
+--- a/src/perf/perf_bundle.cpp
++++ b/src/perf/perf_bundle.cpp
+@@ -27,6 +27,7 @@
+ #include <algorithm>
+ #include <string.h>
+ #include <stdint.h>
++#include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+-- 
+2.5.2
+
meta/recipes-kernel/powertop/powertop_2.8.bb +3 -1
index a466067..1f2dfb8 100644
@@ -6,7 +6,9 @@ DEPENDS = "ncurses libnl pciutils"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
 
-SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-${PV}.tar.gz"
+SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-${PV}.tar.gz \
+           file://0001-include-rquired-headers-for-typedefs.patch \
+"
 
 SRC_URI[md5sum] = "c55fedb69203e480801b18bd7b886241"
 SRC_URI[sha256sum] = "a87b563f73106babfa3e74dcf92f252938c061e309ace20a361358bbfa579c5a"
Signature · 1 line
2.7.0
author
#2 lore raw

PATCH 2/73 blktrace: Include <sys/types.h for dev_t

---
 ...-include-sys-types.h-for-dev_t-definition.patch | 30 ++++++++++++++++++++++
 meta/recipes-kernel/blktrace/blktrace_git.bb       |  4 ++-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch
meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch new file +30 -0
new file mode 100644
index 0000000..a4b7157
@@ -0,0 +1,30 @@
+From 6b5bbdfaac7f216fe8a02c4cf29e5eb2aee5a409 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 15 Sep 2015 00:01:00 +0000
+Subject: [PATCH] include sys/types.h for dev_t definition
+
+Avoids the build failures when sys/types.h does not get included
+indirectly through other headers.
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted
+
+ blktrace.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/blktrace.h b/blktrace.h
+index 380aec7..944fc08 100644
+--- a/blktrace.h
++++ b/blktrace.h
+@@ -5,6 +5,7 @@
+ #include <limits.h>
+ #include <byteswap.h>
+ #include <endian.h>
++#include <sys/types.h>
+ 
+ #include "blktrace_api.h"
+ #include "rbtree.h"
+-- 
+2.5.2
+
meta/recipes-kernel/blktrace/blktrace_git.bb +3 -1
index 5b0be42..957cb70 100644
@@ -9,7 +9,9 @@ SRCREV = "43fc870ce04e963def45dfc0d1ed4ea21ef10d4b"
 PV = "1.1.0+git${SRCPV}"
 
 SRC_URI = "git://git.kernel.dk/blktrace.git \
-           file://ldflags.patch"
+           file://ldflags.patch \
+           file://0001-include-sys-types.h-for-dev_t-definition.patch \
+"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.7.0
author
#3 lore raw

PATCH 3/73 ppp: Fix build with musl

In reply to Khem Raj

Therer are assumptions about glibc headers and features which needs to be addressed for musl

---
 .../ppp/ppp/0001-Fix-build-with-musl.patch         | 163 +++++++++++++++++++++
 meta/recipes-connectivity/ppp/ppp_2.4.7.bb         |   3 +
 2 files changed, 166 insertions(+)
 create mode 100644 meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch
meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch new file +163 -0
new file mode 100644
index 0000000..763e374
@@ -0,0 +1,163 @@
+From 52a1e41d7541b2c936285844c59bd1be21797860 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 29 May 2015 14:57:05 -0700
+Subject: [PATCH] Fix build with musl
+
+There are several assumption about glibc
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ include/net/ppp_defs.h                  | 2 ++
+ pppd/Makefile.linux                     | 2 +-
+ pppd/magic.h                            | 6 +++---
+ pppd/plugins/rp-pppoe/config.h          | 5 ++++-
+ pppd/plugins/rp-pppoe/plugin.c          | 1 -
+ pppd/plugins/rp-pppoe/pppoe-discovery.c | 8 ++++----
+ pppd/plugins/rp-pppoe/pppoe.h           | 2 +-
+ pppd/sys-linux.c                        | 3 ++-
+ 8 files changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h
+index b06eda5..dafa36c 100644
+--- a/include/net/ppp_defs.h
++++ b/include/net/ppp_defs.h
+@@ -38,6 +38,8 @@
+ #ifndef _PPP_DEFS_H_
+ #define _PPP_DEFS_H_
+ 
++#include <sys/time.h>
++
+ /*
+  * The basic PPP frame.
+  */
+diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
+index 8ab2102..d7e2564 100644
+--- a/pppd/Makefile.linux
++++ b/pppd/Makefile.linux
+@@ -126,7 +126,7 @@ LIBS	+= -lcrypt
+ #endif
+ 
+ ifdef USE_LIBUTIL
+-CFLAGS	+= -DHAVE_LOGWTMP=1
++#CFLAGS	+= -DHAVE_LOGWTMP=1
+ LIBS	+= -lutil
+ endif
+ 
+diff --git a/pppd/magic.h b/pppd/magic.h
+index c81213b..9d399e3 100644
+--- a/pppd/magic.h
++++ b/pppd/magic.h
+@@ -42,8 +42,8 @@
+  * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
+  */
+ 
+-void magic_init __P((void));	/* Initialize the magic number generator */
+-u_int32_t magic __P((void));	/* Returns the next magic number */
++void magic_init (void);	/* Initialize the magic number generator */
++u_int32_t magic (void);	/* Returns the next magic number */
+ 
+ /* Fill buffer with random bytes */
+-void random_bytes __P((unsigned char *buf, int len));
++void random_bytes (unsigned char *buf, int len);
+diff --git a/pppd/plugins/rp-pppoe/config.h b/pppd/plugins/rp-pppoe/config.h
+index 5703087..fff032e 100644
+--- a/pppd/plugins/rp-pppoe/config.h
++++ b/pppd/plugins/rp-pppoe/config.h
+@@ -78,8 +78,9 @@
+ #define HAVE_NET_IF_ARP_H 1
+ 
+ /* Define if you have the <net/ethernet.h> header file.  */
++#ifdef __GLIBC__
+ #define HAVE_NET_ETHERNET_H 1
+-
++#endif
+ /* Define if you have the <net/if.h> header file.  */
+ #define HAVE_NET_IF_H 1
+ 
+@@ -102,7 +103,9 @@
+ #define HAVE_NETPACKET_PACKET_H 1
+ 
+ /* Define if you have the <sys/cdefs.h> header file.  */
++#ifdef __GLIBC__
+ #define HAVE_SYS_CDEFS_H 1
++#endif
+ 
+ /* Define if you have the <sys/dlpi.h> header file.  */
+ /* #undef HAVE_SYS_DLPI_H */
+diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c
+index a8c2bb4..ca34d79 100644
+--- a/pppd/plugins/rp-pppoe/plugin.c
++++ b/pppd/plugins/rp-pppoe/plugin.c
+@@ -46,7 +46,6 @@ static char const RCSID[] =
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <signal.h>
+-#include <net/ethernet.h>
+ #include <net/if_arp.h>
+ #include <linux/ppp_defs.h>
+ #include <linux/if_pppox.h>
+diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c
+index 3d3bf4e..d42f619 100644
+--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
++++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
+@@ -27,10 +27,6 @@
+ #include <linux/if_packet.h>
+ #endif
+ 
+-#ifdef HAVE_NET_ETHERNET_H
+-#include <net/ethernet.h>
+-#endif
+-
+ #ifdef HAVE_ASM_TYPES_H
+ #include <asm/types.h>
+ #endif
+@@ -47,6 +43,10 @@
+ #include <net/if_arp.h>
+ #endif
+ 
++#ifndef __GLIBC__
++#define error(x...) fprintf(stderr, x)
++#endif
++
+ char *xstrdup(const char *s);
+ void usage(void);
+ 
+diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
+index 9ab2eee..75b9004 100644
+--- a/pppd/plugins/rp-pppoe/pppoe.h
++++ b/pppd/plugins/rp-pppoe/pppoe.h
+@@ -92,7 +92,7 @@ typedef unsigned long UINT32_t;
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+-#ifndef HAVE_SYS_DLPI_H
++#if !defined HAVE_SYS_DLPI_H && defined HAVE_NET_ETHERNET_H
+ #include <netinet/if_ether.h>
+ #endif
+ #endif
+diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
+index a105505..49b0273 100644
+--- a/pppd/sys-linux.c
++++ b/pppd/sys-linux.c
+@@ -112,7 +112,7 @@
+ #include <linux/types.h>
+ #include <linux/if.h>
+ #include <linux/if_arp.h>
+-#include <linux/route.h>
++/* #include <linux/route.h> */
+ #include <linux/if_ether.h>
+ #endif
+ #include <netinet/in.h>
+@@ -145,6 +145,7 @@
+ #endif
+ 
+ #ifdef INET6
++#include <net/route.h>
+ #ifndef _LINUX_IN6_H
+ /*
+  *    This is in linux/include/net/ipv6.h.
+-- 
+2.1.4
+
meta/recipes-connectivity/ppp/ppp_2.4.7.bb +3 -0
index 5f06034..4437b5c 100644
@@ -32,6 +32,9 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
            file://fix-CVE-2015-3310.patch \
 "
 
+SRC_URI_append_libc-musl = "\
+           file://0001-Fix-build-with-musl.patch \
+"
 SRC_URI[md5sum] = "78818f40e6d33a1d1de68a1551f6595a"
 SRC_URI[sha256sum] = "02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30"
 
Signature · 1 line
2.7.0
author
#4 lore raw

PATCH 4/73 tcp-wrappers: Fix build with musl

In reply to Khem Raj
---
 .../tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch | 31 ++++++++++++++++++++++
 .../tcp-wrappers/tcp-wrappers_7.6.bb               |  4 +++
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch
meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch new file +31 -0
new file mode 100644
index 0000000..eee640e
@@ -0,0 +1,31 @@
+__BEGIN_DECLS/__END_DECLS are BSD specific and not defined in musl
+glibc and uclibc had sys/cdefs.h doing it.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+Index: tcp_wrappers_7.6/tcpd.h
+===================================================================
+--- tcp_wrappers_7.6.orig/tcpd.h
++++ tcp_wrappers_7.6/tcpd.h
+@@ -11,7 +11,9 @@
+ #include <netinet/in.h>
+ #include <stdio.h>
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /* Structure to describe one communications endpoint. */
+ 
+@@ -252,6 +254,8 @@ extern char *fix_strtok();
+ extern char *my_strtok();
+ #endif
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif
meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb +4 -0
index 2630478..5fdbbce 100644
@@ -43,6 +43,7 @@ SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
            file://try-from.8 \
            file://safe_finger.8 \
            file://makefile-fix-parallel.patch \
+           file://musl-decls.patch \
            "
 
 SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"
@@ -73,6 +74,9 @@ EXTRA_OEMAKE = "'CC=${CC}' \
 
 EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN"
 EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN"
+EXTRA_OEMAKE_NETGROUP_libc-musl = "-DUSE_GETDOMAIN"
+
+EXTRA_OEMAKE_append_libc-musl = " 'LIBS='"
 
 do_compile () {
 	oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \
Signature · 1 line
2.7.0
author
#5 lore raw

PATCH 5/73 fts: Add recipe

In reply to Khem Raj

fts is not implemented in musl but many packages depend on it glibc implements it even though posix does not requir it to do so. So provide an alternative provider for fts

---
 meta/recipes-core/fts/fts.bb                       |   39 +
 .../fts/fts/fts-header-correctness.patch           |   25 +
 meta/recipes-core/fts/fts/fts-uclibc.patch         |   50 +
 meta/recipes-core/fts/fts/gcc5.patch               | 1368 ++++++++++++++++++++
 meta/recipes-core/fts/fts/remove_cdefs.patch       |   69 +
 meta/recipes-core/fts/fts/stdint.patch             |   15 +
 6 files changed, 1566 insertions(+)
 create mode 100644 meta/recipes-core/fts/fts.bb
 create mode 100644 meta/recipes-core/fts/fts/fts-header-correctness.patch
 create mode 100644 meta/recipes-core/fts/fts/fts-uclibc.patch
 create mode 100644 meta/recipes-core/fts/fts/gcc5.patch
 create mode 100644 meta/recipes-core/fts/fts/remove_cdefs.patch
 create mode 100644 meta/recipes-core/fts/fts/stdint.patch
meta/recipes-core/fts/fts.bb new file +39 -0
new file mode 100644
index 0000000..d8b4ed2
@@ -0,0 +1,39 @@
+# Copyright (C) 2015 Khem Raj <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "keith bostic's POSIX file tree stream operations library"
+HOMEPAGE = "https://sites.google.com/a/bostic.com/keithbostic"
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHECKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-4-Clause;md5=624d9e67e8ac41a78f6b6c2c55a83a2b"
+SECTION = "libs"
+
+SRC_URI = "https://sites.google.com/a/bostic.com/keithbostic/files/fts.tar.gz \
+           file://fts-header-correctness.patch \
+           file://fts-uclibc.patch \
+           file://remove_cdefs.patch \
+           file://stdint.patch \
+           file://gcc5.patch \
+"
+
+SRC_URI[md5sum] = "120c14715485ec6ced14f494d059d20a"
+SRC_URI[sha256sum] = "3df9b9b5a45aeaf16f33bb84e692a10dc662e22ec8a51748f98767d67fb6f342"
+
+S = "${WORKDIR}/${BPN}"
+
+do_configure[noexec] = "1"
+
+VER = "0"
+do_compile () {
+    ${CC} -I${S} -fPIC -shared -o libfts.so.${VER} -Wl,-soname,libfts.so.${VER} ${S}/fts.c
+}
+
+do_install() {
+    install -Dm755 ${B}/libfts.so.${VER} ${D}${libdir}/libfts.so.${VER}
+    ln -sf libfts.so.${VER} ${D}${libdir}/libfts.so
+    install -Dm644 ${S}/fts.h ${D}${includedir}/fts.h
+}
+#
+# We will skip parsing for non-musl systems
+#
+COMPATIBLE_HOST = ".*-musl.*"
+
meta/recipes-core/fts/fts/fts-header-correctness.patch new file +25 -0
new file mode 100644
index 0000000..c73ddc9
@@ -0,0 +1,25 @@
+Included needed headers for compiling with musl
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Inappropriate
+
+--- fts.orig/fts.h
++++ fts/fts.h
+@@ -38,6 +38,17 @@
+ #ifndef	_FTS_H_
+ #define	_FTS_H_
+ 
++#include <sys/types.h>
++#include <sys/param.h>
++#include <sys/stat.h>
++
++#include <dirent.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++
+ typedef struct {
+ 	struct _ftsent *fts_cur;	/* current node */
+ 	struct _ftsent *fts_child;	/* linked list of children */
meta/recipes-core/fts/fts/fts-uclibc.patch new file +50 -0

50 lines not on this page · raw message

meta/recipes-core/fts/fts/gcc5.patch new file +1368 -0

1,368 lines not on this page · raw message

meta/recipes-core/fts/fts/remove_cdefs.patch new file +69 -0

69 lines not on this page · raw message

meta/recipes-core/fts/fts/stdint.patch new file +15 -0
new file mode 100644
index 0000000..89e6097
@@ -0,0 +1,15 @@
+Include stdint.h for u_* typedefs
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Inappropriate
+
+--- ./fts.c.orig
++++ ./fts.c
+@@ -46,6 +46,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <fts.h>
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
Signature · 1 line
2.7.0
author
#6 lore raw

PATCH 6/73 connman: include config.h for HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR

In reply to Khem Raj

We now check at configure time of libc has pktinfo struct

---
 .../0003-Fix-header-inclusions-for-musl.patch      | 79 +++++++++++++++-------
 1 file changed, 56 insertions(+), 23 deletions(-)
meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch +56 -23
index 6327aa2..eefc683 100644
@@ -14,10 +14,10 @@ Upstream-Status: Pending
  tools/dnsproxy-test.c | 1 +
  5 files changed, 3 insertions(+), 5 deletions(-)
 
-diff --git a/gweb/gresolv.c b/gweb/gresolv.c
-index 3ad8e70..61d6fe8 100644
---- a/gweb/gresolv.c
-+++ b/gweb/gresolv.c
+Index: connman-1.30/gweb/gresolv.c
+===================================================================
+--- connman-1.30.orig/gweb/gresolv.c
++++ connman-1.30/gweb/gresolv.c
 @@ -28,6 +28,7 @@
  #include <stdarg.h>
  #include <string.h>
@@ -26,10 +26,10 @@ index 3ad8e70..61d6fe8 100644
  #include <resolv.h>
  #include <sys/types.h>
  #include <sys/socket.h>
-diff --git a/plugins/wifi.c b/plugins/wifi.c
-index dfe849f..99cff3f 100644
---- a/plugins/wifi.c
-+++ b/plugins/wifi.c
+Index: connman-1.30/plugins/wifi.c
+===================================================================
+--- connman-1.30.orig/plugins/wifi.c
++++ connman-1.30/plugins/wifi.c
 @@ -30,9 +30,8 @@
  #include <string.h>
  #include <sys/ioctl.h>
@@ -41,10 +41,10 @@ index dfe849f..99cff3f 100644
  
  #ifndef IFF_LOWER_UP
  #define IFF_LOWER_UP	0x10000
-diff --git a/src/tethering.c b/src/tethering.c
-index ceeec74..c44cb36 100644
---- a/src/tethering.c
-+++ b/src/tethering.c
+Index: connman-1.30/src/tethering.c
+===================================================================
+--- connman-1.30.orig/src/tethering.c
++++ connman-1.30/src/tethering.c
 @@ -31,10 +31,8 @@
  #include <stdio.h>
  #include <sys/ioctl.h>
@@ -56,10 +56,10 @@ index ceeec74..c44cb36 100644
  #include <netinet/in.h>
  #include <linux/if_bridge.h>
  
-diff --git a/tools/dhcp-test.c b/tools/dhcp-test.c
-index c34e10a..eae66fc 100644
---- a/tools/dhcp-test.c
-+++ b/tools/dhcp-test.c
+Index: connman-1.30/tools/dhcp-test.c
+===================================================================
+--- connman-1.30.orig/tools/dhcp-test.c
++++ connman-1.30/tools/dhcp-test.c
 @@ -33,7 +33,6 @@
  #include <arpa/inet.h>
  #include <net/route.h>
@@ -68,10 +68,10 @@ index c34e10a..eae66fc 100644
  
  #include <gdhcp/gdhcp.h>
  
-diff --git a/tools/dnsproxy-test.c b/tools/dnsproxy-test.c
-index 551cae9..226ba86 100644
---- a/tools/dnsproxy-test.c
-+++ b/tools/dnsproxy-test.c
+Index: connman-1.30/tools/dnsproxy-test.c
+===================================================================
+--- connman-1.30.orig/tools/dnsproxy-test.c
++++ connman-1.30/tools/dnsproxy-test.c
 @@ -27,6 +27,7 @@
  #include <stdlib.h>
  #include <string.h>
@@ -80,6 +80,39 @@ index 551cae9..226ba86 100644
  #include <arpa/inet.h>
  #include <netinet/in.h>
  #include <sys/types.h>
--- 
-2.5.1
-
+Index: connman-1.30/configure.ac
+===================================================================
+--- connman-1.30.orig/configure.ac
++++ connman-1.30/configure.ac
+@@ -173,6 +173,8 @@ AM_CONDITIONAL(PPTP_BUILTIN, test "${ena
+ 
+ AC_CHECK_HEADERS([execinfo.h])
+ 
++AC_CHECK_MEMBERS([struct in6_pktinfo.ipi6_addr], [], [], [[#include <netinet/in.h>]])
++
+ AC_CHECK_HEADERS(resolv.h, dummy=yes,
+ 	AC_MSG_ERROR(resolver header files are required))
+ AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
+Index: connman-1.30/gdhcp/common.h
+===================================================================
+--- connman-1.30.orig/gdhcp/common.h
++++ connman-1.30/gdhcp/common.h
+@@ -19,6 +19,7 @@
+  *
+  */
+ 
++#include <config.h>
+ #include <netinet/udp.h>
+ #include <netinet/ip.h>
+ 
+@@ -170,8 +171,8 @@ static const uint8_t dhcp_option_lengths
+ 	[OPTION_U32]	= 4,
+ };
+ 
+-/* already defined within netinet/in.h if using GNU compiler */
+-#ifndef __USE_GNU
++/* already defined within netinet/in.h if using GNU or musl libc */
++#ifndef HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR
+ struct in6_pktinfo {
+ 	struct in6_addr ipi6_addr;  /* src/dst IPv6 address */
+ 	unsigned int ipi6_ifindex;  /* send/recv interface index */
Signature · 1 line
2.7.0
author
#7 lore raw

PATCH 7/73 libcgroup: Add dependency on fts when building on musl

In reply to Khem Raj
---
 .../libcgroup/libcgroup/musl-decls-compat.patch    | 235 +++++++++++++++++++++
 meta/recipes-core/libcgroup/libcgroup_0.41.bb      |   4 +
 2 files changed, 239 insertions(+)
 create mode 100644 meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch
meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch new file +235 -0
new file mode 100644
index 0000000..65f4ef9
@@ -0,0 +1,235 @@
+commit ca780b4f7f71abeeb04a585f2a4d889caaa985fa
+Author: Isaac Dunham <[email protected]>
+Date:   Fri Sep 5 22:35:32 2014 -0700
+
+    Remove __.*DECLS nonsense
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+Index: libcgroup-0.41/include/libcgroup/config.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/config.h
++++ libcgroup-0.41/include/libcgroup/config.h
+@@ -9,7 +9,9 @@
+ #include <features.h>
+ #endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /**
+  * @defgroup group_config 5. Configuration
+@@ -107,6 +109,8 @@ int cgroup_config_create_template_group(
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /*_LIBCGROUP_CONFIG_H*/
+Index: libcgroup-0.41/include/libcgroup/error.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/error.h
++++ libcgroup-0.41/include/libcgroup/error.h
+@@ -9,7 +9,9 @@
+ #include <features.h>
+ #endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /**
+  * @defgroup group_errors 6. Error handling
+@@ -99,6 +101,8 @@ int cgroup_get_last_errno(void);
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _LIBCGROUP_INIT_H */
+Index: libcgroup-0.41/include/libcgroup/groups.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/groups.h
++++ libcgroup-0.41/include/libcgroup/groups.h
+@@ -11,7 +11,9 @@
+ #include <stdbool.h>
+ #endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /**
+  * Flags for cgroup_delete_cgroup_ext().
+@@ -577,6 +579,8 @@ char *cgroup_get_cgroup_name(struct cgro
+  */
+ 
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _LIBCGROUP_GROUPS_H */
+Index: libcgroup-0.41/include/libcgroup/init.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/init.h
++++ libcgroup-0.41/include/libcgroup/init.h
+@@ -9,7 +9,9 @@
+ #include <features.h>
+ #endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /**
+  * @defgroup group_init 1. Initialization
+@@ -58,6 +60,8 @@ int cgroup_get_subsys_mount_point(const
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _LIBCGROUP_INIT_H */
+Index: libcgroup-0.41/include/libcgroup/iterators.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/iterators.h
++++ libcgroup-0.41/include/libcgroup/iterators.h
+@@ -11,7 +11,9 @@
+ #include <features.h>
+ #endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /**
+  * @defgroup group_iterators 3. Iterators
+@@ -423,6 +425,8 @@ int cgroup_get_subsys_mount_point_end(vo
+  * @}
+  */
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _LIBCGROUP_ITERATORS_H */
+Index: libcgroup-0.41/include/libcgroup/tasks.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/tasks.h
++++ libcgroup-0.41/include/libcgroup/tasks.h
+@@ -12,7 +12,9 @@
+ #include <stdbool.h>
+ #endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /** Flags for cgroup_change_cgroup_uid_gid(). */
+ enum cgflags {
+@@ -204,6 +206,8 @@ int cgroup_register_unchanged_process(pi
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _LIBCGROUP_TASKS_H */
+Index: libcgroup-0.41/src/daemon/cgrulesengd.h
+===================================================================
+--- libcgroup-0.41.orig/src/daemon/cgrulesengd.h
++++ libcgroup-0.41/src/daemon/cgrulesengd.h
+@@ -17,7 +17,9 @@
+ 
+ #include <features.h>
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ #include "config.h"
+ #include "libcgroup.h"
+@@ -119,7 +121,9 @@ void cgre_flash_templates(int signum);
+  */
+ void cgre_catch_term(int signum);
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _CGRULESENGD_H */
+ 
+Index: libcgroup-0.41/src/libcgroup-internal.h
+===================================================================
+--- libcgroup-0.41.orig/src/libcgroup-internal.h
++++ libcgroup-0.41/src/libcgroup-internal.h
+@@ -16,7 +16,9 @@
+ 
+ #define __LIBCG_INTERNAL
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ #include "config.h"
+ #include <fts.h>
+@@ -279,6 +281,8 @@ extern void cgroup_dictionary_iterator_e
+  */
+ int cg_chmod_path(const char *path, mode_t mode, int owner_is_umask);
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif
+Index: libcgroup-0.41/include/libcgroup/log.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/log.h
++++ libcgroup-0.41/include/libcgroup/log.h
+@@ -11,7 +11,9 @@
+ 
+ #include <stdarg.h>
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /**
+  * @defgroup group_log 7. Logging
+@@ -142,6 +144,8 @@ extern int cgroup_parse_log_level_str(co
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _LIBCGROUP_LOG_H */
meta/recipes-core/libcgroup/libcgroup_0.41.bb +4 -0
index 287aecd..9597963 100644
@@ -11,12 +11,16 @@ inherit autotools pkgconfig
 DEPENDS = "bison-native flex-native ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/${BPN}/v0.41/${BPN}-${PV}.tar.bz2"
+SRC_URI_append_libc-musl = " file://musl-decls-compat.patch"
 
 SRC_URI[md5sum] = "3dea9d50b8a5b73ff0bf1cdcb210f63f"
 SRC_URI[sha256sum] = "e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51"
 
 UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libcg/files/libcgroup/"
 
+DEPENDS_append_libc-musl = " fts "
+EXTRA_OEMAKE_append_libc-musl = "LIBS=-lfts"
+
 EXTRA_OECONF = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes', '--enable-pam=no', d)}"
 
 PACKAGES =+ "cgroups-pam-plugin"
Signature · 1 line
2.7.0
author
#8 lore raw

PATCH 8/73 linux-libc-headers: Port patches for linux-headers for musl

In reply to Khem Raj

These patches have revealed issues with linux kernel headers which has been proposed upstream but hasnt been applied yet

---
 ...mpat.h-fix-some-issues-arising-from-in6.h.patch | 82 ++++++++++++++++++++++
 ...t.h-prevent-redefinition-of-struct-ethhdr.patch | 59 ++++++++++++++++
 ...remove-inclusion-of-sysinfo.h-in-kernel.h.patch | 32 +++++++++
 .../linux-libc-headers/linux-libc-headers_4.1.bb   |  5 ++
 4 files changed, 178 insertions(+)
 create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
 create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
 create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch new file +82 -0
new file mode 100644
index 0000000..3db52cf
@@ -0,0 +1,82 @@
+From 2872f5d8bcef84e62b15b37ba4ffeccfb6402dad Mon Sep 17 00:00:00 2001
+From: rofl0r <[email protected]>
+Date: Wed, 22 Jan 2014 00:48:28 +0100
+Subject: [PATCH 1/3] libc-compat.h: fix some issues arising from in6.h
+
+namely redefinition of some structs provided by netinet/in.h.
+---
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Submitted
+
+ include/uapi/linux/libc-compat.h | 25 ++++++++-----------------
+ 1 file changed, 8 insertions(+), 17 deletions(-)
+
+diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
+index fa673e9..afe15c2 100644
+--- a/include/uapi/linux/libc-compat.h
++++ b/include/uapi/linux/libc-compat.h
+@@ -48,24 +48,15 @@
+ #ifndef _UAPI_LIBC_COMPAT_H
+ #define _UAPI_LIBC_COMPAT_H
+ 
+-/* We have included glibc headers... */
+-#if defined(__GLIBC__)
++#ifndef __KERNEL__ /* we're used from userspace */
+ 
+-/* Coordinate with glibc netinet/in.h header. */
++/* Coordinate with libc netinet/in.h header. */
+ #if defined(_NETINET_IN_H)
+ 
+-/* GLIBC headers included first so don't define anything
++/* libc headers included first so don't define anything
+  * that would already be defined. */
+ #define __UAPI_DEF_IN6_ADDR		0
+-/* The exception is the in6_addr macros which must be defined
+- * if the glibc code didn't define them. This guard matches
+- * the guard in glibc/inet/netinet/in.h which defines the
+- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */
+-#if defined(__USE_MISC) || defined (__USE_GNU)
+ #define __UAPI_DEF_IN6_ADDR_ALT		0
+-#else
+-#define __UAPI_DEF_IN6_ADDR_ALT		1
+-#endif
+ #define __UAPI_DEF_SOCKADDR_IN6		0
+ #define __UAPI_DEF_IPV6_MREQ		0
+ #define __UAPI_DEF_IPPROTO_V6		0
+@@ -73,13 +64,13 @@
+ #define __UAPI_DEF_IN6_PKTINFO		0
+ #define __UAPI_DEF_IP6_MTUINFO		0
+ 
+-#else
++#else /* defined(_NETINET_IN_H) */
+ 
+ /* Linux headers included first, and we must define everything
+- * we need. The expectation is that glibc will check the
++ * we need. The expectation is that the libc will check the
+  * __UAPI_DEF_* defines and adjust appropriately. */
+ #define __UAPI_DEF_IN6_ADDR		1
+-/* We unconditionally define the in6_addr macros and glibc must
++/* We unconditionally define the in6_addr macros and libc must
+  * coordinate. */
+ #define __UAPI_DEF_IN6_ADDR_ALT		1
+ #define __UAPI_DEF_SOCKADDR_IN6		1
+@@ -101,7 +92,7 @@
+ /* If we did not see any headers from any supported C libraries,
+  * or we are being included in the kernel, then define everything
+  * that we need. */
+-#else /* !defined(__GLIBC__) */
++#else /* __KERNEL__ */
+ 
+ /* Definitions for in6.h */
+ #define __UAPI_DEF_IN6_ADDR		1
+@@ -116,6 +107,6 @@
+ /* Definitions for xattr.h */
+ #define __UAPI_DEF_XATTR		1
+ 
+-#endif /* __GLIBC__ */
++#endif /* __KERNEL__ */
+ 
+ #endif /* _UAPI_LIBC_COMPAT_H */
+-- 
+2.6.4
+
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch new file +59 -0

59 lines not on this page · raw message

meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch new file +32 -0
new file mode 100644
index 0000000..6d9e8d8
@@ -0,0 +1,32 @@
+From 8e69b663d6ddef132041a1186f081fdd74d4a31d Mon Sep 17 00:00:00 2001
+From: rofl0r <[email protected]>
+Date: Mon, 20 Jan 2014 21:31:34 +0100
+Subject: [PATCH 3/3] remove inclusion of sysinfo.h in kernel.h
+
+the declaration of struct sysinfo clashes with userspace.
+it's not quite clear why that header was included from kernel.h,
+as none of its functionality is needed.
+---
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Submitted
+
+ include/uapi/linux/kernel.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
+index 321e399..e8ff821 100644
+--- a/include/uapi/linux/kernel.h
++++ b/include/uapi/linux/kernel.h
+@@ -1,7 +1,9 @@
+ #ifndef _UAPI_LINUX_KERNEL_H
+ #define _UAPI_LINUX_KERNEL_H
+ 
++#ifdef __GLIBC__
+ #include <linux/sysinfo.h>
++#endif
+ 
+ /*
+  * 'kernel.h' contains some often-used function prototypes etc
+-- 
+2.6.4
+
meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.1.bb +5 -0
index 01037c1..6f2c427 100644
@@ -1,4 +1,9 @@
 require linux-libc-headers.inc
 
+SRC_URI_append_libc-musl = "\
+    file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
+    file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \
+    file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
+   "
 SRC_URI[md5sum] = "fe9dc0f6729f36400ea81aa41d614c37"
 SRC_URI[sha256sum] = "caf51f085aac1e1cea4d00dbbf3093ead07b551fc07b31b2a989c05f8ea72d9f"
Signature · 1 line
2.7.0
author
#9 lore raw

PATCH 9/73 xserver-xorg: Fix build with musl

In reply to Khem Raj

inb/outb are implemented for ARM on glibc but not on linux in general therefore the conditional has to reflect that

---
 .../xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch  | 18 ++++++++++++++++++
 .../xorg-xserver/xserver-xorg_1.18.0.bb                |  4 +++-
 2 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch
meta/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch new file +18 -0
new file mode 100644
index 0000000..4be441f
@@ -0,0 +1,18 @@
+inb/outb family for arm is only implemented on glibc
+so assumption across linux is wrong
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Pending
+Index: xorg-server-1.18.0/hw/xfree86/common/compiler.h
+===================================================================
+--- xorg-server-1.18.0.orig/hw/xfree86/common/compiler.h
++++ xorg-server-1.18.0/hw/xfree86/common/compiler.h
+@@ -758,7 +758,7 @@ inl(unsigned short port)
+     return xf86ReadMmio32Le((void *) ioBase, port);
+ }
+ 
+-#elif defined(__arm__) && defined(__linux__)
++#elif defined(__arm__) && defined(__GLIBC__)
+ 
+ /* for Linux on ARM, we use the LIBC inx/outx routines */
+ /* note that the appropriate setup via "ioperm" needs to be done */
meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.0.bb +3 -1
index 60973c5..e606dac 100644
@@ -1,6 +1,8 @@
 require xserver-xorg.inc
 
-SRC_URI += "file://configure.ac-Use-libsystemd-in-REQUIRED_LIBS-check.patch"
+SRC_URI += "file://configure.ac-Use-libsystemd-in-REQUIRED_LIBS-check.patch \
+            file://musl-arm-inb-outb.patch \
+           "
 SRC_URI[md5sum] = "3c1c1057d3ad27380d8dd87ffcc182cd"
 SRC_URI[sha256sum] = "195670819695d9cedd8dde95fbe069be0d0f488a77797a2d409f9f702daf312e"
 
Signature · 1 line
2.7.0
author
#10 lore raw

PATCH 10/73 gdk-pixbuf: Fix latent build issue exposed by musl

In reply to Khem Raj
---
 .../gdk-pixbuf/gdk-pixbuf/libc_memfuncs.patch      | 63 ++++++++++++++++++++++
 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb |  1 +
 2 files changed, 64 insertions(+)
 create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/libc_memfuncs.patch
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/libc_memfuncs.patch new file +63 -0
new file mode 100644
index 0000000..82a27c3
@@ -0,0 +1,63 @@
+From 205a3b04e1216c1df199aec95185f7f48b8e0491 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <[email protected]>
+Date: Tue, 6 Oct 2015 09:11:38 +0200
+Subject: Run only pixbuf-lowmem test on GNU libc
+
+The test case depends on GNU libc specific internals so we only run it
+on GNU libc.
+
+This fixes build on Linux with musl libc.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=756078
+---
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Backport
+
+ tests/Makefile.am     | 5 -----
+ tests/pixbuf-lowmem.c | 8 ++++++++
+ 2 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index bdd68f3..c122188 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -19,13 +19,8 @@ LDADD = \
+ noinst_PROGRAMS += 			\
+ 	pixbuf-read			\
+ 	pixbuf-random			\
+-	$(NULL)
+-
+-if OS_LINUX
+-noinst_PROGRAMS += 			\
+ 	pixbuf-lowmem			\
+ 	$(NULL)
+-endif
+ 
+ test_programs = 			\
+ 	animation			\
+diff --git a/tests/pixbuf-lowmem.c b/tests/pixbuf-lowmem.c
+index ae71788..9e9571f 100644
+--- a/tests/pixbuf-lowmem.c
++++ b/tests/pixbuf-lowmem.c
+@@ -24,6 +24,7 @@
+ #include <time.h>
+ #include <string.h>
+ 
++#ifdef __GLIBC__
+ #define PRETEND_MEM_SIZE (16 * 1024 * 1024)
+ #define REMAINING_MEM_SIZE 100000
+ 
+@@ -225,3 +226,10 @@ main (int argc, char **argv)
+   
+   return 0;
+ }
++#else
++int
++main (int argc, char **argv)
++{
++	return 0;
++}
++#endif
+-- 
+cgit v0.11.2
+
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb +1 -0
index 084fe36..104c743 100644
@@ -17,6 +17,7 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
            file://extending-libinstall-dependencies.patch \
            file://run-ptest \
            file://fatal-loader.patch \
+           file://libc_memfuncs.patch \
            "
 
 SRC_URI[md5sum] = "b1590189a2e89fab9f871959c168508c"
Signature · 1 line
2.7.0
author
#11 lore raw

PATCH 11/73 argp-standalone: Add recipe

In reply to Khem Raj

This helps packages like gnutls to compile with musl any package that needs glibc's implementation of argp can link to this library

---
 .../argp-standalone/argp-standalone_1.3.bb         | 28 ++++++++
 .../files/0001-throw-in-funcdef.patch              | 84 ++++++++++++++++++++++
 .../argp-standalone/files/0002-isprint.patch       | 51 +++++++++++++
 3 files changed, 163 insertions(+)
 create mode 100644 meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
 create mode 100644 meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch
 create mode 100644 meta/recipes-support/argp-standalone/files/0002-isprint.patch
meta/recipes-support/argp-standalone/argp-standalone_1.3.bb new file +28 -0
new file mode 100644
index 0000000..a5d20d3
@@ -0,0 +1,28 @@
+# Copyright (C) 2015 Khem Raj <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Glibc hierarchical argument parsing standalone library"
+HOMEPAGE = "http://www.lysator.liu.se/~nisse/misc/"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://argp.h;beginline=1;endline=20;md5=008b7e53dea6f9e1d9fdef0d9cf3184a"
+SECTION = "libs"
+
+SRC_URI = "http://www.lysator.liu.se/~nisse/misc/argp-standalone-${PV}.tar.gz \
+           file://0001-throw-in-funcdef.patch \
+           file://0002-isprint.patch \
+          "
+SRC_URI[md5sum] = "720704bac078d067111b32444e24ba69"
+SRC_URI[sha256sum] = "dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be"
+
+inherit autotools
+
+CFLAGS += "-fPIC -U__OPTIMIZE__"
+
+do_install() {
+	install -D -m 0644 ${B}/libargp.a ${D}${libdir}/libargp.a
+	install -D -m 0644 ${S}/argp.h ${D}${includedir}/argp.h
+}
+#
+# We will skip parsing for non-musl systems
+#
+COMPATIBLE_HOST = ".*-musl.*"
meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch new file +84 -0

84 lines not on this page · raw message

meta/recipes-support/argp-standalone/files/0002-isprint.patch new file +51 -0

51 lines not on this page · raw message

Signature · 1 line
2.7.0
author
#12 lore raw

PATCH 12/73 gnutls: Link with libargp on musl and depend on argp-standalone

In reply to Khem Raj
---
 meta/recipes-support/gnutls/gnutls.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-support/gnutls/gnutls.inc +2 -0
index c1ec120..5bcfc9c 100644
@@ -2,6 +2,7 @@ SUMMARY = "GNU Transport Layer Security Library"
 HOMEPAGE = "http://www.gnu.org/software/gnutls/"
 BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
 DEPENDS = "nettle libidn"
+DEPENDS_append_libc-musl = " argp-standalone "
 
 LICENSE = "GPLv3+ & LGPLv2.1+"
 LICENSE_${PN} = "LGPLv2.1+"
@@ -28,6 +29,7 @@ EXTRA_OECONF="--disable-rpath \
               --without-p11-kit \
               --enable-openssl-compatibility \
               "
+LDFLAGS_append_libc-musl = " -largp "
 
 do_configure_prepend() {
 	for dir in . lib; do
Signature · 1 line
2.7.0
author
#13 lore raw

PATCH 13/73 util-linux: Fix ptest builds on musl

In reply to Khem Raj

musl doesnt implement error() API, hence provide one

---
 .../util-linux/uuid-test-error-api.patch           | 92 ++++++++++++++++++++++
 meta/recipes-core/util-linux/util-linux_2.27.1.bb  |  1 +
 2 files changed, 93 insertions(+)
 create mode 100644 meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch new file +92 -0
new file mode 100644
index 0000000..1b0ff79
@@ -0,0 +1,92 @@
+This patch adds error() API implementation for non-glibc system C libs
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+Index: util-linux-2.27.1/tests/helpers/test_uuidd.c
+===================================================================
+--- util-linux-2.27.1.orig/tests/helpers/test_uuidd.c
++++ util-linux-2.27.1/tests/helpers/test_uuidd.c
+@@ -23,7 +23,6 @@
+  *
+  *	make uuidd uuidgen localstatedir=/var
+  */
+-#include <error.h>
+ #include <libgen.h>
+ #include <pthread.h>
+ #include <stdio.h>
+@@ -39,6 +38,17 @@
+ #include "xalloc.h"
+ #include "strutils.h"
+ 
++#ifdef __GLIBC__
++#include <error.h>
++#else
++extern void (*error_print_progname)(void);
++extern unsigned int error_message_count;
++extern int error_one_per_line;
++
++void error(int, int, const char *, ...);
++void error_at_line(int, int, const char *, unsigned int, const char *, ...);
++#endif
++
+ #define LOG(level,args) if (loglev >= level) { fprintf args; }
+ 
+ size_t nprocesses = 4;
+@@ -257,6 +267,56 @@ static void object_dump(size_t idx, obje
+ 	fprintf(stderr, "}\n");
+ }
+ 
++#ifndef __GLIBC__
++extern char *__progname;
++
++void (*error_print_progname)(void) = 0;
++unsigned int error_message_count = 0;
++int error_one_per_line = 0;
++
++static void eprint(int status, int e, const char *file, unsigned int line, const char *fmt, va_list ap)
++{
++	if (file && error_one_per_line) {
++		static const char *oldfile;
++		static unsigned int oldline;
++		if (line == oldline && strcmp(file, oldfile) == 0)
++			return;
++		oldfile = file;
++		oldline = line;
++	}
++	if (error_print_progname)
++		error_print_progname();
++	else
++		fprintf(stderr, "%s: ", __progname);
++	if (file)
++		fprintf(stderr, "%s:%u: ", file, line);
++	vfprintf(stderr, fmt, ap);
++	if (e)
++		fprintf(stderr, ": %s", strerror(e));
++	putc('\n', stderr);
++	fflush(stderr);
++	error_message_count++;
++	if (status)
++		exit(status);
++}
++
++void error(int status, int e, const char *fmt, ...)
++{
++	va_list ap;
++	va_start(ap,fmt);
++	eprint(status, e, 0, 0, fmt, ap);
++	va_end(ap);
++}
++
++void error_at_line(int status, int e, const char *file, unsigned int line, const char *fmt, ...)
++{
++	va_list ap;
++	va_start(ap,fmt);
++	eprint(status, e, file, line, fmt, ap);
++	va_end(ap);
++}
++#endif /* __GLIBC__ */
++
+ int main(int argc, char *argv[])
+ {
+ 	size_t i, nfailed = 0, nignored = 0;
meta/recipes-core/util-linux/util-linux_2.27.1.bb +1 -0
index 14a77ca..7549158 100644
@@ -19,6 +19,7 @@ SRC_URI += "file://util-linux-ng-2.16-mount_lock_path.patch \
             file://avoid_unsupported_grep_opts.patch \
             file://display_testname_for_subtest.patch \
             file://avoid_parallel_tests.patch \
+            file://uuid-test-error-api.patch \
 "
 SRC_URI[md5sum] = "3cd2698d1363a2c64091c2dadc974647"
 SRC_URI[sha256sum] = "0a818fcdede99aec43ffe6ca5b5388bff80d162f2f7bd4541dca94fecb87a290"
Signature · 1 line
2.7.0
author
#14 lore raw

PATCH 14/73 elfutils: Fix build with uclibc/musl

In reply to Khem Raj

Remove mempcpy patch its already in uclibc now
refresh libargp patch to match latest elfutils

Add ALLOW_EMPTY for musl

core-image-cmdline-full asks for elfutils package to be added to package it has all eu-* tools but we dont build them on musl. nevertheless lets satisfy the dependency so image can build for musl

Build libdw,libasm,libebl along with libelf

enhance the musl portability patch to compile every other library except the eu-* tools

Fix build on aarch64/musl issues

Header inclusion ends up with duplicate definitions of iovec struct since uclibc defines the same in usersapce, we have been depending upong including the kernel header on aarch64, using sys/uio.h is the right approach

Fix x86 build warning seen on musl

---
 ...de-alternatives-for-glibc-assumptions-hel.patch | 1161 ++++++++++++++++++++
 .../elfutils/elfutils-0.164/aarch64_uio.patch      |   47 +
 .../elfutils/elfutils-0.164/shadow.patch           |   23 +
 .../elfutils/elfutils-0.164/uclibc-support.patch   |  129 +++
 .../elfutils/elfutils/mempcpy.patch                |   24 -
 meta/recipes-devtools/elfutils/elfutils_0.148.bb   |    1 -
 meta/recipes-devtools/elfutils/elfutils_0.164.bb   |   13 +-
 7 files changed, 1368 insertions(+), 30 deletions(-)
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch
 delete mode 100644 meta/recipes-devtools/elfutils/elfutils/mempcpy.patch
meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch new file +1161 -0
new file mode 100644
index 0000000..ffab4c2
@@ -0,0 +1,1161 @@
+From 4b0fe80b3951f044c1c1b14d1d7f5f0b8ab67507 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 31 Dec 2015 06:35:34 +0000
+Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
+ compiling it on musl
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ Makefile.am                      |  2 +-
+ lib/color.c                      |  2 +-
+ lib/crc32_file.c                 |  4 +++-
+ lib/fixedsizehash.h              |  4 ++--
+ lib/system.h                     | 11 +++++++++++
+ lib/xmalloc.c                    |  2 +-
+ libasm/asm_end.c                 |  2 +-
+ libasm/asm_newscn.c              |  2 +-
+ libcpu/i386_gendis.c             |  2 +-
+ libcpu/i386_lex.c                |  2 +-
+ libcpu/i386_parse.c              |  2 +-
+ libdw/Makefile.am                |  2 +-
+ libdw/libdw_alloc.c              |  3 ++-
+ libdwfl/Makefile.am              |  2 ++
+ libdwfl/dwfl_build_id_find_elf.c |  3 ++-
+ libdwfl/dwfl_error.c             |  4 +++-
+ libdwfl/dwfl_module_getdwarf.c   |  1 +
+ libdwfl/find-debuginfo.c         |  2 +-
+ libdwfl/libdwfl_crc32_file.c     | 10 ++++++++++
+ libdwfl/linux-kernel-modules.c   |  1 +
+ libebl/eblopenbackend.c          |  2 +-
+ libebl/eblwstrtab.c              |  2 +-
+ libelf/elf.h                     |  9 ++++++---
+ libelf/libelf.h                  |  1 +
+ libelf/libelfP.h                 |  1 +
+ src/addr2line.c                  |  2 +-
+ src/ar.c                         |  2 +-
+ src/arlib.c                      |  2 +-
+ src/arlib2.c                     |  2 +-
+ src/elfcmp.c                     |  2 +-
+ src/elflint.c                    |  2 +-
+ src/findtextrel.c                |  2 +-
+ src/i386_ld.c                    |  2 +-
+ src/ld.c                         |  2 +-
+ src/ldgeneric.c                  |  2 +-
+ src/ldlex.c                      |  2 +-
+ src/ldscript.c                   |  2 +-
+ src/nm.c                         |  2 +-
+ src/objdump.c                    |  2 +-
+ src/ranlib.c                     |  2 +-
+ src/readelf.c                    |  2 +-
+ src/size.c                       |  2 +-
+ src/stack.c                      |  2 +-
+ src/strings.c                    |  2 +-
+ src/strip.c                      |  2 +-
+ src/unstrip.c                    |  2 +-
+ tests/addrscopes.c               |  2 +-
+ tests/allregs.c                  |  2 +-
+ tests/backtrace-data.c           |  2 +-
+ tests/backtrace-dwarf.c          |  2 +-
+ tests/backtrace.c                |  2 +-
+ tests/buildid.c                  |  2 +-
+ tests/debugaltlink.c             |  2 +-
+ tests/debuglink.c                |  2 +-
+ tests/deleted.c                  |  2 +-
+ tests/dwfl-addr-sect.c           |  2 +-
+ tests/dwfl-bug-addr-overflow.c   |  2 +-
+ tests/dwfl-bug-fd-leak.c         |  2 +-
+ tests/dwfl-bug-getmodules.c      |  2 +-
+ tests/dwfl-report-elf-align.c    |  2 +-
+ tests/dwfllines.c                |  2 +-
+ tests/dwflmodtest.c              |  2 +-
+ tests/dwflsyms.c                 |  2 +-
+ tests/early-offscn.c             |  2 +-
+ tests/ecp.c                      |  2 +-
+ tests/find-prologues.c           |  2 +-
+ tests/funcretval.c               |  2 +-
+ tests/funcscopes.c               |  2 +-
+ tests/getsrc_die.c               |  2 +-
+ tests/line2addr.c                |  2 +-
+ tests/low_high_pc.c              |  2 +-
+ tests/md5-sha1-test.c            |  2 +-
+ tests/rdwrmmap.c                 |  2 +-
+ tests/saridx.c                   |  2 +-
+ tests/sectiondump.c              |  2 +-
+ tests/varlocs.c                  |  2 +-
+ tests/vdsosyms.c                 |  2 +-
+ 77 files changed, 109 insertions(+), 73 deletions(-)
+
+Index: elfutils-0.164/Makefile.am
+===================================================================
+--- elfutils-0.164.orig/Makefile.am
++++ elfutils-0.164/Makefile.am
+@@ -24,7 +24,7 @@ pkginclude_HEADERS = version.h
+ 
+ # Add doc back when we have some real content.
+ SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
+-	  backends src po tests
++	  backends po tests
+ 
+ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
+ 	     COPYING COPYING-GPLV2 COPYING-LGPLV3
+Index: elfutils-0.164/lib/color.c
+===================================================================
+--- elfutils-0.164.orig/lib/color.c
++++ elfutils-0.164/lib/color.c
+@@ -32,7 +32,7 @@
+ #endif
+ 
+ #include <argp.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+ #include <string.h>
+Index: elfutils-0.164/lib/crc32_file.c
+===================================================================
+--- elfutils-0.164.orig/lib/crc32_file.c
++++ elfutils-0.164/lib/crc32_file.c
+@@ -30,12 +30,14 @@
+ # include <config.h>
+ #endif
+ 
+-#include "system.h"
+ #include <errno.h>
+ #include <unistd.h>
++#include <stdint.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+ 
++#include "system.h"
++
+ int
+ crc32_file (int fd, uint32_t *resp)
+ {
+Index: elfutils-0.164/lib/fixedsizehash.h
+===================================================================
+--- elfutils-0.164.orig/lib/fixedsizehash.h
++++ elfutils-0.164/lib/fixedsizehash.h
+@@ -30,12 +30,12 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <sys/cdefs.h>
+ #include <sys/param.h>
+ 
+ #include <system.h>
+ 
+-#define CONCAT(t1,t2) __CONCAT (t1,t2)
++#define CONCAT1(x,y) x##y
++#define CONCAT(x,y) CONCAT1(x,y)
+ 
+ /* Before including this file the following macros must be defined:
+ 
+Index: elfutils-0.164/lib/system.h
+===================================================================
+--- elfutils-0.164.orig/lib/system.h
++++ elfutils-0.164/lib/system.h
+@@ -49,6 +49,16 @@
+ #else
+ # error "Unknown byte order"
+ #endif
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression) \
++  (__extension__							      \
++    ({ long int __result;						      \
++       do __result = (long int) (expression);				      \
++       while (__result == -1L && errno == EINTR);			      \
++       __result; }))
++#endif
++
++#define error(status, errno, ...) err(status, __VA_ARGS__)
+ 
+ extern void *xmalloc (size_t) __attribute__ ((__malloc__));
+ extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__));
+Index: elfutils-0.164/lib/xmalloc.c
+===================================================================
+--- elfutils-0.164.orig/lib/xmalloc.c
++++ elfutils-0.164/lib/xmalloc.c
+@@ -30,7 +30,7 @@
+ # include <config.h>
+ #endif
+ 
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stddef.h>
+ #include <stdlib.h>
+Index: elfutils-0.164/libasm/asm_end.c
+===================================================================
+--- elfutils-0.164.orig/libasm/asm_end.c
++++ elfutils-0.164/libasm/asm_end.c
+@@ -32,7 +32,7 @@
+ #endif
+ 
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+Index: elfutils-0.164/libasm/asm_newscn.c
+===================================================================
+--- elfutils-0.164.orig/libasm/asm_newscn.c
++++ elfutils-0.164/libasm/asm_newscn.c
+@@ -32,7 +32,7 @@
+ #endif
+ 
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+ #include <string.h>
+Index: elfutils-0.164/libcpu/i386_gendis.c
+===================================================================
+--- elfutils-0.164.orig/libcpu/i386_gendis.c
++++ elfutils-0.164/libcpu/i386_gendis.c
+@@ -31,7 +31,7 @@
+ # include <config.h>
+ #endif
+ 
+-#include <error.h>
++#include <err.h>
+ #include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+Index: elfutils-0.164/libcpu/i386_lex.c
+===================================================================
+--- elfutils-0.164.orig/libcpu/i386_lex.c
++++ elfutils-0.164/libcpu/i386_lex.c
+@@ -571,7 +571,7 @@ char *i386_text;
+ #endif
+ 
+ #include <ctype.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ 
+ #include <system.h>
+Index: elfutils-0.164/libcpu/i386_parse.c
+===================================================================
+--- elfutils-0.164.orig/libcpu/i386_parse.c
++++ elfutils-0.164/libcpu/i386_parse.c
+@@ -107,7 +107,7 @@
+ #include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <inttypes.h>
+ #include <libintl.h>
+ #include <math.h>
+Index: elfutils-0.164/libdw/Makefile.am
+===================================================================
+--- elfutils-0.164.orig/libdw/Makefile.am
++++ elfutils-0.164/libdw/Makefile.am
+@@ -117,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
+ 		-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
+ 		-Wl,--version-script,$<,--no-undefined \
+ 		-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
+-		-ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS)
++		-ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS) -lfts -largp
+ 	@$(textrel_check)
+ 	$(AM_V_at)ln -fs $@ $@.$(VERSION)
+ 
+Index: elfutils-0.164/libdw/libdw_alloc.c
+===================================================================
+--- elfutils-0.164.orig/libdw/libdw_alloc.c
++++ elfutils-0.164/libdw/libdw_alloc.c
+@@ -31,11 +31,12 @@
+ # include <config.h>
+ #endif
+ 
+-#include <error.h>
++#include <err.h>
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <sys/param.h>
+ #include "libdwP.h"
++#include "system.h"
+ 
+ 
+ void *
+Index: elfutils-0.164/libdwfl/Makefile.am
+===================================================================
+--- elfutils-0.164.orig/libdwfl/Makefile.am
++++ elfutils-0.164/libdwfl/Makefile.am
+@@ -86,6 +86,8 @@ libelf = ../libelf/libelf.so
+ libebl = ../libebl/libebl.a
+ libeu = ../lib/libeu.a
+ 
++LDADD = -lfts
++
+ libdwfl_pic_a_SOURCES =
+ am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_SOURCES:.c=.os)
+ 
+Index: elfutils-0.164/libdwfl/dwfl_build_id_find_elf.c
+===================================================================
+--- elfutils-0.164.orig/libdwfl/dwfl_build_id_find_elf.c
++++ elfutils-0.164/libdwfl/dwfl_build_id_find_elf.c
+@@ -27,6 +27,7 @@
+    not, see <http://www.gnu.org/licenses/>.  */
+ 
+ #include "libdwflP.h"
++#include "system.h"
+ #include <inttypes.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+@@ -94,7 +95,7 @@ __libdwfl_open_by_build_id (Dwfl_Module
+ 	{
+ 	  if (*file_name != NULL)
+ 	    free (*file_name);
+-	  *file_name = canonicalize_file_name (name);
++	  *file_name = realpath (name, NULL);
+ 	  if (*file_name == NULL)
+ 	    {
+ 	      *file_name = name;
+Index: elfutils-0.164/libdwfl/dwfl_error.c
+===================================================================
+--- elfutils-0.164.orig/libdwfl/dwfl_error.c
++++ elfutils-0.164/libdwfl/dwfl_error.c
+@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
+ const char *
+ dwfl_errmsg (int error)
+ {
++  static __thread char s[64] = "";
+   if (error == 0 || error == -1)
+     {
+       int last_error = global_error;
+@@ -154,7 +155,8 @@ dwfl_errmsg (int error)
+   switch (error &~ 0xffff)
+     {
+     case OTHER_ERROR (ERRNO):
+-      return strerror_r (error & 0xffff, "bad", 0);
++      strerror_r (error & 0xffff, s, sizeof(s));
++      return s;
+     case OTHER_ERROR (LIBELF):
+       return elf_errmsg (error & 0xffff);
+     case OTHER_ERROR (LIBDW):
+Index: elfutils-0.164/libdwfl/dwfl_module_getdwarf.c
+===================================================================
+--- elfutils-0.164.orig/libdwfl/dwfl_module_getdwarf.c
++++ elfutils-0.164/libdwfl/dwfl_module_getdwarf.c
+@@ -31,6 +31,7 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <unistd.h>
++#include "system.h"
+ #include "../libdw/libdwP.h"	/* DWARF_E_* values are here.  */
+ #include "../libelf/libelfP.h"
+ 
+Index: elfutils-0.164/libdwfl/find-debuginfo.c
+===================================================================
+--- elfutils-0.164.orig/libdwfl/find-debuginfo.c
++++ elfutils-0.164/libdwfl/find-debuginfo.c
+@@ -372,7 +372,7 @@ dwfl_standard_find_debuginfo (Dwfl_Modul
+       /* If FILE_NAME is a symlink, the debug file might be associated
+ 	 with the symlink target name instead.  */
+ 
+-      char *canon = canonicalize_file_name (file_name);
++      char *canon = realpath (file_name, NULL);
+       if (canon != NULL && strcmp (file_name, canon))
+ 	fd = find_debuginfo_in_path (mod, canon,
+ 				     debuglink_file, debuglink_crc,
+Index: elfutils-0.164/libdwfl/libdwfl_crc32_file.c
+===================================================================
+--- elfutils-0.164.orig/libdwfl/libdwfl_crc32_file.c
++++ elfutils-0.164/libdwfl/libdwfl_crc32_file.c
+@@ -31,6 +31,16 @@
+ 
+ #define crc32_file attribute_hidden __libdwfl_crc32_file
+ #define crc32 __libdwfl_crc32
++
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression) \
++  (__extension__							      \
++    ({ long int __result;						      \
++       do __result = (long int) (expression);				      \
++       while (__result == -1L && errno == EINTR);			      \
++       __result; }))
++#endif
++
+ #define LIB_SYSTEM_H	1
+ #include <libdwflP.h>
+ #include "../lib/crc32_file.c"
+Index: elfutils-0.164/libdwfl/linux-kernel-modules.c
+===================================================================
+--- elfutils-0.164.orig/libdwfl/linux-kernel-modules.c
++++ elfutils-0.164/libdwfl/linux-kernel-modules.c
+@@ -34,6 +34,7 @@
+ #include <config.h>
+ 
+ #include "libdwflP.h"
++#include "system.h"
+ #include <inttypes.h>
+ #include <errno.h>
+ #include <stdio.h>
+Index: elfutils-0.164/libebl/eblopenbackend.c
+===================================================================
+--- elfutils-0.164.orig/libebl/eblopenbackend.c
++++ elfutils-0.164/libebl/eblopenbackend.c
+@@ -32,7 +32,7 @@
+ 
+ #include <assert.h>
+ #include <dlfcn.h>
+-#include <error.h>
++#include <err.h>
+ #include <libelfP.h>
+ #include <dwarf.h>
+ #include <stdlib.h>
+Index: elfutils-0.164/libebl/eblwstrtab.c
+===================================================================
+--- elfutils-0.164.orig/libebl/eblwstrtab.c
++++ elfutils-0.164/libebl/eblwstrtab.c
+@@ -305,7 +305,7 @@ copystrings (struct Ebl_WStrent *nodep,
+ 
+   /* Process the current node.  */
+   nodep->offset = *offsetp;
+-  *freep = wmempcpy (*freep, nodep->string, nodep->len);
++  *freep = wmemcpy (*freep, nodep->string, nodep->len) + nodep->len;
+   *offsetp += nodep->len * sizeof (wchar_t);
+ 
+   for (subs = nodep->next; subs != NULL; subs = subs->next)
+Index: elfutils-0.164/libelf/elf.h
+===================================================================
+--- elfutils-0.164.orig/libelf/elf.h
++++ elfutils-0.164/libelf/elf.h
+@@ -21,7 +21,9 @@
+ 
+ #include <features.h>
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /* Standard ELF types.  */
+ 
+@@ -3552,7 +3554,8 @@ enum
+ 
+ #define R_TILEGX_NUM		130
+ 
+-
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif	/* elf.h */
+Index: elfutils-0.164/libelf/libelf.h
+===================================================================
+--- elfutils-0.164.orig/libelf/libelf.h
++++ elfutils-0.164/libelf/libelf.h
+@@ -29,6 +29,7 @@
+ #ifndef _LIBELF_H
+ #define _LIBELF_H 1
+ 
++#include <fcntl.h>
+ #include <stdint.h>
+ #include <sys/types.h>
+ 
+Index: elfutils-0.164/libelf/libelfP.h
+===================================================================
+--- elfutils-0.164.orig/libelf/libelfP.h
++++ elfutils-0.164/libelf/libelfP.h
+@@ -36,6 +36,7 @@
+ 
+ #include <ar.h>
+ #include <gelf.h>
++#include <libelf.h>
+ 
+ #include <errno.h>
+ #include <stdint.h>
+Index: elfutils-0.164/src/addr2line.c
+===================================================================
+--- elfutils-0.164.orig/src/addr2line.c
++++ elfutils-0.164/src/addr2line.c
+@@ -23,7 +23,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <inttypes.h>
+ #include <libdwfl.h>
+Index: elfutils-0.164/src/ar.c
+===================================================================
+--- elfutils-0.164.orig/src/ar.c
++++ elfutils-0.164/src/ar.c
+@@ -22,7 +22,7 @@
+ 
+ #include <argp.h>
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <libintl.h>
+Index: elfutils-0.164/src/arlib.c
+===================================================================
+--- elfutils-0.164.orig/src/arlib.c
++++ elfutils-0.164/src/arlib.c
+@@ -21,7 +21,7 @@
+ #endif
+ 
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <gelf.h>
+ #include <libintl.h>
+ #include <stdio.h>
+Index: elfutils-0.164/src/arlib2.c
+===================================================================
+--- elfutils-0.164.orig/src/arlib2.c
++++ elfutils-0.164/src/arlib2.c
+@@ -20,7 +20,7 @@
+ # include <config.h>
+ #endif
+ 
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <limits.h>
+ #include <string.h>
+Index: elfutils-0.164/src/elfcmp.c
+===================================================================
+--- elfutils-0.164.orig/src/elfcmp.c
++++ elfutils-0.164/src/elfcmp.c
+@@ -23,7 +23,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <locale.h>
+ #include <libintl.h>
+Index: elfutils-0.164/src/elflint.c
+===================================================================
+--- elfutils-0.164.orig/src/elflint.c
++++ elfutils-0.164/src/elflint.c
+@@ -24,7 +24,7 @@
+ #include <assert.h>
+ #include <byteswap.h>
+ #include <endian.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.164/src/findtextrel.c
+===================================================================
+--- elfutils-0.164.orig/src/findtextrel.c
++++ elfutils-0.164/src/findtextrel.c
+@@ -23,7 +23,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <libdw.h>
+Index: elfutils-0.164/src/i386_ld.c
+===================================================================
+--- elfutils-0.164.orig/src/i386_ld.c
++++ elfutils-0.164/src/i386_ld.c
+@@ -20,7 +20,7 @@
+ #endif
+ 
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+ #include <string.h>
+Index: elfutils-0.164/src/ld.c
+===================================================================
+--- elfutils-0.164.orig/src/ld.c
++++ elfutils-0.164/src/ld.c
+@@ -21,7 +21,7 @@
+ 
+ #include <argp.h>
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <libelf.h>
+ #include <libintl.h>
+Index: elfutils-0.164/src/ldgeneric.c
+===================================================================
+--- elfutils-0.164.orig/src/ldgeneric.c
++++ elfutils-0.164/src/ldgeneric.c
+@@ -23,7 +23,7 @@
+ #include <ctype.h>
+ #include <dlfcn.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <fnmatch.h>
+ #include <gelf.h>
+Index: elfutils-0.164/src/ldlex.c
+===================================================================
+--- elfutils-0.164.orig/src/ldlex.c
++++ elfutils-0.164/src/ldlex.c
+@@ -1099,7 +1099,7 @@ char *ldtext;
+ #include <assert.h>
+ #include <ctype.h>
+ #include <elf.h>
+-#include <error.h>
++#include <err.h>
+ #include <inttypes.h>
+ #include <libintl.h>
+ #include <stdbool.h>
+Index: elfutils-0.164/src/ldscript.c
+===================================================================
+--- elfutils-0.164.orig/src/ldscript.c
++++ elfutils-0.164/src/ldscript.c
+@@ -95,7 +95,7 @@
+ #endif
+ 
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdbool.h>
+ #include <stdint.h>
+Index: elfutils-0.164/src/nm.c
+===================================================================
+--- elfutils-0.164.orig/src/nm.c
++++ elfutils-0.164/src/nm.c
+@@ -26,7 +26,7 @@
+ #include <ctype.h>
+ #include <dwarf.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.164/src/objdump.c
+===================================================================
+--- elfutils-0.164.orig/src/objdump.c
++++ elfutils-0.164/src/objdump.c
+@@ -21,7 +21,7 @@
+ #endif
+ 
+ #include <argp.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <inttypes.h>
+ #include <libintl.h>
+Index: elfutils-0.164/src/ranlib.c
+===================================================================
+--- elfutils-0.164.orig/src/ranlib.c
++++ elfutils-0.164/src/ranlib.c
+@@ -24,7 +24,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <libintl.h>
+Index: elfutils-0.164/src/readelf.c
+===================================================================
+--- elfutils-0.164.orig/src/readelf.c
++++ elfutils-0.164/src/readelf.c
+@@ -25,7 +25,7 @@
+ #include <ctype.h>
+ #include <dwarf.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.164/src/size.c
+===================================================================
+--- elfutils-0.164.orig/src/size.c
++++ elfutils-0.164/src/size.c
+@@ -21,7 +21,7 @@
+ #endif
+ 
+ #include <argp.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.164/src/stack.c
+===================================================================
+--- elfutils-0.164.orig/src/stack.c
++++ elfutils-0.164/src/stack.c
+@@ -18,7 +18,7 @@
+ #include <config.h>
+ #include <assert.h>
+ #include <argp.h>
+-#include <error.h>
++#include <err.h>
+ #include <stdlib.h>
+ #include <inttypes.h>
+ #include <stdio.h>
+Index: elfutils-0.164/src/strings.c
+===================================================================
+--- elfutils-0.164.orig/src/strings.c
++++ elfutils-0.164/src/strings.c
+@@ -25,7 +25,7 @@
+ #include <ctype.h>
+ #include <endian.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.164/src/strip.c
+===================================================================
+--- elfutils-0.164.orig/src/strip.c
++++ elfutils-0.164/src/strip.c
+@@ -24,7 +24,7 @@
+ #include <assert.h>
+ #include <byteswap.h>
+ #include <endian.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <libelf.h>
+Index: elfutils-0.164/src/unstrip.c
+===================================================================
+--- elfutils-0.164.orig/src/unstrip.c
++++ elfutils-0.164/src/unstrip.c
+@@ -31,7 +31,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <fnmatch.h>
+ #include <libintl.h>
+Index: elfutils-0.164/tests/addrscopes.c
+===================================================================
+--- elfutils-0.164.orig/tests/addrscopes.c
++++ elfutils-0.164/tests/addrscopes.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ 
+ 
+Index: elfutils-0.164/tests/allregs.c
+===================================================================
+--- elfutils-0.164.orig/tests/allregs.c
++++ elfutils-0.164/tests/allregs.c
+@@ -21,7 +21,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include <argp.h>
+ #include <assert.h>
+Index: elfutils-0.164/tests/backtrace-data.c
+===================================================================
+--- elfutils-0.164.orig/tests/backtrace-data.c
++++ elfutils-0.164/tests/backtrace-data.c
+@@ -27,7 +27,7 @@
+ #include <dirent.h>
+ #include <stdlib.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <dwarf.h>
+ #if defined(__x86_64__) && defined(__linux__)
+Index: elfutils-0.164/tests/backtrace-dwarf.c
+===================================================================
+--- elfutils-0.164.orig/tests/backtrace-dwarf.c
++++ elfutils-0.164/tests/backtrace-dwarf.c
+@@ -22,7 +22,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <sys/ptrace.h>
+ #include <sys/types.h>
+Index: elfutils-0.164/tests/backtrace.c
+===================================================================
+--- elfutils-0.164.orig/tests/backtrace.c
++++ elfutils-0.164/tests/backtrace.c
+@@ -24,7 +24,7 @@
+ #include <dirent.h>
+ #include <stdlib.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <dwarf.h>
+ #ifdef __linux__
+Index: elfutils-0.164/tests/buildid.c
+===================================================================
+--- elfutils-0.164.orig/tests/buildid.c
++++ elfutils-0.164/tests/buildid.c
+@@ -23,7 +23,7 @@
+ #include ELFUTILS_HEADER(elf)
+ #include ELFUTILS_HEADER(dwelf)
+ #include <stdio.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+Index: elfutils-0.164/tests/debugaltlink.c
+===================================================================
+--- elfutils-0.164.orig/tests/debugaltlink.c
++++ elfutils-0.164/tests/debugaltlink.c
+@@ -23,7 +23,7 @@
+ #include ELFUTILS_HEADER(dw)
+ #include ELFUTILS_HEADER(dwelf)
+ #include <stdio.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+Index: elfutils-0.164/tests/debuglink.c
+===================================================================
+--- elfutils-0.164.orig/tests/debuglink.c
++++ elfutils-0.164/tests/debuglink.c
+@@ -21,7 +21,7 @@
+ #include <errno.h>
+ #include ELFUTILS_HEADER(dwelf)
+ #include <stdio.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+Index: elfutils-0.164/tests/deleted.c
+===================================================================
+--- elfutils-0.164.orig/tests/deleted.c
++++ elfutils-0.164/tests/deleted.c
+@@ -21,7 +21,7 @@
+ #include <unistd.h>
+ #include <assert.h>
+ #include <stdio.h>
+-#include <error.h>
++#include <err.h>
+ #include <errno.h>
+ #ifdef __linux__
+ #include <sys/prctl.h>
+Index: elfutils-0.164/tests/dwfl-addr-sect.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwfl-addr-sect.c
++++ elfutils-0.164/tests/dwfl-addr-sect.c
+@@ -23,7 +23,7 @@
+ #include <stdio_ext.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include <argp.h>
+ #include ELFUTILS_HEADER(dwfl)
+Index: elfutils-0.164/tests/dwfl-bug-addr-overflow.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwfl-bug-addr-overflow.c
++++ elfutils-0.164/tests/dwfl-bug-addr-overflow.c
+@@ -20,7 +20,7 @@
+ #include <inttypes.h>
+ #include <stdio.h>
+ #include <stdio_ext.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include ELFUTILS_HEADER(dwfl)
+ 
+Index: elfutils-0.164/tests/dwfl-bug-fd-leak.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwfl-bug-fd-leak.c
++++ elfutils-0.164/tests/dwfl-bug-fd-leak.c
+@@ -24,7 +24,7 @@
+ #include <dirent.h>
+ #include <stdlib.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <dwarf.h>
+ #include <sys/resource.h>
+Index: elfutils-0.164/tests/dwfl-bug-getmodules.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwfl-bug-getmodules.c
++++ elfutils-0.164/tests/dwfl-bug-getmodules.c
+@@ -18,7 +18,7 @@
+ #include <config.h>
+ #include ELFUTILS_HEADER(dwfl)
+ 
+-#include <error.h>
++#include <err.h>
+ 
+ static const Dwfl_Callbacks callbacks =
+   {
+Index: elfutils-0.164/tests/dwfl-report-elf-align.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwfl-report-elf-align.c
++++ elfutils-0.164/tests/dwfl-report-elf-align.c
+@@ -20,7 +20,7 @@
+ #include <inttypes.h>
+ #include <stdio.h>
+ #include <stdio_ext.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include <string.h>
+ #include <stdlib.h>
+Index: elfutils-0.164/tests/dwfllines.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwfllines.c
++++ elfutils-0.164/tests/dwfllines.c
+@@ -27,7 +27,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ 
+ int
+ main (int argc, char *argv[])
+Index: elfutils-0.164/tests/dwflmodtest.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwflmodtest.c
++++ elfutils-0.164/tests/dwflmodtest.c
+@@ -23,7 +23,7 @@
+ #include <stdio_ext.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include <argp.h>
+ #include ELFUTILS_HEADER(dwfl)
+Index: elfutils-0.164/tests/dwflsyms.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwflsyms.c
++++ elfutils-0.164/tests/dwflsyms.c
+@@ -25,7 +25,7 @@
+ #include <stdio.h>
+ #include <stdio_ext.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ 
+ static const char *
+Index: elfutils-0.164/tests/early-offscn.c
+===================================================================
+--- elfutils-0.164.orig/tests/early-offscn.c
++++ elfutils-0.164/tests/early-offscn.c
+@@ -19,7 +19,7 @@
+ #endif
+ 
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <stdio.h>
+Index: elfutils-0.164/tests/ecp.c
+===================================================================
+--- elfutils-0.164.orig/tests/ecp.c
++++ elfutils-0.164/tests/ecp.c
+@@ -20,7 +20,7 @@
+ #endif
+ 
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <stdlib.h>
+Index: elfutils-0.164/tests/find-prologues.c
+===================================================================
+--- elfutils-0.164.orig/tests/find-prologues.c
++++ elfutils-0.164/tests/find-prologues.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <fnmatch.h>
+ 
+Index: elfutils-0.164/tests/funcretval.c
+===================================================================
+--- elfutils-0.164.orig/tests/funcretval.c
++++ elfutils-0.164/tests/funcretval.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <fnmatch.h>
+ 
+Index: elfutils-0.164/tests/funcscopes.c
+===================================================================
+--- elfutils-0.164.orig/tests/funcscopes.c
++++ elfutils-0.164/tests/funcscopes.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <fnmatch.h>
+ 
+Index: elfutils-0.164/tests/getsrc_die.c
+===================================================================
+--- elfutils-0.164.orig/tests/getsrc_die.c
++++ elfutils-0.164/tests/getsrc_die.c
+@@ -19,7 +19,7 @@
+ #endif
+ 
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <inttypes.h>
+ #include <libelf.h>
+Index: elfutils-0.164/tests/line2addr.c
+===================================================================
+--- elfutils-0.164.orig/tests/line2addr.c
++++ elfutils-0.164/tests/line2addr.c
+@@ -26,7 +26,7 @@
+ #include <locale.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ 
+ 
+ static void
+Index: elfutils-0.164/tests/low_high_pc.c
+===================================================================
+--- elfutils-0.164.orig/tests/low_high_pc.c
++++ elfutils-0.164/tests/low_high_pc.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <fnmatch.h>
+ 
+Index: elfutils-0.164/tests/md5-sha1-test.c
+===================================================================
+--- elfutils-0.164.orig/tests/md5-sha1-test.c
++++ elfutils-0.164/tests/md5-sha1-test.c
+@@ -19,7 +19,7 @@
+ #endif
+ 
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ 
+ #include "md5.h"
+ #include "sha1.h"
+Index: elfutils-0.164/tests/rdwrmmap.c
+===================================================================
+--- elfutils-0.164.orig/tests/rdwrmmap.c
++++ elfutils-0.164/tests/rdwrmmap.c
+@@ -19,7 +19,7 @@
+ #endif
+ 
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+Index: elfutils-0.164/tests/saridx.c
+===================================================================
+--- elfutils-0.164.orig/tests/saridx.c
++++ elfutils-0.164/tests/saridx.c
+@@ -17,7 +17,7 @@
+ 
+ #include <config.h>
+ 
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <stdio.h>
+Index: elfutils-0.164/tests/sectiondump.c
+===================================================================
+--- elfutils-0.164.orig/tests/sectiondump.c
++++ elfutils-0.164/tests/sectiondump.c
+@@ -18,7 +18,7 @@
+ #include <config.h>
+ 
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.164/tests/varlocs.c
+===================================================================
+--- elfutils-0.164.orig/tests/varlocs.c
++++ elfutils-0.164/tests/varlocs.c
+@@ -25,7 +25,7 @@
+ #include <dwarf.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+Index: elfutils-0.164/tests/vdsosyms.c
+===================================================================
+--- elfutils-0.164.orig/tests/vdsosyms.c
++++ elfutils-0.164/tests/vdsosyms.c
+@@ -18,7 +18,7 @@
+ #include <config.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <inttypes.h>
+ #include <stdio.h>
+ #include <string.h>
+Index: elfutils-0.164/libelf/elf_getarsym.c
+===================================================================
+--- elfutils-0.164.orig/libelf/elf_getarsym.c
++++ elfutils-0.164/libelf/elf_getarsym.c
+@@ -302,7 +302,7 @@ elf_getarsym (Elf *elf, size_t *ptr)
+ 		arsym[cnt].as_off = (*u32)[cnt];
+ 
+ 	      arsym[cnt].as_hash = _dl_elf_hash (str_data);
+-	      str_data = rawmemchr (str_data, '\0') + 1;
++	      str_data = memchr (str_data, '\0', SIZE_MAX) + 1;
+ 	    }
+ 
+ 	  /* At the end a special entry.  */
meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch new file +47 -0

47 lines not on this page · raw message

meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch new file +23 -0
new file mode 100644
index 0000000..d31961f
@@ -0,0 +1,23 @@
+Fix control path where we have str as uninitialized string
+
+| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c: In function 'i386_disasm':
+| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5: error: 'str' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+|      memcpy (buf + bufcnt, _str, _len);           \
+|      ^
+| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17: note: 'str' was declared here
+|      const char *str;
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Pending
+Index: elfutils-0.164/libcpu/i386_disasm.c
+===================================================================
+--- elfutils-0.164.orig/libcpu/i386_disasm.c
++++ elfutils-0.164/libcpu/i386_disasm.c
+@@ -821,6 +821,7 @@ i386_disasm (const uint8_t **startp, con
+ 			    }
+ 
+ 			default:
++			  str = "";
+ 			  assert (! "INVALID not handled");
+ 			}
+ 		    }
meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch new file +129 -0

129 lines not on this page · raw message

meta/recipes-devtools/elfutils/elfutils/mempcpy.patch deleted +0 -24
deleted file mode 100644
index 24e31fa..0000000
@@ -1,24 +0,0 @@
-
-uclibc does not export __mempcpy like glibc so we alias it here.
-This patch may make sense for upstream but elfutils uses more
-glibc specific features like obstack_printf which are missing in
-uclibc they need to be fixed along to make it work all the way
-
-Upstream-Status: Inappropriate[Elfutils uses more glibc specific features]
-
-Signed-off-by: Khem Raj <[email protected]>
-
-Index: elfutils-0.148/libelf/elf_begin.c
-===================================================================
---- elfutils-0.148.orig/libelf/elf_begin.c
-+++ elfutils-0.148/libelf/elf_begin.c
-@@ -68,6 +68,9 @@
- #include "libelfP.h"
- #include "common.h"
- 
-+#ifdef __UCLIBC__
-+#define __mempcpy mempcpy
-+#endif
- 
- /* Create descriptor for archive in memory.  */
- static inline Elf *
meta/recipes-devtools/elfutils/elfutils_0.148.bb +0 -1
index 0d8490d..ff53257 100644
@@ -27,7 +27,6 @@ SRC_URI += "\
         file://elf_additions.diff \
         file://elfutils-fsize.patch \
         file://remove-unused.patch \
-        file://mempcpy.patch \
         file://fix_for_gcc-4.7.patch \
         file://dso-link-change.patch \
         file://nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch \
meta/recipes-devtools/elfutils/elfutils_0.164.bb +8 -5
index c27635d..4964c05 100644
@@ -4,6 +4,7 @@ SECTION = "base"
 LICENSE = "(GPLv3 & Elfutils-Exception)"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 DEPENDS = "libtool bzip2 zlib virtual/libintl"
+DEPENDS_append_libc-musl = " argp-standalone fts "
 
 SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/${BP}.tar.bz2"
 
@@ -11,13 +12,14 @@ SRC_URI[md5sum] = "2e4536c1c48034f188a80789a59114d8"
 SRC_URI[sha256sum] = "9683c025928a12d06b7fe812928aa6235249e22d197d086f7084606a48165900"
 
 SRC_URI += "\
-        file://mempcpy.patch \
         file://dso-link-change.patch \
         file://Fix_elf_cvt_gunhash.patch \
         file://fixheadercheck.patch \
         file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \
         file://0001-remove-the-unneed-checking.patch \
         file://0001-fix-a-stack-usage-warning.patch \
+        file://aarch64_uio.patch \
+        file://shadow.patch \
 "
 
 # pick the patch from debian
@@ -33,10 +35,9 @@ SRC_URI += "\
         file://0001-Ignore-differences-between-mips-machine-identifiers.patch \
         file://0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
         file://0003-Add-mips-n64-relocation-format-hack.patch \
+        file://uclibc-support.patch \
 "
-
-# Only apply when building uclibc based target recipe
-SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.161.patch"
+SRC_URI_append_libc-musl = " file://0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch "
 
 # The buildsystem wants to generate 2 .h files from source using a binary it just built,
 # which can not pass the cross compiling, so let's work around it by adding 2 .h files
@@ -50,7 +51,7 @@ EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc"
 
 do_install_append() {
 	if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
-		rm ${D}${bindir}/eu-objdump
+		rm -f ${D}${bindir}/eu-objdump
 	fi
 }
 
@@ -62,6 +63,8 @@ EXTRA_OEMAKE_libc-uclibc = "-C libelf"
 EXTRA_OEMAKE_class-native = ""
 EXTRA_OEMAKE_class-nativesdk = ""
 
+ALLOW_EMPTY_${PN}_libc-musl = "1"
+
 BBCLASSEXTEND = "native nativesdk"
 
 # Package utilities separately
Signature · 1 line
2.7.0
#15 lore raw

Re: [PATCH 14/73] elfutils: Fix build with uclibc/musl

Quoted 14 lines · Khem Raj

Remove mempcpy patch its already in uclibc now
refresh libargp patch to match latest elfutils

Add ALLOW_EMPTY for musl

core-image-cmdline-full asks for elfutils package to be added to package it has all eu-* tools but we dont build them on musl. nevertheless lets satisfy the dependency so image can build for musl

Build libdw,libasm,libebl along with libelf

enhance the musl portability patch to compile every other library except the eu-* tools

Quoted 9 lines

Fix build on aarch64/musl issues

Header inclusion ends up with duplicate definitions of iovec struct since uclibc defines the same in usersapce, we have been depending upong including the kernel header on aarch64, using sys/uio.h is the right approach

Fix x86 build warning seen on musl

The new patches are missing their Upstream-Status tags.

Ross

author
#16 lore raw

Re: [PATCH 14/73] elfutils: Fix build with uclibc/musl

Quoted 24 lines · Ross
Quoted 22 lines · Khem Raj

Remove mempcpy patch its already in uclibc now
refresh libargp patch to match latest elfutils

Add ALLOW_EMPTY for musl

core-image-cmdline-full asks for elfutils package to be added to package it has all eu-* tools but we dont build them on musl. nevertheless lets satisfy the dependency so image can build for musl

Build libdw,libasm,libebl along with libelf

enhance the musl portability patch to compile every other library except the eu-* tools

Fix build on aarch64/musl issues

Header inclusion ends up with duplicate definitions of iovec struct since uclibc defines the same in usersapce, we have been depending upong including the kernel header on aarch64, using sys/uio.h is the right approach

Quoted 5 lines
Quoted 1 line

Fix x86 build warning seen on musl

The new patches are missing their Upstream-Status tags.

updated
https://github.com/kraj/openembedded-core/commit/df09f6aac44253dbf6a313a588f877206264ea64

Quoted 1 line

Ross

author
#17 lore raw

PATCH 15/73 systemd: Update and fix build with uclibc

In reply to Khem Raj
---
 .../systemd/0001-define-exp10-if-missing.patch     |  4 +-
 ...r-getty-to-agetty-in-console-setup-system.patch |  4 +-
 ...pper-instead-of-looking-for-relative-opti.patch | 61 ++++++++++++++++++++++
 ...v-when-secure-versions-are-not-available.patch} | 21 ++++----
 ...c-Change-the-default-device-timeout-to-2.patch} |  4 +-
 ...-install-dependency-links-at-install-tim.patch} |  6 +--
 ...eck-for-additional-features-that-uclibc-.patch} | 12 ++---
 ...n-Use-execvpe-only-when-libc-supports-it.patch} |  4 +-
 ...unimplemented-_SC_PHYS_PAGES-system-conf.patch} |  4 +-
 ...010-implment-systemd-sysv-install-for-OE.patch} |  4 +-
 ...es-Build-conditionally-when-HAVE_MYHOSTN.patch} |  6 +--
 ...patch => 0012-rules-whitelist-hd-devices.patch} |  4 +-
 ...or-add-support-for-executing-scripts-und.patch} |  4 +-
 ...-Make-root-s-home-directory-configurable.patch} | 14 ++---
 ...015-systemd-user-avoid-using-system-auth.patch} |  4 +-
 ...vert-rules-remove-firmware-loading-rules.patch} |  4 +-
 ...remove-userspace-firmware-loading-suppor.patch} | 16 +++---
 ...sing.h-for-getting-secure_getenv-definiti.patch | 25 +++++++++
 ...il-don-t-fail-if-libc-doesn-t-support-IDN.patch | 34 ++++++++++++
 meta/recipes-core/systemd/systemd_228.bb           | 46 ++++++++--------
 20 files changed, 201 insertions(+), 80 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
 rename meta/recipes-core/systemd/systemd/{0003-Use-getenv-when-secure-versions-are-not-available.patch => 0004-Use-getenv-when-secure-versions-are-not-available.patch} (56%)
 rename meta/recipes-core/systemd/systemd/{0004-core-device.c-Change-the-default-device-timeout-to-2.patch => 0005-core-device.c-Change-the-default-device-timeout-to-2.patch} (88%)
 rename meta/recipes-core/systemd/systemd/{0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch => 0006-binfmt-Don-t-install-dependency-links-at-install-tim.patch} (92%)
 rename meta/recipes-core/systemd/systemd/{0006-configure-Check-for-additional-features-that-uclibc-.patch => 0007-configure-Check-for-additional-features-that-uclibc-.patch} (72%)
 rename meta/recipes-core/systemd/systemd/{0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch => 0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch} (89%)
 rename meta/recipes-core/systemd/systemd/{0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch => 0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch} (90%)
 rename meta/recipes-core/systemd/systemd/{0009-implment-systemd-sysv-install-for-OE.patch => 0010-implment-systemd-sysv-install-for-OE.patch} (91%)
 rename meta/recipes-core/systemd/systemd/{0010-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch => 0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch} (83%)
 rename meta/recipes-core/systemd/systemd/{0011-rules-whitelist-hd-devices.patch => 0012-rules-whitelist-hd-devices.patch} (91%)
 rename meta/recipes-core/systemd/systemd/{0012-sysv-generator-add-support-for-executing-scripts-und.patch => 0013-sysv-generator-add-support-for-executing-scripts-und.patch} (98%)
 rename meta/recipes-core/systemd/systemd/{0013-Make-root-s-home-directory-configurable.patch => 0014-Make-root-s-home-directory-configurable.patch} (95%)
 rename meta/recipes-core/systemd/systemd/{0014-systemd-user-avoid-using-system-auth.patch => 0015-systemd-user-avoid-using-system-auth.patch} (87%)
 rename meta/recipes-core/systemd/systemd/{0015-Revert-rules-remove-firmware-loading-rules.patch => 0016-Revert-rules-remove-firmware-loading-rules.patch} (84%)
 rename meta/recipes-core/systemd/systemd/{0016-Revert-udev-remove-userspace-firmware-loading-suppor.patch => 0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch} (96%)
 create mode 100644 meta/recipes-core/systemd/systemd/0018-include-missing.h-for-getting-secure_getenv-definiti.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
meta/recipes-core/systemd/systemd/0001-define-exp10-if-missing.patch +2 -2
index 8bb775f..2822169 100644
@@ -1,7 +1,7 @@
-From ddad25c809846e08ea39bef49cc668f95d53304a Mon Sep 17 00:00:00 2001
+From 9c89ac1ecb76d25511c146e1b641a7d5237c4be0 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Mon, 14 Dec 2015 00:42:49 +0000
-Subject: [PATCH 01/16] define exp10 if missing
+Subject: [PATCH 01/37] define exp10 if missing
 
 Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch
 
meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch +2 -2
index 55ff0ce..451193e 100644
@@ -1,7 +1,7 @@
-From bfb6562cdbec73d03765ce707e9e0cac138fd223 Mon Sep 17 00:00:00 2001
+From 32409e584db04c9f7c2cadd39b8ccb580db5c83c Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 20 Feb 2015 05:29:15 +0000
-Subject: [PATCH 02/16] units: Prefer getty to agetty in console setup systemd
+Subject: [PATCH 02/37] units: Prefer getty to agetty in console setup systemd
  units
 
 Upstream-Status: Inappropriate [configuration specific]
meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch new file +61 -0

61 lines not on this page · raw message

meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch renamed from meta/recipes-core/systemd/systemd/0003-Use-getenv-when-secure-versions-are-not-available.patch +9 -12
similarity index 56%
rename from meta/recipes-core/systemd/systemd/0003-Use-getenv-when-secure-versions-are-not-available.patch
rename to meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch
index cbf69d1..ad898b8 100644
@@ -1,7 +1,7 @@
-From 9e79bb4bea758f25803e9f7ff2c5835ac4204230 Mon Sep 17 00:00:00 2001
+From 3d1fb8d7c0a8d4b2f256eab86905fe569d41065d Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sat, 12 Sep 2015 19:10:04 +0000
-Subject: [PATCH 03/16] Use getenv when secure versions are not available
+Subject: [PATCH 04/37] Use getenv when secure versions are not available
 
 musl doesnt implement secure version, so we default
 to it if configure does not detect a secure imeplementation
@@ -9,30 +9,27 @@ to it if configure does not detect a secure imeplementation
 Signed-off-by: Khem Raj <[email protected]>
 Upstream-Status: Denied
 ---
- src/basic/missing.h | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
+ src/basic/missing.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 09a233b..3c37466 100644
+index 09a233b..ab6ff8d 100644
 --- a/src/basic/missing.h
 +++ b/src/basic/missing.h
-@@ -582,13 +582,14 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle
+@@ -582,12 +582,11 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle
          return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags);
  }
  #endif
 -
--#ifndef HAVE_SECURE_GETENV
-+#ifdef HAVE_SECURE_GETENV
+ #ifndef HAVE_SECURE_GETENV
  #  ifdef HAVE___SECURE_GETENV
  #    define secure_getenv __secure_getenv
  #  else
- #    error "neither secure_getenv nor __secure_getenv are available"
+-#    error "neither secure_getenv nor __secure_getenv are available"
++#    define secure_getenv getenv
  #  endif
-+#else
-+#  define secure_getenv getenv
  #endif
  
- #ifndef CIFS_MAGIC_NUMBER
 -- 
 2.6.4
 
meta/recipes-core/systemd/systemd/0005-core-device.c-Change-the-default-device-timeout-to-2.patch renamed from meta/recipes-core/systemd/systemd/0004-core-device.c-Change-the-default-device-timeout-to-2.patch +2 -2
similarity index 88%
rename from meta/recipes-core/systemd/systemd/0004-core-device.c-Change-the-default-device-timeout-to-2.patch
rename to meta/recipes-core/systemd/systemd/0005-core-device.c-Change-the-default-device-timeout-to-2.patch
index 74629fc..0414b0c 100644
@@ -1,7 +1,7 @@
-From ef867afd27e8fed558e82430759d8d2c7efb6608 Mon Sep 17 00:00:00 2001
+From 118be6eb12746750018c5068ab63003ef63525db Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Mon, 14 Dec 2015 04:09:19 +0000
-Subject: [PATCH 04/16] core/device.c: Change the default device timeout to 240
+Subject: [PATCH 05/37] core/device.c: Change the default device timeout to 240
  sec.
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
meta/recipes-core/systemd/systemd/0006-binfmt-Don-t-install-dependency-links-at-install-tim.patch renamed from meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch +3 -3
similarity index 92%
rename from meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
rename to meta/recipes-core/systemd/systemd/0006-binfmt-Don-t-install-dependency-links-at-install-tim.patch
index 0b75fac..a5e790f 100644
@@ -1,7 +1,7 @@
-From 319873d22a6b1225ae41aa38bc976e723326ba20 Mon Sep 17 00:00:00 2001
+From dad101dfad17312581ba25b09be84c1dc9b72041 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 20 Feb 2015 05:03:44 +0000
-Subject: [PATCH 05/16] binfmt: Don't install dependency links at install time
+Subject: [PATCH 06/37] binfmt: Don't install dependency links at install time
  for the binfmt services
 
 use [Install] blocks so that they get created when the service is enabled
@@ -24,7 +24,7 @@ Signed-off-by: Khem Raj <[email protected]>
  3 files changed, 8 insertions(+), 4 deletions(-)
 
 diff --git a/Makefile.am b/Makefile.am
-index 00a92e3..4c1143a 100644
+index f332b79..c62d459 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -4455,10 +4455,6 @@ INSTALL_DIRS += \
meta/recipes-core/systemd/systemd/0007-configure-Check-for-additional-features-that-uclibc-.patch renamed from meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch +6 -6
similarity index 72%
rename from meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch
rename to meta/recipes-core/systemd/systemd/0007-configure-Check-for-additional-features-that-uclibc-.patch
index a2c40b5..a2d97b7 100644
@@ -1,7 +1,7 @@
-From d1fe5d2dd38cdef984296f453c65ccaebb71d1a9 Mon Sep 17 00:00:00 2001
+From 4425894feddbbaedfa1fd7776d40b42feb871a74 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 20 Feb 2015 05:05:45 +0000
-Subject: [PATCH 06/16] configure: Check for additional features that uclibc
+Subject: [PATCH 07/37] configure: Check for additional features that uclibc
  doesnt support
 
 This helps in supporting uclibc which does not have all features that
@@ -15,12 +15,12 @@ Signed-off-by: Khem Raj <[email protected]>
  1 file changed, 18 insertions(+)
 
 diff --git a/configure.ac b/configure.ac
-index 3128ca8..49f73a4 100644
+index f7aa12a..0f75cb2 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -112,6 +112,24 @@ AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin]
- 
- AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
+@@ -110,6 +110,24 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
+ AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
+ AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
  
 +# check for few functions not implemented in uClibc
 +
meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch renamed from meta/recipes-core/systemd/systemd/0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch +2 -2
similarity index 89%
rename from meta/recipes-core/systemd/systemd/0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch
rename to meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch
index 85d3907..72d2f14 100644
@@ -1,7 +1,7 @@
-From 529e7e2f7f6a5dc0e4527ff5c2237b19ece2f112 Mon Sep 17 00:00:00 2001
+From 75e4d779c9681a61777ac6eb4571e7a7434fe13c Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 20 Feb 2015 05:10:37 +0000
-Subject: [PATCH 07/16] nspawn: Use execvpe only when libc supports it
+Subject: [PATCH 08/37] nspawn: Use execvpe only when libc supports it
 
 Upstream-Status: Denied [no desire for uclibc support]
 
meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch renamed from meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch +2 -2
similarity index 90%
rename from meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
rename to meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
index 8d71ecb..3a1ee2a 100644
@@ -1,7 +1,7 @@
-From 83944758dc0703afea81f3c7aa0ad926bc5df757 Mon Sep 17 00:00:00 2001
+From abdd9c23e0d17fa97ee8148770481a2877f9b60a Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Mon, 14 Dec 2015 00:47:53 +0000
-Subject: [PATCH 08/16] util: bypass unimplemented _SC_PHYS_PAGES system
+Subject: [PATCH 09/37] util: bypass unimplemented _SC_PHYS_PAGES system
  configuration API on uclibc
 
 Upstream-Status: Inappropriate [uclibc-specific]
meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch renamed from meta/recipes-core/systemd/systemd/0009-implment-systemd-sysv-install-for-OE.patch +2 -2
similarity index 91%
rename from meta/recipes-core/systemd/systemd/0009-implment-systemd-sysv-install-for-OE.patch
rename to meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch
index a139684..0ef642b 100644
@@ -1,7 +1,7 @@
-From 81c3d92b5bc5786cbd93b1e5ed82884e8caf2254 Mon Sep 17 00:00:00 2001
+From dc37aa73dd37625bf1c516a85263cda7dc24de1f Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sat, 5 Sep 2015 06:31:47 +0000
-Subject: [PATCH 09/16] implment systemd-sysv-install for OE
+Subject: [PATCH 10/37] implment systemd-sysv-install for OE
 
 Use update-rc.d for enabling/disabling and status command
 to check the status of the sysv service
meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch renamed from meta/recipes-core/systemd/systemd/0010-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch +3 -3
similarity index 83%
rename from meta/recipes-core/systemd/systemd/0010-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
rename to meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
index 8cec071..87d1d74 100644
@@ -1,7 +1,7 @@
-From d4b7f9b771a538c2356c4c77461f3b4790043556 Mon Sep 17 00:00:00 2001
+From ea87f3675829724158f3b14aa712e7a56e1f2202 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Mon, 14 Dec 2015 00:50:01 +0000
-Subject: [PATCH 10/16] nss-mymachines: Build conditionally when
+Subject: [PATCH 11/37] nss-mymachines: Build conditionally when
  HAVE_MYHOSTNAME is set
 
 Fixes build failures when building with --disable-myhostname
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <[email protected]>
  1 file changed, 2 insertions(+)
 
 diff --git a/Makefile.am b/Makefile.am
-index 4c1143a..cf559be 100644
+index c62d459..c74cb43 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -4961,6 +4961,7 @@ SYSTEM_UNIT_ALIASES += \
meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch renamed from meta/recipes-core/systemd/systemd/0011-rules-whitelist-hd-devices.patch +2 -2
similarity index 91%
rename from meta/recipes-core/systemd/systemd/0011-rules-whitelist-hd-devices.patch
rename to meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch
index 03fdbff..e63cceb 100644
@@ -1,7 +1,7 @@
-From ae6c9dcb00919e1dd2793fd1b82125d123f69a90 Mon Sep 17 00:00:00 2001
+From 346ff06084ba4f9a8b91717df3388d90bc8f0876 Mon Sep 17 00:00:00 2001
 From: Patrick Ohly <[email protected]>
 Date: Wed, 16 Sep 2015 13:55:58 +0200
-Subject: [PATCH 11/16] rules: whitelist hd* devices
+Subject: [PATCH 12/37] rules: whitelist hd* devices
 
 qemu by default emulates IDE and the linux-yocto kernel(s) use
 CONFIG_IDE instead of the more modern libsata, so disks appear as
meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch renamed from meta/recipes-core/systemd/systemd/0012-sysv-generator-add-support-for-executing-scripts-und.patch +2 -2
similarity index 98%
rename from meta/recipes-core/systemd/systemd/0012-sysv-generator-add-support-for-executing-scripts-und.patch
rename to meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch
index 82feff0..476ed05 100644
@@ -1,7 +1,7 @@
-From 9e6c907ff1f17deb96c66a607653db4c7da34289 Mon Sep 17 00:00:00 2001
+From 0049d2c4f21c22191e023a8eb8e9157783f26ab5 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Mon, 14 Dec 2015 05:09:53 +0000
-Subject: [PATCH 12/16] sysv-generator: add support for executing scripts under
+Subject: [PATCH 13/37] sysv-generator: add support for executing scripts under
  /etc/rcS.d/
 
 To be compatible, all services translated from scripts under /etc/rcS.d would
meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch renamed from meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch +7 -7
similarity index 95%
rename from meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
rename to meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch
index ea0b3e2..a0c796a 100644
@@ -1,7 +1,7 @@
-From 1ba00ff6ed3f0626892f57cdd8d9788692c7bf14 Mon Sep 17 00:00:00 2001
+From 197215f360821b1f892ec31145dd7cd1bf66810a Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Mon, 14 Dec 2015 05:18:20 +0000
-Subject: [PATCH 13/16] Make root's home directory configurable
+Subject: [PATCH 14/37] Make root's home directory configurable
 
 OpenEmbedded has a configurable home directory for root. Allow
 systemd to be built using its idea of what root's home directory
@@ -26,7 +26,7 @@ Signed-off-by: Khem Raj <[email protected]>
  8 files changed, 20 insertions(+), 11 deletions(-)
 
 diff --git a/Makefile.am b/Makefile.am
-index cf559be..a511c3d 100644
+index c74cb43..2cc61ac 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -210,6 +210,7 @@ AM_CPPFLAGS = \
@@ -46,10 +46,10 @@ index cf559be..a511c3d 100644
         '|SYSTEMCTL=$(rootbindir)/systemctl|' \
         '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
 diff --git a/configure.ac b/configure.ac
-index 49f73a4..a3e639d 100644
+index 0f75cb2..20a921e 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1434,6 +1434,11 @@ AC_ARG_WITH([rootlibdir],
+@@ -1432,6 +1432,11 @@ AC_ARG_WITH([rootlibdir],
          [with_rootlibdir=${libdir}])
  AX_NORMALIZE_PATH([with_rootlibdir])
  
@@ -61,7 +61,7 @@ index 49f73a4..a3e639d 100644
  AC_ARG_WITH([pamlibdir],
          AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
          [],
-@@ -1517,6 +1522,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
+@@ -1515,6 +1520,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
  AC_SUBST([pamconfdir], [$with_pamconfdir])
  AC_SUBST([rootprefix], [$with_rootprefix])
  AC_SUBST([rootlibdir], [$with_rootlibdir])
@@ -69,7 +69,7 @@ index 49f73a4..a3e639d 100644
  
  AC_CONFIG_FILES([
          Makefile
-@@ -1606,6 +1612,7 @@ AC_MSG_RESULT([
+@@ -1604,6 +1610,7 @@ AC_MSG_RESULT([
          includedir:              ${includedir}
          lib dir:                 ${libdir}
          rootlib dir:             ${with_rootlibdir}
meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch renamed from meta/recipes-core/systemd/systemd/0014-systemd-user-avoid-using-system-auth.patch +2 -2
similarity index 87%
rename from meta/recipes-core/systemd/systemd/0014-systemd-user-avoid-using-system-auth.patch
rename to meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch
index 11be097..cae93e3 100644
@@ -1,7 +1,7 @@
-From 548a8d5d456c531444498b3ce8cec3f3dd374cf8 Mon Sep 17 00:00:00 2001
+From 86d38ea2128332975342175a8349e3919a6b2ab5 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 20 Feb 2015 05:26:25 +0000
-Subject: [PATCH 14/16] systemd-user: avoid using system-auth
+Subject: [PATCH 15/37] systemd-user: avoid using system-auth
 
 In OE, we don't provide system-auth, instead, we use common-* files.
 So modify systemd-user file to use common-* files.
meta/recipes-core/systemd/systemd/0016-Revert-rules-remove-firmware-loading-rules.patch renamed from meta/recipes-core/systemd/systemd/0015-Revert-rules-remove-firmware-loading-rules.patch +2 -2
similarity index 84%
rename from meta/recipes-core/systemd/systemd/0015-Revert-rules-remove-firmware-loading-rules.patch
rename to meta/recipes-core/systemd/systemd/0016-Revert-rules-remove-firmware-loading-rules.patch
index 7cc3922..5fccc1d 100644
@@ -1,7 +1,7 @@
-From 6b2b8d20f884bd5a3d928175e422023f6c9d056b Mon Sep 17 00:00:00 2001
+From 2ca57f968c29a26d67e3a7a3bc3217ac1f886b55 Mon Sep 17 00:00:00 2001
 From: Jonathan Liu <[email protected]>
 Date: Thu, 19 Mar 2015 15:01:29 +1100
-Subject: [PATCH 15/16] Revert "rules: remove firmware loading rules"
+Subject: [PATCH 16/37] Revert "rules: remove firmware loading rules"
 
 This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19.
 Userspace firmware loading support is needed for Linux < 3.7.
meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch renamed from meta/recipes-core/systemd/systemd/0016-Revert-udev-remove-userspace-firmware-loading-suppor.patch +8 -8
similarity index 96%
rename from meta/recipes-core/systemd/systemd/0016-Revert-udev-remove-userspace-firmware-loading-suppor.patch
rename to meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch
index 6e5a8fb..93b4fa3 100644
@@ -1,7 +1,7 @@
-From d3661ec7fb4557c47f001986cbb8a684b8dbae4a Mon Sep 17 00:00:00 2001
+From 6dba4a34e1685eacf1524704e5bcfe290864ee17 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Mon, 14 Dec 2015 05:33:32 +0000
-Subject: [PATCH 16/16] Revert "udev: remove userspace firmware loading
+Subject: [PATCH 17/37] Revert "udev: remove userspace firmware loading
  support"
 
 This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca.
@@ -15,16 +15,16 @@ Signed-off-by: Khem Raj <[email protected]>
  Makefile.am                      |  12 +++
  README                           |   6 +-
  TODO                             |   1 +
- configure.ac                     |  25 +++++++
+ configure.ac                     |  22 ++++++
  src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++
  src/udev/udev-builtin.c          |   3 +
  src/udev/udev.h                  |   6 ++
  src/udev/udevd.c                 |  13 ++++
- 8 files changed, 217 insertions(+), 3 deletions(-)
+ 8 files changed, 214 insertions(+), 3 deletions(-)
  create mode 100644 src/udev/udev-builtin-firmware.c
 
 diff --git a/Makefile.am b/Makefile.am
-index a511c3d..6181e55 100644
+index 2cc61ac..db9d204 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -3650,6 +3650,18 @@ libudev_core_la_LIBADD = \
@@ -81,10 +81,10 @@ index 369805f..ce97674 100644
    - kill scsi_id
    - add trigger --subsystem-match=usb/usb_device device
 diff --git a/configure.ac b/configure.ac
-index a3e639d..00736f5 100644
+index 20a921e..1bde875 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1317,6 +1317,25 @@ AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database
+@@ -1315,6 +1315,25 @@ AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database
  AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
  
  # ------------------------------------------------------------------------------
@@ -110,7 +110,7 @@ index a3e639d..00736f5 100644
  have_manpages=no
  AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
  AS_IF([test "x$enable_manpages" != xno], [
-@@ -1616,6 +1635,9 @@ AC_MSG_RESULT([
+@@ -1614,6 +1633,9 @@ AC_MSG_RESULT([
          SysV init scripts:       ${SYSTEM_SYSVINIT_PATH}
          SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
          Build Python:            ${PYTHON}
meta/recipes-core/systemd/systemd/0018-include-missing.h-for-getting-secure_getenv-definiti.patch new file +25 -0
new file mode 100644
index 0000000..7e9132c
@@ -0,0 +1,25 @@
+From a2bfd7e43780eccc5a1100f51604a513e050d460 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 15 Dec 2015 22:51:55 +0000
+Subject: [PATCH 18/37] include missing.h for getting secure_getenv definition
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/basic/user-util.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/basic/user-util.c b/src/basic/user-util.c
+index c3d0ec3..e0755e7 100644
+--- a/src/basic/user-util.c
++++ b/src/basic/user-util.c
+@@ -40,6 +40,7 @@
+ #include "path-util.h"
+ #include "string-util.h"
+ #include "user-util.h"
++#include "missing.h"
+ 
+ bool uid_is_valid(uid_t uid) {
+ 
+-- 
+2.6.4
+
meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch new file +34 -0
new file mode 100644
index 0000000..e92b668
@@ -0,0 +1,34 @@
+From 41626df8d8e159cc958d483f7059f94583ab0795 Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <[email protected]>
+Date: Sat, 12 Sep 2015 19:56:52 +0000
+Subject: [PATCH 19/37] socket-util: don't fail if libc doesn't support IDN
+
+Signed-off-by: Emil Renner Berthing <[email protected]>
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/basic/socket-util.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
+index be144e1..45538da 100644
+--- a/src/basic/socket-util.c
++++ b/src/basic/socket-util.c
+@@ -46,6 +46,15 @@
+ #include "string-util.h"
+ #include "user-util.h"
+ #include "util.h"
++/* Don't fail if the standard library
++ * doesn't support IDN */
++#ifndef NI_IDN
++#define NI_IDN 0
++#endif
++
++#ifndef NI_IDN_USE_STD3_ASCII_RULES
++#define NI_IDN_USE_STD3_ASCII_RULES 0
++#endif
+ 
+ int socket_address_parse(SocketAddress *a, const char *s) {
+         char *e, *n;
+-- 
+2.6.4
+
meta/recipes-core/systemd/systemd_228.bb +25 -21

74 lines not on this page · raw message

Signature · 1 line
2.7.0
#18 lore raw

Re: [PATCH 15/73] systemd: Update and fix build with uclibc

Quoted 5 lines · Khem Raj
 create mode 100644 meta/recipes-core/systemd/systemd
/0018-include-missing.h-for-getting-secure_getenv-definiti.patch
 create mode 100644 meta/recipes-core/systemd/systemd

/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch

These are missing Upstream-Status.

Ross

author
#19 lore raw

Re: [PATCH 15/73] systemd: Update and fix build with uclibc

Quoted 10 lines · Ross
Quoted 5 lines · Khem Raj
 create mode 100644
meta/recipes-core/systemd/systemd/0018-include-missing.h-for-getting-secure_getenv-definiti.patch
 create mode 100644

meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch

These are missing Upstream-Status.

Drop this patch from this series. I will submit it separately.

Quoted 2 lines

Ross

author
#20 lore raw

PATCH 16/73 packagegroup-self-hosted.bb: Move glibc-gconv-ibm850 to glibc only case

In reply to Khem Raj

This package is not provided by non-glibc libcs therefore add it only when libc is glibc

---
 meta/recipes-core/packagegroups/packagegroup-self-hosted.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +1 -1
index d38be26..bb8371e 100644
@@ -67,7 +67,6 @@ RDEPENDS_packagegroup-self-hosted-sdk = "\
     cpp \
     cpp-symlinks \
     distcc \
-    glibc-gconv-ibm850 \
     file \
     findutils \
     g++ \
@@ -93,6 +92,7 @@ RDEPENDS_packagegroup-self-hosted-sdk = "\
     "
 # glibc-utils: for rpcgen
 RDEPENDS_packagegroup-self-hosted-sdk_append_libc-glibc = "\
+    glibc-gconv-ibm850 \
     glibc-utils \
     "
 RDEPENDS_packagegroup-self-hosted-debug = " \
Signature · 1 line
2.7.0
author
#21 lore raw

PATCH 17/73 guile: Fix build with uclibc

In reply to Khem Raj
---
 .../guile/files/remove_strcase_l_funcs.patch       | 38 ++++++++++++++++++++++
 meta/recipes-devtools/guile/guile_2.0.11.bb        |  3 +-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/guile/files/remove_strcase_l_funcs.patch
meta/recipes-devtools/guile/files/remove_strcase_l_funcs.patch new file +38 -0
new file mode 100644
index 0000000..e7a06fe
@@ -0,0 +1,38 @@
+These unused functions cause build failures with uclibc since they reference __uclibc_locale_struct
+and this is exposed by uclibc API headers only if C locales are built, but for OE we build full locale
+support
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Pending
+Index: guile-2.0.11/libguile/i18n.c
+===================================================================
+--- guile-2.0.11.orig/libguile/i18n.c
++++ guile-2.0.11/libguile/i18n.c
+@@ -851,27 +851,6 @@ str_downcase (register char *dst, regist
+   *dst = '\0';
+ }
+ 
+-#ifdef USE_GNU_LOCALE_API
+-static inline void
+-str_upcase_l (register char *dst, register const char *src,
+-	      scm_t_locale locale)
+-{
+-  for (; *src != '\0'; src++, dst++)
+-    *dst = toupper_l (*src, locale);
+-  *dst = '\0';
+-}
+-
+-static inline void
+-str_downcase_l (register char *dst, register const char *src,
+-		scm_t_locale locale)
+-{
+-  for (; *src != '\0'; src++, dst++)
+-    *dst = tolower_l (*src, locale);
+-  *dst = '\0';
+-}
+-#endif
+-
+-
+ SCM_DEFINE (scm_string_locale_lt, "string-locale<?", 2, 1, 0,
+ 	    (SCM s1, SCM s2, SCM locale),
+ 	    "Compare strings @var{s1} and @var{s2} in a locale-dependent way."
meta/recipes-devtools/guile/guile_2.0.11.bb +2 -1
index fa45008..413c81d 100644
@@ -23,6 +23,7 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
            file://workaround-ice-ssa-corruption.patch \
            file://libguile-Makefile.am-hook.patch \
            file://libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch \
+           file://remove_strcase_l_funcs.patch \
            "
 
 #           file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
@@ -50,7 +51,7 @@ EXTRA_OECONF += "${@['--without-libltdl-prefix --without-libgmp-prefix --without
 EXTRA_OECONF_append_class-target = " --with-libunistring-prefix=${STAGING_LIBDIR} \
                                      --with-libgmp-prefix=${STAGING_LIBDIR} \
                                      --with-libltdl-prefix=${STAGING_LIBDIR}"
-
+EXTRA_OECONF_append_libc-uclibc = " guile_cv_use_csqrt=no "
 do_configure_prepend() {
 	mkdir -p po
 }
Signature · 1 line
2.7.0
author
#22 lore raw

PATCH 18/73 gnutls: Link with libuargp on uclibc

In reply to Khem Raj

uclibc has its own implementation for libargp

---
 meta/recipes-support/gnutls/gnutls.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-support/gnutls/gnutls.inc +2 -1
index 5bcfc9c..90597db 100644
@@ -1,7 +1,7 @@
 SUMMARY = "GNU Transport Layer Security Library"
 HOMEPAGE = "http://www.gnu.org/software/gnutls/"
 BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
-DEPENDS = "nettle libidn"
+DEPENDS = "nettle libidn virtual/libiconv"
 DEPENDS_append_libc-musl = " argp-standalone "
 
 LICENSE = "GPLv3+ & LGPLv2.1+"
@@ -30,6 +30,7 @@ EXTRA_OECONF="--disable-rpath \
               --enable-openssl-compatibility \
               "
 LDFLAGS_append_libc-musl = " -largp "
+LDFLAGS_append_libc-uclibc = " -luargp "
 
 do_configure_prepend() {
 	for dir in . lib; do
Signature · 1 line
2.7.0
author
#23 lore raw

PATCH 19/73 mtools: Fix build with uclibc

In reply to Khem Raj

unlike glibc, uclibc does not have internal APIs implemented for libiconv, so it needs to depend upon libiconv

---
 meta/recipes-devtools/mtools/mtools_4.0.18.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/mtools/mtools_4.0.18.bb +3 -0
index bc9b79c..479fd32 100644
@@ -5,6 +5,7 @@ SECTION = "optional"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
+DEPENDS += "virtual/libiconv"
 
 RDEPENDS_${PN}_libc-glibc = "glibc-gconv-ibm850"
 RRECOMMENDS_${PN}_libc-glibc = "\
@@ -35,6 +36,8 @@ inherit autotools texinfo
 
 EXTRA_OECONF = "--without-x"
 
+LDFLAGS_append_libc-uclibc = " -liconv "
+
 BBCLASSEXTEND = "native nativesdk"
 
 PACKAGECONFIG ??= ""
Signature · 1 line
2.7.0
#24 lore raw

Re: [PATCH 19/73] mtools: Fix build with uclibc

В письме от 17 января 2016 03:35:52 пользователь Khem Raj написал:

Quoted 11 lines
meta/recipes-devtools/mtools/mtools_4.0.18.bb +1 -0
@@ -5,6 +5,7 @@ SECTION = "optional"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
+DEPENDS += "virtual/libiconv"
 
 RDEPENDS_${PN}_libc-glibc = "glibc-gconv-ibm850"
 RRECOMMENDS_${PN}_libc-glibc = "\

meta/recipes-devtools/mtools/mtools_4.0.18.bb inherit autotools texinfo · line 43

Quoted 8 lines
meta/recipes-devtools/mtools/mtools_4.0.18.bb +2 -0
@@ -35,6 +36,8 @@ inherit autotools texinfo
 
 EXTRA_OECONF = "--without-x"
 
+LDFLAGS_append_libc-uclibc = " -liconv "
+
 BBCLASSEXTEND = "native nativesdk"
 
 PACKAGECONFIG ??= ""

I've just checked to see that my mtools bbappend (based on fido) has it solved like this:

DEPENDS_class-target += "virtual/libiconv"
export LIBS = "-liconv"
LIBS_class-native = ""

And from what I remember, I had some issue building native package with 'DEPENDS +='. Although that's an old branch and probably things are different now.

Same thing with parted.

Signature · 3 lines
 http://roman.khimov.ru
mailto: [email protected]
gpg --keyserver hkp://subkeys.pgp.net --recv-keys 0xE5E055C3
author
#25 lore raw

Re: [PATCH 19/73] mtools: Fix build with uclibc

Hi Roman

Quoted 21 lines · Roman Khimov

В письме от 17 января 2016 03:35:52 пользователь Khem Raj написал:

Quoted 18 lines
meta/recipes-devtools/mtools/mtools_4.0.18.bb +0 -0
@@ -5,6 +5,7 @@ SECTION = "optional"

LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

+DEPENDS += "virtual/libiconv"

RDEPENDS_${PN}_libc-glibc = "glibc-gconv-ibm850"
RRECOMMENDS_${PN}_libc-glibc = "\

meta/recipes-devtools/mtools/mtools_4.0.18.bb +0 -0
@@ -35,6 +36,8 @@ inherit autotools texinfo
 

EXTRA_OECONF = "--without-x"

meta/recipes-devtools/mtools/mtools_4.0.18.bb +2 -0
+LDFLAGS_append_libc-uclibc = " -liconv "
+

BBCLASSEXTEND = "native nativesdk"

Quoted 8 lines
Quoted 1 line

PACKAGECONFIG ??= ""

I've just checked to see that my mtools bbappend (based on fido) has it solved like this:

DEPENDS_class-target += "virtual/libiconv"
export LIBS = "-liconv"
LIBS_class-native = “"

Both are doing same thing in the end. if LIBS is altered we inject the compiler flags same happens via LDFLAGS except that if we use LDFLAGS then we can utilize overrides at recipe level and they are automatically exported into component Make systems.

LIBS is supposed to be computed during configure if one was to use libs approach then USERLDLIBS is safer.

Quoted 4 lines

And from what I remember, I had some issue building native package with 'DEPENDS +='. Although that's an old branch and probably things are different now.

I guess what you might have seen is that there is no provider for libiconv-native which is already fixed by
https://github.com/kraj/openembedded-core/commit/a5e6f5939c0ee4280eabd7cfc01131052040bc81

if it was something else. Please report with more details.

Quoted 7 lines

Same thing with parted.

--
http://roman.khimov.ru
mailto: [email protected]
gpg --keyserver hkp://subkeys.pgp.net --recv-keys 0xE5E055C3

#26 lore raw

Re: [PATCH 19/73] mtools: Fix build with uclibc

В письме от 18 января 2016 13:51:36 пользователь Khem Raj написал:

Quoted 10 lines
Quoted 3 lines

And from what I remember, I had some issue building native package with 'DEPENDS +='. Although that's an old branch and probably things are different now.

I guess what you might have seen is that there is no provider for libiconv-native which is already fixed by
https://github.com/kraj/openembedded-core/commit/a5e6f5939c0ee4280eabd7cfc01
131052040bc81

if it was something else. Please report with more details.

True, it was something like that. If that's already fixed, then everything is perfect. Will this kind of patches go to jethro?

Signature · 3 lines
 http://roman.khimov.ru
mailto: [email protected]
gpg --keyserver hkp://subkeys.pgp.net --recv-keys 0xE5E055C3
author
#27 lore raw

Re: [PATCH 19/73] mtools: Fix build with uclibc

Quoted 10 lines · Roman Khimov

В письме от 18 января 2016 13:51:36 пользователь Khem Raj написал:

Quoted 9 lines
Quoted 3 lines

And from what I remember, I had some issue building native package with 'DEPENDS +='. Although that's an old branch and probably things are different now.

I guess what you might have seen is that there is no provider for libiconv-native which is already fixed by
https://github.com/kraj/openembedded-core/commit/a5e6f5939c0ee4280eabd7cfc01
131052040bc81

Quoted 4 lines
Quoted 1 line

if it was something else. Please report with more details.

True, it was something like that. If that's already fixed, then everything is perfect. Will this kind of patches go to jethro?

Not all of this series but this one in particular can go in. Send a request for backport and let Robert know.

Quoted 5 lines

--
http://roman.khimov.ru
mailto: [email protected]
gpg --keyserver hkp://subkeys.pgp.net --recv-keys 0xE5E055C3

author
#28 lore raw

PATCH 20/73 parted: Fix build with uclibc

In reply to Khem Raj

unlike glibc, uclibc does not have internal APIs implemented for libiconv, so it needs to depend upon libiconv

---
 meta/recipes-extended/parted/parted_3.2.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-extended/parted/parted_3.2.bb +2 -1
index ff8ae09..30c00c8 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/parted/parted.html"
 LICENSE = "GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"
 SECTION = "console/tools"
-DEPENDS = "ncurses readline util-linux"
+DEPENDS = "ncurses readline util-linux virtual/libiconv"
 PR = "r1"
 
 SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
@@ -21,6 +21,7 @@ SRC_URI[md5sum] = "0247b6a7b314f8edeb618159fa95f9cb"
 SRC_URI[sha256sum] = "858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4"
 
 EXTRA_OECONF = "--disable-device-mapper"
+LDFLAGS_append_libc-uclibc = " -liconv "
 
 inherit autotools pkgconfig gettext texinfo ptest
 
Signature · 1 line
2.7.0
author
#29 lore raw

PATCH 21/73 net-tools: Link with libintl on uclibc

In reply to Khem Raj

libintl is needed explicitly on linker cmdline on uclibc since the APIs are not in libc itelf.

Fix build on musl

---
 .../net-tools/net-tools/musl-fixes.patch           | 100 +++++++++++++++++++++
 .../net-tools/net-tools_1.60-26.bb                 |   3 +-
 2 files changed, 102 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/net-tools/net-tools/musl-fixes.patch
meta/recipes-extended/net-tools/net-tools/musl-fixes.patch new file +100 -0
new file mode 100644
index 0000000..f694d59
@@ -0,0 +1,100 @@
+Adjust headers for non-glibc cases
+especially exposed by musl
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Pending
+
+Index: net-tools-1.60/lib/inet6_gr.c
+===================================================================
+--- net-tools-1.60.orig/lib/inet6_gr.c
++++ net-tools-1.60/lib/inet6_gr.c
+@@ -23,7 +23,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <unistd.h>
+-#ifndef __GLIBC__
++#ifdef HAVE_IPV6_ROUTE_H
+ #include <netinet6/ipv6_route.h>	/* glibc doesn't have this */
+ #endif
+ #include "version.h"
+Index: net-tools-1.60/lib/inet6_sr.c
+===================================================================
+--- net-tools-1.60.orig/lib/inet6_sr.c
++++ net-tools-1.60/lib/inet6_sr.c
+@@ -23,10 +23,10 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <unistd.h>
+-#ifdef __GLIBC__
+-#include <net/route.h>
+-#else
++#ifdef HAVE_IPV6_ROUTE_H
+ #include <netinet6/ipv6_route.h>	/* glibc does not have this */
++#else
++#include <net/route.h>
+ #endif
+ #include "version.h"
+ #include "net-support.h"
+Index: net-tools-1.60/lib/inet_sr.c
+===================================================================
+--- net-tools-1.60.orig/lib/inet_sr.c
++++ net-tools-1.60/lib/inet_sr.c
+@@ -26,6 +26,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <unistd.h>
++#include <asm-generic/param.h>
+ #include "version.h"
+ #include "net-support.h"
+ #include "pathnames.h"
+Index: net-tools-1.60/lib/util-ank.c
+===================================================================
+--- net-tools-1.60.orig/lib/util-ank.c
++++ net-tools-1.60/lib/util-ank.c
+@@ -14,6 +14,7 @@
+  * Rani Assaf <[email protected]> 980929:	resolve addresses
+  */
+ 
++#include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+Index: net-tools-1.60/mii-tool.c
+===================================================================
+--- net-tools-1.60.orig/mii-tool.c
++++ net-tools-1.60/mii-tool.c
+@@ -47,10 +47,6 @@ static char Version[] = "$Id: mii-tool.c
+ #include <net/if.h>
+ #include <linux/sockios.h>
+ 
+-#ifndef __GLIBC__
+-#include <linux/if_arp.h>
+-#include <linux/if_ether.h>
+-#endif
+ #include "mii.h"
+ #include "version.h"
+ 
+Index: net-tools-1.60/netstat.c
+===================================================================
+--- net-tools-1.60.orig/netstat.c
++++ net-tools-1.60/netstat.c
+@@ -87,6 +87,7 @@
+ #include <dirent.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <asm-generic/param.h>
+ 
+ #include "net-support.h"
+ #include "pathnames.h"
+Index: net-tools-1.60/slattach.c
+===================================================================
+--- net-tools-1.60.orig/slattach.c
++++ net-tools-1.60/slattach.c
+@@ -44,6 +44,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <getopt.h>
++#include <termios.h>
+ #include <linux/if_slip.h>
+ 
+ #if defined(__GLIBC__)
meta/recipes-extended/net-tools/net-tools_1.60-26.bb +2 -1
index 923d048..79c7291 100644
@@ -11,6 +11,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20050312T000000Z/pool/main/
            file://net-tools-config.h \
            file://net-tools-config.make \
            file://ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch \
+           file://musl-fixes.patch \
 	   "
 
 # for this package we're mostly interested in tracking debian patches,
@@ -30,7 +31,7 @@ SRC_URI[patch.sha256sum] = "aeeeafaff68866a446f01bb639d4e0146a60af34dcd20e31a3e4
 UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/net-tools/"
 
 inherit gettext
-
+LDFLAGS_append_libc-uclibc = " -lintl "
 # The Makefile is lame, no parallel build
 PARALLEL_MAKE = ""
 
Signature · 1 line
2.7.0
author
#30 lore raw

PATCH 22/73 libdrm: Upgrade 2.4.65 -> 2.4.66

In reply to Khem Raj

Fix test build failures

---
 ...tests-kms-steal-crtc-Include-sys-select.h.patch | 33 ++++++++++++++++++++++
 .../recipes-graphics/drm/libdrm/installtests.patch | 24 +++++-----------
 .../drm/{libdrm_2.4.65.bb => libdrm_2.4.66.bb}     |  8 ++++--
 3 files changed, 45 insertions(+), 20 deletions(-)
 create mode 100644 meta/recipes-graphics/drm/libdrm/0001-tests-kms-steal-crtc-Include-sys-select.h.patch
 rename meta/recipes-graphics/drm/{libdrm_2.4.65.bb => libdrm_2.4.66.bb} (86%)
meta/recipes-graphics/drm/libdrm/0001-tests-kms-steal-crtc-Include-sys-select.h.patch new file +33 -0
new file mode 100644
index 0000000..c18228e
@@ -0,0 +1,33 @@
+From 46fb5516fb0ab17bcf46a0306a11e8966bb36e14 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 29 Dec 2015 22:17:21 +0000
+Subject: [PATCH] tests/kms-steal-crtc: Include sys/select.h
+
+Fixes errors e.g.
+
+error: implicit declaration of function 'select'
+
+and missing definitions of FD_* defines
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted
+
+ tests/kms/kms-steal-crtc.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/kms/kms-steal-crtc.c b/tests/kms/kms-steal-crtc.c
+index 2f7f327..24d70ab 100644
+--- a/tests/kms/kms-steal-crtc.c
++++ b/tests/kms/kms-steal-crtc.c
+@@ -31,6 +31,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <sys/select.h>
+ 
+ #include <drm_fourcc.h>
+ 
+-- 
+2.6.4
+
meta/recipes-graphics/drm/libdrm/installtests.patch +7 -17
index f460ef5..30e0a61 100644
@@ -4,22 +4,12 @@ Upstream-Status: Inappropriate [configuration]
 
 Signed-off-by: Yu Ke <[email protected]>
 
-Index: libdrm-2.4.65/tests/Makefile.am
+Index: libdrm-2.4.66/tests/Makefile.am
 ===================================================================
---- libdrm-2.4.65.orig/tests/Makefile.am
-+++ libdrm-2.4.65/tests/Makefile.am
-@@ -29,9 +29,11 @@ AM_CFLAGS = \
- 
- LDADD = $(top_builddir)/libdrm.la
- 
--check_PROGRAMS = \
--	dristat \
--	drmstat
-+bin_PROGRAMS = \
-+        dristat \
-+        drmstat
-+ 
-+check_PROGRAMS =
- 
- dristat_LDADD = -lm
+--- libdrm-2.4.66.orig/tests/Makefile.am
++++ libdrm-2.4.66/tests/Makefile.am
+@@ -73,3 +73,4 @@ TESTS +=					\
+ endif
  
+ check_PROGRAMS += $(TESTS)
++bin_PROGRAMS = $(check_PROGRAMS)
meta/recipes-graphics/drm/libdrm_2.4.66.bb renamed from meta/recipes-graphics/drm/libdrm_2.4.65.bb +5 -3
similarity index 86%
rename from meta/recipes-graphics/drm/libdrm_2.4.65.bb
rename to meta/recipes-graphics/drm/libdrm_2.4.66.bb
index e5ed260..214dccc 100644
@@ -11,10 +11,12 @@ PROVIDES = "drm"
 DEPENDS = "libpthread-stubs udev libpciaccess"
 
 SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
-           file://installtests.patch "
+           file://installtests.patch \
+           file://0001-tests-kms-steal-crtc-Include-sys-select.h.patch \
+          "
 
-SRC_URI[md5sum] = "de49916e5f8aef4eba55223c79709b05"
-SRC_URI[sha256sum] = "71960ac8bde7d710992b1bc8879935e8300a870c36bd06f22412d0447e3d96c4"
+SRC_URI[md5sum] = "c6809c48538d6e5999588832045ff014"
+SRC_URI[sha256sum] = "79cb8e988749794edfb2d777b298d5292eff353bbbb71ed813589e61d2bc2d76"
 
 inherit autotools pkgconfig
 
Signature · 1 line
2.7.0
#31 lore raw

Re: [PATCH 22/73] libdrm: Upgrade 2.4.65 -> 2.4.66

Quoted 2 lines · Khem Raj

Fix test build failures

packages/corei7-64-poky-linux/libdrm/libdrm: PKG changed from libdrm2 to libdrm [default] - may indicate debian renaming failure packages/corei7-64-poky-linux/libdrm/libdrm: PKGSIZE changed from 56367 to 176551 (+213%)
* PV changed from "2.4.65" to "2.4.66"
* FILELIST: added "/usr/bin/random /usr/bin/getversion
/usr/bin/updatedraw /usr/bin/setversion /usr/bin/name_from_fd /usr/bin/getstats /usr/bin/hash /usr/bin/openclose /usr/bin/kms-universal-planes /usr/bin/kms-steal-crtc /usr/bin/getclient"

Please remember to run buildhistory-diff :)

This is a simple matter of more binaries being added and overly-restricted FILES matches, I've fixed locally.

Ross

author
#32 lore raw

Re: [PATCH 22/73] libdrm: Upgrade 2.4.65 -> 2.4.66

Hi Ross

Quoted 6 lines · Ross

On 17 January 2016 at 11:35, Khem Raj <[email protected] <mailto:[email protected]>> wrote:
Fix test build failures

Quoted 6 lines

packages/corei7-64-poky-linux/libdrm/libdrm: PKG changed from libdrm2 to libdrm [default] - may indicate debian renaming failure
packages/corei7-64-poky-linux/libdrm/libdrm: PKGSIZE changed from 56367 to 176551 (+213%)
* PV changed from "2.4.65" to "2.4.66"
* FILELIST: added "/usr/bin/random /usr/bin/getversion /usr/bin/updatedraw /usr/bin/setversion /usr/bin/name_from_fd /usr/bin/getstats /usr/bin/hash /usr/bin/openclose /usr/bin/kms-universal-planes /usr/bin/kms-steal-crtc /usr/bin/getclient"

Please remember to run buildhistory-diff :)

I think we have a bit relaxed QA checks for nodistro in OE-Core, may be we should tighten it up to make it similar to poky. I will locally add them in my site.conf

Quoted 3 lines

This is a simple matter of more binaries being added and overly-restricted FILES matches, I've fixed locally.

thanks for the help

author
#33 lore raw

PATCH 23/73 directfb: Fix build with musl

In reply to Khem Raj

compar_fn_t, sigval_t and non-posix recursive mutexes are not available in musl

---
 meta/recipes-graphics/directfb/directfb.inc        |   3 +
 .../directfb/directfb/compar_fn_t.patch            |  62 +++++++++++
 .../directfb/directfb/union-sigval.patch           |  19 ++++
 .../directfb/use-PTHREAD_MUTEX_RECURSIVE.patch     | 116 +++++++++++++++++++++
 4 files changed, 200 insertions(+)
 create mode 100644 meta/recipes-graphics/directfb/directfb/compar_fn_t.patch
 create mode 100644 meta/recipes-graphics/directfb/directfb/union-sigval.patch
 create mode 100644 meta/recipes-graphics/directfb/directfb/use-PTHREAD_MUTEX_RECURSIVE.patch
meta/recipes-graphics/directfb/directfb.inc +3 -0
index 603aba3..be39b83 100644
@@ -16,6 +16,9 @@ SRC_URI = "http://www.directfb.org/downloads/Core/DirectFB-1.7/DirectFB-${PV}.ta
            file://fusion.patch \
            file://bashism.patch \
            file://0001-gfx-direct-Aboid-usng-VLAs-and-printf-formats.patch \
+           file://compar_fn_t.patch \
+           file://union-sigval.patch \
+           file://use-PTHREAD_MUTEX_RECURSIVE.patch \
           "
 
 S = "${WORKDIR}/DirectFB-${PV}"
meta/recipes-graphics/directfb/directfb/compar_fn_t.patch new file +62 -0

62 lines not on this page · raw message

meta/recipes-graphics/directfb/directfb/union-sigval.patch new file +19 -0
new file mode 100644
index 0000000..29f45c7
@@ -0,0 +1,19 @@
+This patch is taken from gentoo musl overlay
+sigval_t is glibc only construct, we use a union of sigval
+which pretty much is same effect as sigval_t
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+diff -Naur DirectFB-1.7.6.orig/lib/direct/os/linux/glibc/system.c DirectFB-1.7.6/lib/direct/os/linux/glibc/system.c
+--- DirectFB-1.7.6.orig/lib/direct/os/linux/glibc/system.c	2014-07-15 02:54:58.000000000 -0400
++++ DirectFB-1.7.6/lib/direct/os/linux/glibc/system.c	2015-07-18 16:55:35.077989166 -0400
+@@ -111,7 +111,7 @@
+ void
+ direct_trap( const char *domain, int sig )
+ {
+-     sigval_t val;
++     union sigval val;
+ 
+      if (direct_config->delay_trap_ms) {
+           D_LOG( Direct_Trap, VERBOSE, "NOT RAISING signal %d from %s, waiting for %dms... attach gdb --pid=%d\n", sig, domain, direct_config->delay_trap_ms, getpid() );
meta/recipes-graphics/directfb/directfb/use-PTHREAD_MUTEX_RECURSIVE.patch new file +116 -0

116 lines not on this page · raw message

Signature · 1 line
2.7.0
author
#34 lore raw

PATCH 24/73 gzip: Fix build with musl

In reply to Khem Raj

gzip 1.6 uses an older version of gnulib when cross compiling it treats fseeko as broken since it cant do runtime checks for it during configure this only shows up on musl since for glibc since it has special check for gnu c library, so we aid the system by telling it that fflush on stdin works well with musl

Use NO_ASM to avoid textrels

Delete charset.alias for musl which is again another issue in gnulib not knowing musl platform

---
 meta/recipes-extended/gzip/gzip.inc | 7 +++++++
 1 file changed, 7 insertions(+)
meta/recipes-extended/gzip/gzip.inc +7 -0
index 58e5e0c..6e81883 100644
@@ -6,8 +6,10 @@ SECTION = "console/utils"
 # change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12
 
 inherit autotools texinfo
+export DEFS="NO_ASM"
 
 EXTRA_OEMAKE_class-target = "GREP=${base_bindir}/grep"
+EXTRA_OECONF_append_libc-musl = " gl_cv_func_fflush_stdin=yes "
 
 do_install_append () {
 	if [ "${base_bindir}" != "${bindir}" ]; then
@@ -20,6 +22,11 @@ do_install_append () {
 	fi
 }
 
+do_install_append_libc-musl () {
+	rm ${D}${libdir}/charset.alias
+	rmdir ${D}${libdir}
+}
+
 inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
Signature · 1 line
2.7.0
author
#35 lore raw

PATCH 25/73 watchdog: Fix build with musl

In reply to Khem Raj

This patch is generic but is found during compiling watchdog with musl

---
 ...d-issues-found-with-non-glibc-C-libraries.patch | 99 ++++++++++++++++++++++
 meta/recipes-extended/watchdog/watchdog_5.14.bb    |  8 +-
 2 files changed, 106 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch new file +99 -0
new file mode 100644
index 0000000..8afed5c
@@ -0,0 +1,99 @@
+From 83ec34df357218a1c9cfc13a23d3367d333652c3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 30 Dec 2015 01:01:15 +0000
+Subject: [PATCH] Fix build issues found with non glibc C libraries
+
+Add time.h for getting time_t definition
+limits.h for PATH_MAX
+linux/param.h for EXEC_PAGESIZE
+Replace deprecated MNTTAB with _PATH_MNTTAB
+include ext2_mnt.h for MNTOPT_USRQUOTA and MNTOPT_GRPQUOTA and
+MNTTYPE_EXT2
+Include sys/types.h for u_char definition
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+
+Upstream-Status: Submitted
+
+ include/extern.h | 1 +
+ src/configfile.c | 1 +
+ src/memory.c     | 3 +++
+ src/net.c        | 1 +
+ src/shutdown.c   | 3 ++-
+ 5 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/include/extern.h b/include/extern.h
+index 21db11b..04b16bc 100644
+--- a/include/extern.h
++++ b/include/extern.h
+@@ -3,6 +3,7 @@
+ 
+ #include <netinet/in.h>
+ #include <stdio.h>
++#include <time.h>
+ 
+ #include "logmessage.h"
+ #include "xmalloc.h"
+diff --git a/src/configfile.c b/src/configfile.c
+index be5d7b3..7c1d1dd 100644
+--- a/src/configfile.c
++++ b/src/configfile.c
+@@ -16,6 +16,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <dirent.h>
++#include <limits.h>
+ #include <sys/stat.h>
+ 
+ #include "extern.h"
+diff --git a/src/memory.c b/src/memory.c
+index e9607e4..b5e08aa 100644
+--- a/src/memory.c
++++ b/src/memory.c
+@@ -21,6 +21,9 @@
+ #include <sys/stat.h>
+ #include <sys/param.h>
+ #include <sys/mman.h>
++#ifdef __linux__
++#include <linux/param.h>
++#endif
+ 
+ #include "extern.h"
+ #include "watch_err.h"
+diff --git a/src/net.c b/src/net.c
+index 21823ae..8930caf 100644
+--- a/src/net.c
++++ b/src/net.c
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <unistd.h>		/* for gethostname() etc */
+ #include <netdb.h>		/* for gethostbyname() */
++#include <sys/types.h>
+ #include <sys/param.h>	/* for MAXHOSTNAMELEN */
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+diff --git a/src/shutdown.c b/src/shutdown.c
+index 74aafa5..46b99cf 100644
+--- a/src/shutdown.c
++++ b/src/shutdown.c
+@@ -25,6 +25,7 @@
+ 
+ #include "watch_err.h"
+ #include "extern.h"
++#include "ext2_mnt.h"
+ 
+ #if defined __GLIBC__
+ #include "ext2_mnt.h"
+@@ -123,7 +124,7 @@ static void mnt_off()
+ 	FILE *fp;
+ 	struct mntent *mnt;
+ 
+-	fp = setmntent(MNTTAB, "r");
++	fp = setmntent(_PATH_MNTTAB, "r");
+ 	/* in some rare cases fp might be NULL so be careful */
+ 	while (fp != NULL && ((mnt = getmntent(fp)) != (struct mntent *)0)) {
+ 		/* First check if swap */
+-- 
+2.6.4
+
meta/recipes-extended/watchdog/watchdog_5.14.bb +7 -1
index 9cb89d5..fc717bc 100644
@@ -12,7 +12,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
            file://fixsepbuild.patch \
 	   file://fix-ping-failure.patch \
 	   file://watchdog-init.patch \
-	   file://watchdog-conf.patch"
+	   file://watchdog-conf.patch \
+	   file://0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch \
+"
 
 SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4"
 SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1"
@@ -23,6 +25,10 @@ UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
 inherit autotools
 inherit update-rc.d
 
+DEPENDS_append_libc-musl = " libtirpc "
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
+LDFLAGS_append_libc-musl = " -ltirpc "
+
 INITSCRIPT_NAME = "watchdog.sh"
 INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ."
 
Signature · 1 line
2.7.0
author
#36 lore raw

PATCH 26/73 xinetd: Fix build with musl

In reply to Khem Raj

musl relies on external rpc implemetation (libtirpc) and exposed a bug in configury when checking for rlim_t

---
 ...se-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch | 100 +++++++++++++++++++++
 meta/recipes-extended/xinetd/xinetd_2.3.15.bb      |   5 ++
 2 files changed, 105 insertions(+)
 create mode 100644 meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch
meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch new file +100 -0
new file mode 100644
index 0000000..3c1b2f6
@@ -0,0 +1,100 @@
+From e8b0ffc7ea04cc71dba97a38e1a134aaf2285c2d Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 30 Dec 2015 07:14:50 +0000
+Subject: [PATCH] configure: Use HAVE_SYS_RESOURCE_H to guard sys/resource.h
+ inclusion
+
+HAVE_RLIM_T check will not let sys/resource.h to be checked and
+rlim_t is defined in sys/resource.h so the check would fail.
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ aclocal.m4 |  2 +-
+ configure  | 14 +++++++-------
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 6e6f32c..70e7076 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -11,7 +11,7 @@ AC_CACHE_VAL(xinetd_cv_type_$1,
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+diff --git a/configure b/configure
+index b507d38..bec56ea 100755
+--- a/configure
++++ b/configure
+@@ -7640,7 +7640,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7686,7 +7686,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7732,7 +7732,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7778,7 +7778,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7824,7 +7824,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7870,7 +7870,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7916,7 +7916,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+-- 
+2.6.4
+
meta/recipes-extended/xinetd/xinetd_2.3.15.bb +5 -0
index 652fe91..6bfaabe 100644
@@ -7,6 +7,7 @@ LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8"
 
 DEPENDS = ""
+DEPENDS_append_libc-musl = " libtirpc "
 PR = "r2"
 
 # Blacklist a bogus tag in upstream check
@@ -20,6 +21,7 @@ SRC_URI = "git://github.com/xinetd-org/xinetd.git;protocol=https \
       file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \
       file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \
       file://xinetd-CVE-2013-4342.patch \
+      file://0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch \
       file://xinetd.service \
       "
 
@@ -39,6 +41,9 @@ EXTRA_OECONF="--disable-nls"
 PACKAGECONFIG ??= "tcp-wrappers"
 PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers"
 
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
+LDFLAGS_append_libc-musl = " -ltirpc "
+
 do_configure() {
 	# Looks like configure.in is broken, so we are skipping
 	# rebuilding configure and are just using the shipped one
Signature · 1 line
2.7.0
author
#37 lore raw

PATCH 27/73 dpkg: Add musleabi to known architectures

In reply to Khem Raj

Remove a glibc specific patch to be applied only for native version, this is a dpkg-native specific patch needed for Centos 5.8, this patch should be redone to be glibc independent for it to be applied to all types of dpkg recipes

---
 ...0006-add-musleabi-to-known-target-tripets.patch | 42 ++++++++++++++++++++++
 meta/recipes-devtools/dpkg/dpkg_1.18.2.bb          |  3 +-
 2 files changed, 44 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch new file +42 -0
new file mode 100644
index 0000000..a6b0088
@@ -0,0 +1,42 @@
+From f8910022dc3ec622272f168cd0022dbdf6dff93a Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 30 Dec 2015 23:05:41 +0000
+Subject: [PATCH] add musleabi to known target tripets
+
+helps compiling dpkg for musl/arm-softfloat
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ ostable      | 1 +
+ triplettable | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/ostable b/ostable
+index 3bb6819..d0ffdc7 100644
+--- a/ostable
++++ b/ostable
+@@ -15,6 +15,7 @@
+ uclibceabi-linux	linux-uclibceabi	linux[^-]*-uclibceabi
+ uclibc-linux		linux-uclibc		linux[^-]*-uclibc
+ musleabihf-linux	linux-musleabihf	linux[^-]*-musleabihf
++musleabi-linux		linux-musleabi		linux[^-]*-musleabi
+ musl-linux		linux-musl		linux[^-]*-musl
+ gnueabihf-linux		linux-gnueabihf		linux[^-]*-gnueabihf
+ gnueabi-linux		linux-gnueabi		linux[^-]*-gnueabi
+diff --git a/triplettable b/triplettable
+index 1213584..70d24c1 100644
+--- a/triplettable
++++ b/triplettable
+@@ -6,6 +6,7 @@
+ uclibceabi-linux-arm	uclibc-linux-armel
+ uclibc-linux-<cpu>	uclibc-linux-<cpu>
+ musleabihf-linux-arm	musl-linux-armhf
++musleabi-linux-arm	musl-linux-armel
+ musl-linux-<cpu>	musl-linux-<cpu>
+ gnueabihf-linux-arm	armhf
+ gnueabi-linux-arm	armel
+-- 
+2.6.4
+
meta/recipes-devtools/dpkg/dpkg_1.18.2.bb +2 -1
index 4c3fa4f..dd1109b 100644
@@ -1,17 +1,18 @@
 require dpkg.inc
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
+SRC_URI_append_class-native =" file://glibc2.5-sync_file_range.patch "
 SRC_URI += "file://noman.patch \
             file://remove-tar-no-timestamp.patch \
             file://fix-abs-redefine.patch \
             file://arch_pm.patch \
             file://dpkg-configure.service \
-            file://glibc2.5-sync_file_range.patch \
             file://add_armeb_triplet_entry.patch \
 	    file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \
 	    file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \
 	    file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \
 	    file://0005-dpkg-compiler.m4-remove-Wvla.patch \
+	    file://0006-add-musleabi-to-known-target-tripets.patch \
            "
 
 SRC_URI[md5sum] = "63b9d869081ec49adeef6c5ff62d6576"
Signature · 1 line
2.7.0
author
#38 lore raw

PATCH 28/73 puzzles: Zero'ise structs before use

In reply to Khem Raj

Fixes build failures with musl where gcc5 flags it used before initialized.

---
 ...mpiler-errors-about-uninitialized-use-of-.patch | 32 ++++++++++++++++++++++
 meta/recipes-sato/puzzles/puzzles_git.bb           |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch
meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch new file +32 -0
new file mode 100644
index 0000000..0b971c4
@@ -0,0 +1,32 @@
+From 78d6d1706c21ad467520075ff7a8bf15cfbd68b3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 30 Dec 2015 22:13:16 +0000
+Subject: [PATCH] rect: Fix compiler errors about uninitialized use of
+ variables
+
+error: 'r2.x' may be used uninitialized in this function
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted
+
+ rect.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/rect.c b/rect.c
+index 55667c0..fa3a786 100644
+--- a/rect.c
++++ b/rect.c
+@@ -1317,7 +1317,8 @@ static char *new_game_desc(const game_params *params_in, random_state *rs,
+                     if (ndirs > 0) {
+                         int which, dir;
+                         struct rect r1, r2;
+-
++                        memset(&r1, 0, sizeof(struct rect));
++                        memset(&r2, 0, sizeof(struct rect));
+                         which = random_upto(rs, ndirs);
+                         dir = dirs[which];
+ 
+-- 
+2.6.4
+
meta/recipes-sato/puzzles/puzzles_git.bb +1 -0
index 1e3bac7..9c8170c 100644
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
 SRC_URI = "git://git.tartarus.org/simon/puzzles.git \
            file://fix-compiling-failure-with-option-g-O.patch \
            file://0001-Use-labs-instead-of-abs.patch \
+           file://0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch \
 "
 SRCREV = "346584bf6e38232be8773c24fd7dedcbd7b3d9ed"
 PE = "1"
Signature · 1 line
2.7.0
author
#39 lore raw

PATCH 29/73 apt: Add support for building for musl targets

In reply to Khem Raj

Turn bzip2 support into a PACKAGECONFIG
zlibs is a must have and therefore add it to DEPENDS will make the build consistent

---
 meta/recipes-devtools/apt/apt.inc                  |  1 +
 ....mak-musl-based-systems-can-generate-shar.patch | 29 ++++++++++++++++++++++
 meta/recipes-devtools/apt/apt_1.0.10.1.bb          |  3 ++-
 3 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch
meta/recipes-devtools/apt/apt.inc +1 -0
index 312c6a9..78ef5a7 100644
@@ -11,6 +11,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20150805T094928Z/pool/main/
            file://nodoc.patch \
            file://disable-configure-in-makefile.patch \
            file://disable-test.patch \
+           file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \
            "
 SRC_URI[md5sum] = "6505c4297b338adb2087ce87bbc4a276"
 SRC_URI[sha256sum] = "3fb1de9598363c416591d49e3c285458e095b035e6c06d5b944a54e15fc9b543"
meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch new file +29 -0
new file mode 100644
index 0000000..042372b
@@ -0,0 +1,29 @@
+From 2f8aa21ace375c18977ed908b291c80a210a93c6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 31 Dec 2015 08:06:12 +0000
+Subject: [PATCH] environment.mak: musl based systems can generate shared
+ objects too
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ buildlib/environment.mak.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in
+index b0a8d9d..3a52344 100644
+--- a/buildlib/environment.mak.in
++++ b/buildlib/environment.mak.in
+@@ -68,7 +68,7 @@ NEED_SOCKLEN_T_DEFINE = @NEED_SOCKLEN_T_DEFINE@
+ 
+ # Shared library things
+ HOST_OS = @host_os@
+-ifneq ($(words $(filter gnu% linux-gnu% kfreebsd-gnu% %-gnu,$(HOST_OS))),0)
++ifneq ($(words $(filter gnu% linux-gnu% kfreebsd-gnu% %-gnu linux-musl%,$(HOST_OS))),0)
+    SONAME_MAGIC=-Wl,-soname -Wl,
+    LFLAGS_SO=
+ else
+-- 
+2.6.4
+
meta/recipes-devtools/apt/apt_1.0.10.1.bb +2 -1
index bf77e2a..85c0d56 100644
@@ -1,4 +1,4 @@
-DEPENDS = "curl db"
+DEPENDS = "curl db zlib"
 RDEPENDS_${PN} = "dpkg bash debianutils"
 require apt.inc
 
@@ -6,6 +6,7 @@ require apt-package.inc
 
 PACKAGECONFIG ??= "lzma"
 PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_easy_encoder=no,xz"
+PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,bzip2"
 
 FILES_${PN} += "${bindir}/apt-key"
 apt-manpages += "doc/apt-key.8"
Signature · 1 line
2.7.0
author
#40 lore raw

PATCH 30/73 libunwind: backtrace APIs are glibc specific

In reply to Khem Raj

Make backtrace() API's use conditional on glibc
this helps make libunwind compile on musl

---
 ...-backtrace-Use-only-with-glibc-and-uclibc.patch | 45 ++++++++++++++++++++++
 meta/recipes-support/libunwind/libunwind_1.1.bb    |  1 +
 2 files changed, 46 insertions(+)
 create mode 100644 meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch new file +45 -0
new file mode 100644
index 0000000..9aed419
@@ -0,0 +1,45 @@
+From 04437142399662b576bd55a85485c6dcc14d0812 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 31 Dec 2015 06:44:07 +0000
+Subject: [PATCH] backtrace: Use only with glibc and uclibc
+
+backtrace API is glibc specific not linux specific
+so make it behave so.
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ tests/test-coredump-unwind.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
+index 5254708..8767b42 100644
+--- a/tests/test-coredump-unwind.c
++++ b/tests/test-coredump-unwind.c
+@@ -57,7 +57,9 @@
+ #include <grp.h>
+ 
+ /* For SIGSEGV handler code */
++#ifdef __GLIBC__
+ #include <execinfo.h>
++#endif
+ #include <sys/ucontext.h>
+ 
+ #include <libunwind-coredump.h>
+@@ -238,11 +240,11 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
+ 			ip);
+ 
+   {
++#ifdef __GLIBC__
+     /* glibc extension */
+     void *array[50];
+     int size;
+     size = backtrace(array, 50);
+-#ifdef __linux__
+     backtrace_symbols_fd(array, size, 2);
+ #endif
+   }
+-- 
+2.6.4
+
meta/recipes-support/libunwind/libunwind_1.1.bb +1 -0
index aa62bcc..7df9f5e 100644
@@ -7,6 +7,7 @@ SRC_URI += "\
     file://Link-libunwind-to-libgcc_s-rather-than-libgcc.patch \
     file://0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch \
     file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
+    file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
 "
 
 SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce"
Signature · 1 line
2.7.0
author
#41 lore raw

PATCH 31/73 babeltrace: Add missing header for MAXNAMLEN define

In reply to Khem Raj

Fix bug exposed on musl

---
 ...Include-sys-param.h-for-MAXNAMLEN-definti.patch | 29 ++++++++++++++++++++++
 meta/recipes-kernel/lttng/babeltrace_1.3.1.bb      |  5 ++--
 2 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch
meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch new file +29 -0
new file mode 100644
index 0000000..eb16cd1
@@ -0,0 +1,29 @@
+From 8331b87845cafdda40e59a682f2ca8120ed0c472 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 31 Dec 2015 08:17:40 +0000
+Subject: [PATCH] lttng-live: Include sys/param.h for MAXNAMLEN defintion
+
+exposed on musl based systems
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: pending
+
+ formats/lttng-live/lttng-live.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/formats/lttng-live/lttng-live.h b/formats/lttng-live/lttng-live.h
+index 4ab641d..808ed2b 100644
+--- a/formats/lttng-live/lttng-live.h
++++ b/formats/lttng-live/lttng-live.h
+@@ -25,6 +25,7 @@
+  */
+ 
+ #include <stdint.h>
++#include <sys/param.h>
+ #include "lttng-viewer-abi.h"
+ 
+ #define LTTNG_DEFAULT_NETWORK_VIEWER_PORT	5344
+-- 
+2.6.4
+
meta/recipes-kernel/lttng/babeltrace_1.3.1.bb +3 -2
index 36345e3..1766026 100644
@@ -6,14 +6,15 @@ BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
 LICENSE = "MIT & GPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
 
-inherit autotools pkgconfig
-
 DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
 
+inherit autotools pkgconfig
+
 SRCREV = "6e2b9096c77138593097335b9b27202d98918089"
 
 SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.3 \
            file://0001-Fix-invalid-pointer-free-with-trace-collection.patch \
+           file://0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch \
 "
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.7.0
author
#42 lore raw

PATCH 32/73 sysklogd: untangle header inclusion maze

In reply to Khem Raj

wait is not union per posix it is int
remove assumption about glibc is linux

---
 .../sysklogd/files/0001-Fix-build-with-musl.patch  | 132 +++++++++++++++++++++
 meta/recipes-extended/sysklogd/sysklogd.inc        |   1 +
 2 files changed, 133 insertions(+)
 create mode 100644 meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch
meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch new file +132 -0
new file mode 100644
index 0000000..9567946
@@ -0,0 +1,132 @@
+From f0af5bcfd753691652eac35efbcb208c933253f1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 31 Aug 2015 05:11:53 +0000
+Subject: [PATCH] Fix build with musl
+
+Explicitly include fcntl.h since with glibc is comes in as indirect
+include but not with musl
+
+linux/time.h inclusion is not required on musl so using !__GLIBC__ is
+not right for musl here
+
+wait type is glibc specific
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ klogd.c    | 10 +---------
+ ksym_mod.c |  5 +----
+ pidfile.c  |  1 +
+ syslog.c   |  3 ++-
+ syslogd.c  |  4 +---
+ 5 files changed, 6 insertions(+), 17 deletions(-)
+
+diff --git a/klogd.c b/klogd.c
+index 6cc80ed..9219671 100644
+--- a/klogd.c
++++ b/klogd.c
+@@ -260,11 +260,8 @@
+ #include <unistd.h>
+ #include <signal.h>
+ #include <errno.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <sys/stat.h>
+-#if !defined(__GLIBC__)
+-#include <linux/time.h>
+-#endif /* __GLIBC__ */
+ #include <stdarg.h>
+ #include <paths.h>
+ #include <stdlib.h>
+@@ -277,13 +274,8 @@
+ 
+ #define __LIBRARY__
+ #include <linux/unistd.h>
+-#if !defined(__GLIBC__)
+-# define __NR_ksyslog __NR_syslog
+-_syscall3(int,ksyslog,int, type, char *, buf, int, len);
+-#else
+ #include <sys/klog.h>
+ #define ksyslog klogctl
+-#endif
+ 
+ #define LOG_BUFFER_SIZE 4096
+ #define LOG_LINE_LENGTH 1000
+diff --git a/ksym_mod.c b/ksym_mod.c
+index 68cd6b6..6e26da1 100644
+--- a/ksym_mod.c
++++ b/ksym_mod.c
+@@ -113,12 +113,9 @@
+ #include <unistd.h>
+ #include <signal.h>
+ #include <errno.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <sys/stat.h>
+ #include "module.h"
+-#if !defined(__GLIBC__)
+-#include <linux/time.h>
+-#endif /* __GLIBC__ */
+ #include <stdarg.h>
+ #include <paths.h>
+ #include <linux/version.h>
+diff --git a/pidfile.c b/pidfile.c
+index e0959a0..6daa2e0 100644
+--- a/pidfile.c
++++ b/pidfile.c
+@@ -31,6 +31,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <signal.h>
++#include <fcntl.h>
+ 
+ /* read_pid
+  *
+diff --git a/syslog.c b/syslog.c
+index bdb3ff2..ef7b34e 100644
+--- a/syslog.c
++++ b/syslog.c
+@@ -55,7 +55,7 @@ static char sccsid[] = "@(#)syslog.c	5.28 (Berkeley) 6/27/90";
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/file.h>
+-#include <sys/signal.h>
++//#include <sys/signal.h>
+ #include <sys/syslog.h>
+ #if 0
+ #include "syslog.h"
+@@ -72,6 +72,7 @@ static char sccsid[] = "@(#)syslog.c	5.28 (Berkeley) 6/27/90";
+ #include <stdarg.h>
+ #include <paths.h>
+ #include <stdio.h>
++#include <fcntl.h>
+ 
+ #define	_PATH_LOGNAME	"/dev/log"
+ 
+diff --git a/syslogd.c b/syslogd.c
+index ea73ea5..1ca0595 100644
+--- a/syslogd.c
++++ b/syslogd.c
+@@ -818,9 +818,7 @@ void doexit(int sig);
+ void init();
+ void cfline(char *line, register struct filed *f);
+ int decode(char *name, struct code *codetab);
+-#if defined(__GLIBC__)
+ #define dprintf mydprintf
+-#endif /* __GLIBC__ */
+ static void dprintf(char *, ...);
+ static void allocate_log(void);
+ void sighup_handler();
+@@ -2094,7 +2092,7 @@ void reapchild()
+ 	(void) signal(SIGCHLD, reapchild);	/* reset signal handler -ASP */
+ 	wait ((int *)0);
+ #else
+-	union wait status;
++	int status;
+ 
+ 	while (wait3(&status, WNOHANG, (struct rusage *) NULL) > 0)
+ 		;
+-- 
+2.5.1
+
meta/recipes-extended/sysklogd/sysklogd.inc +1 -0
index 85b3cdc..f789c54 100644
@@ -15,6 +15,7 @@ inherit update-rc.d update-alternatives
 
 SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
            file://no-strip-install.patch \
+           file://0001-Fix-build-with-musl.patch \
            file://sysklogd \
            file://syslog.conf \
            "
Signature · 1 line
2.7.0
author
#43 lore raw

PATCH 33/73 console-tools: Include sys/types.h for u_char and u_short defs

In reply to Khem Raj
---
 ...clude-sys-types.h-for-u_char-and-u_short-.patch | 44 ++++++++++++++++++++++
 .../console-tools/console-tools_0.3.2.bb           |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 meta/recipes-core/console-tools/console-tools-0.3.2/0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch
meta/recipes-core/console-tools/console-tools-0.3.2/0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch new file +44 -0
new file mode 100644
index 0000000..64b5b04
@@ -0,0 +1,44 @@
+From 0fd5dda51d68e1ec2a87e27b5ed0dff3503b4681 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 31 Dec 2015 08:12:38 +0000
+Subject: [PATCH] kbdtools: Include sys/types.h for u_char and u_short
+ definition
+
+on musl this gets exposed since sys/types.h is not
+included via some other indirect inclusion as is the case with glibc
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ kbdtools/dumpkeys.c | 1 +
+ kbdtools/loadkeys.y | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/kbdtools/dumpkeys.c b/kbdtools/dumpkeys.c
+index 6159d49..c19fb21 100644
+--- a/kbdtools/dumpkeys.c
++++ b/kbdtools/dumpkeys.c
+@@ -26,6 +26,7 @@
+ #include <errno.h>
+ #include <sysexits.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
+ #include <linux/types.h>
+ #include <linux/kd.h>
+ #include <linux/keyboard.h>
+diff --git a/kbdtools/loadkeys.y b/kbdtools/loadkeys.y
+index b6a8e01..4468f77 100644
+--- a/kbdtools/loadkeys.y
++++ b/kbdtools/loadkeys.y
+@@ -71,6 +71,7 @@
+ #include <linux/kd.h>
+ #include <linux/keyboard.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
+ #include <ctype.h>
+ #include <sysexits.h>
+ #include <signal.h>
+-- 
+2.6.4
+
meta/recipes-core/console-tools/console-tools_0.3.2.bb +1 -0
index 7e14b31..d14d683 100644
@@ -14,6 +14,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lct/console-tools-${PV}.tar.gz \
            file://nodocs.patch \
            file://fix-libconsole-linking.patch \
            file://no-dep-on-libfl.patch \
+           file://0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch \
            file://lcmessage.m4 \
            file://Makevars"
 
Signature · 1 line
2.7.0
author
#44 lore raw

PATCH 34/73 webkitgtk: Fix build with clang/musl

In reply to Khem Raj

backtrace is glibc only feature on linux so check for glibc before using it
Clangs clear_cache has different signature than gcc provided builtin make it compatible for both

---
 ...nable-backtrace-on-linux-when-using-glibc.patch | 39 ++++++++++++++
 ...x-build-with-non-glibc-libraries-on-linux.patch | 61 ++++++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk/clang.patch     | 25 +++++++++
 meta/recipes-sato/webkit/webkitgtk_2.10.4.bb       |  3 ++
 4 files changed, 128 insertions(+)
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/clang.patch
meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch new file +39 -0
new file mode 100644
index 0000000..d7e4ef6
@@ -0,0 +1,39 @@
+From 0b68ad206d2d90df78d91cad4da19152084014cf Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 16 Sep 2015 05:15:04 +0000
+Subject: [PATCH] Enable backtrace on linux when using glibc
+
+We dont have backtrace() implemented on non-glibc libc's on linux
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Accepted
+
+ Source/WTF/wtf/Assertions.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp
+index 191d53f..a4d86b5 100644
+--- a/Source/WTF/wtf/Assertions.cpp
++++ b/Source/WTF/wtf/Assertions.cpp
+@@ -68,7 +68,7 @@
+ #include <unistd.h>
+ #endif
+ 
+-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
++#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
+@@ -225,7 +225,7 @@ void WTFReportArgumentAssertionFailure(const char* file, int line, const char* f
+ 
+ void WTFGetBacktrace(void** stack, int* size)
+ {
+-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
++#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
+     *size = backtrace(stack, *size);
+ #elif OS(WINDOWS)
+     // The CaptureStackBackTrace function is available in XP, but it is not defined
+-- 
+2.5.2
+
meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch new file +61 -0

61 lines not on this page · raw message

meta/recipes-sato/webkit/webkitgtk/clang.patch new file +25 -0
new file mode 100644
index 0000000..e526713
@@ -0,0 +1,25 @@
+Clang's builtin for clear_cache accepts char* and errors out when using void*,
+using char* work on both gcc and clang since char* is auto-converted to void* in gcc case
+
+Source/JavaScriptCore/assembler/ARM64Assembler.h:2857:33: error: cannot initialize a parameter of type 'char *' with an rvalue of type 'void *'
+        __builtin___clear_cache(reinterpret_cast<void*>(begin), reinterpret_cast<void*>(end));
+                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1 error generated.
+
+Signed-off-by: Khem Raj <[email protected]>
+
+Upstream-Status: Accepted
+
+Index: webkitgtk-2.8.5/Source/JavaScriptCore/assembler/ARM64Assembler.h
+===================================================================
+--- webkitgtk-2.8.5.orig/Source/JavaScriptCore/assembler/ARM64Assembler.h
++++ webkitgtk-2.8.5/Source/JavaScriptCore/assembler/ARM64Assembler.h
+@@ -2854,7 +2854,7 @@ public:
+ #if OS(LINUX) && COMPILER(GCC)
+     static inline void linuxPageFlush(uintptr_t begin, uintptr_t end)
+     {
+-        __builtin___clear_cache(reinterpret_cast<void*>(begin), reinterpret_cast<void*>(end));
++        __builtin___clear_cache(reinterpret_cast<char*>(begin), reinterpret_cast<char*>(end));
+     }
+ #endif
+ 
meta/recipes-sato/webkit/webkitgtk_2.10.4.bb +3 -0
index 4d5aeb4..098bbbb 100644
@@ -12,6 +12,9 @@ LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d842
 
 SRC_URI = "\
   http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
+  file://clang.patch \
+  file://0001-Enable-backtrace-on-linux-when-using-glibc.patch \
+  file://0001-Fix-build-with-non-glibc-libraries-on-linux.patch \
   "
 SRC_URI[md5sum] = "fb010031c6f61c3a1a00793b112badb5"
 SRC_URI[sha256sum] = "dbf8260da5cac0c74de2d3cce1fe7c519da3cd816a2c769cb6c6d56addd2f055"
Signature · 1 line
2.7.0
author
#45 lore raw

PATCH 35/73 rt-tests: Fix build with non-gcc compilers

In reply to Khem Raj

Makery hard sets CC to be some form of gcc, make it set only if CC variable is absent in environment.

---
 ...t-CC-AR-variable-only-if-it-doesn-t-have-.patch | 30 ++++++++++++++++++++++
 meta/recipes-rt/rt-tests/rt-tests_0.96.bb          |  3 ++-
 2 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch
meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch new file +30 -0
new file mode 100644
index 0000000..00fcc7d
@@ -0,0 +1,30 @@
+From 9640dde4241e1314b8e8ea35b0c8dab0b30ae51f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sun, 3 Jan 2016 10:50:56 -0800
+Subject: [PATCH] Makefile: Set CC/AR variable only if it doesn't have a value
+
+This helps it compile with clang or any other compilers besides gcc
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted
+
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1e4b7d1..2c2d396 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 0.96
+-CC=$(CROSS_COMPILE)gcc
+-AR=$(CROSS_COMPILE)ar
++CC?=$(CROSS_COMPILE)gcc
++AR?=$(CROSS_COMPILE)ar
+ 
+ OBJDIR = bld
+ 
+-- 
+2.6.4
+
meta/recipes-rt/rt-tests/rt-tests_0.96.bb +2 -1
index 7d70392..2f96fea 100644
@@ -10,7 +10,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
 require rt-tests.inc
 inherit ptest
 
-SRC_URI += "file://run-ptest \
+SRC_URI += "file://0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch \
+            file://run-ptest \
             file://rt_bmark.py \
            "
 # Do not install hwlatdetect
Signature · 1 line
2.7.0
author
#46 lore raw

PATCH 36/73 tar: Fix build for musl based targets

In reply to Khem Raj

It only considered linux-gnu hosts when cross compiling here we add linux-musl to the mix as well

Fixes errors e.g.

1.28-r0/tar-1.28/src/tar.c:1351:5: error: 'SAVEDIR_SORT_INODE' undeclared here (not in a function)

|      SAVEDIR_SORT_INODE
|      ^
---
 meta/recipes-extended/tar/tar/musl_dirent.patch | 19 +++++++++++++++++++
 meta/recipes-extended/tar/tar_1.28.bb           |  6 ++++++
 2 files changed, 25 insertions(+)
 create mode 100644 meta/recipes-extended/tar/tar/musl_dirent.patch
meta/recipes-extended/tar/tar/musl_dirent.patch new file +19 -0
new file mode 100644
index 0000000..b0dc16c
@@ -0,0 +1,19 @@
+musl has valid d_ino implementation
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Pending
+
+Index: tar-1.28/m4/d-ino.m4
+===================================================================
+--- tar-1.28.orig/m4/d-ino.m4
++++ tar-1.28/m4/d-ino.m4
+@@ -40,7 +40,8 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_
+            [gl_cv_struct_dirent_d_ino=no],
+            [case "$host_os" in
+                            # Guess yes on glibc systems with Linux kernel.
+-              linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
++              linux*-gnu*|linux*-musl*)
++                           gl_cv_struct_dirent_d_ino="guessing yes" ;;
+                            # If we don't know, assume the worst.
+               *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
+             esac
meta/recipes-extended/tar/tar_1.28.bb +6 -0
index 8816000..518e622 100644
@@ -7,6 +7,12 @@ LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
 SRC_URI += "file://remove-gets.patch \
+            file://musl_dirent.patch \
            "
 SRC_URI[md5sum] = "8f32b2bc1ed7ddf4cf4e4a39711341b0"
 SRC_URI[sha256sum] = "60e4bfe0602fef34cd908d91cf638e17eeb09394d7b98c2487217dc4d3147562"
+
+do_install_append_libc-musl() {
+	rm -f ${D}${libdir}/charset.alias
+	rmdir ${D}${libdir}
+}
Signature · 1 line
2.7.0
author
#47 lore raw

PATCH 37/73 pax: Fix build with musl

In reply to Khem Raj

There are several BSD specific assumptions
and some GNU specific ones.

---
 .../pax/pax/0001-Fix-build-with-musl.patch         | 1287 ++++++++++++++++++++
 .../pax/0001-use-strtoll-instead-of-strtoq.patch   |   33 +
 meta/recipes-extended/pax/pax_3.4.bb               |   10 +
 3 files changed, 1330 insertions(+)
 create mode 100644 meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
 create mode 100644 meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch new file +1287 -0
new file mode 100644
index 0000000..61bf2de
@@ -0,0 +1,1287 @@
+From 47c4db8d37248d968fac7ee4a71ca64398890723 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 6 Jan 2016 11:57:21 -0800
+Subject: [PATCH] Fix build with musl
+
+Remove BSDisms
+Remove fts, and link to libfts thats provided externally
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Inappropriate[musl specific]
+
+ lib/Makefile.am |    4 +-
+ lib/fts.c       | 1025 -------------------------------------------------------
+ lib/fts.h       |  131 -------
+ lib/vis.h       |   13 +-
+ src/Makefile.am |    2 +-
+ src/extern.h    |    2 -
+ src/file_subs.c |    2 +-
+ src/tables.c    |    2 +-
+ 8 files changed, 14 insertions(+), 1167 deletions(-)
+ delete mode 100644 lib/fts.c
+ delete mode 100644 lib/fts.h
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 56d0859..7f5045a 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -8,8 +8,8 @@ AUTOMAKE_OPTIONS = 1.7 gnits
+ CLEANFILES = *~
+ 
+ noinst_LIBRARIES = libbsdfunc.a
+-noinst_HEADERS = vis.h bsdfunc.h fts.h
++noinst_HEADERS = vis.h bsdfunc.h
+ 
+ AM_CFLAGS = @EXTRA_CFLAGS@
+ 
+-libbsdfunc_a_SOURCES = vis.c strlcpy.c strmode.c fts.c
++libbsdfunc_a_SOURCES = vis.c strlcpy.c strmode.c
+diff --git a/lib/fts.c b/lib/fts.c
+deleted file mode 100644
+index 45e90ca..0000000
+--- a/lib/fts.c
++++ /dev/null
+@@ -1,1025 +0,0 @@
+-/*-
+- * Copyright (c) 1990, 1993, 1994
+- *      The Regents of the University of California.  All rights reserved.
+- *
+- * Redistribution and use in source and binary forms, with or without
+- * modification, are permitted provided that the following conditions
+- * are met:
+- * 1. Redistributions of source code must retain the above copyright
+- *    notice, this list of conditions and the following disclaimer.
+- * 2. Redistributions in binary form must reproduce the above copyright
+- *    notice, this list of conditions and the following disclaimer in the
+- *    documentation and/or other materials provided with the distribution.
+- * 4. Neither the name of the University nor the names of its contributors
+- *    may be used to endorse or promote products derived from this software
+- *    without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+- * SUCH DAMAGE.
+- */
+-
+-#ifdef HAVE_CONFIG_H
+-#include <config.h>
+-#endif
+-
+-#include <sys/stat.h>
+-#include <fcntl.h>
+-#include <dirent.h>
+-#include <errno.h>
+-#include <fts.h>
+-#include <stdlib.h>
+-#include <string.h>
+-#include <unistd.h>
+-
+-/* Largest alignment size needed, minus one.
+-   Usually long double is the worst case.  */
+-#ifndef ALIGNBYTES
+-#define ALIGNBYTES	(__alignof__ (long double) - 1)
+-#endif
+-/* Align P to that size.  */
+-#ifndef ALIGN
+-#define	ALIGN(p)	(((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES)
+-#endif
+-
+-
+-static FTSENT	*fts_alloc (FTS *, const char *, int);
+-static FTSENT	*fts_build (FTS *, int);
+-static void	 fts_lfree (FTSENT *);
+-static void	 fts_load (FTS *, FTSENT *);
+-static size_t	 fts_maxarglen (char * const *);
+-static void	 fts_padjust (FTS *, FTSENT *);
+-static int	 fts_palloc (FTS *, size_t);
+-static FTSENT	*fts_sort (FTS *, FTSENT *, int);
+-static u_short	 fts_stat (FTS *, FTSENT *, int);
+-static int      fts_safe_changedir (FTS *, FTSENT *, int, const char *);
+-
+-#ifndef MAX
+-#define MAX(a, b)	(a > b ? a : b)
+-#endif
+-
+-#define	ISDOT(a)	(a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
+-
+-#define CLR(opt)	(sp->fts_options &= ~(opt))
+-#define	ISSET(opt)	(sp->fts_options & (opt))
+-#define	SET(opt)	(sp->fts_options |= (opt))
+-
+-#define	FCHDIR(sp, fd)	(!ISSET(FTS_NOCHDIR) && fchdir(fd))
+-
+-#define	BREAD		3		/* fts_read */
+-
+-FTS *
+-fts_open(argv, koptions, compar)
+-	char * const *argv;
+-	register int koptions;
+-	int (*compar) (const FTSENT **, const FTSENT **);
+-{
+-	register FTS *sp;
+-	register FTSENT *p, *root;
+-	register int nitems;
+-	FTSENT *parent, *tmp;
+-	int len;
+-
+-tmp = NULL;	/* stop compiler whinging */
+-	/* Options check. */
+-	if (koptions & ~FTS_OPTIONMASK) {
+-		errno = EINVAL;
+-		return (NULL);
+-	}
+-
+-	/* Allocate/initialize the stream */
+-	if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
+-		return (NULL);
+-	memset(sp, 0, sizeof(FTS));
+-	sp->fts_compar = (int (*) (const void *, const void *)) compar;
+-	sp->fts_options = koptions;
+-
+-	/* Logical walks turn on NOCHDIR; symbolic links are too hard. */
+-	if (ISSET(FTS_LOGICAL))
+-		SET(FTS_NOCHDIR);
+-
+-	/*
+-	 * Start out with 1K of path space, and enough, in any case,
+-	 * to hold the user's paths.
+-	 */
+-#ifndef MAXPATHLEN
+-#define MAXPATHLEN 1024
+-#endif
+-	if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
+-		goto mem1;
+-
+-	/* Allocate/initialize root's parent. */
+-	if ((parent = fts_alloc(sp, "", 0)) == NULL)
+-		goto mem2;
+-	parent->fts_level = FTS_ROOTPARENTLEVEL;
+-
+-	/* Allocate/initialize root(s). */
+-	for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
+-		/* Don't allow zero-length paths. */
+-		if ((len = strlen(*argv)) == 0) {
+-			errno = ENOENT;
+-			goto mem3;
+-		}
+-
+-		p = fts_alloc(sp, *argv, len);
+-		p->fts_level = FTS_ROOTLEVEL;
+-		p->fts_parent = parent;
+-		p->fts_accpath = p->fts_name;
+-		p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW));
+-
+-		/* Command-line "." and ".." are real directories. */
+-		if (p->fts_info == FTS_DOT)
+-			p->fts_info = FTS_D;
+-
+-		/*
+-		 * If comparison routine supplied, traverse in sorted
+-		 * order; otherwise traverse in the order specified.
+-		 */
+-		if (compar) {
+-			p->fts_link = root;
+-			root = p;
+-		} else {
+-			p->fts_link = NULL;
+-			if (root == NULL)
+-				tmp = root = p;
+-			else {
+-				tmp->fts_link = p;
+-				tmp = p;
+-			}
+-		}
+-	}
+-	if (compar && nitems > 1)
+-		root = fts_sort(sp, root, nitems);
+-
+-	/*
+-	 * Allocate a dummy pointer and make fts_read think that we've just
+-	 * finished the node before the root(s); set p->fts_info to FTS_INIT
+-	 * so that everything about the "current" node is ignored.
+-	 */
+-	if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
+-		goto mem3;
+-	sp->fts_cur->fts_link = root;
+-	sp->fts_cur->fts_info = FTS_INIT;
+-
+-	/*
+-	 * If using chdir(2), grab a file descriptor pointing to dot to ensure
+-	 * that we can get back here; this could be avoided for some paths,
+-	 * but almost certainly not worth the effort.  Slashes, symbolic links,
+-	 * and ".." are all fairly nasty problems.  Note, if we can't get the
+-	 * descriptor we run anyway, just more slowly.
+-	 */
+-	if (!ISSET(FTS_NOCHDIR)
+-	    && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
+-		SET(FTS_NOCHDIR);
+-
+-	return (sp);
+-
+-mem3:	fts_lfree(root);
+-	free(parent);
+-mem2:	free(sp->fts_path);
+-mem1:	free(sp);
+-	return (NULL);
+-}
+-
+-static void
+-fts_load(sp, p)
+-	FTS *sp;
+-	register FTSENT *p;
+-{
+-	register int len;
+-	register char *cp;
+-
+-	/*
+-	 * Load the stream structure for the next traversal.  Since we don't
+-	 * actually enter the directory until after the preorder visit, set
+-	 * the fts_accpath field specially so the chdir gets done to the right
+-	 * place and the user can access the first node.  From fts_open it's
+-	 * known that the path will fit.
+-	 */
+-	len = p->fts_pathlen = p->fts_namelen;
+-	memmove(sp->fts_path, p->fts_name, len + 1);
+-	if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) {
+-		len = strlen(++cp);
+-		memmove(p->fts_name, cp, len + 1);
+-		p->fts_namelen = len;
+-	}
+-	p->fts_accpath = p->fts_path = sp->fts_path;
+-	sp->fts_dev = p->fts_dev;
+-}
+-
+-int
+-fts_close(sp)
+-	FTS *sp;
+-{
+-	register FTSENT *freep, *p;
+-	int saved_errno;
+-
+-	/*
+-	 * This still works if we haven't read anything -- the dummy structure
+-	 * points to the root list, so we step through to the end of the root
+-	 * list which has a valid parent pointer.
+-	 */
+-	if (sp->fts_cur) {
+-		for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
+-			freep = p;
+-			p = p->fts_link != NULL ? p->fts_link : p->fts_parent;
+-			free(freep);
+-		}
+-		free(p);
+-	}
+-
+-	/* Free up child linked list, sort array, path buffer. */
+-	if (sp->fts_child)
+-		fts_lfree(sp->fts_child);
+-	if (sp->fts_array)
+-		free(sp->fts_array);
+-	free(sp->fts_path);
+-
+-	/* Return to original directory, save errno if necessary. */
+-	if (!ISSET(FTS_NOCHDIR)) {
+-		saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
+-		(void)close(sp->fts_rfd);
+-
+-		/* Set errno and return. */
+-		if (saved_errno != 0) {
+-			/* Free up the stream pointer. */
+-			free(sp);
+-			errno = saved_errno;
+-			return (-1);
+-		}
+-	}
+-
+-	/* Free up the stream pointer. */
+-	free(sp);
+-	return (0);
+-}
+-
+-/*
+- * Special case of "/" at the end of the path so that slashes aren't
+- * appended which would cause paths to be written as "....//foo".
+- */
+-#define	NAPPEND(p)							\
+-	(p->fts_path[p->fts_pathlen - 1] == '/'				\
+-	    ? p->fts_pathlen - 1 : p->fts_pathlen)
+-
+-FTSENT *
+-fts_read(sp)
+-	register FTS *sp;
+-{
+-	register FTSENT *p, *tmp;
+-	register int instr;
+-	register char *t;
+-	int saved_errno;
+-
+-	/* If finished or unrecoverable error, return NULL. */
+-	if (sp->fts_cur == NULL || ISSET(FTS_STOP))
+-		return (NULL);
+-
+-	/* Set current node pointer. */
+-	p = sp->fts_cur;
+-
+-	/* Save and zero out user instructions. */
+-	instr = p->fts_instr;
+-	p->fts_instr = FTS_NOINSTR;
+-
+-	/* Any type of file may be re-visited; re-stat and re-turn. */
+-	if (instr == FTS_AGAIN) {
+-		p->fts_info = fts_stat(sp, p, 0);
+-		return (p);
+-	}
+-
+-	/*
+-	 * Following a symlink -- SLNONE test allows application to see
+-	 * SLNONE and recover.  If indirecting through a symlink, have
+-	 * keep a pointer to current location.  If unable to get that
+-	 * pointer, follow fails.
+-	 */
+-	if (instr == FTS_FOLLOW &&
+-	    (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
+-		p->fts_info = fts_stat(sp, p, 1);
+-		if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
+-			if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
+-				p->fts_errno = errno;
+-				p->fts_info = FTS_ERR;
+-			} else
+-				p->fts_flags |= FTS_SYMFOLLOW;
+-		}
+-		return (p);
+-	}
+-
+-	/* Directory in pre-order. */
+-	if (p->fts_info == FTS_D) {
+-		/* If skipped or crossed mount point, do post-order visit. */
+-		if (instr == FTS_SKIP ||
+-		    (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) {
+-			if (p->fts_flags & FTS_SYMFOLLOW)
+-				(void)close(p->fts_symfd);
+-			if (sp->fts_child) {
+-				fts_lfree(sp->fts_child);
+-				sp->fts_child = NULL;
+-			}
+-			p->fts_info = FTS_DP;
+-			return (p);
+-		}
+-
+-		/* Rebuild if only read the names and now traversing. */
+-		if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) {
+-			CLR(FTS_NAMEONLY);
+-			fts_lfree(sp->fts_child);
+-			sp->fts_child = NULL;
+-		}
+-
+-		/*
+-		 * Cd to the subdirectory.
+-		 *
+-		 * If have already read and now fail to chdir, whack the list
+-		 * to make the names come out right, and set the parent errno
+-		 * so the application will eventually get an error condition.
+-		 * Set the FTS_DONTCHDIR flag so that when we logically change
+-		 * directories back to the parent we don't do a chdir.
+-		 *
+-		 * If haven't read do so.  If the read fails, fts_build sets
+-		 * FTS_STOP or the fts_info field of the node.
+-		 */
+-		if (sp->fts_child != NULL) {
+-			if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) {
+-				p->fts_errno = errno;
+-				p->fts_flags |= FTS_DONTCHDIR;
+-				for (p = sp->fts_child; p != NULL;
+-				     p = p->fts_link)
+-					p->fts_accpath =
+-					    p->fts_parent->fts_accpath;
+-			}
+-		} else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
+-			if (ISSET(FTS_STOP))
+-				return (NULL);
+-			return (p);
+-		}
+-		p = sp->fts_child;
+-		sp->fts_child = NULL;
+-		goto name;
+-	}
+-
+-	/* Move to the next node on this level. */
+-next:	tmp = p;
+-	if ((p = p->fts_link) != NULL) {
+-		free(tmp);
+-
+-		/*
+-		 * If reached the top, return to the original directory (or
+-		 * the root of the tree), and load the paths for the next root.
+-		 */
+-		if (p->fts_level == FTS_ROOTLEVEL) {
+-			if (FCHDIR(sp, sp->fts_rfd)) {
+-				SET(FTS_STOP);
+-				return (NULL);
+-			}
+-			fts_load(sp, p);
+-			return (sp->fts_cur = p);
+-		}
+-
+-		/*
+-		 * User may have called fts_set on the node.  If skipped,
+-		 * ignore.  If followed, get a file descriptor so we can
+-		 * get back if necessary.
+-		 */
+-		if (p->fts_instr == FTS_SKIP)
+-			goto next;
+-		if (p->fts_instr == FTS_FOLLOW) {
+-			p->fts_info = fts_stat(sp, p, 1);
+-			if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
+-				if ((p->fts_symfd =
+-				    open(".", O_RDONLY, 0)) < 0) {
+-					p->fts_errno = errno;
+-					p->fts_info = FTS_ERR;
+-				} else
+-					p->fts_flags |= FTS_SYMFOLLOW;
+-			}
+-			p->fts_instr = FTS_NOINSTR;
+-		}
+-
+-name:		t = sp->fts_path + NAPPEND(p->fts_parent);
+-		*t++ = '/';
+-		memmove(t, p->fts_name, p->fts_namelen + 1);
+-		return (sp->fts_cur = p);
+-	}
+-
+-	/* Move up to the parent node. */
+-	p = tmp->fts_parent;
+-	free(tmp);
+-
+-	if (p->fts_level == FTS_ROOTPARENTLEVEL) {
+-		/*
+-		 * Done; free everything up and set errno to 0 so the user
+-		 * can distinguish between error and EOF.
+-		 */
+-		free(p);
+-		errno = 0;
+-		return (sp->fts_cur = NULL);
+-	}
+-
+-	/* NUL terminate the pathname. */
+-	sp->fts_path[p->fts_pathlen] = '\0';
+-
+-	/*
+-	 * Return to the parent directory.  If at a root node or came through
+-	 * a symlink, go back through the file descriptor.  Otherwise, cd up
+-	 * one directory.
+-	 */
+-	if (p->fts_level == FTS_ROOTLEVEL) {
+-		if (FCHDIR(sp, sp->fts_rfd)) {
+-			SET(FTS_STOP);
+-			return (NULL);
+-		}
+-	} else if (p->fts_flags & FTS_SYMFOLLOW) {
+-		if (FCHDIR(sp, p->fts_symfd)) {
+-			saved_errno = errno;
+-			(void)close(p->fts_symfd);
+-			errno = saved_errno;
+-			SET(FTS_STOP);
+-			return (NULL);
+-		}
+-		(void)close(p->fts_symfd);
+-	} else if (!(p->fts_flags & FTS_DONTCHDIR) &&
+-		   fts_safe_changedir(sp, p->fts_parent, -1, "..")) {
+-		SET(FTS_STOP);
+-		return (NULL);
+-	}
+-	p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
+-	return (sp->fts_cur = p);
+-}
+-
+-/*
+- * Fts_set takes the stream as an argument although it's not used in this
+- * implementation; it would be necessary if anyone wanted to add global
+- * semantics to fts using fts_set.  An error return is allowed for similar
+- * reasons.
+- */
+-/* ARGSUSED */
+-int
+-fts_set(sp, p, instr)
+-	FTS __attribute__((__unused__)) *sp;
+-	FTSENT *p;
+-	int instr;
+-{
+-sp = NULL;	/* stop compiler whinging */
+-	if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
+-	    instr != FTS_NOINSTR && instr != FTS_SKIP) {
+-		errno = EINVAL;
+-		return (1);
+-	}
+-	p->fts_instr = instr;
+-	return (0);
+-}
+-
+-/*
+- * This is the tricky part -- do not casually change *anything* in here.  The
+- * idea is to build the linked list of entries that are used by fts_children
+- * and fts_read.  There are lots of special cases.
+- *
+- * The real slowdown in walking the tree is the stat calls.  If FTS_NOSTAT is
+- * set and it's a physical walk (so that symbolic links can't be directories),
+- * we can do things quickly.  First, if it's a 4.4BSD file system, the type
+- * of the file is in the directory entry.  Otherwise, we assume that the number
+- * of subdirectories in a node is equal to the number of links to the parent.
+- * The former skips all stat calls.  The latter skips stat calls in any leaf
+- * directories and for any files after the subdirectories in the directory have
+- * been found, cutting the stat calls by about 2/3.
+- */
+-static FTSENT *
+-fts_build(sp, type)
+-	register FTS *sp;
+-	int type;
+-{
+-	register struct dirent *dp;
+-	register FTSENT *p, *head;
+-	register int nitems;
+-	FTSENT *cur, *tail;
+-	DIR *dirp;
+-	void *oldaddr;
+-	int cderrno, descend, len, level, nlinks, saved_errno,
+-	    nostat, doadjust;
+-	size_t maxlen;
+-	char *cp;
+-
+-	/* Set current node pointer. */
+-	cur = sp->fts_cur;
+-
+-	/*
+-	 * Open the directory for reading.  If this fails, we're done.
+-	 * If being called from fts_read, set the fts_info field.
+-	 */
+-       if ((dirp = opendir(cur->fts_accpath)) == NULL) {
+-		if (type == BREAD) {
+-			cur->fts_info = FTS_DNR;
+-			cur->fts_errno = errno;
+-		}
+-		return (NULL);
+-	}
+-
+-	/*
+-	 * Nlinks is the number of possible entries of type directory in the
+-	 * directory if we're cheating on stat calls, 0 if we're not doing
+-	 * any stat calls at all, -1 if we're doing stats on everything.
+-	 */
+-	nlinks = -1;
+-	nostat = 0;
+-
+-	/*
+-	 * If we're going to need to stat anything or we want to descend
+-	 * and stay in the directory, chdir.  If this fails we keep going,
+-	 * but set a flag so we don't chdir after the post-order visit.
+-	 * We won't be able to stat anything, but we can still return the
+-	 * names themselves.  Note, that since fts_read won't be able to
+-	 * chdir into the directory, it will have to return different path
+-	 * names than before, i.e. "a/b" instead of "b".  Since the node
+-	 * has already been visited in pre-order, have to wait until the
+-	 * post-order visit to return the error.  There is a special case
+-	 * here, if there was nothing to stat then it's not an error to
+-	 * not be able to stat.  This is all fairly nasty.  If a program
+-	 * needed sorted entries or stat information, they had better be
+-	 * checking FTS_NS on the returned nodes.
+-	 */
+-	cderrno = 0;
+-	if (nlinks || type == BREAD) {
+-		if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
+-			if (nlinks && type == BREAD)
+-				cur->fts_errno = errno;
+-			cur->fts_flags |= FTS_DONTCHDIR;
+-			descend = 0;
+-			cderrno = errno;
+-			(void)closedir(dirp);
+-			dirp = NULL;
+-		} else
+-			descend = 1;
+-	} else
+-		descend = 0;
+-
+-	/*
+-	 * Figure out the max file name length that can be stored in the
+-	 * current path -- the inner loop allocates more path as necessary.
+-	 * We really wouldn't have to do the maxlen calculations here, we
+-	 * could do them in fts_read before returning the path, but it's a
+-	 * lot easier here since the length is part of the dirent structure.
+-	 *
+-	 * If not changing directories set a pointer so that can just append
+-	 * each new name into the path.
+-	 */
+-	len = NAPPEND(cur);
+-	if (ISSET(FTS_NOCHDIR)) {
+-		cp = sp->fts_path + len;
+-		*cp++ = '/';
+-	} else {
+-		/* GCC, you're too verbose. */
+-		cp = NULL;
+-	}
+-	len++;
+-	maxlen = sp->fts_pathlen - len;
+-
+-	level = cur->fts_level + 1;
+-
+-	/* Read the directory, attaching each entry to the `link' pointer. */
+-	doadjust = 0;
+-	for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
+-		if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
+-			continue;
+-
+-		if ((p = fts_alloc(sp, dp->d_name, (int)_D_EXACT_NAMLEN (dp))) == NULL)
+-			goto mem1;
+-		if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */
+-			oldaddr = sp->fts_path;
+-			if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) {
+-				/*
+-				 * No more memory for path or structures.  Save
+-				 * errno, free up the current structure and the
+-				 * structures already allocated.
+-				 */
+-mem1:				saved_errno = errno;
+-				if (p)
+-					free(p);
+-				fts_lfree(head);
+-				(void)closedir(dirp);
+-				cur->fts_info = FTS_ERR;
+-				SET(FTS_STOP);
+-				errno = saved_errno;
+-				return (NULL);
+-			}
+-			/* Did realloc() change the pointer? */
+-			if (oldaddr != sp->fts_path) {
+-				doadjust = 1;
+-				if (ISSET(FTS_NOCHDIR))
+-					cp = sp->fts_path + len;
+-			}
+-			maxlen = sp->fts_pathlen - len;
+-		}
+-
+-		if (len + _D_EXACT_NAMLEN (dp) >= 0x10000) {
+-			/*
+-			 * In an FTSENT, fts_pathlen is a u_short so it is
+-			 * possible to wraparound here.  If we do, free up
+-			 * the current structure and the structures already
+-			 * allocated, then error out with ENAMETOOLONG.
+-			 */
+-			free(p);
+-			fts_lfree(head);
+-			(void)closedir(dirp);
+-			cur->fts_info = FTS_ERR;
+-			SET(FTS_STOP);
+-			errno = ENAMETOOLONG;
+-			return (NULL);
+-		}
+-		p->fts_level = level;
+-		p->fts_parent = sp->fts_cur;
+-		p->fts_pathlen = len + _D_EXACT_NAMLEN (dp);
+-
+-#if defined FTS_WHITEOUT && 0
+-		if (dp->d_type == DT_WHT)
+-			p->fts_flags |= FTS_ISW;
+-#endif
+-
+-		if (cderrno) {
+-			if (nlinks) {
+-				p->fts_info = FTS_NS;
+-				p->fts_errno = cderrno;
+-			} else
+-				p->fts_info = FTS_NSOK;
+-			p->fts_accpath = cur->fts_accpath;
+-		} else if (nlinks == 0
+-#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
+-			   || (nostat &&
+-			       dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
+-#endif
+-		    ) {
+-			p->fts_accpath =
+-			    ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
+-			p->fts_info = FTS_NSOK;
+-		} else {
+-			/* Build a file name for fts_stat to stat. */
+-			if (ISSET(FTS_NOCHDIR)) {
+-				p->fts_accpath = p->fts_path;
+-				memmove(cp, p->fts_name, p->fts_namelen + 1);
+-			} else
+-				p->fts_accpath = p->fts_name;
+-			/* Stat it. */
+-			p->fts_info = fts_stat(sp, p, 0);
+-
+-			/* Decrement link count if applicable. */
+-			if (nlinks > 0 && (p->fts_info == FTS_D ||
+-			    p->fts_info == FTS_DC || p->fts_info == FTS_DOT))
+-				--nlinks;
+-		}
+-
+-		/* We walk in directory order so "ls -f" doesn't get upset. */
+-		p->fts_link = NULL;
+-		if (head == NULL)
+-			head = tail = p;
+-		else {
+-			tail->fts_link = p;
+-			tail = p;
+-		}
+-		++nitems;
+-	}
+-	if (dirp)
+-		(void)closedir(dirp);
+-
+-	/*
+-	 * If realloc() changed the address of the path, adjust the
+-	 * addresses for the rest of the tree and the dir list.
+-	 */
+-	if (doadjust)
+-		fts_padjust(sp, head);
+-
+-	/*
+-	 * If not changing directories, reset the path back to original
+-	 * state.
+-	 */
+-	if (ISSET(FTS_NOCHDIR)) {
+-		if (len == sp->fts_pathlen || nitems == 0)
+-			--cp;
+-		*cp = '\0';
+-	}
+-
+-	/*
+-	 * If descended after called from fts_children or after called from
+-	 * fts_read and nothing found, get back.  At the root level we use
+-	 * the saved fd; if one of fts_open()'s arguments is a relative path
+-	 * to an empty directory, we wind up here with no other way back.  If
+-	 * can't get back, we're done.
+-	 */
+-	if (descend && nitems == 0 &&
+-	    (cur->fts_level == FTS_ROOTLEVEL ?
+-	     FCHDIR(sp, sp->fts_rfd) :
+-	     fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
+-		cur->fts_info = FTS_ERR;
+-		SET(FTS_STOP);
+-		return (NULL);
+-	}
+-
+-	/* If didn't find anything, return NULL. */
+-	if (!nitems) {
+-		if (type == BREAD)
+-			cur->fts_info = FTS_DP;
+-		return (NULL);
+-	}
+-
+-	/* Sort the entries. */
+-	if (sp->fts_compar && nitems > 1)
+-		head = fts_sort(sp, head, nitems);
+-	return (head);
+-}
+-
+-static u_short
+-fts_stat(sp, p, follow)
+-	FTS *sp;
+-	register FTSENT *p;
+-	int follow;
+-{
+-	register FTSENT *t;
+-	register dev_t dev;
+-	register ino_t ino;
+-	struct stat *sbp;
+-	int saved_errno;
+-
+-	/* If user needs stat info, stat buffer already allocated. */
+-	sbp = p->fts_statp;
+-
+-#if defined FTS_WHITEOUT && 0
+-	/* check for whiteout */
+-	if (p->fts_flags & FTS_ISW) {
+-		if (sbp != &sb) {
+-			memset(sbp, '\0', sizeof (*sbp));
+-			sbp->st_mode = S_IFWHT;
+-		}
+-		return (FTS_W);
+-       }
+-#endif
+-
+-	/*
+-	 * If doing a logical walk, or application requested FTS_FOLLOW, do
+-	 * a stat(2).  If that fails, check for a non-existent symlink.  If
+-	 * fail, set the errno from the stat call.
+-	 */
+-	if (ISSET(FTS_LOGICAL) || follow) {
+-		if (stat(p->fts_accpath, sbp)) {
+-			saved_errno = errno;
+-			if (!lstat(p->fts_accpath, sbp)) {
+-				errno = 0;
+-				return (FTS_SLNONE);
+-			}
+-			p->fts_errno = saved_errno;
+-			goto err;
+-		}
+-	} else if (lstat(p->fts_accpath, sbp)) {
+-		p->fts_errno = errno;
+-err:		memset(sbp, 0, sizeof(struct stat));
+-		return (FTS_NS);
+-	}
+-
+-	if (S_ISDIR(sbp->st_mode)) {
+-		/*
+-		 * Set the device/inode.  Used to find cycles and check for
+-		 * crossing mount points.  Also remember the link count, used
+-		 * in fts_build to limit the number of stat calls.  It is
+-		 * understood that these fields are only referenced if fts_info
+-		 * is set to FTS_D.
+-		 */
+-		dev = p->fts_dev = sbp->st_dev;
+-		ino = p->fts_ino = sbp->st_ino;
+-		p->fts_nlink = sbp->st_nlink;
+-
+-		if (ISDOT(p->fts_name))
+-			return (FTS_DOT);
+-
+-		/*
+-		 * Cycle detection is done by brute force when the directory
+-		 * is first encountered.  If the tree gets deep enough or the
+-		 * number of symbolic links to directories is high enough,
+-		 * something faster might be worthwhile.
+-		 */
+-		for (t = p->fts_parent;
+-		    t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
+-			if (ino == t->fts_ino && dev == t->fts_dev) {
+-				p->fts_cycle = t;
+-				return (FTS_DC);
+-			}
+-		return (FTS_D);
+-	}
+-	if (S_ISLNK(sbp->st_mode))
+-		return (FTS_SL);
+-	if (S_ISREG(sbp->st_mode))
+-		return (FTS_F);
+-	return (FTS_DEFAULT);
+-}
+-
+-static FTSENT *
+-fts_sort(sp, head, nitems)
+-	FTS *sp;
+-	FTSENT *head;
+-	register int nitems;
+-{
+-	register FTSENT **ap, *p;
+-
+-	/*
+-	 * Construct an array of pointers to the structures and call qsort(3).
+-	 * Reassemble the array in the order returned by qsort.  If unable to
+-	 * sort for memory reasons, return the directory entries in their
+-	 * current order.  Allocate enough space for the current needs plus
+-	 * 40 so don't realloc one entry at a time.
+-	 */
+-	if (nitems > sp->fts_nitems) {
+-		struct _ftsent **a;
+-
+-		sp->fts_nitems = nitems + 40;
+-		if ((a = realloc(sp->fts_array,
+- 		    (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
+-			free(sp->fts_array);
+-			sp->fts_array = NULL;
+-			sp->fts_nitems = 0;
+-			return (head);
+-		}
+-		sp->fts_array = a;
+-	}
+-	for (ap = sp->fts_array, p = head; p; p = p->fts_link)
+-		*ap++ = p;
+-	qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
+-	for (head = *(ap = sp->fts_array); --nitems; ++ap)
+-		ap[0]->fts_link = ap[1];
+-	ap[0]->fts_link = NULL;
+-	return (head);
+-}
+-
+-static FTSENT *
+-fts_alloc(sp, name, namelen)
+-	FTS *sp;
+-	const char *name;
+-	register int namelen;
+-{
+-	register FTSENT *p;
+-	size_t len;
+-
+-	/*
+-	 * The file name is a variable length array and no stat structure is
+-	 * necessary if the user has set the nostat bit.  Allocate the FTSENT
+-	 * structure, the file name and the stat structure in one chunk, but
+-	 * be careful that the stat structure is reasonably aligned.  Since the
+-	 * fts_name field is declared to be of size 1, the fts_name pointer is
+-	 * namelen + 2 before the first possible address of the stat structure.
+-	 */
+-	len = sizeof(FTSENT) + namelen;
+-	len += sizeof(struct stat) + ALIGNBYTES;
+-	if ((p = malloc(len)) == NULL)
+-		return (NULL);
+-
+-	/* Copy the name and guarantee NUL termination. */
+-	memmove(p->fts_name, name, namelen);
+-	p->fts_name[namelen] = '\0';
+-
+-	p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
+-	p->fts_namelen = namelen;
+-	p->fts_path = sp->fts_path;
+-	p->fts_errno = 0;
+-	p->fts_flags = 0;
+-	p->fts_instr = FTS_NOINSTR;
+-	p->fts_number = 0;
+-	p->fts_pointer = NULL;
+-	return (p);
+-}
+-
+-static void
+-fts_lfree(head)
+-	register FTSENT *head;
+-{
+-	register FTSENT *p;
+-
+-	/* Free a linked list of structures. */
+-	while ((p = head)) {
+-		head = head->fts_link;
+-		free(p);
+-	}
+-}
+-
+-/*
+- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
+- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
+- * though the kernel won't resolve them.  Add the size (not just what's needed)
+- * plus 256 bytes so don't realloc the path 2 bytes at a time.
+- */
+-static int
+-fts_palloc(sp, more)
+-	FTS *sp;
+-	size_t more;
+-{
+-	char *p;
+-
+-	sp->fts_pathlen += more + 256;
+-	/*
+-	 * Check for possible wraparound.  In an FTS, fts_pathlen is
+-	 * a signed int but in an FTSENT it is an unsigned short.
+-	 * We limit fts_pathlen to USHRT_MAX to be safe in both cases.
+-	 */
+-	if (sp->fts_pathlen < 0 || sp->fts_pathlen >= 0x10000) {
+-		if (sp->fts_path) {
+-			free(sp->fts_path);
+-			sp->fts_path = NULL;
+-		}
+-		sp->fts_path = NULL;
+-		errno = ENAMETOOLONG;
+-		return (1);
+-	}
+-	p = realloc(sp->fts_path, sp->fts_pathlen);
+-	if (p == NULL) {
+-		free(sp->fts_path);
+-		sp->fts_path = NULL;
+-		return 1;
+-	}
+-	sp->fts_path = p;
+-	return 0;
+-}
+-
+-/*
+- * When the path is realloc'd, have to fix all of the pointers in structures
+- * already returned.
+- */
+-static void
+-fts_padjust(sp, head)
+-	FTS *sp;
+-	FTSENT *head;
+-{
+-	FTSENT *p;
+-	char *addr = sp->fts_path;
+-
+-#define	ADJUST(p) do {							\
+-	if ((p)->fts_accpath != (p)->fts_name) {			\
+-		(p)->fts_accpath =					\
+-		    (char *)addr + ((p)->fts_accpath - (p)->fts_path);	\
+-	}								\
+-	(p)->fts_path = addr;						\
+-} while (0)
+-	/* Adjust the current set of children. */
+-	for (p = sp->fts_child; p; p = p->fts_link)
+-		ADJUST(p);
+-
+-	/* Adjust the rest of the tree, including the current level. */
+-	for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
+-		ADJUST(p);
+-		p = p->fts_link ? p->fts_link : p->fts_parent;
+-	}
+-}
+-
+-static size_t
+-fts_maxarglen(argv)
+-	char * const *argv;
+-{
+-	size_t len, max;
+-
+-	for (max = 0; *argv; ++argv)
+-		if ((len = strlen(*argv)) > max)
+-			max = len;
+-	return (max + 1);
+-}
+-
+-/*
+- * Change to dir specified by fd or p->fts_accpath without getting
+- * tricked by someone changing the world out from underneath us.
+- * Assumes p->fts_dev and p->fts_ino are filled in.
+- */
+-static int
+-fts_safe_changedir(sp, p, fd, path)
+-	FTS *sp;
+-	FTSENT *p;
+-	int fd;
+-	const char *path;
+-{
+-	int ret, oerrno, newfd;
+-	struct stat sb;
+-
+-	newfd = fd;
+-	if (ISSET(FTS_NOCHDIR))
+-		return (0);
+-	if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0)
+-		return (-1);
+-	if (fstat(newfd, &sb)) {
+-		ret = -1;
+-		goto bail;
+-	}
+-	if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) {
+-		errno = ENOENT;		/* disinformation */
+-		ret = -1;
+-		goto bail;
+-	}
+-	ret = fchdir(newfd);
+-bail:
+-	oerrno = errno;
+-	if (fd < 0)
+-		(void)close(newfd);
+-	errno = oerrno;
+-	return (ret);
+-}
+diff --git a/lib/fts.h b/lib/fts.h
+deleted file mode 100644
+index 58846b9..0000000
+--- a/lib/fts.h
++++ /dev/null
+@@ -1,131 +0,0 @@
+-/*
+- * Copyright (c) 1989, 1993
+- *	The Regents of the University of California.  All rights reserved.
+- *
+- * Redistribution and use in source and binary forms, with or without
+- * modification, are permitted provided that the following conditions
+- * are met:
+- * 1. Redistributions of source code must retain the above copyright
+- *    notice, this list of conditions and the following disclaimer.
+- * 2. Redistributions in binary form must reproduce the above copyright
+- *    notice, this list of conditions and the following disclaimer in the
+- *    documentation and/or other materials provided with the distribution.
+- * 4. Neither the name of the University nor the names of its contributors
+- *    may be used to endorse or promote products derived from this software
+- *    without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+- * SUCH DAMAGE.
+- *
+- *	@(#)fts.h	8.3 (Berkeley) 8/14/94
+- */
+-
+-#ifndef	_FTS_H
+-#define	_FTS_H 1
+-
+-#include <features.h>
+-#include <sys/types.h>
+-
+-typedef struct {
+-	struct _ftsent *fts_cur;	/* current node */
+-	struct _ftsent *fts_child;	/* linked list of children */
+-	struct _ftsent **fts_array;	/* sort array */
+-	dev_t fts_dev;			/* starting device # */
+-	char *fts_path;			/* path for this descent */
+-	int fts_rfd;			/* fd for root */
+-	int fts_pathlen;		/* sizeof(path) */
+-	int fts_nitems;			/* elements in the sort array */
+-	int (*fts_compar) (const void *, const void *); /* compare fn */
+-
+-#define	FTS_COMFOLLOW	0x0001		/* follow command line symlinks */
+-#define	FTS_LOGICAL	0x0002		/* logical walk */
+-#define	FTS_NOCHDIR	0x0004		/* don't change directories */
+-#define	FTS_NOSTAT	0x0008		/* don't get stat info */
+-#define	FTS_PHYSICAL	0x0010		/* physical walk */
+-#define	FTS_SEEDOT	0x0020		/* return dot and dot-dot */
+-#define	FTS_XDEV	0x0040		/* don't cross devices */
+-#define FTS_WHITEOUT	0x0080		/* return whiteout information */
+-#define	FTS_OPTIONMASK	0x00ff		/* valid user option mask */
+-
+-#define	FTS_NAMEONLY	0x0100		/* (private) child names only */
+-#define	FTS_STOP	0x0200		/* (private) unrecoverable error */
+-	int fts_options;		/* fts_open options, global flags */
+-} FTS;
+-
+-typedef struct _ftsent {
+-	struct _ftsent *fts_cycle;	/* cycle node */
+-	struct _ftsent *fts_parent;	/* parent directory */
+-	struct _ftsent *fts_link;	/* next file in directory */
+-	long fts_number;	        /* local numeric value */
+-	void *fts_pointer;	        /* local address value */
+-	char *fts_accpath;		/* access path */
+-	char *fts_path;			/* root path */
+-	int fts_errno;			/* errno for this node */
+-	int fts_symfd;			/* fd for symlink */
+-	u_short fts_pathlen;		/* strlen(fts_path) */
+-	u_short fts_namelen;		/* strlen(fts_name) */
+-
+-	ino_t fts_ino;			/* inode */
+-	dev_t fts_dev;			/* device */
+-	nlink_t fts_nlink;		/* link count */
+-
+-#define	FTS_ROOTPARENTLEVEL	-1
+-#define	FTS_ROOTLEVEL		 0
+-	short fts_level;		/* depth (-1 to N) */
+-
+-#define	FTS_D		 1		/* preorder directory */
+-#define	FTS_DC		 2		/* directory that causes cycles */
+-#define	FTS_DEFAULT	 3		/* none of the above */
+-#define	FTS_DNR		 4		/* unreadable directory */
+-#define	FTS_DOT		 5		/* dot or dot-dot */
+-#define	FTS_DP		 6		/* postorder directory */
+-#define	FTS_ERR		 7		/* error; errno is set */
+-#define	FTS_F		 8		/* regular file */
+-#define	FTS_INIT	 9		/* initialized only */
+-#define	FTS_NS		10		/* stat(2) failed */
+-#define	FTS_NSOK	11		/* no stat(2) requested */
+-#define	FTS_SL		12		/* symbolic link */
+-#define	FTS_SLNONE	13		/* symbolic link without target */
+-#define FTS_W		14		/* whiteout object */
+-	u_short fts_info;		/* user flags for FTSENT structure */
+-
+-#define	FTS_DONTCHDIR	 0x01		/* don't chdir .. to the parent */
+-#define	FTS_SYMFOLLOW	 0x02		/* followed a symlink to get here */
+-	u_short fts_flags;		/* private flags for FTSENT structure */
+-
+-#define	FTS_AGAIN	 1		/* read node again */
+-#define	FTS_FOLLOW	 2		/* follow symbolic link */
+-#define	FTS_NOINSTR	 3		/* no instructions */
+-#define	FTS_SKIP	 4		/* discard node */
+-	u_short fts_instr;		/* fts_set() instructions */
+-
+-	struct stat *fts_statp;		/* stat(2) information */
+-	char fts_name[1];		/* file name */
+-} FTSENT;
+-
+-__BEGIN_DECLS
+-
+-#define fts_children pax_fts_children
+-#define fts_close pax_fts_close
+-#define fts_open pax_fts_open
+-#define fts_read pax_fts_read
+-#define fts_set pax_fts_set
+-
+-FTSENT	*fts_children (FTS *, int);
+-int	 fts_close (FTS *);
+-FTS	*fts_open (char * const *, int,
+-		   int (*)(const FTSENT **, const FTSENT **));
+-FTSENT	*fts_read (FTS *);
+-int	 fts_set (FTS *, FTSENT *, int) __THROW;
+-__END_DECLS
+-
+-#endif /* fts.h */
+diff --git a/lib/vis.h b/lib/vis.h
+index d34d342..71fa5f4 100644
+--- a/lib/vis.h
++++ b/lib/vis.h
+@@ -73,14 +73,19 @@
+  */
+ #define	UNVIS_END	1	/* no more characters */
+ 
+-#include <sys/cdefs.h>
++#ifndef __P
++#define __P(x) x
++#endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ char	*vis __P((char *, int, int, int));
+ int	strvis __P((char *, const char *, int));
+ int	strvisx __P((char *, const char *, size_t, int));
+ int	strunvis __P((char *, const char *));
+ int	unvis __P((char *, char, int *, int));
+-__END_DECLS
+-
++#ifdef __cplusplus
++}
++#endif
+ #endif /* !_VIS_H_ */
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 5ef52a3..227cdef 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -22,4 +22,4 @@ pax_SOURCES = ar_io.c ar_subs.c buf_subs.c cache.c cpio.c\
+ 	file_subs.c ftree.c gen_subs.c getoldopt.c options.c\
+ 	pat_rep.c pax.c sel_subs.c tables.c tar.c tty_subs.c
+ 
+-pax_LDADD = $(top_builddir)/lib/libbsdfunc.a
++pax_LDADD = $(top_builddir)/lib/libbsdfunc.a -lfts
+diff --git a/src/extern.h b/src/extern.h
+index 361fa81..3ed365d 100644
+--- a/src/extern.h
++++ b/src/extern.h
+@@ -37,8 +37,6 @@
+  * External references from each source file
+  */
+ 
+-#include <sys/cdefs.h>
+-
+ /*
+  * ar_io.c
+  */
+diff --git a/src/file_subs.c b/src/file_subs.c
+index 5590ff1..15bc339 100644
+--- a/src/file_subs.c
++++ b/src/file_subs.c
+@@ -52,7 +52,7 @@
+ #include "extern.h"
+ 
+ static int
+-mk_link __P((register char *,register struct stat *,register char *, int));
++mk_link (register char *,register struct stat *,register char *, int);
+ 
+ /*
+  * routines that deal with file operations such as: creating, removing;
+diff --git a/src/tables.c b/src/tables.c
+index 2275bf7..8fddca4 100644
+--- a/src/tables.c
++++ b/src/tables.c
+@@ -39,7 +39,7 @@
+ #include <sys/time.h>
+ #include <sys/stat.h>
+ #include <sys/param.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+-- 
+2.6.4
+
meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch new file +33 -0
new file mode 100644
index 0000000..58ac9ce
@@ -0,0 +1,33 @@
+From b1f50320332c9c90fa33ab136ef0ec2d12cda461 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 6 Jan 2016 12:30:52 -0800
+Subject: [PATCH] use strtoll instead of strtoq
+
+Use LLONG_MAX instead of LONG_LONG_MAX
+LONG_LONG_MAX is GNU specific
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ src/options.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/options.c b/src/options.c
+index da8b4cf..c663b4e 100644
+--- a/src/options.c
++++ b/src/options.c
+@@ -1547,8 +1547,8 @@ str_offt (char *val)
+ 
+ #if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
+     || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+-  num = strtoq (val, &expr, 0);
+-  if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
++  num = strtoll (val, &expr, 0);
++  if ((num == LLONG_MAX) || (num <= 0) || (expr == val))
+ #else
+   num = strtol (val, &expr, 0);
+   if ((num == LONG_MAX) || (num <= 0) || (expr == val))
+-- 
+2.6.4
+
meta/recipes-extended/pax/pax_3.4.bb +10 -0
index ad04871..cee52e3 100644
@@ -12,11 +12,21 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \
 SECTION = "base"
 PR = "r2"
 
+DEPENDS_append_libc-musl = " fts "
+
 SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.bz2/fbd9023b590b45ac3ade95870702a0d6/${BP}.tar.bz2 \
 	file://fix_for_compile_with_gcc-4.6.0.patch \
 	file://pax-3.4_fix_for_x32.patch"
 
+SRC_URI_append_libc-musl = " file://0001-Fix-build-with-musl.patch \
+                             file://0001-use-strtoll-instead-of-strtoq.patch \
+                           "
+
 SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6"
 SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b"
 
+# see https://lists.yoctoproject.org/pipermail/poky/2013-December/009435.html
+# We should ideally drop ac_cv_sizeof_off_t from site files but until then
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)}"
+
 inherit autotools
Signature · 1 line
2.7.0
author
#48 lore raw

PATCH 38/73 iputils: Use member based initialization for mrghdr struct

In reply to Khem Raj

Fix build with musl

uclibc and glibc dont agree on structure of the struct, musl rightly adds padding elements, so when doing anonymous initialization struct elements gets wrongly mapped on 64bit arches

---
 .../files/0001-Fix-header-inclusion-for-musl.patch | 92 ++++++++++++++++++++++
 .../0001-Intialize-struct-elements-by-name.patch   | 52 ++++++++++++
 meta/recipes-extended/iputils/iputils_s20151218.bb |  2 +
 3 files changed, 146 insertions(+)
 create mode 100644 meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
 create mode 100644 meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch new file +92 -0
new file mode 100644
index 0000000..20ef07e
@@ -0,0 +1,92 @@
+From be0bb81d72fea4d20da74f4f2236aa145684f332 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 6 Jan 2016 14:14:22 -0800
+Subject: [PATCH] Fix header inclusion for musl
+
+Fix errors e.g.
+
+In file included from tracepath.c:17:0:
+/usr/include/linux/errqueue.h:33:18:
+error: array type has incomplete element type 'struct timespec'
+  struct timespec ts[3];
+                  ^
+tracepath.c: In function 'main':
+tracepath.c:329:16: error: 'INT_MAX' undeclared (first use in this
+function)
+      overhead, INT_MAX);
+                ^
+tracepath.c:329:16: note: each undeclared identifier is reported only
+once for each function it appears in
+Makefile:131: recipe for target 'tracepath.o' failed
+make: *** [tracepath.o] Error 1
+
+ping_common.c: In function 'main_loop':
+ping_common.c:756:15: error: 'HZ' undeclared (first use in this
+function)
+    if (1000 % HZ == 0 ? next <= 1000 / HZ : (next < INT_MAX / HZ &&
+next * HZ <= 1000)) {
+
+protocols/timed.h is not needed and is absent in musl
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ clockdiff.c   | 1 -
+ ping_common.c | 1 +
+ tracepath.c   | 2 ++
+ tracepath6.c  | 1 +
+ 4 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/clockdiff.c b/clockdiff.c
+index 7c1ea1b..1d6341e 100644
+--- a/clockdiff.c
++++ b/clockdiff.c
+@@ -14,7 +14,6 @@
+ #include <netinet/ip.h>
+ #include <netinet/ip_icmp.h>
+ #define TSPTYPES
+-#include <protocols/timed.h>
+ #include <fcntl.h>
+ #include <netdb.h>
+ #include <arpa/inet.h>
+diff --git a/ping_common.c b/ping_common.c
+index 7f82851..3ce699d 100644
+--- a/ping_common.c
++++ b/ping_common.c
+@@ -2,6 +2,7 @@
+ #include <ctype.h>
+ #include <sched.h>
+ #include <math.h>
++#include <asm-generic/param.h>
+ 
+ int options;
+ 
+diff --git a/tracepath.c b/tracepath.c
+index 89e6d16..c9d6ddd 100644
+--- a/tracepath.c
++++ b/tracepath.c
+@@ -12,6 +12,8 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <limits.h>
++#include <time.h>
+ #include <sys/socket.h>
+ #include <linux/types.h>
+ #include <linux/errqueue.h>
+diff --git a/tracepath6.c b/tracepath6.c
+index 126fadf..9d5745c 100644
+--- a/tracepath6.c
++++ b/tracepath6.c
+@@ -12,6 +12,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <limits.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <netinet/icmp6.h>
+-- 
+2.6.4
+
meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch new file +52 -0

52 lines not on this page · raw message

meta/recipes-extended/iputils/iputils_s20151218.bb +2 -0
index 4c3523d..62c3c81 100644
@@ -18,6 +18,8 @@ SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
            file://debian/use_gethostbyname2.diff \
            file://debian/targets.diff \
            file://nsgmls-path-fix.patch \
+           file://0001-Fix-header-inclusion-for-musl.patch \
+           file://0001-Intialize-struct-elements-by-name.patch \
           "
 
 SRC_URI[md5sum] = "8aaa7395f27dff9f57ae016d4bc753ce"
Signature · 1 line
2.7.0
author
#49 lore raw

PATCH 39/73 libuser: Fix build when secure getenv is not there

In reply to Khem Raj

Fixes build on musl

---
 .../libuser/libuser/0001-Check-for-issetugid.patch | 62 ++++++++++++++++++++++
 .../libuser/0002-remove-unused-execinfo.h.patch    | 27 ++++++++++
 meta/recipes-extended/libuser/libuser_0.62.bb      |  4 +-
 3 files changed, 92 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch
 create mode 100644 meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch
meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch new file +62 -0
new file mode 100644
index 0000000..79756b9
@@ -0,0 +1,62 @@
+From d0537cb7f2dc5877700ad78dfd191515379d4edc Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 7 Jan 2016 02:22:51 +0000
+Subject: [PATCH 1/2] Check for issetugid()
+
+If secure version of getenv is not there then we can use
+issetugid() as aid to call getenv()
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ configure.ac |  1 +
+ lib/config.c | 12 +++++++++++-
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1ded1a2..ee19e1f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -125,6 +125,7 @@ AC_TYPE_OFF_T
+ AC_TYPE_SIZE_T
+ 
+ AC_CHECK_FUNCS([__secure_getenv secure_getenv])
++AC_CHECK_FUNCS([issetugid])
+ 
+ # Modify CFLAGS after all tests are run (some of them could fail because
+ # of the -Werror).
+diff --git a/lib/config.c b/lib/config.c
+index 29e7120..30f9daf 100644
+--- a/lib/config.c
++++ b/lib/config.c
+@@ -44,8 +44,10 @@
+ #  define safe_getenv(string) secure_getenv(string)
+ #elif defined(HAVE___SECURE_GETENV)
+ #  define safe_getenv(string) __secure_getenv(string)
++#elif defined(HAVE_ISSETUGID)
++#  define safe_getenv(string) safe_getenv_issetugid(string)
+ #else
+-#  error Neither secure_getenv not __secure_getenv are available
++#  error None of secure_getenv, __secure_getenv, or issetugid is available
+ #endif
+ 
+ struct config_config {
+@@ -59,6 +61,14 @@ struct config_key {
+ 	GList *values;
+ };
+ 
++static const char*
++safe_getenv_issetugid(const char* name)
++{
++	if (issetugid ())
++		return 0;
++	return getenv (name);
++}
++
+ /* Compare two section names */
+ static int
+ compare_section_names(gconstpointer a, gconstpointer b)
+-- 
+2.7.0
+
meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch new file +27 -0
new file mode 100644
index 0000000..4bc0219
@@ -0,0 +1,27 @@
+From 4b2f81f307ffeac12956e5c16e894e5ebb937ea5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 7 Jan 2016 02:26:00 +0000
+Subject: [PATCH 2/2] remove unused execinfo.h
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ lib/error.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/lib/error.c b/lib/error.c
+index a5ec30a..443e601 100644
+--- a/lib/error.c
++++ b/lib/error.c
+@@ -18,7 +18,6 @@
+ #include <config.h>
+ #include <sys/types.h>
+ #include <errno.h>
+-#include <execinfo.h>
+ #include <libintl.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
+-- 
+2.7.0
+
meta/recipes-extended/libuser/libuser_0.62.bb +3 -1
index 4caa8a1..2d5bd35 100644
@@ -12,7 +12,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
 SECTION = "base"
 
 SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz \
-           "
+           file://0001-Check-for-issetugid.patch \
+           file://0002-remove-unused-execinfo.h.patch \
+          "
 
 SRC_URI[md5sum] = "63e5e5c551e99dc5302b40b80bd6d4f2"
 SRC_URI[sha256sum] = "a58ff4fabb01a25043b142185a33eeea961109dd60d4b40b6a9df4fa3cace20b"
Signature · 1 line
2.7.0
author
#50 lore raw

PATCH 40/73 iproute2: Fix build with musl

In reply to Khem Raj
---
 .../iproute2/iproute2/iproute2-4.3.0-musl.patch    | 97 ++++++++++++++++++++++
 .../iproute2/iproute2_4.3.0.bb                     |  1 +
 2 files changed, 98 insertions(+)
 create mode 100644 meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch
meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch new file +97 -0
new file mode 100644
index 0000000..1b415a5
@@ -0,0 +1,97 @@
+From 48596709d8ab59727b79a5c6db33ebb251c36543 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Thu, 19 Nov 2015 17:44:25 +0100
+Subject: [PATCH] Avoid in6_addr redefinition
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Due to both <netinet/in.h> and <linux/in6.h> being included, the
+in6_addr is being redefined: once from the C library headers and once
+from the kernel headers. This causes some build failures with for
+example the musl C library:
+
+In file included from ../include/linux/xfrm.h:4:0,
+                 from xfrm.h:29,
+                 from ipxfrm.c:39:
+../include/linux/in6.h:32:8: error: redefinition of ‘struct in6_addr’
+ struct in6_addr {
+        ^
+In file included from .../output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netdb.h:9:0,
+                 from ipxfrm.c:34:
+.../output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:24:8: note: originally defined here
+ struct in6_addr
+        ^
+
+In order to fix this, use just the C library header <netinet/in.h>.
+
+Original patch taken from
+http://git.alpinelinux.org/cgit/aports/tree/main/iproute2/musl-fixes.patch.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+Upstream-Status: Pending
+
+ include/libiptc/ipt_kernel_headers.h | 2 --
+ include/linux/if_bridge.h            | 1 -
+ include/linux/netfilter.h            | 2 --
+ include/linux/xfrm.h                 | 1 -
+ 4 files changed, 6 deletions(-)
+
+diff --git a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h
+index 7e87828..9566be5 100644
+--- a/include/libiptc/ipt_kernel_headers.h
++++ b/include/libiptc/ipt_kernel_headers.h
+@@ -15,12 +15,10 @@
+ #else /* libc5 */
+ #include <sys/socket.h>
+ #include <linux/ip.h>
+-#include <linux/in.h>
+ #include <linux/if.h>
+ #include <linux/icmp.h>
+ #include <linux/tcp.h>
+ #include <linux/udp.h>
+ #include <linux/types.h>
+-#include <linux/in6.h>
+ #endif
+ #endif
+diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
+index ee197a3..f823aa4 100644
+--- a/include/linux/if_bridge.h
++++ b/include/linux/if_bridge.h
+@@ -15,7 +15,6 @@
+ 
+ #include <linux/types.h>
+ #include <linux/if_ether.h>
+-#include <linux/in6.h>
+ 
+ #define SYSFS_BRIDGE_ATTR	"bridge"
+ #define SYSFS_BRIDGE_FDB	"brforward"
+diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
+index b71b4c9..3e4e6ae 100644
+--- a/include/linux/netfilter.h
++++ b/include/linux/netfilter.h
+@@ -4,8 +4,6 @@
+ #include <linux/types.h>
+ 
+ #include <linux/sysctl.h>
+-#include <linux/in.h>
+-#include <linux/in6.h>
+ 
+ /* Responses from hook functions. */
+ #define NF_DROP 0
+diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
+index b8f5451..a9761a5 100644
+--- a/include/linux/xfrm.h
++++ b/include/linux/xfrm.h
+@@ -1,7 +1,6 @@
+ #ifndef _LINUX_XFRM_H
+ #define _LINUX_XFRM_H
+ 
+-#include <linux/in6.h>
+ #include <linux/types.h>
+ 
+ /* All of the structures in this file may not change size as they are
+-- 
+2.6.3
+
meta/recipes-connectivity/iproute2/iproute2_4.3.0.bb +1 -0
index 0b3d896..60f0a8d 100644
@@ -3,6 +3,7 @@ require iproute2.inc
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
            file://configure-cross.patch \
            file://0001-iproute2-de-bash-scripts.patch \
+           file://iproute2-4.3.0-musl.patch \
           "
 SRC_URI[md5sum] = "1a2bbb80cfc7ab3f3e987e18b3207c2f"
 SRC_URI[sha256sum] = "f03b1188dd6c039512424de82ff7a8f3b446680bd4e908ff42a7b9b137422995"
Signature · 1 line
2.7.0
author
#51 lore raw

PATCH 41/73 irda-utils: Fix header inclusions

In reply to Khem Raj

Helps compile with musl

---
 .../irda-utils/irda-utils-0.9.18/musl.patch        | 29 ++++++++++++++++++++++
 .../irda-utils/irda-utils_0.9.18.bb                |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch
meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch new file +29 -0
new file mode 100644
index 0000000..97eb975
@@ -0,0 +1,29 @@
+Replace use of <net/if_packet.h> with <linux/if_packet.h>.
+
+kernel headers <linux/if_packet.h> already provides the
+needed definitions, moreover not all libc implementations
+provide if_packet.h e.g. musl
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Pending
+
+Index: irda-utils-0.9.18/irdaping/irdaping.c
+===================================================================
+--- irda-utils-0.9.18.orig/irdaping/irdaping.c
++++ irda-utils-0.9.18/irdaping/irdaping.c
+@@ -33,7 +33,6 @@
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <net/if.h>		/* For struct ifreq */
+-#include <net/if_packet.h>	/* For struct sockaddr_pkt */
+ #include <net/if_arp.h>		/* For ARPHRD_IRDA */
+ #include <netinet/if_ether.h>	/* For ETH_P_ALL */
+ #include <netinet/in.h>		/* For htons */
+@@ -46,6 +45,7 @@
+ #include <asm/byteorder.h>	/* __cpu_to_le32 and co. */
+ 
+ #include <linux/types.h>	/* For __u8 and co. */
++#include <linux/if_packet.h>	/* For struct sockaddr_pkt */
+ #include <irda.h>
+ 
+ #ifndef AF_IRDA
meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb +1 -0
index bd2f815..11b2ee9 100644
@@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = "file://irdadump/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \
            file://ldflags.patch \
+           file://musl.patch \
            file://init"
 
 SRC_URI[md5sum] = "84dc12aa4c3f61fccb8d8919bf4079bb"
Signature · 1 line
2.7.0
author
#52 lore raw

PATCH 42/73 nspr: Drop older glibc code

In reply to Khem Raj

This was not only getting included for libc5 but also for not-glibc libc implementations e.g. musl

---
 ...001-Remove-the-check-for-LINUX-glibc-case.patch | 35 ++++++++++++++++++++++
 meta/recipes-support/nspr/nspr_4.11.bb             |  9 ++++++
 2 files changed, 44 insertions(+)
 create mode 100644 meta/recipes-support/nspr/nspr/0001-Remove-the-check-for-LINUX-glibc-case.patch
meta/recipes-support/nspr/nspr/0001-Remove-the-check-for-LINUX-glibc-case.patch new file +35 -0
new file mode 100644
index 0000000..5b17355
@@ -0,0 +1,35 @@
+From 9b9c95e0390395c7e9ad24a882deb87a50846059 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 8 Aug 2015 17:10:34 -0700
+Subject: [PATCH] Remove the check for LINUX == glibc case
+
+Here it does not consider the case where musl can be an options it does
+consider the bionic case with !defined(ANDROID) but musl does not define
+and musl'ism defines like that
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ pr/src/misc/prnetdb.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/pr/src/misc/prnetdb.c b/pr/src/misc/prnetdb.c
+index b86248f..dc83a56 100644
+--- a/pr/src/misc/prnetdb.c
++++ b/pr/src/misc/prnetdb.c
+@@ -61,10 +61,7 @@ PRLock *_pr_dnsLock = NULL;
+ #define _PR_HAVE_GETPROTO_R_POINTER
+ #endif
+ 
+-#if defined(SOLARIS) || (defined(BSDI) && defined(_REENTRANT)) \
+-	|| (defined(LINUX) && defined(_REENTRANT) \
+-        && !(defined(__GLIBC__) && __GLIBC__ >= 2) \
+-        && !defined(ANDROID))
++#if defined(SOLARIS) || (defined(BSDI) && defined(_REENTRANT))
+ #define _PR_HAVE_GETPROTO_R
+ #define _PR_HAVE_GETPROTO_R_POINTER
+ #endif
+-- 
+2.1.4
+
meta/recipes-support/nspr/nspr_4.11.bb +9 -0
index 3048641..3dabcb6 100644
@@ -13,6 +13,15 @@ SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz
 
 SRC_URI += "file://nspr.pc.in"
 
+CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \
+                                          -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
+                                          -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \
+                                          -D_PR_INET6_PROBE'"
+
+SRC_URI_append_libc-musl = "\
+        file://0001-Remove-the-check-for-LINUX-glibc-case.patch \
+        "
+
 UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
 UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
 
Signature · 1 line
2.7.0
author
#53 lore raw

PATCH 43/73 chkconfig: Avoid using caddr_t

In reply to Khem Raj
---
 .../chkconfig/chkconfig/replace_caddr_t.patch      | 33 ++++++++++++++++++++++
 .../recipes-extended/chkconfig/chkconfig_1.3.58.bb |  4 ++-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch
meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch new file +33 -0
new file mode 100644
index 0000000..96d1938
@@ -0,0 +1,33 @@
+caddr_t is a legacy BSD type which was rejected by the POSIX standard.
+Use void * instead.
+
+sys/unitstd.h is not needed and moreover its not available on all C library
+implementations e.g. musl
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+Index: chkconfig-1.3.58/alternatives.c
+===================================================================
+--- chkconfig-1.3.58.orig/alternatives.c
++++ chkconfig-1.3.58/alternatives.c
+@@ -22,7 +22,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/stat.h>
+-#include <sys/unistd.h>
+ #include <unistd.h>
+ 
+ #define	FLAGS_TEST	(1 << 0)
+Index: chkconfig-1.3.58/leveldb.c
+===================================================================
+--- chkconfig-1.3.58.orig/leveldb.c
++++ chkconfig-1.3.58/leveldb.c
+@@ -442,7 +442,7 @@ int parseServiceInfo(int fd, char * name
+     fstat(fd, &sb);
+ 
+     bufstart = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
+-    if (bufstart == ((caddr_t) -1)) {
++    if (bufstart == ((void*) -1)) {
+ 	close(fd);
+ 	return -1;
+     }
meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb +3 -1
index 488847a..e839026 100644
@@ -16,7 +16,9 @@ PROVIDES += "virtual/update-alternatives"
 
 PR = "r7"
 
-SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2"
+SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2 \
+           file://replace_caddr_t.patch \
+          "
 
 SRC_URI[md5sum] = "c2039ca67f2749fe0c06ef7c6f8ee246"
 SRC_URI[sha256sum] = "18b497d25b2cada955c72810e45fcad8280d105f17cf45e2970f18271211de68"
Signature · 1 line
2.7.0
author
#54 lore raw

PATCH 44/73 tcf-agent: Implement canonicalize_file_name() for musl as well

In reply to Khem Raj
---
 ...nonicalize_file_name-is-specific-to-glibc.patch | 46 ++++++++++++++++++++++
 meta/recipes-devtools/tcf-agent/tcf-agent_git.bb   |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 meta/recipes-devtools/tcf-agent/tcf-agent/0001-canonicalize_file_name-is-specific-to-glibc.patch
meta/recipes-devtools/tcf-agent/tcf-agent/0001-canonicalize_file_name-is-specific-to-glibc.patch new file +46 -0
new file mode 100644
index 0000000..5f93c46
@@ -0,0 +1,46 @@
+From 23a3759b74d081b3b2849b0d37a0e5219f37813e Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 7 Jan 2016 22:37:48 +0000
+Subject: [PATCH] canonicalize_file_name is specific to glibc
+
+When on Linux and not using glibc then we need to define
+canonicalize_file_name() API, therefore add a check for finding out if
+its not glibc
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ agent/tcf/framework/mdep.c | 2 +-
+ agent/tcf/framework/mdep.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/agent/tcf/framework/mdep.c b/agent/tcf/framework/mdep.c
+index 2b52ca8..7d09655 100644
+--- a/agent/tcf/framework/mdep.c
++++ b/agent/tcf/framework/mdep.c
+@@ -1042,7 +1042,7 @@ char * canonicalize_file_name(const char * path) {
+     return strdup(res);
+ }
+ 
+-#elif defined(__UCLIBC__)
++#elif defined(__UCLIBC__) || !defined(__GLIBC__)
+ 
+ char * canonicalize_file_name(const char * path) {
+     return realpath(path, NULL);
+diff --git a/agent/tcf/framework/mdep.h b/agent/tcf/framework/mdep.h
+index 1e718a2..187c399 100644
+--- a/agent/tcf/framework/mdep.h
++++ b/agent/tcf/framework/mdep.h
+@@ -276,7 +276,7 @@ extern int loc_clock_gettime(int, struct timespec *);
+ 
+ #define O_BINARY 0
+ 
+-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || !defined(__GLIBC__)
+ #  define O_LARGEFILE 0
+ extern char ** environ;
+ extern char * canonicalize_file_name(const char * path);
+-- 
+2.7.0
+
meta/recipes-devtools/tcf-agent/tcf-agent_git.bb +1 -0
index fff81a5..ab2fcd7 100644
@@ -12,6 +12,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
 SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git;branch=1.3_mars_bugfix \
            file://fix_ranlib.patch \
            file://ldflags.patch \
+           file://0001-canonicalize_file_name-is-specific-to-glibc.patch;striplevel=2 \
            file://tcf-agent.init \
            file://tcf-agent.service \
           "
Signature · 1 line
2.7.0
author
#55 lore raw

PATCH 45/73 bsd-headers, musl: Add recipe for bsd missing features

In reply to Khem Raj

let musl depend on these headers so they are staged along with libc

---
 meta/recipes-core/bsd-headers/bsd-headers.bb       |  25 +
 .../bsd-headers/bsd-headers/sys-queue.h            | 846 +++++++++++++++++++++
 .../bsd-headers/bsd-headers/sys-tree.h             | 761 ++++++++++++++++++
 meta/recipes-core/musl/musl_git.bb                 |   1 +
 4 files changed, 1633 insertions(+)
 create mode 100644 meta/recipes-core/bsd-headers/bsd-headers.bb
 create mode 100644 meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h
 create mode 100644 meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h
meta/recipes-core/bsd-headers/bsd-headers.bb new file +25 -0
new file mode 100644
index 0000000..ae659ab
@@ -0,0 +1,25 @@
+# Copyright (C) 2016 Khem Raj <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "bsd compatible headers"
+LICENSE = "BSD-3-Clause && BSD-2-Clause"
+SECTION = "devel"
+
+SRC_URI = "file://sys-queue.h \
+           file://sys-tree.h \
+          "
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+S = "${WORKDIR}"
+
+do_install() {
+	install -Dm 0644 ${S}/sys-queue.h ${D}${includedir}/sys/queue.h
+	install -Dm 0644 ${S}/sys-tree.h ${D}${includedir}/sys/tree.h
+}
+#
+# We will skip parsing for non-musl systems
+#
+COMPATIBLE_HOST = ".*-musl.*"
meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h new file +846 -0

846 lines not on this page · raw message

meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h new file +761 -0

761 lines not on this page · raw message

meta/recipes-core/musl/musl_git.bb +1 -0
index 051d925..5b94d1f 100644
@@ -19,6 +19,7 @@ PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv
 DEPENDS = "virtual/${TARGET_PREFIX}binutils \
            virtual/${TARGET_PREFIX}gcc-initial \
            libgcc-initial \
+           bsd-headers \
           "
 
 export CROSS_COMPILE="${TARGET_PREFIX}"
Signature · 1 line
2.7.0
author
#56 lore raw

PATCH 46/73 nfs-utils: Disable tcp-wrappers for musl

In reply to Khem Raj

Doesnt build with musl

---
 meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb +1 -0
index 2e0c8b1..ea00656 100644
@@ -64,6 +64,7 @@ EXTRA_OECONF = "--with-statduser=rpcuser \
                "
 
 PACKAGECONFIG ??= "tcp-wrappers"
+PACKAGECONFIG_remove_libc-musl = "tcp-wrappers"
 PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers"
 PACKAGECONFIG[nfsidmap] = "--enable-nfsidmap,--disable-nfsidmap,keyutils"
 
Signature · 1 line
2.7.0
author
#57 lore raw

PATCH 47/73 portmap: Point to tirpc headers and libraries on musl

In reply to Khem Raj
---
 meta/recipes-connectivity/portmap/portmap_6.0.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-connectivity/portmap/portmap_6.0.bb +4 -0
index e727fe3..999b4a9 100644
@@ -1,5 +1,7 @@
 require portmap.inc
 
+DEPENDS_append_libc-musl = " libtirpc "
+
 PR = "r9"
 
 SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \
@@ -19,6 +21,8 @@ PACKAGECONFIG[tcp-wrappers] = ",,tcp-wrappers"
 CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS -DHOSTS_ACCESS"
 CFLAGS += "-Wall -Wstrict-prototypes -fPIC"
 EXTRA_OEMAKE += "'NO_TCP_WRAPPER=${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', '', '1', d)}'"
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
+LDFLAGS_append_libc-musl = " -ltirpc "
 
 do_install() {
     install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d
Signature · 1 line
2.7.0
author
#58 lore raw

PATCH 48/73 oprofile: fix build with musl

In reply to Khem Raj

From: Ross Burton <[email protected]>

---
 meta/recipes-kernel/oprofile/oprofile.inc        |  2 ++
 meta/recipes-kernel/oprofile/oprofile/musl.patch | 46 ++++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 meta/recipes-kernel/oprofile/oprofile/musl.patch
meta/recipes-kernel/oprofile/oprofile.inc +2 -0
index 6ec56e7..faf0e53 100644
@@ -25,6 +25,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
            file://run-ptest \
            file://root-home-dir.patch"
 
+SRC_URI_append_libc-musl = " file://musl.patch"
+
 inherit autotools pkgconfig ptest
 
 EXTRA_OECONF = "--with-kernel=${STAGING_DIR_HOST}${prefix} --without-x ac_cv_prog_XSLTPROC="
meta/recipes-kernel/oprofile/oprofile/musl.patch new file +46 -0

46 lines not on this page · raw message

Signature · 1 line
2.7.0
author
#59 lore raw

PATCH 49/73 systemd: Skip parsing on musl based targets

In reply to Khem Raj

systemd on musl doesn't yet work even though we have patches to make it compile it fails to run, therefore lets skip building it for now

---
 meta/recipes-core/systemd/systemd_228.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-core/systemd/systemd_228.bb +4 -0
index 0c6fbde..16737f9 100644
@@ -447,4 +447,8 @@ pkg_prerm_udev-hwdb () {
 python () {
     if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
         raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
+
+    import re
+    if re.match('.*musl*', d.getVar('TARGET_OS', True)) != None:
+        raise bb.parse.SkipPackage("Not _yet_ supported on musl based targets")
 }
Signature · 1 line
2.7.0
author
#60 lore raw

PATCH 50/73 libsolv: Update to 0.6.17+

In reply to Khem Raj
---
 meta/recipes-extended/libsolv/libsolv_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-extended/libsolv/libsolv_git.bb +2 -2
index 78a2d51..cd7cf77 100644
@@ -7,10 +7,10 @@ LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
 
 DEPENDS = "expat zlib"
 
-PV = "0.6.14+git${SRCPV}"
+PV = "0.6.17+git${SRCPV}"
 
 SRC_URI = "git://github.com/openSUSE/libsolv.git"
-SRCREV = "b1ea39233f86cd62fbab1964d7497244f6be0087"
+SRCREV = "6ea235973e942436c8815dadddf2c318a8b5ca7d"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.7.0
author
#61 lore raw

PATCH 51/73 db: Use cross libtool

In reply to Khem Raj

db 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
index e8b814e..3dc1da5 100644
@@ -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
index db9f0ab..eac84b8 100644
@@ -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
#62 lore raw

Re: [PATCH 51/73] db: Use cross libtool

Quoted 8 lines · Khem Raj

db 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

Quoted 7 lines

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

This fails to build on the autobuilder in poky-lsb configurations (which turns on securityflags.inc):

/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/qemux86/usr/lib/libc_nonshared.a(elf-init.oS):
In function `__libc_csu_init':
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/work/i586-poky-linux/glibc/2.22-r0/git/csu/elf-init.c:87:
undefined reference to `__init_array_start' /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/5.3.0/ld:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/qemux86/usr/lib/libc_nonshared.a(elf-init.oS):
relocation R_386_GOTOFF against undefined hidden symbol
`__init_array_start' can not be used when making a shared object /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/5.3.0/ld:
final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:884: recipe for target 'libdb_cxx-6.0.la' failed

Ross

author
#63 lore raw

Re: [PATCH 51/73] db: Use cross libtool

Quoted 23 lines · Ross
Quoted 9 lines · Khem Raj

db 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

Quoted 7 lines

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

This fails to build on the autobuilder in poky-lsb configurations (which turns on securityflags.inc):

Quoted 7 lines

/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/qemux86/usr/lib/libc_nonshared.a(elf-init.oS):
In function `__libc_csu_init':
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/work/i586-poky-linux/glibc/2.22-r0/git/csu/elf-init.c:87:
undefined reference to `__init_array_start' /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/5.3.0/ld:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/qemux86/usr/lib/libc_nonshared.a(elf-init.oS):
relocation R_386_GOTOFF against undefined hidden symbol `__init_array_start'

You can drop this one from this patch set I will submit it another time after finding the cause and fix.
I need to reproduce it locally here. I think the issue might be that the makefiles are calling linker directly which works
in common cases but not when -pie is used. Do you have full errors log somewhere to look into ?

Quoted 7 lines

can not be used when making a shared object /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/5.3.0/ld:
final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:884: recipe for target 'libdb_cxx-6.0.la' failed

Ross

author
#64 lore raw

PATCH 52/73 kexec-tools: Define _GNU_SOURCE for getting loff_t definition

In reply to Khem Raj

Fixes errors e.g.

vmcore-dmesg/vmcore-dmesg.c:370:32: error: unknown type name 'loff_t'

---
 .../0001-vmcore-dmesg-Define-_GNU_SOURCE.patch     | 31 ++++++++++++++++++++++
 meta/recipes-kernel/kexec/kexec-tools_2.0.11.bb    |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch new file +31 -0
new file mode 100644
index 0000000..90c2f6e
@@ -0,0 +1,31 @@
+From d811875a41b4628040abaada3da29b7b9592e757 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 9 Jan 2016 17:16:16 -0800
+Subject: [PATCH] vmcore-dmesg: Define _GNU_SOURCE
+
+loff_t is guarded with _GNU_SOURCE on some C library implementations
+e.g. musl since this type is not defined by POSIX. Define _GNU_SOURCE to
+include this define, it should help compiling on musl while nothing
+changes for glibc based systems since there _GNU_SOURCE is already
+defined
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted
+
+ vmcore-dmesg/vmcore-dmesg.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
+index 0364636..a8f56df 100644
+--- a/vmcore-dmesg/vmcore-dmesg.c
++++ b/vmcore-dmesg/vmcore-dmesg.c
+@@ -1,4 +1,5 @@
+ #define _XOPEN_SOURCE 600
++#define _GNU_SOURCE
+ #define _LARGEFILE_SOURCE 1
+ #define _FILE_OFFSET_BITS 64
+ #include <endian.h>
+-- 
+2.7.0
+
meta/recipes-kernel/kexec/kexec-tools_2.0.11.bb +1 -0
index 7173767..5ea6516 100644
@@ -7,6 +7,7 @@ SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch \
             file://kexec-x32.patch \
             file://0002-powerpc-change-the-memory-size-limit.patch \
             file://0001-purgatory-Pass-r-directly-to-linker.patch \
+            file://0001-vmcore-dmesg-Define-_GNU_SOURCE.patch \
          "
 
 SRC_URI[md5sum] = "86de066859f289048f1b286af6f03f78"
Signature · 1 line
2.7.0
author
#65 lore raw

PATCH 53/73 pcmciautils: Fix parallel build and include sys/types.h

In reply to Khem Raj

parallel build patch was removing dependencies on .c files mistakenly just adding src/yacc_config.h to dependencies in existing rule should have fixed the original build race

include sys/types.h in lex_config.l for getting u_long definition

---
 .../0001-fix-a-parallel-building-issue.patch        | 18 +++++++-----------
 .../pcmciautils/pcmciautils-018/lex_sys_types.patch | 21 +++++++++++++++++++++
 meta/recipes-bsp/pcmciautils/pcmciautils_018.bb     |  1 +
 3 files changed, 29 insertions(+), 11 deletions(-)
 create mode 100644 meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch
meta/recipes-bsp/pcmciautils/pcmciautils-018/0001-fix-a-parallel-building-issue.patch +7 -11
index 7b01040..3125df4 100644
@@ -26,20 +26,16 @@ Signed-off-by: Roy Li <[email protected]>
  Makefile | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index d45fdc3..4c53bc2 100644
---- a/Makefile
-+++ b/Makefile
-@@ -246,8 +246,7 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/startup.o src/yacc_config.o src/lex_config
+Index: pcmciautils-018/Makefile
+===================================================================
+--- pcmciautils-018.orig/Makefile
++++ pcmciautils-018/Makefile
+@@ -246,7 +246,7 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/st
  	$(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) src/startup.o src/yacc_config.o src/lex_config.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
  	$(QUIET) $(STRIPCMD) $@
  
 -yacc_config.o lex_config.o: %.o: %.c
--	$(CC) -c -MD -O -pipe $(CPPFLAGS) $<
-+src/lex_config.o:src/yacc_config.h
++yacc_config.o lex_config.o: %.o: %.c src/yacc_config.h
+ 	$(CC) -c -MD -O -pipe $(CPPFLAGS) $<
  
  debugtools: ccdv $(CBDUMP) $(CISDUMP)
- 
--- 
-1.9.1
-
meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch new file +21 -0
new file mode 100644
index 0000000..d4c2bed
@@ -0,0 +1,21 @@
+Include sys/types.h for u_long definition
+
+Fix errors like
+In file included from src/lex_config.l:34:0:
+src/yacc_config.y:45:5: error: unknown type name 'u_long'
+     u_long num;
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Pending
+Index: pcmciautils-018/src/lex_config.l
+===================================================================
+--- pcmciautils-018.orig/src/lex_config.l
++++ pcmciautils-018/src/lex_config.l
+@@ -22,6 +22,7 @@
+ #include <unistd.h>
+ #include <string.h>
+ #include <syslog.h>
++#include <sys/types.h>
+ 
+ #ifdef HAS_WORDEXP
+ #include <wordexp.h>
meta/recipes-bsp/pcmciautils/pcmciautils_018.bb +1 -0
index 6a1c366..5c34081 100644
@@ -2,6 +2,7 @@ require pcmciautils.inc
 
 SRC_URI += "file://makefile_fix.patch \
             file://0001-fix-a-parallel-building-issue.patch \
+            file://lex_sys_types.patch \
 "
 
 SRC_URI[md5sum] = "5d85669b3440baa4532363da6caaf1b4"
Signature · 1 line
2.7.0
author
#66 lore raw

PATCH 54/73 btrfs-tools: Disable backtrace on musl

In reply to Khem Raj

musl does not support backtrace APIs
include limit.h for PATH_MAX definition

---
 ...001-btrfs-corrupt-blocks-Include-limits.h.patch | 34 ++++++++++++++++++++++
 .../btrfs-tools/btrfs-tools_4.3.1.bb               |  3 ++
 2 files changed, 37 insertions(+)
 create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-corrupt-blocks-Include-limits.h.patch
meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-corrupt-blocks-Include-limits.h.patch new file +34 -0
new file mode 100644
index 0000000..35bd021
@@ -0,0 +1,34 @@
+From 57f55247af39173d10c6332bd147a5169c478628 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 9 Jan 2016 18:58:27 -0800
+Subject: [PATCH] btrfs-corrupt-blocks: Include limits.h
+
+limits.h is needed for PATH_MAX definition
+
+Fixes
+| btrfs-corrupt-block.c: In function 'corrupt_dir_item':
+| btrfs-corrupt-block.c:478:12: error: 'PATH_MAX' undeclared (first use in this function)
+|   char name[PATH_MAX];
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted
+
+ btrfs-corrupt-block.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c
+index 0b26903..c908b7e 100644
+--- a/btrfs-corrupt-block.c
++++ b/btrfs-corrupt-block.c
+@@ -21,6 +21,7 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <getopt.h>
++#include <limits.h>
+ 
+ #include "kerncompat.h"
+ #include "ctree.h"
+-- 
+2.7.0
+
meta/recipes-devtools/btrfs-tools/btrfs-tools_4.3.1.bb +3 -0
index e6b0132..339668c 100644
@@ -15,11 +15,14 @@ DEPENDS = "util-linux attr e2fsprogs lzo acl"
 SRCREV = "7c3394ed9ef2063a7256d4bc078a485b6f826bc5"
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
            file://fix-parallel.patch \
+           file://0001-btrfs-corrupt-blocks-Include-limits.h.patch \
 "
 
 inherit autotools-brokensep pkgconfig
 
 EXTRA_OECONF += "--disable-documentation"
+EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
+
 
 do_configure_prepend() {
       sh autogen.sh
Signature · 1 line
2.7.0
#67 lore raw

Re: [PATCH 54/73] btrfs-tools: Disable backtrace on musl

Quoted 5 lines · Khem Raj

musl does not support backtrace APIs
include limit.h for PATH_MAX definition

Since the rebase to btrfs-tools 4.4 this fails to patch:

NOTE: Applying patch '0001-btrfs-corrupt-blocks-Include-limits.h.patch' (../meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-corrupt-blocks-Include-limits.h.patch)
ERROR: Command Error: exit status: 1 Output:
Applying patch 0001-btrfs-corrupt-blocks-Include-limits.h.patch
patching file btrfs-corrupt-block.c
Hunk #1 FAILED at 21.
1 out of 1 hunk FAILED -- rejects in file btrfs-corrupt-block.c
Patch 0001-btrfs-corrupt-blocks-Include-limits.h.patch can be
reverse-applied

Presumably 4.4 accepted these patches and this can be dropped?

Ross

author
#68 lore raw

Re: [PATCH 54/73] btrfs-tools: Disable backtrace on musl

Quoted 21 lines · Ross
Quoted 5 lines · Khem Raj

musl does not support backtrace APIs
include limit.h for PATH_MAX definition

Since the rebase to btrfs-tools 4.4 this fails to patch:

NOTE: Applying patch '0001-btrfs-corrupt-blocks-Include-limits.h.patch' (../meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-corrupt-blocks-Include-limits.h.patch)
ERROR: Command Error: exit status: 1 Output:
Applying patch 0001-btrfs-corrupt-blocks-Include-limits.h.patch
patching file btrfs-corrupt-block.c
Hunk #1 FAILED at 21.
1 out of 1 hunk FAILED -- rejects in file btrfs-corrupt-block.c
Patch 0001-btrfs-corrupt-blocks-Include-limits.h.patch can be
reverse-applied

Quoted 1 line

Presumably 4.4 accepted these patches and this can be dropped?

Patch part is in upstream so can be dropped however there is a recipe change which is still needed

Quoted 2 lines

Ross

author
#69 lore raw

PATCH 55/73 apmd: Fix build with musl

In reply to Khem Raj

Fix error like below

| apmd.c:372:41: error: use of undeclared identifier '__WCOREFLAG'
|                                 status = __W_EXITCODE(0, SIGTERM) | __WCOREFLAG;
|                                                                     ^
| apmd.c:392:41: error: use of undeclared identifier '__WCOREFLAG'
|                                 status = __W_EXITCODE(0, SIGTERM) | __WCOREFLAG;
---
 meta/recipes-bsp/apmd/apmd/wexitcode.patch | 26 ++++++++++++++++++++++++++
 meta/recipes-bsp/apmd/apmd_3.2.2-15.bb     |  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 meta/recipes-bsp/apmd/apmd/wexitcode.patch
meta/recipes-bsp/apmd/apmd/wexitcode.patch new file +26 -0
new file mode 100644
index 0000000..c5faa85
@@ -0,0 +1,26 @@
+Define non-posix W* funcitons
+
+C libraries like musl dont define them
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Pending
+
+Index: apmd-3.2.2.orig/apmd.c
+===================================================================
+--- apmd-3.2.2.orig.orig/apmd.c
++++ apmd-3.2.2.orig/apmd.c
+@@ -55,6 +55,14 @@
+ #define MINIMUM_RATE_CALC_TIME  120
+ #endif
+ 
++#ifndef _POSIX_SOURCE
++
++#define	__WCOREFLAG  0200
++#define __WCOREDUMP(x)  (_W_INT(x) & __WCOREFLAG)
++#define	__W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
++
++#endif
++
+ /*
+  * For the verbosity level feature to be useful,
+  * we rely on the fact that syslog.h assigns adjacent
meta/recipes-bsp/apmd/apmd_3.2.2-15.bb +1 -0
index 9492c69..a932375 100644
@@ -13,6 +13,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz;name=tarball \
            file://legacy.patch \
            file://libtool.patch \
            file://unlinux.patch \
+           file://wexitcode.patch \
            file://init \
            file://default \
            file://apmd_proxy \
Signature · 1 line
2.7.0
author
#70 lore raw

PATCH 56/73 nss: Undefine HAVE_SYS_CDEFS_H

In reply to Khem Raj

nss's build system assumes that cdefs.h is always available on linux which is not the case with musl

---
 meta/recipes-support/nss/nss_3.19.2.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-support/nss/nss_3.19.2.bb +4 -0
index c51b056..d092b18 100644
@@ -41,6 +41,10 @@ TDS = "${S}/tentative-dist-staging"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
+do_configure_prepend_libc-musl () {
+    sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
+}
+
 do_compile_prepend_class-native() {
     export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
     export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
Signature · 1 line
2.7.0
author
#71 lore raw

PATCH 57/73 dosfstools: Correct cross-compile CFLAGS and fix build with musl

In reply to Khem Raj

enable largefile support if its in DISTRO_FEATURES

---
 .../0001-mkfs.fat-fix-incorrect-int-type.patch     | 46 ++++++++++++++++++++++
 .../dosfstools/dosfstools/largefile.patch          | 19 +++++++++
 .../dosfstools/dosfstools_3.0.28.bb                |  7 +++-
 3 files changed, 71 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/dosfstools/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch
 create mode 100644 meta/recipes-devtools/dosfstools/dosfstools/largefile.patch
meta/recipes-devtools/dosfstools/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch new file +46 -0
new file mode 100644
index 0000000..3497ca5
@@ -0,0 +1,46 @@
+From 3b95786af13e28157d889bd90a384ee255f2d91d Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <[email protected]>
+Date: Sun, 16 Aug 2015 15:55:43 +0200
+Subject: [PATCH] mkfs.fat: fix incorrect int type
+
+u_int32_t is not a stanard type, while uint32_t is. This fixes builds
+with the musl C library, which only defines so-called "clean" headers;
+build failures are like (back-quotes and elision manually added for
+readability):
+
+    http://autobuild.buildroot.org/results/a09/a0923d7f6d4dbae02eba4c5024bbdae3a52aa85a/build-end.log
+
+    /home/peko/autobuild/instance-1/output/host/usr/bin/x86_64-linux-gcc -D_LARGEFILE_SOURCE \
+        -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -Os  -D_GNU_SOURCE -D_LARGEFILE_SOURCE \
+        -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -c -o mkfs.fat.o src/mkfs.fat.c
+    src/mkfs.fat.c: In function 'main':
+    src/mkfs.fat.c:1415:18: error: 'u_int32_t' undeclared (first use in this function)
+         volume_id = (u_int32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); [...]
+                      ^
+    src/mkfs.fat.c:1415:18: note: each undeclared identifier is reported only once for each
+    function it appears in
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+Signed-off-by: Andreas Bombe <[email protected]>
+---
+Upstream-Status: Backport
+
+ src/mkfs.fat.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/mkfs.fat.c b/src/mkfs.fat.c
+index b38d116..dddbe24 100644
+--- a/src/mkfs.fat.c
++++ b/src/mkfs.fat.c
+@@ -1412,7 +1412,7 @@ int main(int argc, char **argv)
+ 
+     gettimeofday(&create_timeval, NULL);
+     create_time = create_timeval.tv_sec;
+-    volume_id = (u_int32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec);	/* Default volume ID = creation time, fudged for more uniqueness */
++    volume_id = (uint32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec);	/* Default volume ID = creation time, fudged for more uniqueness */
+     check_atari();
+ 
+     printf("mkfs.fat " VERSION " (" VERSION_DATE ")\n");
+-- 
+2.7.0
+
meta/recipes-devtools/dosfstools/dosfstools/largefile.patch new file +19 -0
new file mode 100644
index 0000000..7f7d835
@@ -0,0 +1,19 @@
+defer setting largefile flags to build makery
+in a cross build we can not do runtime config tests
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Inappropriate[Cross compile Specific]
+Index: dosfstools-3.0.28/Makefile
+===================================================================
+--- dosfstools-3.0.28.orig/Makefile
++++ dosfstools-3.0.28/Makefile
+@@ -27,8 +27,7 @@ SBINDIR = $(PREFIX)/sbin
+ DOCDIR = $(PREFIX)/share/doc
+ MANDIR = $(PREFIX)/share/man
+ 
+-#OPTFLAGS = -O2 -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+-OPTFLAGS = -O2 -fomit-frame-pointer -D_GNU_SOURCE $(shell getconf LFS_CFLAGS)
++OPTFLAGS = -O2 -fomit-frame-pointer
+ #WARNFLAGS = -Wall -pedantic -std=c99
+ WARNFLAGS = -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings
+ DEBUGFLAGS = -g
meta/recipes-devtools/dosfstools/dosfstools_3.0.28.bb +6 -1
index addcbf6..6fc3e41 100644
@@ -9,12 +9,17 @@ SECTION = "base"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-SRC_URI = "https://github.com/dosfstools/dosfstools/releases/download/v3.0.28/dosfstools-3.0.28.tar.xz"
+SRC_URI = "https://github.com/dosfstools/dosfstools/releases/download/v3.0.28/dosfstools-3.0.28.tar.xz \
+           file://largefile.patch \
+           file://0001-mkfs.fat-fix-incorrect-int-type.patch \
+          "
 SRC_URI[md5sum] = "6a047a6c65186b9ebb1853709adb36db"
 SRC_URI[sha256sum] = "ee95913044ecf2719b63ea11212917649709a6e53209a72d622135aaa8517ee2"
 
 UPSTREAM_CHECK_URI = "https://github.com/dosfstools/dosfstools/releases"
 
+CFLAGS += "-D_GNU_SOURCE ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', '', d)}"
+
 FILES_${PN} = "${base_sbindir}"
 FILES_${PN}-doc = "${mandir} ${docdir}"
 
Signature · 1 line
2.7.0
author
#72 lore raw

PATCH 58/73 fts: Fix linker hash-style option

In reply to Khem Raj

pass --hash-style explicitly to linker and ensure that mips does not use gnu hash style This inoculates fts when compiler does not pass hash style option e.g. clang

---
 meta/recipes-core/fts/fts.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta/recipes-core/fts/fts.bb +7 -1
index d8b4ed2..2539e5d 100644
@@ -22,9 +22,15 @@ S = "${WORKDIR}/${BPN}"
 
 do_configure[noexec] = "1"
 
+HASHSTYLE_mips = "sysv"
+HASHSTYLE_mipsel = "sysv"
+HASHSTYLE_mips64 = "sysv"
+HASHSTYLE_mips64el = "sysv"
+HASHSTYLE = "gnu"
+
 VER = "0"
 do_compile () {
-    ${CC} -I${S} -fPIC -shared -o libfts.so.${VER} -Wl,-soname,libfts.so.${VER} ${S}/fts.c
+    ${CC} -I${S} -fPIC -shared -Wl,--hash-style=${HASHSTYLE} -o libfts.so.${VER} -Wl,-soname,libfts.so.${VER} ${S}/fts.c
 }
 
 do_install() {
Signature · 1 line
2.7.0
author
#73 lore raw

PATCH 59/73 musl: Create ld.so as a relative symlink

In reply to Khem Raj

We have rootfs intercepts which fail on musl because ld.so on musl is an absolute symlink to /usr/lib/libc.so and then it fails to load when run with qemu user mode.

Fixes rootfs failures like

WARNING: The postinstall intercept hook 'update_pixbuf_cache' failed (exit code: 255)! See log for details!
WARNING: The postinstalls for the following packages will be postponed for first boot: libgdk-pixbuf-2.0-loader-jpeg li bgdk-pixbuf-2.0-loader-png libgdk-pixbuf-2.0-loader-gif libgdk-pixbuf-2.0-loader-xpm
WARNING: [log_check] core-image-sato: found a warning message in the logfile (keyword 'WARNING:'):
[log_check] WARNING: The postinstall intercept hook 'update_pixbuf_cache' failed (exit code: 255)! See log for details!

WARNING: [log_check] core-image-sato: found a warning message in the logfile (keyword 'WARNING:'):
[log_check] WARNING: The postinstalls for the following packages will be postponed for first boot: libgdk-pixbuf-2.0-lo
ader-jpeg libgdk-pixbuf-2.0-loader-png libgdk-pixbuf-2.0-loader-gif libgdk-pixbuf-2.0-loader-xpm

---
 ...dynamic-linker-a-relative-symlink-to-libc.patch | 34 ++++++++++++++++++++++
 meta/recipes-core/musl/musl_git.bb                 |  3 +-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch new file +34 -0
new file mode 100644
index 0000000..5490b1c
@@ -0,0 +1,34 @@
+From 94c0b97b62125d8bbc92dce0694e387d5b2ad181 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sun, 10 Jan 2016 12:14:02 -0800
+Subject: [PATCH] Make dynamic linker a relative symlink to libc
+
+absolute symlink into $(libdir) fails to load in a cross build
+environment, especially when executing qemu in usermode to run target
+applications, which cross build systems often do, since not everything
+can be computed during cross builds, qemu in usermode often comes to aid
+in such situations to feed into cross builds.
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index b2226fa..0d71f7f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -189,7 +189,7 @@ $(DESTDIR)$(includedir)/%: include/%
+ 	$(INSTALL) -D -m 644 $< $@
+ 
+ $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
+-	$(INSTALL) -D -l $(libdir)/libc.so $@ || true
++	$(INSTALL) -D -l ..$(libdir)/libc.so $@ || true
+ 
+ install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),)
+ 
+-- 
+2.7.0
+
meta/recipes-core/musl/musl_git.bb +2 -1
index 5b94d1f..8970307 100644
@@ -10,6 +10,7 @@ PV = "1.1.12+git${SRCPV}"
 # mirror is at git://github.com/kraj/musl.git
 
 SRC_URI = "git://git.musl-libc.org/musl \
+           file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
           "
 
 S = "${WORKDIR}/git"
@@ -49,7 +50,7 @@ do_install() {
 	oe_runmake install DESTDIR='${D}'
 
 	install -d ${D}${bindir}
-	ln -s ${libdir}/libc.so ${D}${bindir}/ldd
+	ln -s ../../${libdir}/libc.so ${D}${bindir}/ldd
 }
 
 RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
Signature · 1 line
2.7.0
author
#74 lore raw

PATCH 60/73 bsd-headers: Package cdefs.h

In reply to Khem Raj

Its used in several packages

---
 meta/recipes-core/bsd-headers/bsd-headers.bb       |  2 ++
 .../bsd-headers/bsd-headers/sys-cdefs.h            | 26 ++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h
meta/recipes-core/bsd-headers/bsd-headers.bb +2 -0
index ae659ab..12a2cca 100644
@@ -7,6 +7,7 @@ SECTION = "devel"
 
 SRC_URI = "file://sys-queue.h \
            file://sys-tree.h \
+           file://sys-cdefs.h \
           "
 do_configure[noexec] = "1"
 do_compile[noexec] = "1"
@@ -18,6 +19,7 @@ S = "${WORKDIR}"
 do_install() {
 	install -Dm 0644 ${S}/sys-queue.h ${D}${includedir}/sys/queue.h
 	install -Dm 0644 ${S}/sys-tree.h ${D}${includedir}/sys/tree.h
+	install -Dm 0644 ${S}/sys-cdefs.h ${D}${includedir}/sys/cdefs.h
 }
 #
 # We will skip parsing for non-musl systems
meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h new file +26 -0
new file mode 100644
index 0000000..209a623
@@ -0,0 +1,26 @@
+#warning usage of non-standard #include <sys/cdefs.h> is deprecated
+
+#undef __P
+#undef __PMT
+
+#define __P(args)	args
+#define __PMT(args)	args
+
+#define __CONCAT(x,y)	x ## y
+#define __STRING(x)	#x
+
+#ifdef  __cplusplus
+# define __BEGIN_DECLS	extern "C" {
+# define __END_DECLS	}
+#else
+# define __BEGIN_DECLS
+# define __END_DECLS
+#endif
+
+#if defined(__GNUC__) && !defined(__cplusplus)
+# define __THROW	__attribute__ ((__nothrow__))
+# define __NTH(fct)	__attribute__ ((__nothrow__)) fct
+#else
+# define __THROW
+# define __NTH(fct)     fct
+#endif
Signature · 1 line
2.7.0
author
#75 lore raw

PATCH 61/73 guile: Fix build with musl

In reply to Khem Raj

strol_l is not available on musl
delete charset.alias as well its not needed

Use internal gc function on musl

We get errors on certain functions not being available in boeheme gc when built with musl. Therefore use the internal versions e.g.

Undefined gc_set_finalizer_notifier

---
 ...guile-Check-for-strtol_l-during-configure.patch | 56 ++++++++++++++++++++++
 meta/recipes-devtools/guile/guile_2.0.11.bb        | 12 +++++
 2 files changed, 68 insertions(+)
 create mode 100644 meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch
meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch new file +56 -0
new file mode 100644
index 0000000..24f073f
@@ -0,0 +1,56 @@
+From 814d6fb6c1f4a544c8fd37f5a390ba020c2d8c85 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sun, 10 Jan 2016 22:28:17 +0000
+Subject: [PATCH] libguile: Check for strtol_l during configure
+
+strtol_l is a gnu extention which may not be available on other linux
+libc implementations e.g. musl. Therefore check for this funciton and
+conditionalize the use of it.
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ configure.ac    | 5 +++--
+ libguile/i18n.c | 2 +-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3969929..f8a6a1a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -752,7 +752,8 @@ AC_CHECK_HEADERS([assert.h crt_externs.h])
+ #   truncate - not in mingw
+ #   isblank - available as a GNU extension or in C99
+ #   _NSGetEnviron - Darwin specific
+-#   strcoll_l, newlocale - GNU extensions (glibc), also available on Darwin
++#   strcoll_l, newlocale, strtol_l - GNU extensions (glibc),
++#                                    also available on Darwin
+ #   fork - unavailable on Windows
+ #   utimensat - posix.1-2008
+ #   sched_getaffinity, sched_setaffinity - GNU extensions (glibc)
+@@ -768,7 +769,7 @@ AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid		\
+   getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp	\
+   index bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron	\
+   strcoll strcoll_l newlocale utimensat sched_getaffinity		\
+-  sched_setaffinity sendfile])
++  sched_setaffinity sendfile strtol_l])
+ 
+ AM_CONDITIONAL([BUILD_ICE_9_POPEN],
+   [test "x$enable_posix" = "xyes" && test "x$ac_cv_func_fork" = "xyes"])
+diff --git a/libguile/i18n.c b/libguile/i18n.c
+index 97d44b0..9fb6976 100644
+--- a/libguile/i18n.c
++++ b/libguile/i18n.c
+@@ -1352,7 +1352,7 @@ SCM_DEFINE (scm_locale_string_to_integer, "locale-string->integer",
+ 
+   if (c_locale != NULL)
+     {
+-#ifdef USE_GNU_LOCALE_API
++#if defined(USE_GNU_LOCALE_API) && defined(HAVE_STRTOL_L)
+       c_result = strtol_l (c_str, &c_endptr, c_base, c_locale);
+ #else
+       RUN_IN_LOCALE_SECTION (c_locale,
+-- 
+2.7.0
+
meta/recipes-devtools/guile/guile_2.0.11.bb +12 -0
index 413c81d..6815e25 100644
@@ -24,6 +24,7 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
            file://libguile-Makefile.am-hook.patch \
            file://libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch \
            file://remove_strcase_l_funcs.patch \
+           file://0001-libguile-Check-for-strtol_l-during-configure.patch \
            "
 
 #           file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
@@ -52,6 +53,13 @@ EXTRA_OECONF_append_class-target = " --with-libunistring-prefix=${STAGING_LIBDIR
                                      --with-libgmp-prefix=${STAGING_LIBDIR} \
                                      --with-libltdl-prefix=${STAGING_LIBDIR}"
 EXTRA_OECONF_append_libc-uclibc = " guile_cv_use_csqrt=no "
+
+CFLAGS_append_libc-musl = " -DHAVE_GC_SET_FINALIZER_NOTIFIER \
+	                    -DHAVE_GC_GET_HEAP_USAGE_SAFE \
+	                    -DHAVE_GC_GET_FREE_SPACE_DIVISOR \
+	                    -DHAVE_GC_SET_FINALIZE_ON_DEMAND \
+                           "
+
 do_configure_prepend() {
 	mkdir -p po
 }
@@ -77,6 +85,10 @@ do_install_append_class-target() {
 	sed -i -e 's:${STAGING_DIR_TARGET}::g' ${D}${libdir}/pkgconfig/guile-2.0.pc
 }
 
+do_install_append_libc-musl() {
+	rm -f ${D}${libdir}/charset.alias
+}
+
 SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
 
 guile_cross_config() {
Signature · 1 line
2.7.0
author
#76 lore raw

PATCH 62/73 unfs3: Depend on libtirpc when building on musl

In reply to Khem Raj

needs a rpc implementation

---
 meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb +5 -3
index 7e9d659..eba1139 100644
@@ -9,11 +9,9 @@ RECIPE_UPSTREAM_DATE = "Oct 08, 2015"
 CHECK_DATE = "Dec 10, 2015"
 
 DEPENDS = "flex-native bison-native flex"
+DEPENDS_append_libc-musl = " libtirpc "
 DEPENDS_append_class-nativesdk += "flex-nativesdk"
 
-SRC_URI[md5sum] = "3687acc4ee992e536472365dd99712a7"
-SRC_URI[sha256sum] = "274b43ada9c6eea1da26eb7010d72889c5278984ba0b50dff4e093057d4d64f8"
-
 MOD_PV = "497"
 S = "${WORKDIR}/trunk"
 SRC_URI = "svn://svn.code.sf.net/p/unfs3/code;module=trunk;rev=${MOD_PV};protocol=http \
@@ -25,10 +23,14 @@ SRC_URI = "svn://svn.code.sf.net/p/unfs3/code;module=trunk;rev=${MOD_PV};protoco
            file://relative_max_socket_path_len.patch \
            file://tcp_no_delay.patch \
           "
+SRC_URI[md5sum] = "3687acc4ee992e536472365dd99712a7"
+SRC_URI[sha256sum] = "274b43ada9c6eea1da26eb7010d72889c5278984ba0b50dff4e093057d4d64f8"
+
 BBCLASSEXTEND = "native nativesdk"
 
 inherit autotools
 EXTRA_OECONF_append_class-native = " --sbindir=${bindir}"
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
 
 # Turn off these header detects else the inode search
 # will walk entire file systems and this is a real problem
Signature · 1 line
2.7.0
author
#77 lore raw

PATCH 63/73 uclibc: Update to 1.0.11

In reply to Khem Raj

changes are here

http://mailman.uclibc-ng.org/pipermail/devel/2016-January/000665.html

Drop upstreamed patch

---
 meta/recipes-core/uclibc/uclibc-git.inc            |    5 +-
 .../uclibc-git/0003-Add-argp-implementation.patch  | 5811 --------------------
 2 files changed, 2 insertions(+), 5814 deletions(-)
 delete mode 100644 meta/recipes-core/uclibc/uclibc-git/0003-Add-argp-implementation.patch
meta/recipes-core/uclibc/uclibc-git.inc +2 -3
index a5c4b5e..490dfcb 100644
@@ -1,12 +1,11 @@
-SRCREV = "0ad73077c230093ae004829da44418597f330c6a"
+SRCREV = "94493929f674f4410c2743fa3dd82fd37b70c58f"
 
-PV = "1.0.10+git${SRCPV}"
+PV = "1.0.11+git${SRCPV}"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/uclibc-git:"
 
 SRC_URI = "git://uclibc-ng.org/git/uclibc-ng;branch=1.0 \
         file://0001-Disable-lrount_tes-function.patch \
-        file://0003-Add-argp-implementation.patch \
         file://uClibc.machine \
         file://uClibc.distro \
         file://obstack.cfg \
meta/recipes-core/uclibc/uclibc-git/0003-Add-argp-implementation.patch deleted +0 -5811

2,986 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.7.0

Part of the diff is not shown here. View the raw message.

author
#78 lore raw

PATCH 64/73 acpid: Fix build on musl

In reply to Khem Raj

implement isfdtype() if libc does not provide it

Fix build when S != B

use top_builddir instead of top_srcdir

---
 meta/recipes-bsp/acpid/acpid.inc                   |  2 +
 ...1-Define-isfdtype-if-libc-doesn-t-have-it.patch | 62 ++++++++++++++++++++++
 ...-config.h-from-builddir-instead-of-srcdir.patch | 51 ++++++++++++++++++
 3 files changed, 115 insertions(+)
 create mode 100644 meta/recipes-bsp/acpid/acpid/0001-Define-isfdtype-if-libc-doesn-t-have-it.patch
 create mode 100644 meta/recipes-bsp/acpid/acpid/0001-Use-config.h-from-builddir-instead-of-srcdir.patch
meta/recipes-bsp/acpid/acpid.inc +2 -0
index e015619..1d1ce98 100644
@@ -5,6 +5,8 @@ SECTION = "base"
 LICENSE = "GPLv2+"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \
+           file://0001-Define-isfdtype-if-libc-doesn-t-have-it.patch \
+           file://0001-Use-config.h-from-builddir-instead-of-srcdir.patch \
            file://init \
            file://acpid.service \
           "
meta/recipes-bsp/acpid/acpid/0001-Define-isfdtype-if-libc-doesn-t-have-it.patch new file +62 -0

62 lines not on this page · raw message

meta/recipes-bsp/acpid/acpid/0001-Use-config.h-from-builddir-instead-of-srcdir.patch new file +51 -0

51 lines not on this page · raw message

Signature · 1 line
2.7.0
#79 lore raw

Re: [PATCH 64/73] acpid: Fix build on musl

Quoted 6 lines · Khem Raj

implement isfdtype() if libc does not provide it

Fix build when S != B

use top_builddir instead of top_srcdir

This and Maxin's upgrade are conflicting:

NOTE: Applying patch '0001-Define-isfdtype-if-libc-doesn-t-have-it.patch' (../meta/recipes-bsp/acpid/acpid/0001-Define-isfdtype-if-libc-doesn-t-have-it.patch)
ERROR: Command Error: exit status: 1 Output:
Applying patch 0001-Define-isfdtype-if-libc-doesn-t-have-it.patch patching file configure.ac
Hunk #1 FAILED at 41.
1 out of 1 hunk FAILED -- rejects in file configure.ac
patching file sock.c
Hunk #1 succeeded at 61 with fuzz 2 (offset 11 lines).
Patch 0001-Define-isfdtype-if-libc-doesn-t-have-it.patch does not apply (enforce with -f)

Can you see if anything else is required beyond Maxin's upgrade?

Ross

author
#80 lore raw

Re: [PATCH 64/73] acpid: Fix build on musl

Quoted 24 lines · Ross
Quoted 6 lines · Khem Raj

implement isfdtype() if libc does not provide it

Fix build when S != B

use top_builddir instead of top_srcdir

This and Maxin's upgrade are conflicting:

NOTE: Applying patch '0001-Define-isfdtype-if-libc-doesn-t-have-it.patch' (../meta/recipes-bsp/acpid/acpid/0001-Define-isfdtype-if-libc-doesn-t-have-it.patch)
ERROR: Command Error: exit status: 1 Output:
Applying patch 0001-Define-isfdtype-if-libc-doesn-t-have-it.patch patching file configure.ac
Hunk #1 FAILED at 41.
1 out of 1 hunk FAILED -- rejects in file configure.ac
patching file sock.c
Hunk #1 succeeded at 61 with fuzz 2 (offset 11 lines).
Patch 0001-Define-isfdtype-if-libc-doesn-t-have-it.patch does not apply (enforce with -f)

Quoted 1 line

Can you see if anything else is required beyond Maxin's upgrade?

This whole patch can be dropped.

Quoted 2 lines

Ross

author
#81 lore raw

PATCH 65/73 grub: Backport fix for largefile detection/use

In reply to Khem Raj

This is inspired by musl porting, where grub's configure is enabling largefile support based on glibc versions, instead an upstream patch turns it into autoconf check

Update git version recipe

arm platforms use this recipe to provide grub and it needed fixes from upstream so upgrade to latest tip of git and forward port patches as well as drop the ones already applied upstream

---
 ...ct-_llseek-code-and-require-long-filesyst.patch | 80 ++++++++++++++++++++++
 meta/recipes-bsp/grub/grub-efi_2.00.bb             |  2 +
 ...-mfpmath-sse-as-well-when-SSE-is-disabled.patch | 46 +++++++++++++
 ...1-grub.d-10_linux.in-add-oe-s-kernel-name.patch | 56 +++++++++++++++
 meta/recipes-bsp/grub/grub2.inc                    |  1 +
 meta/recipes-bsp/grub/grub_2.00.bb                 |  2 +
 meta/recipes-bsp/grub/grub_git.bb                  | 13 ++--
 7 files changed, 195 insertions(+), 5 deletions(-)
 create mode 100644 meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch
 create mode 100644 meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
 create mode 100644 meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch new file +80 -0
new file mode 100644
index 0000000..277bca6
@@ -0,0 +1,80 @@
+From 3bac4caa2bc64db313aaee54fffb90383e118517 Mon Sep 17 00:00:00 2001
+From: Felix Janda <[email protected]>
+Date: Thu, 22 Jan 2015 19:54:36 +0100
+Subject: [PATCH] Remove direct _llseek code and require long filesystem libc.
+
+---
+Upstream-Status: Backport
+ configure.ac                    |  8 ++++++++
+ grub-core/osdep/unix/hostdisk.c | 24 ------------------------
+ 4 files changed, 13 insertions(+), 24 deletions(-)
+
+Index: grub-2.00/configure.ac
+===================================================================
+--- grub-2.00.orig/configure.ac
++++ grub-2.00/configure.ac
+@@ -306,6 +306,14 @@ if test x$grub_cv_apple_cc = xyes ; then
+   HOST_LDFLAGS="$HOST_LDFLAGS -Wl,-allow_stack_execute"
+ fi
+ 
++case "$host_os" in
++  cygwin | windows* | mingw32* | aros*)
++     ;;
++  *)
++     AC_CHECK_SIZEOF(off_t)
++     test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);;
++esac
++
+ if test x$USE_NLS = xno; then
+   HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
+ fi
+Index: grub-2.00/grub-core/kern/emu/hostdisk.c
+===================================================================
+--- grub-2.00.orig/grub-core/kern/emu/hostdisk.c
++++ grub-2.00/grub-core/kern/emu/hostdisk.c
+@@ -44,11 +44,6 @@
+ #ifdef __linux__
+ # include <sys/ioctl.h>         /* ioctl */
+ # include <sys/mount.h>
+-# if !defined(__GLIBC__) || \
+-        ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
+-/* Maybe libc doesn't have large file support.  */
+-#  include <linux/unistd.h>     /* _llseek */
+-# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
+ # ifndef BLKFLSBUF
+ #  define BLKFLSBUF     _IO (0x12,97)   /* flush buffer cache */
+ # endif /* ! BLKFLSBUF */
+@@ -761,25 +756,6 @@ linux_find_partition (char *dev, grub_di
+ }
+ #endif /* __linux__ */
+ 
+-#if defined(__linux__) && (!defined(__GLIBC__) || \
+-        ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
+-  /* Maybe libc doesn't have large file support.  */
+-grub_err_t
+-grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
+-{
+-  loff_t offset, result;
+-  static int _llseek (uint filedes, ulong hi, ulong lo,
+-		      loff_t *res, uint wh);
+-  _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
+-	     loff_t *, res, uint, wh);
+-
+-  offset = (loff_t) off;
+-  if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
+-    return grub_error (GRUB_ERR_BAD_DEVICE, N_("cannot seek `%s': %s"),
+-		       name, strerror (errno));
+-  return GRUB_ERR_NONE;
+-}
+-#else
+ grub_err_t
+ grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
+ {
+@@ -790,7 +766,6 @@ grub_util_fd_seek (int fd, const char *n
+ 		       name, strerror (errno));
+   return 0;
+ }
+-#endif
+ 
+ static void
+ flush_initial_buffer (const char *os_dev __attribute__ ((unused)))
meta/recipes-bsp/grub/grub-efi_2.00.bb +2 -0
index ecc6c9a..4e80e18 100644
@@ -33,6 +33,8 @@ EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \
                 --enable-efiemu=no --program-prefix='' \
                 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
 
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile ac_cv_sizeof_off_t=8', '--disable-largefile', d)}"
+
 do_install_class-native() {
 	install -d ${D}${bindir}
 	install -m 755 grub-mkimage ${D}${bindir}
meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch new file +46 -0

46 lines not on this page · raw message

meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch new file +56 -0

56 lines not on this page · raw message

meta/recipes-bsp/grub/grub2.inc +1 -0
index a8c41f8..84a4727 100644
@@ -28,6 +28,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
            file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \
            file://grub2-fix-initrd-size-bug.patch \
            file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \
+           file://0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch \
             "
 
 DEPENDS = "flex-native bison-native xz"
meta/recipes-bsp/grub/grub_2.00.bb +2 -0
index c1be133..addc1b2 100644
@@ -6,6 +6,8 @@ PR = "r1"
 EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
                --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
 
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile ac_cv_sizeof_off_t=8', '--disable-largefile', d)}"
+
 do_install_append () {
     install -d ${D}${sysconfdir}/grub.d
 }
meta/recipes-bsp/grub/grub_git.bb +8 -5
index 6a0e3ee..3ebab7f 100644
@@ -5,13 +5,14 @@ DEPENDS += "autogen-native"
 DEFAULT_PREFERENCE = "-1"
 DEFAULT_PREFERENCE_arm = "1"
 
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/grub-git:"
+
 PV = "2.00+${SRCPV}"
-SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e"
+SRCREV = "b95e92678882f56056c64ae29092bc9cf129905f"
 SRC_URI = "git://git.savannah.gnu.org/grub.git \
-           file://grub-2.00-fpmath-sse-387-fix.patch \
+           file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
            file://autogen.sh-exclude-pc.patch \
-           file://grub-2.00-add-oe-kernel.patch \
-           file://0001-Fix-build-with-glibc-2.20.patch \
+           file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
           "
 
 S = "${WORKDIR}/git"
@@ -30,6 +31,8 @@ GRUBPLATFORM ??= "pc"
 EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont --program-prefix="" \
                 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
 
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile ac_cv_sizeof_off_t=8', '--disable-largefile', d)}"
+
 do_configure_prepend() {
     ( cd ${S}
       ${S}/autogen.sh )
@@ -37,7 +40,7 @@ do_configure_prepend() {
 
 do_install_append () {
     install -d ${D}${sysconfdir}/grub.d
- 
+    rm -rf ${D}${libdir}/charset.alias
 }
 
 # debugedit chokes on bare metal binaries
Signature · 1 line
2.7.0
#82 lore raw

Re: [PATCH 65/73] grub: Backport fix for largefile detection/use

meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch line 7

Quoted 12 lines · Khem Raj

+++ b/meta/recipes-bsp/grub /files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch

meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch new file +4 -0
@@ -0,0 +1,80 @@
+From 3bac4caa2bc64db313aaee54fffb90383e118517 Mon Sep 17 00:00:00 2001
+From: Felix Janda <[email protected]>
+Date: Thu, 22 Jan 2015 19:54:36 +0100
+Subject: [PATCH] Remove direct _llseek code and require long filesystem

libc.

meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch new file +3 -0
+
+---
+Upstream-Status: Backport

Missing Signed-off-by.

Ross

author
#83 lore raw

Re: [PATCH 65/73] grub: Backport fix for largefile detection/use

Quoted 17 lines · Ross

meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch line 7

Quoted 12 lines · Khem Raj

+++
b/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch

meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch new file +4 -0
@@ -0,0 +1,80 @@
+From 3bac4caa2bc64db313aaee54fffb90383e118517 Mon Sep 17 00:00:00 2001
+From: Felix Janda <[email protected]>
+Date: Thu, 22 Jan 2015 19:54:36 +0100
+Subject: [PATCH] Remove direct _llseek code and require long filesystem

libc.

meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch new file +3 -0
+
+---
+Upstream-Status: Backport

Missing Signed-off-by.

updated

https://github.com/kraj/openembedded-core/commit/35006da299d2f8c1f45fec6d89d9ae15bf9ca8a6

Quoted 2 lines

Ross

author
#84 lore raw

PATCH 66/73 console-tools: Fix header inclusion when not using glibc

In reply to Khem Raj

It did differentiate on features in libc but assumed always glibc this patch make that assumption clear

---
 .../0001-Cover-the-else-with-__GLIBC__.patch       | 51 ++++++++++++++++++++++
 .../console-tools/console-tools_0.3.2.bb           |  3 ++
 2 files changed, 54 insertions(+)
 create mode 100644 meta/recipes-core/console-tools/console-tools-0.3.2/0001-Cover-the-else-with-__GLIBC__.patch
meta/recipes-core/console-tools/console-tools-0.3.2/0001-Cover-the-else-with-__GLIBC__.patch new file +51 -0
new file mode 100644
index 0000000..ace4bf0
@@ -0,0 +1,51 @@
+From b6a59b05f1fa514c6b387c9544bd63b1bfcf2eed Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 13 Jan 2016 05:38:29 +0000
+Subject: [PATCH] Cover the else with __GLIBC__
+
+Fixes build errors on musl/x86
+
+| In file included from
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/asm/termios.h:1:0,
+|                  from
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/linux/termios.h:5,
+|                  from
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/console-tools/0.3.2-r8/console-tools-0.3.2/vttools/resizecons.c:86:
+|
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/asm-generic/termios.h:14:8:
+error: redefinition of 'struct winsize'
+|  struct winsize {
+|         ^
+| In file included from
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/sys/ioctl.h:7:0,
+|                  from
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/console-tools/0.3.2-r8/console-tools-0.3.2/vttools/resizecons.c:81:
+|
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/bits/ioctl.h:90:8:
+note: originally defined here
+|  struct winsize {
+|         ^
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ vttools/resizecons.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vttools/resizecons.c b/vttools/resizecons.c
+index f0a7055..e8753b1 100644
+--- a/vttools/resizecons.c
++++ b/vttools/resizecons.c
+@@ -81,7 +81,7 @@
+ #include <sys/ioctl.h>
+ #if (__GNU_LIBRARY__ >= 6)
+ # include <sys/perm.h>
+-#else
++#elif defined __GLIBC__
+ # include <linux/types.h>
+ # include <linux/termios.h>
+ #endif
+-- 
+2.7.0
+
meta/recipes-core/console-tools/console-tools_0.3.2.bb +3 -0
index d14d683..1db8414 100644
@@ -15,6 +15,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lct/console-tools-${PV}.tar.gz \
            file://fix-libconsole-linking.patch \
            file://no-dep-on-libfl.patch \
            file://0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch \
+           file://0001-Cover-the-else-with-__GLIBC__.patch \
            file://lcmessage.m4 \
            file://Makevars"
 
@@ -24,6 +25,8 @@ SRC_URI[sha256sum] = "eea6b441672dacd251079fc85ed322e196282e0e66c16303ec64c3a2b1
 UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lct/files/console-tools-devel/"
 UPSTREAM_CHECK_REGEX = "/console-tools-devel/(?P<pver>(\d\d?\.)+\d\d?)/"
 
+CFLAGS_append_aarch64 = " -D_USE_TERMIOS "
+
 do_configure_prepend () {
 	mkdir -p ${S}/m4
 	cp ${WORKDIR}/lcmessage.m4 ${S}/m4/
Signature · 1 line
2.7.0
author
#85 lore raw

PATCH 67/73 gpgme: Define __error_t_defined on musl

In reply to Khem Raj

Configure looks for error_t in errno.h and musl does not define error_t if its not defined then configure emits a definition to be used, now we also use standalone argp implementation from glibc on musl based systems which defines this in argp.h as well so now we have it defined twice and errors like

| /a/builder/mnt/build-oe/tmp-musl/sysroots/raspberrypi2/usr/include/argp.h:40:13:
error: cannot combine with previous 'int' declaration specifier

| typedef int error_t;
|             ^
| ../config.h:257:17: note: expanded from macro 'error_t'
| #define error_t int
|                 ^
| 1 error generated.

are seen. argp.h definition is conditional on __error_t_defined which is true here so lets define it on musl

---
 meta/recipes-support/gpgme/gpgme_1.5.4.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-support/gpgme/gpgme_1.5.4.bb +1 -0
index 1598377..f2211f1 100644
@@ -27,6 +27,7 @@ PACKAGES =+ "${PN}-pthread"
 FILES_${PN}-pthread = "${libdir}/libgpgme-pthread.so.*"
 FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/*"
 
+CFLAGS_append_libc-musl = " -D__error_t_defined "
 do_configure_prepend () {
 	# Else these could be used in preference to those in aclocal-copy
 	rm -f ${S}/m4/gpg-error.m4
Signature · 1 line
2.7.0
author
#86 lore raw

PATCH 68/73 mdadm: Fix build with musl

In reply to Khem Raj

Define _POSIX_C_SOURCE if not defined
Add sockaddr_un* to sockaddr* typecast to make compiler happy

---
 .../0001-Define-_POSIX_C_SOURCE-if-undefined.patch | 59 ++++++++++++++++++++++
 meta/recipes-extended/mdadm/mdadm_3.3.4.bb         |  2 +-
 2 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/mdadm/files/0001-Define-_POSIX_C_SOURCE-if-undefined.patch
meta/recipes-extended/mdadm/files/0001-Define-_POSIX_C_SOURCE-if-undefined.patch new file +59 -0
new file mode 100644
index 0000000..a461b76
@@ -0,0 +1,59 @@
+From d74b02d4653d1ea26029c2528eb93d7268b83eb3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 13 Jan 2016 07:28:33 +0000
+Subject: [PATCH] Define _POSIX_C_SOURCE if undefined
+
+typecast second argument of connect() API to use struct sockaddr*
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ config.c | 3 +++
+ mdmon.c  | 2 +-
+ msg.c    | 2 +-
+ 3 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/config.c b/config.c
+index a882ed3..a675688 100644
+--- a/config.c
++++ b/config.c
+@@ -63,6 +63,9 @@
+  * but may not wrap over lines
+  *
+  */
++#ifndef _POSIX_C_SOURCE
++#define _POSIX_C_SOURCE 200809L
++#endif
+ 
+ #ifndef CONFFILE
+ #define CONFFILE "/etc/mdadm.conf"
+diff --git a/mdmon.c b/mdmon.c
+index ee12b7c..e4b73d9 100644
+--- a/mdmon.c
++++ b/mdmon.c
+@@ -235,7 +235,7 @@ static int make_control_sock(char *devname)
+ 	addr.sun_family = PF_LOCAL;
+ 	strcpy(addr.sun_path, path);
+ 	umask(077); /* ensure no world write access */
+-	if (bind(sfd, &addr, sizeof(addr)) < 0) {
++	if (bind(sfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
+ 		close(sfd);
+ 		return -1;
+ 	}
+diff --git a/msg.c b/msg.c
+index 754630b..45cd450 100644
+--- a/msg.c
++++ b/msg.c
+@@ -170,7 +170,7 @@ int connect_monitor(char *devname)
+ 
+ 	addr.sun_family = PF_LOCAL;
+ 	strcpy(addr.sun_path, path);
+-	if (connect(sfd, &addr, sizeof(addr)) < 0) {
++	if (connect(sfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
+ 		close(sfd);
+ 		return -1;
+ 	}
+-- 
+2.7.0
+
meta/recipes-extended/mdadm/mdadm_3.3.4.bb +1 -1
index 0993611..e004030 100644
@@ -14,13 +14,13 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
            file://mdadm-3.3.2_x32_abi_time_t.patch \
            file://0001-Fix-typo-in-comparision.patch \
            file://mdadm-fix-ptest-build-errors.patch \
+           file://0001-Define-_POSIX_C_SOURCE-if-undefined.patch \
            file://run-ptest \
 	  "
 SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09"
 SRC_URI[sha256sum] = "8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68"
 
 CFLAGS += "-fno-strict-aliasing"
-
 inherit autotools-brokensep
 
 EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
Signature · 1 line
2.7.0
author
#87 lore raw

PATCH 69/73 eglinfo: Fix build on raspberrypi

In reply to Khem Raj
---
 meta/recipes-graphics/eglinfo/eglinfo.inc          |  4 ++-
 ...GING_INCDIR-to-searchpath-for-egl-headers.patch | 34 ++++++++++++++++++++++
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/eglinfo/files/0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch
meta/recipes-graphics/eglinfo/eglinfo.inc +3 -1
index fb89175..d0c0c27 100644
@@ -6,7 +6,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8d4f33bc3add976f7dfae85dab66f03c"
 
 DEPENDS = "virtual/egl"
 
-SRC_URI = "git://github.com/dv1/eglinfo.git;branch=master"
+SRC_URI = "git://github.com/dv1/eglinfo.git;branch=master \
+           file://0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch \
+          "
 SRCREV = "4b317648ec6cf39556a9e5d8078f605bc0edd5de"
 
 S = "${WORKDIR}/git"
meta/recipes-graphics/eglinfo/files/0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch new file +34 -0
new file mode 100644
index 0000000..ca9f55c
@@ -0,0 +1,34 @@
+From 94b1e6daf7d70550b0e32fbb269fcf6887948d3f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 13 Jan 2016 16:08:22 -0800
+Subject: [PATCH] Add STAGING_INCDIR to searchpath for egl headers
+
+bcm_host.h is in standard includedir in sysroot
+add that to header search paths.
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted
+
+ wscript | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/wscript b/wscript
+index fcbb55b..cece8bf 100644
+--- a/wscript
++++ b/wscript
+@@ -163,9 +163,10 @@ def configure_raspberrypi_device(conf, platform):
+ 	conf.check_cxx(mandatory = 1, lib = ['GLESv2', 'EGL', 'bcm_host'], uselib_store = 'EGL')
+ 	import os
+ 	sysroot = conf.options.sysroot + conf.options.prefix
++        std_include_path = os.path.join(sysroot, 'include')
+ 	vcos_pthread_path = os.path.join(sysroot, 'include/interface/vcos/pthreads')
+ 	vcms_host_path = os.path.join(sysroot, 'include/interface/vmcs_host/linux')
+-	if not conf.check_cxx(mandatory = 0, header_name = ['vcos_platform_types.h', 'EGL/egl.h', 'bcm_host.h'], includes = [vcos_pthread_path, vcms_host_path], uselib_store = 'EGL'):
++	if not conf.check_cxx(mandatory = 0, header_name = ['vcos_platform_types.h', 'EGL/egl.h', 'bcm_host.h'], includes = [vcos_pthread_path, vcms_host_path, std_include_path], uselib_store = 'EGL'):
+ 		conf.fatal('Check if --prefix and --sysroot are set correctly.')
+ 	conf.env['WITH_APIS'] = []
+ 	if check_gles2(conf):
+-- 
+2.7.0
+
Signature · 1 line
2.7.0
author
#88 lore raw

PATCH 70/73 puzzles: Silence warning on arm with clang

In reply to Khem Raj

Clang finds overflows when comparison is done between an unsigned char and a integer constant. So explicitly typecast the constant before comparison

---
 ...1-palisade-Fix-warnings-with-clang-on-arm.patch | 72 ++++++++++++++++++++++
 meta/recipes-sato/puzzles/puzzles_git.bb           |  1 +
 2 files changed, 73 insertions(+)
 create mode 100644 meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch
meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch new file +72 -0
new file mode 100644
index 0000000..5351f8e
@@ -0,0 +1,72 @@
+From 6d8326275802a2e6e61d3e99460af6891ae8362f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 13 Jan 2016 23:10:19 -0800
+Subject: [puzzles][PATCH] palisade: Fix warnings with clang on arm
+
+ARM treats 'char' as unsigned char when 'char' is not qualified with
+'signed' or 'unsigned' explicitly.
+
+This results in warnings e.g.
+
+palisade.c:531:22: error: comparison of constant -1 with expression of
+type 'clue' (aka 'char') is always false
+[-Werror,-Wtautological-constant-out-of-range-compare]
+        if (clues[i] == EMPTY) continue;
+
+Therefore, typcast the contant to char in such places to be explicit
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted
+
+ palisade.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/palisade.c b/palisade.c
+index 984e616..2b9c25c 100644
+--- a/palisade.c
++++ b/palisade.c
+@@ -295,11 +295,11 @@ static void solver_connected_clues_versus_region_size(solver_ctx *ctx)
+      * If p = q = 3 then the region has size exactly 2. */
+ 
+     for (i = 0; i < wh; ++i) {
+-        if (ctx->clues[i] == EMPTY) continue;
++        if (ctx->clues[i] == (char)EMPTY) continue;
+         for (dir = 0; dir < 4; ++dir) {
+             int j = i + dx[dir] + w*dy[dir];
+             if (disconnected(ctx, i, j, dir)) continue;
+-            if (ctx->clues[j] == EMPTY) continue;
++            if (ctx->clues[j] == (char)EMPTY) continue;
+             if ((8 - ctx->clues[i] - ctx->clues[j] > ctx->params->k) ||
+                 (ctx->clues[i] == 3 && ctx->clues[j] == 3 &&
+                  ctx->params->k != 2))
+@@ -317,7 +317,7 @@ static int solver_number_exhausted(solver_ctx *ctx)
+     int changed = FALSE;
+ 
+     for (i = 0; i < wh; ++i) {
+-        if (ctx->clues[i] == EMPTY) continue;
++        if (ctx->clues[i] == (char)EMPTY) continue;
+ 
+         if (bitcount[(ctx->borders[i] & BORDER_MASK)] == ctx->clues[i]) {
+             for (dir = 0; dir < 4; ++dir) {
+@@ -528,7 +528,7 @@ static int is_solved(const game_params *params, clue *clues,
+     for (i = 0; i < wh; ++i) {
+         if (dsf[i] == UNVISITED) dfs_dsf(i, params->w, border, dsf, TRUE);
+         if (dsf_size(dsf, i) != k) goto error;
+-        if (clues[i] == EMPTY) continue;
++        if (clues[i] == (char)EMPTY) continue;
+         if (clues[i] != bitcount[border[i] & BORDER_MASK]) goto error;
+     }
+ 
+@@ -674,7 +674,7 @@ static char *new_game_desc(const game_params *params, random_state *rs,
+     p = numbers;
+     r = 0;
+     for (i = 0; i < wh; ++i) {
+-        if (numbers[i] != EMPTY) {
++        if (numbers[i] != (char)EMPTY) {
+             while (r) {
+                 while (r > 26) {
+                     *p++ = 'z';
+-- 
+2.7.0
+
meta/recipes-sato/puzzles/puzzles_git.bb +1 -0
index 9c8170c..dab5440 100644
@@ -13,6 +13,7 @@ SRC_URI = "git://git.tartarus.org/simon/puzzles.git \
            file://fix-compiling-failure-with-option-g-O.patch \
            file://0001-Use-labs-instead-of-abs.patch \
            file://0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch \
+           file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
 "
 SRCREV = "346584bf6e38232be8773c24fd7dedcbd7b3d9ed"
 PE = "1"
Signature · 1 line
2.7.0
author
#89 lore raw

PATCH 71/73 binutils: Fix gold linking errors due to unresolved R_ARM_MOVW_ABS_NC

In reply to Khem Raj

This issue has been seen in multiple times e.g.

http://patchwork.openembedded.org/patch/103083/

https://www.mail-archive.com/[email protected]/msg72513.html

---
 meta/recipes-devtools/binutils/binutils-2.25.1.inc |    1 +
 ...h-adds-IFUNC-support-for-arm-gold-backend.patch | 1004 ++++++++++++++++++++
 2 files changed, 1005 insertions(+)
 create mode 100644 meta/recipes-devtools/binutils/binutils/0016-This-patch-adds-IFUNC-support-for-arm-gold-backend.patch
meta/recipes-devtools/binutils/binutils-2.25.1.inc +1 -0
index bf29da1..dc23c4d 100644
@@ -35,6 +35,7 @@ SRC_URI = "\
      file://0013-Fix-an-internal-error-in-do_print_to_mapfile-seen-wi.patch \
      file://0014-gold-arm-Skip-pic-check-for-R_ARM_REL32.patch \
      file://0015-Fix-dynamic-list-so-that-symbols-not-in-the-list-are.patch \
+     file://0016-This-patch-adds-IFUNC-support-for-arm-gold-backend.patch \
      file://binutils-octeon3.patch \
      file://add-thunderx-support-for-gas.patch \
      "
meta/recipes-devtools/binutils/binutils/0016-This-patch-adds-IFUNC-support-for-arm-gold-backend.patch new file +1004 -0

1,004 lines not on this page · raw message

Signature · 1 line
2.7.0
author
#90 lore raw

PATCH 72/73 syslinux: Set LD to avoid using build host ld

In reply to Khem Raj

base ld is used during link phase and since its x86 so it works mostly, however it can cause problems depending upon build host. During cross build we should use cross linker Fixes errors e.g.

ld -shared -m elf_i386 --hash-style=gnu -T /home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/work/i586-oe-linux/syslinux/6.03-r0/syslinux-6.03/com32/lib/i386/elf.ld -soname libcom32.c32 -o libcom32.elf zlib/adler32.o zlib/compress.
o zlib/crc32.o zlib/uncompr.o zlib/deflate.o zlib/trees.o zlib/zutil.o
zlib/inflate.o zlib/infback.o zlib/inftrees.o zlib/inffast.o sys/zfile.o
sys/zfopen.o libpng/png.o libpng/pngset.o libpng/pngget.o
libpng/pngrutil.o libpng/pngtrans.o
libpng/pngwutil.o libpng/pngread.o libpng/pngrio.o libpng/pngwio.o
libpng/pngwrite.o libpng/pngrtran.o libpng/pngwtran.o libpng/pngmem.o
libpng/pngerror.o libpng/pngpread.o jpeg/tinyjpeg.o jpeg/jidctflt.o
jpeg/decode1.o jpeg/decode3.o jpe
g/rgb24.o jpeg/bgr24.o jpeg/yuv420p.o jpeg/grey.o jpeg/rgba32.o
jpeg/bgra32.o pci/cfgtype.o pci/scan.o pci/bios.o pci/readb.o
pci/readw.o pci/readl.o pci/writeb.o pci/writew.o pci/writel.o
sys/vesacon_write.o sys/vesaserial_write.o sys/ve
sa/initvesa.o sys/vesa/drawtxt.o sys/vesa/background.o
sys/vesa/alphatbl.o sys/vesa/screencpy.o sys/vesa/fmtpixel.o
sys/vesa/i915resolution.o syslinux/reboot.o syslinux/keyboard.o
syslinux/version.o syslinux/pxe_get_cached.o syslinux/pxe_get_nic.o
syslinux/pxe_dns.o syslinux/video/fontquery.o
syslinux/video/reportmode.o syslinux/addlist.o syslinux/freelist.o
syslinux/memmap.o syslinux/movebits.o syslinux/shuffle.o
syslinux/shuffle_pm.o syslinux/shuffle_rm.o syslinux/bios$oot.o
syslinux/zonelist.o syslinux/dump_mmap.o syslinux/dump_movelist.o
syslinux/run_default.o syslinux/run_command.o syslinux/cleanup.o
syslinux/localboot.o syslinux/runimage.o syslinux/loadfile.o
syslinux/floadfile.o syslinux/zloadfile$o syslinux/load_linux.o
syslinux/initramfs.o syslinux/initramfs_file.o
syslinux/initramfs_loadfile.o syslinux/initramfs_archive.o sys/libansi.o
sys/gpxe.o atexit.o onexit.o abort.o

| ld: zlib/deflate.o: unrecognized relocation (0x2b) in section `.text'
| ld: final link failed: Bad value
| make[4]: *** [libcom32.elf] Error 1
---
 meta/recipes-devtools/syslinux/syslinux_6.03.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/syslinux/syslinux_6.03.bb +2 -2
index 8534528..51d5474 100644
@@ -59,11 +59,11 @@ do_compile() {
 
 	# Rebuild only the installer; keep precompiled bootloaders
 	# as per author's request (doc/distrib.txt)
-	oe_runmake CC="${CC} ${CFLAGS}" LDFLAGS="${LDFLAGS}" firmware="bios" installer
+	oe_runmake CC="${CC} ${CFLAGS}" LD="${LD}" LDFLAGS="${LDFLAGS}" firmware="bios" installer
 }
 
 do_install() {
-	oe_runmake CC="${CC} ${CFLAGS}" install INSTALLROOT="${D}" firmware="bios"
+	oe_runmake CC="${CC} ${CFLAGS}" LD="${LD}" install INSTALLROOT="${D}" firmware="bios"
 
 	install -d ${D}${datadir}/syslinux/
 	install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/
Signature · 1 line
2.7.0
author
#91 lore raw

PATCH 73/73 glib-2.0: Fix locale location on musl

In reply to Khem Raj

gettext.m4 macro does not detect musl triplets and falls back to ${libdir}/locale

It ends up with lot of packging warning
"files installed but not packaged"

---
 .../{uclibc.patch => uclibc_musl_translation.patch}  | 20 +++++++++++---------
 meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb        |  2 +-
 meta/recipes-core/glib-2.0/glib.inc                  |  4 ++++
 3 files changed, 16 insertions(+), 10 deletions(-)
 rename meta/recipes-core/glib-2.0/glib-2.0/{uclibc.patch => uclibc_musl_translation.patch} (51%)
meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch renamed from meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch +11 -9
similarity index 51%
rename from meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch
rename to meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch
index 2a154fd..7aa6217 100644
@@ -5,16 +5,18 @@ based systems therefore lets set DATADIRNAME to "share".
 
 Signed-off-by: Khem Raj <[email protected]>
 Upstream-Status: Pending
-Index: glib-2.38.2/m4macros/glib-gettext.m4
+Index: glib-2.46.1/m4macros/glib-gettext.m4
 ===================================================================
---- glib-2.38.2.orig/m4macros/glib-gettext.m4	2013-11-07 07:29:13.000000000 -0800
-+++ glib-2.38.2/m4macros/glib-gettext.m4	2014-03-15 14:51:54.712135644 -0700
-@@ -239,7 +239,7 @@
- 	      [CATOBJEXT=.mo
-                DATADIRNAME=lib])
- 	    ;;
--	    *-*-openbsd*)
-+	    *-*-openbsd* | *-*-linux-uclibc*)
+--- glib-2.46.1.orig/m4macros/glib-gettext.m4
++++ glib-2.46.1/m4macros/glib-gettext.m4
+@@ -243,6 +243,10 @@ msgstr ""
  	    CATOBJEXT=.mo
              DATADIRNAME=share
  	    ;;
++	    *-*-musl* | *-*-linux-uclibc*)
++	    CATOBJEXT=.gmo
++            DATADIRNAME=share
++	    ;;
+ 	    *)
+ 	    CATOBJEXT=.mo
+             DATADIRNAME=lib
meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb +1 -1
index 04951f4..937ae65 100644
@@ -11,7 +11,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
            file://glib-2.0-configure-readlink.patch \
            file://run-ptest \
            file://ptest-paths.patch \
-           file://uclibc.patch \
+           file://uclibc_musl_translation.patch \
            file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \
            file://allow-run-media-sdX-drive-mount-if-username-root.patch \
 	   file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
meta/recipes-core/glib-2.0/glib.inc +4 -0
index 86f7e0e..66082a2 100644
@@ -73,6 +73,10 @@ do_install_append () {
 	fi
 }
 
+do_install_append_libc-musl () {
+	rm -f ${D}${libdir}/charset.alias
+}
+
 RDEPENDS_${PN}-ptest += "\
             gnome-desktop-testing \
             tzdata \
Signature · 1 line
2.7.0
author
#92 lore raw
In reply to Khem Raj
Quoted 18 lines · Khem Raj

This patchset rebases the last pull request on top of latest master since lot of recipes went in and the patches wont apply straight

core-image-weston/core-image-sato/core-image-full-cmdline build for all qemu machines work well.

No regressions seen on glibc based world builds

Here are some of world build results for qemu (musl)

http://errors.yoctoproject.org/Errors/Build/11636/
http://errors.yoctoproject.org/Errors/Build/11637/
http://errors.yoctoproject.org/Errors/Build/11638/

Quoted 6 lines

more to follow as the run finishes

One patch is for upgrading uclibc to 1.0.11

The following changes since commit b3b679d5be86f73d1a06c7230cb00872f0a407b5:

For glibc I see 1 issue on qemuarm which is valgrind and I think Andre wanted to send a patch to fix it since valgrind won’t work on arm < v7 without patching. Another issue on ppc kernel is due to 2.26 binutils/gas upgrade, I have sent and email about that separately besides that all world builds are clean.

uclibc/qemu runs

Building world for qemuarm/uclibc...
Your entry can be found here: http://errors.yoctoproject.org/Errors/Build/11654/
Building world for qemuarm64/uclibc...
Your entry can be found here: http://errors.yoctoproject.org/Errors/Build/11655/
Building world for qemux86/uclibc...
Your entry can be found here: http://errors.yoctoproject.org/Errors/Build/11657/
Building world for qemux86-64/uclibc...
Your entry can be found here: http://errors.yoctoproject.org/Errors/Build/11658/
Building world for qemumips/uclibc...
Your entry can be found here: http://errors.yoctoproject.org/Errors/Build/11660/
Building world for qemuppc/uclibc...
Your entry can be found here: http://errors.yoctoproject.org/Errors/Build/11661/

musl/qemu world builds

---------------------------------------------------------------------
Building world for qemuarm/musl ...
Your entry can be found here: http://errors.yoctoproject.org/Errors/Build/11636/
---------------------------------------------------------------------
Building world for qemuarm64/musl ...
Your entry can be found here: http://errors.yoctoproject.org/Errors/Build/11637/
---------------------------------------------------------------------
Building world for qemux86/musl ...
Your entry can be found here: http://errors.yoctoproject.org/Errors/Build/11638/
---------------------------------------------------------------------
Building world for qemux86-64/musl ...
Your entry can be found here: http://errors.yoctoproject.org/Errors/Build/11640/
---------------------------------------------------------------------
Building world for qemumips/musl ...
Your entry can be found here: http://errors.yoctoproject.org/Errors/Build/11641/
---------------------------------------------------------------------
Building world for qemuppc/musl ...
Your entry can be found here: http://errors.yoctoproject.org/Errors/Build/11645/

Quoted 361 lines

openssh: update to 7.1p2 (2016-01-15 15:44:51 +0000)

are available in the git repository at:

git://github.com/kraj/openembedded-core kraj/musl-fixes
https://github.com/kraj/openembedded-core/tree/kraj/musl-fixes

Khem Raj (72):
powertop: Include right headers for timval struct
blktrace: Include <sys/types.h for dev_t
ppp: Fix build with musl
tcp-wrappers: Fix build with musl
fts: Add recipe
connman: include config.h for HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR
libcgroup: Add dependency on fts when building on musl
linux-libc-headers: Port patches for linux-headers for musl
xserver-xorg: Fix build with musl
gdk-pixbuf: Fix latent build issue exposed by musl
argp-standalone: Add recipe
gnutls: Link with libargp on musl and depend on argp-standalone
util-linux: Fix ptest builds on musl
elfutils: Fix build with uclibc/musl
systemd: Update and fix build with uclibc packagegroup-self-hosted.bb: Move glibc-gconv-ibm850 to glibc only
case
guile: Fix build with uclibc
gnutls: Link with libuargp on uclibc
mtools: Fix build with uclibc
parted: Fix build with uclibc
net-tools: Link with libintl on uclibc
libdrm: Upgrade 2.4.65 -> 2.4.66
directfb: Fix build with musl
gzip: Fix build with musl
watchdog: Fix build with musl
xinetd: Fix build with musl
dpkg: Add musleabi to known architectures
puzzles: Zero'ise structs before use
apt: Add support for building for musl targets
libunwind: backtrace APIs are glibc specific
babeltrace: Add missing header for MAXNAMLEN define
sysklogd: untangle header inclusion maze
console-tools: Include sys/types.h for u_char and u_short defs
webkitgtk: Fix build with clang/musl
rt-tests: Fix build with non-gcc compilers
tar: Fix build for musl based targets
pax: Fix build with musl
iputils: Use member based initialization for mrghdr struct
libuser: Fix build when secure getenv is not there
iproute2: Fix build with musl
irda-utils: Fix header inclusions
nspr: Drop older glibc code
chkconfig: Avoid using caddr_t
tcf-agent: Implement canonicalize_file_name() for musl as well bsd-headers,musl: Add recipe for bsd missing features
nfs-utils: Disable tcp-wrappers for musl
portmap: Point to tirpc headers and libraries on musl
systemd: Skip parsing on musl based targets
libsolv: Update to 0.6.17+
db: Use cross libtool
kexec-tools: Define _GNU_SOURCE for getting loff_t definition
pcmciautils: Fix parallel build and include sys/types.h
btrfs-tools: Disable backtrace on musl
apmd: Fix build with musl
nss: Undefine HAVE_SYS_CDEFS_H
dosfstools: Correct cross-compile CFLAGS and fix build with musl
fts: Fix linker hash-style option
musl: Create ld.so as a relative symlink
bsd-headers: Package cdefs.h
guile: Fix build with musl
unfs3: Depend on libtirpc when building on musl
uclibc: Update to 1.0.11
acpid: Fix build on musl
grub: Backport fix for largefile detection/use
console-tools: Fix header inclusion when not using glibc
gpgme: Define __error_t_defined on musl
mdadm: Fix build with musl
eglinfo: Fix build on raspberrypi
puzzles: Silence warning on arm with clang
binutils: Fix gold linking errors due to unresolved R_ARM_MOVW_ABS_NC
syslinux: Set LD to avoid using build host ld
glib-2.0: Fix locale location on musl

Ross Burton (1):
oprofile: fix build with musl

meta/recipes-bsp/acpid/acpid.inc                   |    2 +
...1-Define-isfdtype-if-libc-doesn-t-have-it.patch |   62 +
...-config.h-from-builddir-instead-of-srcdir.patch |   51 +
meta/recipes-bsp/apmd/apmd/wexitcode.patch         |   26 +
meta/recipes-bsp/apmd/apmd_3.2.2-15.bb             |    1 +
...ct-_llseek-code-and-require-long-filesyst.patch |   80 +
meta/recipes-bsp/grub/grub-efi_2.00.bb             |    2 +
...-mfpmath-sse-as-well-when-SSE-is-disabled.patch |   46 +
...1-grub.d-10_linux.in-add-oe-s-kernel-name.patch |   56 +
meta/recipes-bsp/grub/grub2.inc                    |    1 +
meta/recipes-bsp/grub/grub_2.00.bb                 |    2 +
meta/recipes-bsp/grub/grub_git.bb                  |   13 +-
.../0001-fix-a-parallel-building-issue.patch       |   18 +-
.../pcmciautils-018/lex_sys_types.patch            |   21 +
meta/recipes-bsp/pcmciautils/pcmciautils_018.bb    |    1 +
.../0003-Fix-header-inclusions-for-musl.patch      |   79 +-
.../iproute2/iproute2/iproute2-4.3.0-musl.patch    |   97 +
.../iproute2/iproute2_4.3.0.bb                     |    1 +
.../irda-utils/irda-utils-0.9.18/musl.patch        |   29 +
.../irda-utils/irda-utils_0.9.18.bb                |    1 +
.../nfs-utils/nfs-utils_1.3.3.bb                   |    1 +
meta/recipes-connectivity/portmap/portmap_6.0.bb   |    4 +
.../ppp/ppp/0001-Fix-build-with-musl.patch         |  163 +
meta/recipes-connectivity/ppp/ppp_2.4.7.bb         |    3 +
meta/recipes-core/bsd-headers/bsd-headers.bb       |   27 +
.../bsd-headers/bsd-headers/sys-cdefs.h            |   26 +
.../bsd-headers/bsd-headers/sys-queue.h            |  846 +++
.../bsd-headers/bsd-headers/sys-tree.h             |  761 +++
.../0001-Cover-the-else-with-__GLIBC__.patch       |   51 +
...clude-sys-types.h-for-u_char-and-u_short-.patch |   44 +
.../console-tools/console-tools_0.3.2.bb           |    4 +
meta/recipes-core/fts/fts.bb                       |   45 +
.../fts/fts/fts-header-correctness.patch           |   25 +
meta/recipes-core/fts/fts/fts-uclibc.patch         |   50 +
meta/recipes-core/fts/fts/gcc5.patch               | 1368 +++++
meta/recipes-core/fts/fts/remove_cdefs.patch       |   69 +
meta/recipes-core/fts/fts/stdint.patch             |   15 +
...{uclibc.patch => uclibc_musl_translation.patch} |   20 +-
meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb      |    2 +-
meta/recipes-core/glib-2.0/glib.inc                |    4 +
.../libcgroup/libcgroup/musl-decls-compat.patch    |  235 +
meta/recipes-core/libcgroup/libcgroup_0.41.bb      |    4 +
...dynamic-linker-a-relative-symlink-to-libc.patch |   34 +
meta/recipes-core/musl/musl_git.bb                 |    4 +-
.../packagegroups/packagegroup-self-hosted.bb      |    2 +-
.../systemd/0001-define-exp10-if-missing.patch     |    4 +-
...r-getty-to-agetty-in-console-setup-system.patch |    4 +-
...pper-instead-of-looking-for-relative-opti.patch |   61 +
...v-when-secure-versions-are-not-available.patch} |   21 +-
...c-Change-the-default-device-timeout-to-2.patch} |    4 +-
...-install-dependency-links-at-install-tim.patch} |    6 +-
...eck-for-additional-features-that-uclibc-.patch} |   12 +-
...n-Use-execvpe-only-when-libc-supports-it.patch} |    4 +-
...unimplemented-_SC_PHYS_PAGES-system-conf.patch} |    4 +-
...010-implment-systemd-sysv-install-for-OE.patch} |    4 +-
...es-Build-conditionally-when-HAVE_MYHOSTN.patch} |    6 +-
...patch => 0012-rules-whitelist-hd-devices.patch} |    4 +-
...or-add-support-for-executing-scripts-und.patch} |    4 +-
...-Make-root-s-home-directory-configurable.patch} |   14 +-
...015-systemd-user-avoid-using-system-auth.patch} |    4 +-
...vert-rules-remove-firmware-loading-rules.patch} |    4 +-
...remove-userspace-firmware-loading-suppor.patch} |   16 +-
...sing.h-for-getting-secure_getenv-definiti.patch |   25 +
...il-don-t-fail-if-libc-doesn-t-support-IDN.patch |   34 +
meta/recipes-core/systemd/systemd_228.bb           |   50 +-
meta/recipes-core/uclibc/uclibc-git.inc            |    5 +-
.../uclibc-git/0003-Add-argp-implementation.patch  | 5811 --------------------
.../util-linux/uuid-test-error-api.patch           |   92 +
meta/recipes-core/util-linux/util-linux_2.27.1.bb  |    1 +
meta/recipes-devtools/apt/apt.inc                  |    1 +
....mak-musl-based-systems-can-generate-shar.patch |   29 +
meta/recipes-devtools/apt/apt_1.0.10.1.bb          |    3 +-
meta/recipes-devtools/binutils/binutils-2.25.1.inc |    1 +
...h-adds-IFUNC-support-for-arm-gold-backend.patch | 1004 ++++
...001-btrfs-corrupt-blocks-Include-limits.h.patch |   34 +
.../btrfs-tools/btrfs-tools_4.3.1.bb               |    3 +
.../0001-mkfs.fat-fix-incorrect-int-type.patch     |   46 +
.../dosfstools/dosfstools/largefile.patch          |   19 +
.../dosfstools/dosfstools_3.0.28.bb                |    7 +-
...0006-add-musleabi-to-known-target-tripets.patch |   42 +
meta/recipes-devtools/dpkg/dpkg_1.18.2.bb          |    3 +-
...de-alternatives-for-glibc-assumptions-hel.patch | 1161 ++++
.../elfutils/elfutils-0.164/aarch64_uio.patch      |   47 +
.../elfutils/elfutils-0.164/shadow.patch           |   23 +
.../elfutils/elfutils-0.164/uclibc-support.patch   |  129 +
.../elfutils/elfutils/mempcpy.patch                |   24 -
meta/recipes-devtools/elfutils/elfutils_0.148.bb   |    1 -
meta/recipes-devtools/elfutils/elfutils_0.164.bb   |   13 +-
...guile-Check-for-strtol_l-during-configure.patch |   56 +
.../guile/files/remove_strcase_l_funcs.patch       |   38 +
meta/recipes-devtools/guile/guile_2.0.11.bb        |   13 +
meta/recipes-devtools/mtools/mtools_4.0.18.bb      |    3 +
meta/recipes-devtools/syslinux/syslinux_6.03.bb    |    4 +-
...nonicalize_file_name-is-specific-to-glibc.patch |   46 +
meta/recipes-devtools/tcf-agent/tcf-agent_git.bb   |    1 +
meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb   |    8 +-
.../chkconfig/chkconfig/replace_caddr_t.patch      |   33 +
.../recipes-extended/chkconfig/chkconfig_1.3.58.bb |    4 +-
meta/recipes-extended/gzip/gzip.inc                |    7 +
.../files/0001-Fix-header-inclusion-for-musl.patch |   92 +
.../0001-Intialize-struct-elements-by-name.patch   |   52 +
meta/recipes-extended/iputils/iputils_s20151218.bb |    2 +
meta/recipes-extended/libsolv/libsolv_git.bb       |    4 +-
.../libuser/libuser/0001-Check-for-issetugid.patch |   62 +
.../libuser/0002-remove-unused-execinfo.h.patch    |   27 +
meta/recipes-extended/libuser/libuser_0.62.bb      |    4 +-
.../0001-Define-_POSIX_C_SOURCE-if-undefined.patch |   59 +
meta/recipes-extended/mdadm/mdadm_3.3.4.bb         |    2 +-
.../net-tools/net-tools/musl-fixes.patch           |  100 +
.../net-tools/net-tools_1.60-26.bb                 |    3 +-
meta/recipes-extended/parted/parted_3.2.bb         |    3 +-
.../pax/pax/0001-Fix-build-with-musl.patch         | 1287 +++++
.../pax/0001-use-strtoll-instead-of-strtoq.patch   |   33 +
meta/recipes-extended/pax/pax_3.4.bb               |   10 +
.../sysklogd/files/0001-Fix-build-with-musl.patch  |  132 +
meta/recipes-extended/sysklogd/sysklogd.inc        |    1 +
meta/recipes-extended/tar/tar/musl_dirent.patch    |   19 +
meta/recipes-extended/tar/tar_1.28.bb              |    6 +
.../tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch |   31 +
.../tcp-wrappers/tcp-wrappers_7.6.bb               |    4 +
...d-issues-found-with-non-glibc-C-libraries.patch |   99 +
meta/recipes-extended/watchdog/watchdog_5.14.bb    |    8 +-
...se-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch |  100 +
meta/recipes-extended/xinetd/xinetd_2.3.15.bb      |    5 +
.../gdk-pixbuf/gdk-pixbuf/libc_memfuncs.patch      |   63 +
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb |    1 +
meta/recipes-graphics/directfb/directfb.inc        |    3 +
.../directfb/directfb/compar_fn_t.patch            |   62 +
.../directfb/directfb/union-sigval.patch           |   19 +
.../directfb/use-PTHREAD_MUTEX_RECURSIVE.patch     |  116 +
...tests-kms-steal-crtc-Include-sys-select.h.patch |   33 +
.../recipes-graphics/drm/libdrm/installtests.patch |   24 +-
.../drm/{libdrm_2.4.65.bb => libdrm_2.4.66.bb}     |    8 +-
meta/recipes-graphics/eglinfo/eglinfo.inc          |    4 +-
...GING_INCDIR-to-searchpath-for-egl-headers.patch |   34 +
.../xserver-xorg/musl-arm-inb-outb.patch           |   18 +
.../xorg-xserver/xserver-xorg_1.18.0.bb            |    4 +-
...-include-sys-types.h-for-dev_t-definition.patch |   30 +
meta/recipes-kernel/blktrace/blktrace_git.bb       |    4 +-
.../0001-vmcore-dmesg-Define-_GNU_SOURCE.patch     |   31 +
meta/recipes-kernel/kexec/kexec-tools_2.0.11.bb    |    1 +
...mpat.h-fix-some-issues-arising-from-in6.h.patch |   82 +
...t.h-prevent-redefinition-of-struct-ethhdr.patch |   59 +
...remove-inclusion-of-sysinfo.h-in-kernel.h.patch |   32 +
.../linux-libc-headers/linux-libc-headers_4.1.bb   |    5 +
...Include-sys-param.h-for-MAXNAMLEN-definti.patch |   29 +
meta/recipes-kernel/lttng/babeltrace_1.3.1.bb      |    5 +-
meta/recipes-kernel/oprofile/oprofile.inc          |    2 +
meta/recipes-kernel/oprofile/oprofile/musl.patch   |   46 +
...0001-include-rquired-headers-for-typedefs.patch |   47 +
meta/recipes-kernel/powertop/powertop_2.8.bb       |    4 +-
...t-CC-AR-variable-only-if-it-doesn-t-have-.patch |   30 +
meta/recipes-rt/rt-tests/rt-tests_0.96.bb          |    3 +-
...1-palisade-Fix-warnings-with-clang-on-arm.patch |   72 +
...mpiler-errors-about-uninitialized-use-of-.patch |   32 +
meta/recipes-sato/puzzles/puzzles_git.bb           |    2 +
...nable-backtrace-on-linux-when-using-glibc.patch |   39 +
...x-build-with-non-glibc-libraries-on-linux.patch |   61 +
meta/recipes-sato/webkit/webkitgtk/clang.patch     |   25 +
meta/recipes-sato/webkit/webkitgtk_2.10.4.bb       |    3 +
.../argp-standalone/argp-standalone_1.3.bb         |   28 +
.../files/0001-throw-in-funcdef.patch              |   84 +
.../argp-standalone/files/0002-isprint.patch       |   51 +
meta/recipes-support/db/db_5.3.28.bb               |    1 +
meta/recipes-support/db/db_6.0.30.bb               |    1 +
meta/recipes-support/gnutls/gnutls.inc             |    5 +-
meta/recipes-support/gpgme/gpgme_1.5.4.bb          |    1 +
...-backtrace-Use-only-with-glibc-and-uclibc.patch |   45 +
meta/recipes-support/libunwind/libunwind_1.1.bb    |    1 +
...001-Remove-the-check-for-LINUX-glibc-case.patch |   35 +
meta/recipes-support/nspr/nspr_4.11.bb             |    9 +
meta/recipes-support/nss/nss_3.19.2.bb             |    4 +
172 files changed, 10817 insertions(+), 6019 deletions(-)

create mode 100644 meta/recipes-bsp/acpid/acpid/0001-Define-isfdtype-if-libc-doesn-t-have-it.patch
create mode 100644 meta/recipes-bsp/acpid/acpid/0001-Use-config.h-from-builddir-instead-of-srcdir.patch
create mode 100644 meta/recipes-bsp/apmd/apmd/wexitcode.patch
create mode 100644 meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch
create mode 100644 meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
create mode 100644 meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
create mode 100644 meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch
create mode 100644 meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch
create mode 100644 meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch
create mode 100644 meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch
create mode 100644 meta/recipes-core/bsd-headers/bsd-headers.bb
create mode 100644 meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h
create mode 100644 meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h
create mode 100644 meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h
create mode 100644 meta/recipes-core/console-tools/console-tools-0.3.2/0001-Cover-the-else-with-__GLIBC__.patch
create mode 100644 meta/recipes-core/console-tools/console-tools-0.3.2/0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch
create mode 100644 meta/recipes-core/fts/fts.bb
create mode 100644 meta/recipes-core/fts/fts/fts-header-correctness.patch
create mode 100644 meta/recipes-core/fts/fts/fts-uclibc.patch
create mode 100644 meta/recipes-core/fts/fts/gcc5.patch
create mode 100644 meta/recipes-core/fts/fts/remove_cdefs.patch
create mode 100644 meta/recipes-core/fts/fts/stdint.patch
rename meta/recipes-core/glib-2.0/glib-2.0/{uclibc.patch => uclibc_musl_translation.patch} (51%)
create mode 100644 meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch
create mode 100644 meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
create mode 100644 meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
rename meta/recipes-core/systemd/systemd/{0003-Use-getenv-when-secure-versions-are-not-available.patch => 0004-Use-getenv-when-secure-versions-are-not-available.patch} (56%) rename meta/recipes-core/systemd/systemd/{0004-core-device.c-Change-the-default-device-timeout-to-2.patch => 0005-core-device.c-Change-the-default-device-timeout-to-2.patch} (88%) rename meta/recipes-core/systemd/systemd/{0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch => 0006-binfmt-Don-t-install-dependency-links-at-install-tim.patch} (92%) rename meta/recipes-core/systemd/systemd/{0006-configure-Check-for-additional-features-that-uclibc-.patch => 0007-configure-Check-for-additional-features-that-uclibc-.patch} (72%) rename meta/recipes-core/systemd/systemd/{0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch => 0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch} (89%) rename meta/recipes-core/systemd/systemd/{0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch => 0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch} (90%) rename meta/recipes-core/systemd/systemd/{0009-implment-systemd-sysv-install-for-OE.patch => 0010-implment-systemd-sysv-install-for-OE.patch} (91%) rename meta/recipes-core/systemd/systemd/{0010-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch => 0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch} (83%) rename meta/recipes-core/systemd/systemd/{0011-rules-whitelist-hd-devices.patch => 0012-rules-whitelist-hd-devices.patch} (91%)
rename meta/recipes-core/systemd/systemd/{0012-sysv-generator-add-support-for-executing-scripts-und.patch => 0013-sysv-generator-add-support-for-executing-scripts-und.patch} (98%) rename meta/recipes-core/systemd/systemd/{0013-Make-root-s-home-directory-configurable.patch => 0014-Make-root-s-home-directory-configurable.patch} (95%) rename meta/recipes-core/systemd/systemd/{0014-systemd-user-avoid-using-system-auth.patch => 0015-systemd-user-avoid-using-system-auth.patch} (87%) rename meta/recipes-core/systemd/systemd/{0015-Revert-rules-remove-firmware-loading-rules.patch => 0016-Revert-rules-remove-firmware-loading-rules.patch} (84%) rename meta/recipes-core/systemd/systemd/{0016-Revert-udev-remove-userspace-firmware-loading-suppor.patch => 0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch} (96%) create mode 100644 meta/recipes-core/systemd/systemd/0018-include-missing.h-for-getting-secure_getenv-definiti.patch
create mode 100644 meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
delete mode 100644 meta/recipes-core/uclibc/uclibc-git/0003-Add-argp-implementation.patch
create mode 100644 meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
create mode 100644 meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch
create mode 100644 meta/recipes-devtools/binutils/binutils/0016-This-patch-adds-IFUNC-support-for-arm-gold-backend.patch
create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-corrupt-blocks-Include-limits.h.patch
create mode 100644 meta/recipes-devtools/dosfstools/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch
create mode 100644 meta/recipes-devtools/dosfstools/dosfstools/largefile.patch
create mode 100644 meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch
create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch
create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch
create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch
delete mode 100644 meta/recipes-devtools/elfutils/elfutils/mempcpy.patch
create mode 100644 meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch
create mode 100644 meta/recipes-devtools/guile/files/remove_strcase_l_funcs.patch
create mode 100644 meta/recipes-devtools/tcf-agent/tcf-agent/0001-canonicalize_file_name-is-specific-to-glibc.patch
create mode 100644 meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch
create mode 100644 meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
create mode 100644 meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
create mode 100644 meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch
create mode 100644 meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch
create mode 100644 meta/recipes-extended/mdadm/files/0001-Define-_POSIX_C_SOURCE-if-undefined.patch
create mode 100644 meta/recipes-extended/net-tools/net-tools/musl-fixes.patch
create mode 100644 meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
create mode 100644 meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
create mode 100644 meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch
create mode 100644 meta/recipes-extended/tar/tar/musl_dirent.patch
create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch
create mode 100644 meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
create mode 100644 meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch
create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/libc_memfuncs.patch
create mode 100644 meta/recipes-graphics/directfb/directfb/compar_fn_t.patch
create mode 100644 meta/recipes-graphics/directfb/directfb/union-sigval.patch
create mode 100644 meta/recipes-graphics/directfb/directfb/use-PTHREAD_MUTEX_RECURSIVE.patch
create mode 100644 meta/recipes-graphics/drm/libdrm/0001-tests-kms-steal-crtc-Include-sys-select.h.patch
rename meta/recipes-graphics/drm/{libdrm_2.4.65.bb => libdrm_2.4.66.bb} (86%)
create mode 100644 meta/recipes-graphics/eglinfo/files/0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch
create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch
create mode 100644 meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch
create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
create mode 100644 meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch
create mode 100644 meta/recipes-kernel/oprofile/oprofile/musl.patch
create mode 100644 meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch
create mode 100644 meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch
create mode 100644 meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch
create mode 100644 meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch
create mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch
create mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch
create mode 100644 meta/recipes-sato/webkit/webkitgtk/clang.patch
create mode 100644 meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
create mode 100644 meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch
create mode 100644 meta/recipes-support/argp-standalone/files/0002-isprint.patch
create mode 100644 meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
create mode 100644 meta/recipes-support/nspr/nspr/0001-Remove-the-check-for-LINUX-glibc-case.patch

--
2.7.0