Skip to contentSkip to conversation

musl fixes to run core-image-sato and core-image-weston

PATCH In review Khem Raj 4 participants 29 messages Apr 11, 2015 – Apr 20, 2015

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

cover musl fixes to run core-image-sato and core-image-weston

This is further patchset to enable core-image-sato and core-image-weston to build and boot on qemux86 and qemumips

volatile mount patch is for ro-rfs with systemd

gdb patches are generated against git tree for better upstreamablity

e2fsprogs is general improvement

Khem Raj (17):
mtd-utils: update to latest and fix static inlining var/volatile: Mount it if doing ro-rfs
libproxy: Include select.h for posix compliance
ppp: Add extra include dirs
musl: Enable NLS
vte: Pass _GNU_SOURCE via CFLAGS
libfm-extra: Add own nls.m4
connman: Fix builds to compile on musl
perl: Fix build for musl
iptables: Fix build on musl
xserver-xorg: Use __GLIBC__ instread of __linux__ to denote glibc
dependent code
pulseaudio: Fix build with musl
sudo: Disable hardening for musl
xserver-xf86-config: Preload graphics driver modules for musl
kbd: Mark glibc headers under __GLIBC__
gdb: Refresh patches against git
e2fsprogs: Delete identical binaries and create symlinks instead

 meta/classes/image.bbclass                         |   1 +
 meta/conf/distro/include/tclibc-musl.inc           |   2 +-
 ...cktrace-API-only-when-compiling-for-glibc.patch |  41 +
 .../connman/connman/0002-musl-header-fixes.patch   | 235 ++++++
 ...resolve-musl-does-not-implement-res_ninit.patch |  77 ++
 ...Fix-duplicate-definitions-issue-with-musl.patch |  43 ++
 meta/recipes-connectivity/connman/connman_1.28.bb  |   4 +
 meta/recipes-connectivity/ppp/ppp_2.4.7.bb         |   6 +-
 meta/recipes-core/base-files/base-files/fstab      |   1 -
 .../initscripts-1.0/read-only-rootfs-hook.sh       |   2 +-
 ...-Only-inluclude-kernel-headers-with-glibc.patch |  29 +
 meta/recipes-core/kbd/kbd_2.0.2.bb                 |   1 +
 .../systemd/systemd/journald-volatile.conf         |   6 +
 .../recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb |   8 +
 meta/recipes-devtools/gdb/gdb-cross_7.9.bb         |   2 +-
 meta/recipes-devtools/gdb/gdb.inc                  |   5 +-
 ...0001-make-man-install-relative-to-DESTDIR.patch |  28 +
 ...last.diff => 0002-Change-order-of-CFLAGS.patch} |  23 +-
 ...-support-for-Renesas-SH-sh4-architecture.patch} | 835 +++++----------------
 .../gdb/0004-Change-comment-in-gdb-compile.patch   |  48 ++
 .../recipes-devtools/gdb/gdb/sim-install-6.6.patch |  14 -
 meta/recipes-devtools/gdb/gdb/sim-install.patch    |  36 -
 meta/recipes-devtools/gdb/gdb/uclibc.patch         | 196 -----
 ...emove-duplicate-hashtable_iterator_value-.patch |  64 ++
 meta/recipes-devtools/mtd/mtd-utils_git.bb         |   1 +
 meta/recipes-devtools/perl/perl_5.20.0.bb          |  23 +
 .../iptables/0001-fix-build-with-musl.patch        |  89 +++
 meta/recipes-extended/iptables/iptables_1.4.21.bb  |   1 +
 meta/recipes-extended/sudo/sudo.inc                |   2 +
 .../xserver-xf86-config/10-preload-modules.conf    |   9 +
 .../xorg-xserver/xserver-xf86-config_0.1.bb        |   9 +
 ...e-__GLIBC__-guard-for-glibc-specific-code.patch |  31 +
 .../xorg-xserver/xserver-xorg_1.16.3.bb            |   1 +
 .../0001-padsp-Make-it-compile-on-musl.patch       |  70 ++
 .../pulseaudio/pulseaudio_6.0.bb                   |   1 +
 .../0001-nls.m4-Take-it-from-gettext-0.15.patch    |  54 ++
 meta/recipes-support/libfm/libfm-extra_1.2.3.bb    |   4 +-
 ...0001-test-Include-sys-select.h-for-select.patch |  37 +
 meta/recipes-support/libproxy/libproxy_0.4.11.bb   |   1 +
 meta/recipes-support/vte/vte_0.28.2.bb             |   2 +
 40 files changed, 1136 insertions(+), 906 deletions(-)
 create mode 100644 meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch
 create mode 100644 meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch
 create mode 100644 meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch
 create mode 100644 meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch
 create mode 100644 meta/recipes-core/kbd/kbd/0003-Only-inluclude-kernel-headers-with-glibc.patch
 create mode 100644 meta/recipes-core/systemd/systemd/journald-volatile.conf
 create mode 100644 meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
 rename meta/recipes-devtools/gdb/gdb/{gdbserver-cflags-last.diff => 0002-Change-order-of-CFLAGS.patch} (55%)
 rename meta/recipes-devtools/gdb/gdb/{renesas-sh-native-support.patch => 0003-Add-support-for-Renesas-SH-sh4-architecture.patch} (60%)
 create mode 100644 meta/recipes-devtools/gdb/gdb/0004-Change-comment-in-gdb-compile.patch
 delete mode 100644 meta/recipes-devtools/gdb/gdb/sim-install-6.6.patch
 delete mode 100644 meta/recipes-devtools/gdb/gdb/sim-install.patch
 delete mode 100644 meta/recipes-devtools/gdb/gdb/uclibc.patch
 create mode 100644 meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
 create mode 100644 meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
 create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf
 create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-use-__GLIBC__-guard-for-glibc-specific-code.patch
 create mode 100644 meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch
 create mode 100644 meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch
 create mode 100644 meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch
Signature · 1 line
2.1.4
author
#1 lore raw

PATCH 1/17 mtd-utils: update to latest and fix static inlining

use static storage class instead of extern for inline functions and remove duplicate definitions as a result

Change-Id I72e8c5f19dff656c18f719d1e9e2ca697c9a856f
---
 ...emove-duplicate-hashtable_iterator_value-.patch | 64 ++++++++++++++++++++++
 meta/recipes-devtools/mtd/mtd-utils_git.bb         |  1 +
 2 files changed, 65 insertions(+)
 create mode 100644 meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch new file +64 -0
new file mode 100644
index 0000000..2d36158
@@ -0,0 +1,64 @@
+From b856ff35c20124ceae40bbc4d32584df47618c96 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 25 Feb 2015 09:28:26 +0000
+Subject: [PATCH] hashtable: Remove duplicate hashtable_iterator_value/hashtable_iterator_key
+
+gcc5 is defaulting to gnu11 instead of gnu89 like previous versions
+as a result the semantics of 'extern inline' changes where in gnu89 for 'extern inline' no external
+visible function is generated,in c99 'external inline' generates externally visible function
+there is no equivalent in c99+ because redefinitions arent allowed
+but 'static inline' remains same for for c89 and c99+, thats why we change the semantics
+so we make the functions static inline, and achieve the same effect
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: pending
+
+---
+ mkfs.ubifs/hashtable/hashtable_itr.c | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+Index: git/mkfs.ubifs/hashtable/hashtable_itr.h
+===================================================================
+--- git.orig/mkfs.ubifs/hashtable/hashtable_itr.h
++++ git/mkfs.ubifs/hashtable/hashtable_itr.h
+@@ -28,7 +28,7 @@ hashtable_iterator(struct hashtable *h);
+ /* hashtable_iterator_key
+  * - return the value of the (key,value) pair at the current position */
+ 
+-extern inline void *
++static inline void *
+ hashtable_iterator_key(struct hashtable_itr *i)
+ {
+     return i->e->k;
+@@ -37,7 +37,7 @@ hashtable_iterator_key(struct hashtable_
+ /*****************************************************************************/
+ /* value - return the value of the (key,value) pair at the current position */
+ 
+-extern inline void *
++static inline void *
+ hashtable_iterator_value(struct hashtable_itr *i)
+ {
+     return i->e->v;
+Index: git/mkfs.ubifs/hashtable/hashtable_itr.c
+===================================================================
+--- git.orig/mkfs.ubifs/hashtable/hashtable_itr.c
++++ git/mkfs.ubifs/hashtable/hashtable_itr.c
+@@ -35,18 +35,6 @@ hashtable_iterator(struct hashtable *h)
+ }
+ 
+ /*****************************************************************************/
+-/* key      - return the key of the (key,value) pair at the current position */
+-/* value    - return the value of the (key,value) pair at the current position */
+-
+-void *
+-hashtable_iterator_key(struct hashtable_itr *i)
+-{ return i->e->k; }
+-
+-void *
+-hashtable_iterator_value(struct hashtable_itr *i)
+-{ return i->e->v; }
+-
+-/*****************************************************************************/
+ /* advance - advance the iterator to the next element
+  *           returns zero if advanced to end of table */
+ 
meta/recipes-devtools/mtd/mtd-utils_git.bb +1 -0
index 12daffe..f991ea1 100644
@@ -13,6 +13,7 @@ SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
 SRC_URI = "git://git.infradead.org/mtd-utils.git \
            file://add-exclusion-to-mkfs-jffs2-git-2.patch \
            file://fix-armv7-neon-alignment.patch \
+           file://0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch \
 "
 
 S = "${WORKDIR}/git/"
Signature · 1 line
2.1.4
author
#2 lore raw

PATCH 2/17 var/volatile: Mount it if doing ro-rfs

- Do not mount /var/volatile to be tmpfs always only when generating readonly rootfs
- Generate var-volatile.mount unit when using system in readonly-rootfs to mount /var/volatile as tmpfs
- for sysvinit, mount /var/volatile to be tmpfs if its not already mounted so
- Use RequiresMountsFor instead of After=, so systemd figures out the needed dependencies for making /var/volatile accessible for journald and not us.

Change-Id I0b176b3e1c1e88e84d2c93154aac04cef565d8ea
---
 meta/classes/image.bbclass                                          | 1 +
 meta/recipes-core/base-files/base-files/fstab                       | 1 -
 .../initscripts/initscripts-1.0/read-only-rootfs-hook.sh            | 2 +-
 meta/recipes-core/systemd/systemd/journald-volatile.conf            | 6 ++++++
 4 files changed, 8 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/journald-volatile.conf
meta/classes/image.bbclass +1 -0
index 03cbbf7..5ace087 100644
@@ -230,6 +230,7 @@ read_only_rootfs_hook () {
 	fi
 
 	if ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "true", "false", d)}; then
+	    sed -e 's#/tmp#/var/volatile#g' ${IMAGE_ROOTFS}/lib/systemd/system/tmp.mount > ${IMAGE_ROOTFS}/lib/systemd/system/var-volatile.mount
 	    # Update user database files so that services don't fail for a read-only systemd system
 	    for conffile in ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd.conf ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd-remote.conf; do
 		[ -e $conffile ] || continue
meta/recipes-core/base-files/base-files/fstab +0 -1
index 739b844..56b14d7 100644
@@ -5,7 +5,6 @@ proc                 /proc                proc       defaults              0  0
 devpts               /dev/pts             devpts     mode=0620,gid=5       0  0
 usbdevfs             /proc/bus/usb        usbdevfs   noauto                0  0
 tmpfs                /run                 tmpfs      mode=0755,nodev,nosuid,strictatime 0  0
-tmpfs                /var/volatile        tmpfs      defaults              0  0
 
 # uncomment this if your device has a SD/MMC/Transflash slot
 #/dev/mmcblk0p1       /media/card          auto       defaults,sync,noauto  0  0
meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh +1 -1
index 1a0328d..3ff39f4 100644
@@ -29,7 +29,7 @@ is_on_read_only_partition () {
 
 if [ "$1" = "start" ] ; then
 	if [ `is_on_read_only_partition /var/lib` = "yes" ]; then
-		grep -q "tmpfs /var/volatile" /proc/mounts || mount /var/volatile
+		grep -q "tmpfs /var/volatile" /proc/mounts || mount -t tmpfs -o strictatime tmpfs /var/volatile
 		mkdir -p /var/volatile/lib
 		cp -a /var/lib/* /var/volatile/lib
 		mount --bind /var/volatile/lib /var/lib
meta/recipes-core/systemd/systemd/journald-volatile.conf new file +6 -0
new file mode 100644
index 0000000..9356a4e
@@ -0,0 +1,6 @@
+# If /var/volatile is a mount point then make sure to mount it before
+# the journal starts. This is because base-files creates a symlink
+# /var/log -> /var/volatile/log. And if the journal starts before the mount
+# happens, the journal will appear empty until restarted.
+[Unit]
+RequiresMountsFor=/var/volatile
Signature · 1 line
2.1.4
author
#3 lore raw

PATCH 3/17 libproxy: Include select.h for posix compliance

In reply to Khem Raj

unearthed with musl

Change-Id I527139905785f253e41dd6a2f0cf555eee752a3a
---
 ...0001-test-Include-sys-select.h-for-select.patch | 37 ++++++++++++++++++++++
 meta/recipes-support/libproxy/libproxy_0.4.11.bb   |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch
meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch new file +37 -0
new file mode 100644
index 0000000..5ae52f2
@@ -0,0 +1,37 @@
+From f5f2c2289eb35eb804c1c35e46ca41b58e4cae01 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 6 Apr 2015 14:13:49 -0700
+Subject: [PATCH] test: Include <sys/select.h> for select()
+
+As per posix we need to include this file otherwise we end up with errors like
+
+/home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/mips32r2-oe-linux-musl/libproxy/0.4.11-r0/libproxy-0.4.11/libproxy/test/get-pac-test.cpp: In member function 'bool TestServer::loop()':
+/home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/mips32r2-oe-linux-musl/libproxy/0.4.11-r0/libproxy-0.4.11/libproxy/test/get-pac-test.cpp:80:4: error: 'fd_set' was not declared in this scope
+    fd_set fds;
+    ^
+/home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/mips32r2-oe-linux-musl/libproxy/0.4.11-r0/libproxy-0.4.11/libproxy/test/get-pac-test.cpp:89:14: error: 'fds' was not declared in this scope
+    FD_ZERO (&fds);
+<JIRA TICKET #1>, <JIRA TICKET #2>, <JIRA TICKET #n> : <one line summary of change>
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ libproxy/test/get-pac-test.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libproxy/test/get-pac-test.cpp b/libproxy/test/get-pac-test.cpp
+index a61fc4b..bda4646 100644
+--- a/libproxy/test/get-pac-test.cpp
++++ b/libproxy/test/get-pac-test.cpp
+@@ -3,6 +3,7 @@
+ #include <sstream>
+ #include <string>
+ 
++#include <sys/select.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+-- 
+2.1.4
+
meta/recipes-support/libproxy/libproxy_0.4.11.bb +1 -0
index 3367c85..e709b52 100644
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
 DEPENDS = "gconf glib-2.0"
 
 SRC_URI = "http://libproxy.googlecode.com/files/libproxy-${PV}.zip \
+           file://0001-test-Include-sys-select.h-for-select.patch \
           "
 
 SRC_URI[md5sum] = "06be230b8b612e64997f8f15af6373aa"
Signature · 1 line
2.1.4
author
#4 lore raw

PATCH 4/17 ppp: Add extra include dirs

In reply to Khem Raj

Just run configure, the configure script is not really a autoconf generated script so just run it

Include path is needed to be there since
the headers from it are used during build in subcomponents

Change-Id Ib1f24fd18bc8564e3c74ab834b7cf0fdf955d0e1
---
 meta/recipes-connectivity/ppp/ppp_2.4.7.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-connectivity/ppp/ppp_2.4.7.bb +5 -1
index 92ca0c9..4219d45 100644
@@ -43,7 +43,11 @@ EXTRA_OECONF = "--disable-strip"
 # Package Makefile computes CFLAGS, referencing COPTS.
 # Typically hard-coded to '-O2 -g' in the Makefile's.
 #
-EXTRA_OEMAKE += ' COPTS="${CFLAGS}"'
+EXTRA_OEMAKE += ' COPTS="${CFLAGS} -I${S}/include"'
+
+do_configure () {
+	oe_runconf
+}
 
 do_install_append () {
 	make install-etcppp ETCDIR=${D}/${sysconfdir}/ppp
Signature · 1 line
2.1.4
author
#5 lore raw

PATCH 5/17 musl: Enable NLS

In reply to Khem Raj

It supports it, so lets enable it even though
we can compile lot of stuff without NLS but its
harder to get them all compiled without NLS

Change-Id I49a06c05b004654dabbef980c4e6ad991d581341
---
 meta/conf/distro/include/tclibc-musl.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/distro/include/tclibc-musl.inc +1 -1
index 7c1c91b..1ddd58e 100644
@@ -14,7 +14,7 @@ PREFERRED_PROVIDER_virtual/libintl ?= "musl"
 PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
 PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
 
-USE_NLS ?= "no"
+#USE_NLS ?= "no"
 
 CXXFLAGS += "-fvisibility-inlines-hidden"
 
Signature · 1 line
2.1.4
author
#6 lore raw

PATCH 6/17 vte: Pass _GNU_SOURCE via CFLAGS

In reply to Khem Raj

It uses function extentions like ptsname_r()
so we need to let build know about it

Change-Id I5a06d08c56529a6b2cf3adf264656ae03b95c1d4
---
 meta/recipes-support/vte/vte_0.28.2.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-support/vte/vte_0.28.2.bb +2 -0
index 485187d..9dab390 100644
@@ -6,5 +6,7 @@ PR = "r6"
 
 SRC_URI += "file://obsolete_automake_macros.patch"
 
+CFLAGS += "-D_GNU_SOURCE"
+
 SRC_URI[archive.md5sum] = "f07a4bf943194f94b7f142db8f7f36dc"
 SRC_URI[archive.sha256sum] = "8d04e202b617373dfb47689e5e628febe2c58840b34cccc4af4feb88c48df903"
Signature · 1 line
2.1.4
author
#7 lore raw

PATCH 7/17 libfm-extra: Add own nls.m4

In reply to Khem Raj

It helps to build when NLS is disabled distro-wide otherwise it has dependency on gettext to provide it

Change-Id Ib6920629b5ab1a1938cc5dfa447078f6fca234c7
---
 .../0001-nls.m4-Take-it-from-gettext-0.15.patch    | 54 ++++++++++++++++++++++
 meta/recipes-support/libfm/libfm-extra_1.2.3.bb    |  4 +-
 2 files changed, 57 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch
meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch new file +54 -0
new file mode 100644
index 0000000..69a51d5
@@ -0,0 +1,54 @@
+From c320799c941d42a9b7e351805359694ea3b36d2d Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sun, 5 Apr 2015 09:08:38 -0700
+Subject: [PATCH] nls.m4: Take it from gettext-0.15
+
+It otherwise expects gettext to provide it. Lets go independent
+
+Signed-off-by: Khem Raj <[email protected]>
+
+Upstream-Status: Pending
+---
+ m4/nls.m4 | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+ create mode 100644 m4/nls.m4
+
+diff --git a/m4/nls.m4 b/m4/nls.m4
+new file mode 100644
+index 0000000..2c8fe69
+--- /dev/null
++++ b/m4/nls.m4
+@@ -0,0 +1,30 @@
++dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
++dnl This file is free software; the Free Software Foundation
++dnl gives unlimited permission to copy and/or distribute it,
++dnl with or without modifications, as long as this notice is preserved.
++dnl
++dnl This file can can be used in projects which are not available under
++dnl the GNU General Public License or the GNU Library General Public
++dnl License but which still want to provide support for the GNU gettext
++dnl functionality.
++dnl Please note that the actual code of the GNU gettext library is covered
++dnl by the GNU Library General Public License, and the rest of the GNU
++dnl gettext package package is covered by the GNU General Public License.
++dnl They are not in the public domain.
++
++dnl Authors:
++dnl Ulrich Drepper [email protected], 1995-2000.
++dnl Bruno Haible [email protected], 2000-2003.
++
++AC_PREREQ(2.50)
++
++AC_DEFUN([AM_NLS],
++[
++AC_MSG_CHECKING([whether NLS is requested])
++dnl Default is enabled NLS
++AC_ARG_ENABLE(nls,
++[ --disable-nls do not use Native Language Support],
++USE_NLS=$enableval, USE_NLS=yes)
++AC_MSG_RESULT($USE_NLS)
++AC_SUBST(USE_NLS)
++])
+-- 
+2.1.4
+
meta/recipes-support/libfm/libfm-extra_1.2.3.bb +3 -1
index 85bcc3c..46d2d62 100644
@@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://src/fm-extra.h;beginline=8;endline=21;md5=ef1f84da64b
 SECTION = "x11/libs"
 DEPENDS = "glib-2.0 intltool-native"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \
+           file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
+          "
 
 SRC_URI[md5sum] = "3ff38200701658f7e80e25ed395d92dd"
 SRC_URI[sha256sum] = "c692f1624a4cbc8d1dd55f3b3f3369fbf5d26f63a916e2c295230b2344e1fbf9"
Signature · 1 line
2.1.4
author
#8 lore raw

PATCH 8/17 connman: Fix builds to compile on musl

In reply to Khem Raj

Add explicit includes for headers which are indirectly included on glibc Dont use backtrace APIs on non-glibc C libs
res_nimit is a glibc specific API in resolvers so we avoid it

Change-Id I78a173f02f8c117ebb513311f27a48bc8d645efe
---
 ...cktrace-API-only-when-compiling-for-glibc.patch |  41 ++++
 .../connman/connman/0002-musl-header-fixes.patch   | 235 +++++++++++++++++++++
 ...resolve-musl-does-not-implement-res_ninit.patch |  77 +++++++
 ...Fix-duplicate-definitions-issue-with-musl.patch |  43 ++++
 meta/recipes-connectivity/connman/connman_1.28.bb  |   4 +
 5 files changed, 400 insertions(+)
 create mode 100644 meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch
 create mode 100644 meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch
 create mode 100644 meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch
 create mode 100644 meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch
meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch new file +41 -0
new file mode 100644
index 0000000..873843b
@@ -0,0 +1,41 @@
+From b736e90681e135e0cccb143a9ce8b7049e1ec0f0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 6 Apr 2015 22:57:20 -0700
+Subject: [PATCH 1/4] Enable backtrace() API only when compiling for glibc
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/log.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/log.c b/src/log.c
+index a693bd0..3bf9fcc 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -30,7 +30,9 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <syslog.h>
++#ifdef __GLIBC__
+ #include <execinfo.h>
++#endif
+ #include <dlfcn.h>
+ 
+ #include "connman.h"
+@@ -215,9 +217,9 @@ static void print_backtrace(unsigned int offset)
+ static void signal_handler(int signo)
+ {
+ 	connman_error("Aborting (signal %d) [%s]", signo, program_exec);
+-
++#ifdef __GLIBC__
+ 	print_backtrace(2);
+-
++#endif
+ 	exit(EXIT_FAILURE);
+ }
+ 
+-- 
+2.1.4
+
meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch new file +235 -0

235 lines not on this page · raw message

meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch new file +77 -0

77 lines not on this page · raw message

meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch new file +43 -0

43 lines not on this page · raw message

meta/recipes-connectivity/connman/connman_1.28.bb +4 -0
index 53e71fa..a395d63 100644
@@ -3,6 +3,10 @@ require connman.inc
 SRC_URI  = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
             file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
             file://add_xuser_dbus_permission.patch \
+	    file://0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch \
+	    file://0002-musl-header-fixes.patch \
+	    file://0003-resolve-musl-does-not-implement-res_ninit.patch \
+	    file://0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch \
             file://connman \
             "
 SRC_URI[md5sum] = "6e07c93877f80bb73c9d4dbfc697f3fc"
Signature · 1 line
2.1.4
author
#11 lore raw

PATCH 9/17 perl: Fix build for musl

In reply to Khem Raj

The changes are covered under "${TARGET_OS}" = "linux-musl"

Change-Id I24a1a8e07abb35c7e3d64b372addfb3bd6f7731c
---
 meta/recipes-devtools/perl/perl_5.20.0.bb | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
meta/recipes-devtools/perl/perl_5.20.0.bb +23 -0
index db65202..d100ff9 100644
@@ -165,6 +165,29 @@ do_configure() {
                        -e "s,-fstack-protector,-fno-stack-protector,g" \
                     config.sh-${TARGET_ARCH}-${TARGET_OS}
         fi
+        # Fixups for musl
+        if [ "${TARGET_OS}" = "linux-musl" -o "${TARGET_OS}" = "linux-musleabi" ]; then
+                sed -i -e "s,\(d_libm_lib_version=\)'define',\1'undef',g" \
+                       -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
+                       -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
+                       -e "s,\(d_stdiobase=\)'define',\1'undef',g" \
+                       -e "s,\(d_stdstdio=\)'define',\1'undef',g" \
+                       -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
+                       -e "s,\(getprotobyname_r=\)'define',\1'undef',g" \
+                       -e "s,\(getpwent_r=\)'define',\1'undef',g" \
+                       -e "s,\(getservent_r=\)'define',\1'undef',g" \
+                       -e "s,\(gethostent_r=\)'define',\1'undef',g" \
+                       -e "s,\(getnetent_r=\)'define',\1'undef',g" \
+                       -e "s,\(getnetbyaddr_r=\)'define',\1'undef',g" \
+                       -e "s,\(getprotoent_r=\)'define',\1'undef',g" \
+                       -e "s,\(getprotobynumber_r=\)'define',\1'undef',g" \
+                       -e "s,\(getgrent_r=\)'define',\1'undef',g" \
+                       -e "s,\(i_fcntl=\)'undef',\1'define',g" \
+                       -e "s,\(h_fcntl=\)'false',\1'true',g" \
+                       -e "s,-fstack-protector,-fno-stack-protector,g" \
+                       -e "s,-lnsl,,g" \
+                    config.sh-${TARGET_ARCH}-${TARGET_OS}
+        fi
 
 	${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '', 'do_nolargefile', d)}
 
Signature · 1 line
2.1.4
author
#12 lore raw

PATCH 10/17 iptables: Fix build on musl

In reply to Khem Raj

Added needed headers and resuffled existing ones to get it portable Added defined for missing TCOPTS*

Change-Id I74977dd052c5569b00631379d7f4bacfb86cf381
---
 .../iptables/0001-fix-build-with-musl.patch        | 89 ++++++++++++++++++++++
 meta/recipes-extended/iptables/iptables_1.4.21.bb  |  1 +
 2 files changed, 90 insertions(+)
 create mode 100644 meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch new file +89 -0
new file mode 100644
index 0000000..7a003d9
@@ -0,0 +1,89 @@
+From 7c07b7fd4fdd7844dd032af822306f08e4422c34 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 6 Apr 2015 20:47:29 -0700
+Subject: [PATCH] fix build with musl
+
+Add needed headers they are just not needed for glibc6+ but also
+for musl
+Define additional TCOPTS if not there
+
+u_initX types are in sys/types.h be explicit about it
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ extensions/libxt_TCPOPTSTRIP.c           | 15 +++++++++++++++
+ include/libiptc/ipt_kernel_headers.h     | 12 ------------
+ include/linux/netfilter_ipv4/ip_tables.h |  1 +
+ 3 files changed, 16 insertions(+), 12 deletions(-)
+
+diff --git a/extensions/libxt_TCPOPTSTRIP.c b/extensions/libxt_TCPOPTSTRIP.c
+index 6897857..8a170b2 100644
+--- a/extensions/libxt_TCPOPTSTRIP.c
++++ b/extensions/libxt_TCPOPTSTRIP.c
+@@ -12,6 +12,21 @@
+ #ifndef TCPOPT_MD5SIG
+ #	define TCPOPT_MD5SIG 19
+ #endif
++#ifndef TCPOPT_MAXSEG
++#	define TCPOPT_MAXSEG 2
++#endif
++#ifndef TCPOPT_WINDOW
++#	define TCPOPT_WINDOW 3
++#endif
++#ifndef TCPOPT_SACK_PERMITTED
++#	define TCPOPT_SACK_PERMITTED 4
++#endif
++#ifndef TCPOPT_SACK
++#	define TCPOPT_SACK 5
++#endif
++#ifndef TCPOPT_TIMESTAMP
++#	define TCPOPT_TIMESTAMP 8
++#endif
+ 
+ enum {
+ 	O_STRIP_OPTION = 0,
+diff --git a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h
+index 18861fe..a5963e9 100644
+--- a/include/libiptc/ipt_kernel_headers.h
++++ b/include/libiptc/ipt_kernel_headers.h
+@@ -5,7 +5,6 @@
+ 
+ #include <limits.h>
+ 
+-#if defined(__GLIBC__) && __GLIBC__ == 2
+ #include <netinet/ip.h>
+ #include <netinet/in.h>
+ #include <netinet/ip_icmp.h>
+@@ -13,15 +12,4 @@
+ #include <netinet/udp.h>
+ #include <net/if.h>
+ #include <sys/types.h>
+-#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/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
+index 57fd82a..4807246 100644
+--- a/include/linux/netfilter_ipv4/ip_tables.h
++++ b/include/linux/netfilter_ipv4/ip_tables.h
+@@ -15,6 +15,7 @@
+ #ifndef _IPTABLES_H
+ #define _IPTABLES_H
+ 
++#include <sys/types.h>
+ #include <linux/types.h>
+ 
+ #include <linux/netfilter_ipv4.h>
+-- 
+2.1.4
+
meta/recipes-extended/iptables/iptables_1.4.21.bb +1 -0
index dc17d57..31c017b 100644
@@ -22,6 +22,7 @@ FILES_${PN}-dbg =+ "${libdir}/xtables/.debug"
 SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
            file://types.h-add-defines-that-are-required-for-if_packet.patch \
            file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
+           file://0001-fix-build-with-musl.patch \
           "
 
 SRC_URI[md5sum] = "536d048c8e8eeebcd9757d0863ebb0c0"
Signature · 1 line
2.1.4
author
#13 lore raw

PATCH 11/17 xserver-xorg: Use __GLIBC__ instread of __linux__ to denote glibc dependent code

In reply to Khem Raj
Change-Id Ia899520181feb1c601a76e04a176f4387a331c00
---
 ...e-__GLIBC__-guard-for-glibc-specific-code.patch | 31 ++++++++++++++++++++++
 .../xorg-xserver/xserver-xorg_1.16.3.bb            |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-use-__GLIBC__-guard-for-glibc-specific-code.patch
meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-use-__GLIBC__-guard-for-glibc-specific-code.patch new file +31 -0
new file mode 100644
index 0000000..21e4ed4
@@ -0,0 +1,31 @@
+From f242740f6488a25e6ca84968b0e2319a9a3975b4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 6 Apr 2015 20:52:50 -0700
+Subject: [PATCH] use __GLIBC__ guard for glibc specific code
+
+Using __linux__ is a tad bit wrong assumption since
+linux != glibc
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ hw/xfree86/os-support/xf86_OSlib.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
+index eb0a338..c366ffc 100644
+--- a/hw/xfree86/os-support/xf86_OSlib.h
++++ b/hw/xfree86/os-support/xf86_OSlib.h
+@@ -178,7 +178,7 @@
+ #include <sys/types.h>
+ #include <assert.h>
+ 
+-#ifdef __linux__
++#ifdef __GLIBC__
+ #include <termio.h>
+ #else                           /* __GLIBC__ */
+ #include <termios.h>
+-- 
+2.1.4
+
meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.3.bb +1 -0
index cfbc491..7eeadd1 100644
@@ -8,6 +8,7 @@ SRC_URI += "file://fix_open_max_preprocessor_error.patch \
             file://xtrans.patch \
             file://0001-xkb-Don-t-swap-XkbSetGeometry-data-in-the-input-buff.patch \
             file://0001-xkb-Check-strings-length-against-request-size.patch \
+            file://0001-use-__GLIBC__-guard-for-glibc-specific-code.patch \
            "
 
 SRC_URI[md5sum] = "afd93977235584a9caa7528a737c1b52"
Signature · 1 line
2.1.4
author
#14 lore raw

PATCH 12/17 pulseaudio: Fix build with musl

In reply to Khem Raj

It reimplements some of standard C library functions but then it assumed glibc so we need to break that assumption into conditional defines

Change-Id I92109c2e4c48ab4c3565f64e68d9cbb165823b45
---
 .../0001-padsp-Make-it-compile-on-musl.patch       | 70 ++++++++++++++++++++++
 .../pulseaudio/pulseaudio_6.0.bb                   |  1 +
 2 files changed, 71 insertions(+)
 create mode 100644 meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch
meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch new file +70 -0
new file mode 100644
index 0000000..8555995
@@ -0,0 +1,70 @@
+From f6ab3c3aa7a1841c8add04828029356d2a8c88e7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 6 Apr 2015 21:56:31 -0700
+Subject: [PATCH] padsp: Make it compile on musl
+
+break assumptions on glibc and there is no stat64 on non
+glibc C libraries
+
+See pulseaudio bug
+
+https://bugs.freedesktop.org/show_bug.cgi?id=85319
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/utils/padsp.c | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/src/utils/padsp.c b/src/utils/padsp.c
+index e61373c..684721a 100644
+--- a/src/utils/padsp.c
++++ b/src/utils/padsp.c
+@@ -2368,7 +2368,7 @@ fail:
+     return ret;
+ }
+ 
+-#ifdef sun
++#ifndef __GLIBC__
+ int ioctl(int fd, int request, ...) {
+ #else
+ int ioctl(int fd, unsigned long request, ...) {
+@@ -2508,10 +2508,13 @@ int stat(const char *pathname, struct stat *buf) {
+ 
+     return 0;
+ }
+-
+ #ifdef HAVE_OPEN64
+-
++#undef stat64
++#ifdef __GLIBC__
+ int stat64(const char *pathname, struct stat64 *buf) {
++#else
++int stat64(const char *pathname, struct stat *buf) {
++#endif
+     struct stat oldbuf;
+     int ret;
+ 
+@@ -2544,7 +2547,7 @@ int stat64(const char *pathname, struct stat64 *buf) {
+ 
+     return 0;
+ }
+-
++#undef open64
+ int open64(const char *filename, int flags, ...) {
+     va_list args;
+     mode_t mode = 0;
+@@ -2670,8 +2673,8 @@ FILE* fopen(const char *filename, const char *mode) {
+ }
+ 
+ #ifdef HAVE_OPEN64
+-
+-FILE *fopen64(const char *filename, const char *mode) {
++#undef fopen64
++FILE *fopen64(const char *__restrict filename, const char *__restrict mode) {
+ 
+     debug(DEBUG_LEVEL_VERBOSE, __FILE__": fopen64(%s)\n", filename?filename:"NULL");
+ 
+-- 
+2.1.4
+
meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb +1 -0
index 91027bf..fb33c7c 100644
@@ -1,6 +1,7 @@
 require pulseaudio.inc
 
 SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
+           file://0001-padsp-Make-it-compile-on-musl.patch \
            file://volatiles.04_pulse \
 "
 SRC_URI[md5sum] = "b691e83b7434c678dffacfa3a027750e"
Signature · 1 line
2.1.4
author
#15 lore raw

PATCH 13/17 sudo: Disable hardening for musl

In reply to Khem Raj

musl does not yet enable ssp

Change-Id If40ab0a54b17d5528676b1268182b6c7e7ef5761
---
 meta/recipes-extended/sudo/sudo.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-extended/sudo/sudo.inc +2 -0
index 2d411f3..cdee6bb 100644
@@ -22,6 +22,8 @@ CONFFILES_${PN} = "${sysconfdir}/sudoers"
 
 EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor"
 
+EXTRA_OECONF_append_libc-musl = " --disable-hardening "
+
 # mksigname/mksiglist are used on build host to generate source files
 do_compile_prepend () {
 	oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}"  -C lib/util mksigname mksiglist
Signature · 1 line
2.1.4
author
#20 lore raw

PATCH 14/17 xserver-xf86-config: Preload graphics driver modules for musl

In reply to Khem Raj

musl does not support BIND_LAZY intentionally, which means dlopen will always complain about missing symbols which is what X does when loading graphics drivers, here we preload the needed drivers for all emulator machines if libc is musl

Change-Id I908c94c30db8a5e872922e1a677126d82fa17145
---
 .../xorg-xserver/xserver-xf86-config/10-preload-modules.conf     | 9 +++++++++
 meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb    | 9 +++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf
meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf new file +9 -0
new file mode 100644
index 0000000..7ceb6fd
@@ -0,0 +1,9 @@
+Section "Module"
+    Load "fbdevhw"
+    Load "fb"
+    Load "shadow"
+    Load "shadowfb"
+    Load "vbe"
+    Load "vgahw"
+EndSection
+
meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb +9 -0
index 5420b7d..e07c204 100644
@@ -7,9 +7,14 @@ PR = "r33"
 
 SRC_URI = "file://xorg.conf"
 
+SRC_URI_append_libc-musl = "\
+          file://10-preload-modules.conf \
+"
+
 S = "${WORKDIR}"
 
 CONFFILES_${PN} = "${sysconfdir}/X11/xorg.conf"
+CONFFILES_${PN}_append_libc-musl = " ${sysconfdir}/X11/xorg.conf.d/10-preload-modules.conf"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 ALLOW_EMPTY_${PN} = "1"
@@ -20,3 +25,7 @@ do_install () {
 		install -m 0644 ${WORKDIR}/xorg.conf ${D}/${sysconfdir}/X11/
 	fi
 }
+
+do_install_append_libc-musl () {
+	install -Dm 0644 ${WORKDIR}/10-preload-modules.conf ${D}/${sysconfdir}/X11/xorg.conf.d/10-preload-modules.conf
+}
Signature · 1 line
2.1.4
author
#22 lore raw

PATCH 15/17 kbd: Mark glibc headers under __GLIBC__

In reply to Khem Raj
Change-Id I4e91038ea8b05defbb9d574c61eea96ccc064e51
---
 ...-Only-inluclude-kernel-headers-with-glibc.patch | 29 ++++++++++++++++++++++
 meta/recipes-core/kbd/kbd_2.0.2.bb                 |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta/recipes-core/kbd/kbd/0003-Only-inluclude-kernel-headers-with-glibc.patch
meta/recipes-core/kbd/kbd/0003-Only-inluclude-kernel-headers-with-glibc.patch new file +29 -0
new file mode 100644
index 0000000..8bfcb0c
@@ -0,0 +1,29 @@
+From 3c5c7acc7ef874b919b26583d3892e21b907833f Mon Sep 17 00:00:00 2001
+From: Natanael Copa <[email protected]>
+Date: Wed, 20 Aug 2014 09:00:03 +0200
+Subject: [PATCH 3/4] Only inluclude kernel headers with glibc
+
+This fixes compile errors with musl libc
+
+Signed-off-by: Natanael Copa <[email protected]>
+Upstream-Status: Pending
+---
+ src/resizecons.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/resizecons.c b/src/resizecons.c
+index 5f84845..691dfcc 100644
+--- a/src/resizecons.c
++++ b/src/resizecons.c
+@@ -80,7 +80,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.1.0
+
meta/recipes-core/kbd/kbd_2.0.2.bb +1 -0
index 0aa976a..136dc7a 100644
@@ -12,6 +12,7 @@ RCONFLICTS_${PN} = "console-tools"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
            file://uclibc-stdarg.patch \
+	   file://0003-Only-inluclude-kernel-headers-with-glibc.patch \
           "
 
 SRC_URI[md5sum] = "87475eb78b1d6e6ab06686dd323ad4ba"
Signature · 1 line
2.1.4
author
#23 lore raw

PATCH 16/17 gdb: Refresh patches against git

In reply to Khem Raj

Drop dead patches sim-install.patch, uclibc.patch

Change-Id I5bd160d0959154896096ebc93a8a450d04979c73
---
 meta/recipes-devtools/gdb/gdb-cross_7.9.bb         |   2 +-
 meta/recipes-devtools/gdb/gdb.inc                  |   5 +-
 ...0001-make-man-install-relative-to-DESTDIR.patch |  28 +
 ...last.diff => 0002-Change-order-of-CFLAGS.patch} |  23 +-
 ...-support-for-Renesas-SH-sh4-architecture.patch} | 835 +++++----------------
 .../gdb/0004-Change-comment-in-gdb-compile.patch   |  48 ++
 .../recipes-devtools/gdb/gdb/sim-install-6.6.patch |  14 -
 meta/recipes-devtools/gdb/gdb/sim-install.patch    |  36 -
 meta/recipes-devtools/gdb/gdb/uclibc.patch         | 196 -----
 9 files changed, 286 insertions(+), 901 deletions(-)
 create mode 100644 meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
 rename meta/recipes-devtools/gdb/gdb/{gdbserver-cflags-last.diff => 0002-Change-order-of-CFLAGS.patch} (55%)
 rename meta/recipes-devtools/gdb/gdb/{renesas-sh-native-support.patch => 0003-Add-support-for-Renesas-SH-sh4-architecture.patch} (60%)
 create mode 100644 meta/recipes-devtools/gdb/gdb/0004-Change-comment-in-gdb-compile.patch
 delete mode 100644 meta/recipes-devtools/gdb/gdb/sim-install-6.6.patch
 delete mode 100644 meta/recipes-devtools/gdb/gdb/sim-install.patch
 delete mode 100644 meta/recipes-devtools/gdb/gdb/uclibc.patch
meta/recipes-devtools/gdb/gdb-cross_7.9.bb +1 -1
index f9da486..3a95cfb 100644
@@ -1,4 +1,4 @@
 require gdb-cross.inc
 require gdb-${PV}.inc
 
-SRC_URI += "file://sim-install-6.6.patch"
+SRC_URI += "file://0001-make-man-install-relative-to-DESTDIR.patch"
meta/recipes-devtools/gdb/gdb.inc +3 -2
index 2c95e03..e65af4b 100644
@@ -2,8 +2,9 @@ require gdb-common.inc
 
 inherit gettext
 
-SRC_URI += "file://gdbserver-cflags-last.diff;striplevel=0 \
-            file://renesas-sh-native-support.patch \
+SRC_URI += "file://0002-Change-order-of-CFLAGS.patch \
+            file://0003-Add-support-for-Renesas-SH-sh4-architecture.patch \
+            file://0004-Change-comment-in-gdb-compile.patch \
            "
 #LDFLAGS_append = " -s"
 #export CFLAGS_append=" -L${STAGING_LIBDIR}"
meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch new file +28 -0
new file mode 100644
index 0000000..e0221af
@@ -0,0 +1,28 @@
+From d3ec939b82be23e7c9534cdc7502645f6c5856d1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 2 Mar 2015 02:27:55 +0000
+Subject: [PATCH 1/3] make man install relative to DESTDIR
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ sim/common/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in
+index d49a93b..2121c46 100644
+--- a/sim/common/Makefile.in
++++ b/sim/common/Makefile.in
+@@ -35,7 +35,7 @@ tooldir = $(libdir)/$(target_alias)
+ datarootdir = @datarootdir@
+ datadir = @datadir@
+ mandir = @mandir@
+-man1dir = $(mandir)/man1
++man1dir = $(DESTDIR)$(mandir)/man1
+ infodir = @infodir@
+ includedir = @includedir@
+ 
+-- 
+2.1.4
+
meta/recipes-devtools/gdb/gdb/0002-Change-order-of-CFLAGS.patch renamed from meta/recipes-devtools/gdb/gdb/gdbserver-cflags-last.diff +17 -6
similarity index 55%
rename from meta/recipes-devtools/gdb/gdb/gdbserver-cflags-last.diff
rename to meta/recipes-devtools/gdb/gdb/0002-Change-order-of-CFLAGS.patch
index 16a3aa9..26a34d3 100644
@@ -1,13 +1,21 @@
-Upstream-Status: Pending
+From 0dcb0a8b139b44ae84e8fd8ff8130cbbb52e444d Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 2 Mar 2015 02:29:23 +0000
+Subject: [PATCH 2/3] Change order of CFLAGS
 
+Lets us override Werror if need be
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Khem Raj <[email protected]>
 ---
- gdb/gdbserver/Makefile.in |    4 ++--
+ gdb/gdbserver/Makefile.in | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-Index: gdb/gdbserver/Makefile.in
-===================================================================
---- gdb/gdbserver/Makefile.in.orig
-+++ gdb/gdbserver/Makefile.in
+diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
+index 1ed2ec8..0cef95b 100644
+--- a/gdb/gdbserver/Makefile.in
++++ b/gdb/gdbserver/Makefile.in
 @@ -131,10 +131,10 @@ CFLAGS = @CFLAGS@
  CPPFLAGS = @CPPFLAGS@
  
@@ -21,3 +29,6 @@ Index: gdb/gdbserver/Makefile.in
  
  # LDFLAGS is specifically reserved for setting from the command line
  # when running make.
+-- 
+2.1.4
+
meta/recipes-devtools/gdb/gdb/0003-Add-support-for-Renesas-SH-sh4-architecture.patch renamed from meta/recipes-devtools/gdb/gdb/renesas-sh-native-support.patch +189 -646

948 lines not on this page · raw message

meta/recipes-devtools/gdb/gdb/0004-Change-comment-in-gdb-compile.patch new file +48 -0

48 lines not on this page · raw message

meta/recipes-devtools/gdb/gdb/sim-install-6.6.patch deleted +0 -14
deleted file mode 100644
index f67c25d..0000000
@@ -1,14 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
---- gdb-6.1/sim/common/Makefile.in~	2004-01-15 21:25:06.000000000 +0000
-+++ gdb-6.1/sim/common/Makefile.in	2004-07-22 17:07:46.237809032 +0100
-@@ -34,7 +34,7 @@
- 
- datadir = @datadir@
- mandir = @mandir@
--man1dir = $(mandir)/man1
-+man1dir = $(DESTDIR)$(mandir)/man1
- infodir = @infodir@
- includedir = @includedir@
- 
-
meta/recipes-devtools/gdb/gdb/sim-install.patch deleted +0 -36
deleted file mode 100644
index a663ba7..0000000
@@ -1,36 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
---- gdb-6.1/sim/common/Makefile.in~	2004-01-15 21:25:06.000000000 +0000
-+++ gdb-6.1/sim/common/Makefile.in	2004-07-22 17:07:46.237809032 +0100
-@@ -34,7 +34,7 @@
- 
- datadir = @datadir@
- mandir = @mandir@
--man1dir = $(mandir)/man1
-+man1dir = $(DESTDIR)$(mandir)/man1
- infodir = @infodir@
- includedir = @includedir@
- 
-
---- gdb-6.1/sim/common/Make-common.in~sim-install.patch	2003-09-08 18:24:59.000000000 +0100
-+++ gdb-6.1/sim/common/Make-common.in	2004-07-22 17:56:18.947423032 +0100
-@@ -581,14 +581,14 @@
- 
- install-common: installdirs
- 	n=`echo run | sed '$(program_transform_name)'`; \
--	$(INSTALL_PROGRAM) run$(EXEEXT) $(bindir)/$$n$(EXEEXT)
-+	$(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
- 	n=`echo libsim.a | sed s/libsim.a/lib$(target_alias)-sim.a/`; \
--	$(INSTALL_DATA) libsim.a $(libdir)/$$n ; \
--	( cd $(libdir) ; $(RANLIB) $$n )
-+	$(INSTALL_DATA) libsim.a $(DESTDIR)$(libdir)/$$n ; \
-+	( cd $(DESTDIR)$(libdir) ; $(RANLIB) $$n )
- 
- installdirs:
--	$(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
--	$(SHELL) $(srcdir)/../../mkinstalldirs $(libdir)
-+	$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)
-+	$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir)
- 
- check:
- 	cd ../testsuite && $(MAKE) check RUNTESTFLAGS="$(RUNTESTFLAGS)"
meta/recipes-devtools/gdb/gdb/uclibc.patch deleted +0 -196

196 lines not on this page · raw message

Signature · 1 line
2.1.4
author
#24 lore raw

PATCH 17/17 e2fsprogs: Delete identical binaries and create symlinks instead

In reply to Khem Raj

Here is what build history tells now

e2fsprogs-tune2fs:

-PKGSIZE = 144336
+PKGSIZE = 72175

e2fsprogs-e2fsck:

-PKGSIZE = 1345500
+PKGSIZE = 269124

e2fsprogs-mke2fs:

-PKGSIZE = 551316
+PKGSIZE = 111036

Change-Id I0902484ad506d892292c4bea6789467179b5ea8d
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb +8 -0
index 66065bc..e6ff5f9 100644
@@ -43,6 +43,9 @@ do_install () {
 	rm -f ${D}${base_sbindir}/blkid
 	rm -f ${D}${base_sbindir}/fsck
 	rm -f ${D}${base_sbindir}/findfs
+	rm -f ${D}${base_sbindir}/mkfs.ext*
+	rm -f ${D}${base_sbindir}/fsck.ext*
+	rm -f ${D}${base_sbindir}/e2label
 
 	# e2initrd_helper and the pkgconfig files belong in libdir
 	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
@@ -50,6 +53,11 @@ do_install () {
 		mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
 		mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
 	fi
+	for ext in ext2 ext3 ext4 ext4dev; do
+		ln -sf mke2fs ${D}${base_sbindir}/mkfs.${ext}
+		ln -sf e2fsck ${D}${base_sbindir}/fsck.${ext}
+	done
+	ln -sf tune2fs ${D}${base_sbindir}/e2label
 
 	oe_multilib_header ext2fs/ext2_types.h
 	install -d ${D}${base_bindir}
Signature · 1 line
2.1.4
#25 lore raw

Re: [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead

There is configure option for this, see my pending e2fsprogs patch from Friday.

Quoted 59 lines · Khem Raj

Here is what build history tells now

e2fsprogs-tune2fs:

(quoted diff) +1 -1
-PKGSIZE = 144336
+PKGSIZE = 72175

e2fsprogs-e2fsck:

(quoted diff) +1 -1
-PKGSIZE = 1345500
+PKGSIZE = 269124

e2fsprogs-mke2fs:

(quoted diff) +1 -1
-PKGSIZE = 551316
+PKGSIZE = 111036
Change-Id I0902484ad506d892292c4bea6789467179b5ea8d
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb +8 -1
index 66065bc..e6ff5f9 100644
@@ -43,6 +43,9 @@ do_install () {
        rm -f ${D}${base_sbindir}/blkid
        rm -f ${D}${base_sbindir}/fsck
        rm -f ${D}${base_sbindir}/findfs
+       rm -f ${D}${base_sbindir}/mkfs.ext*
+       rm -f ${D}${base_sbindir}/fsck.ext*
+       rm -f ${D}${base_sbindir}/e2label
 
        # e2initrd_helper and the pkgconfig files belong in libdir
        if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
@@ -50,6 +53,11 @@ do_install () {
                mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
                mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
        fi
+       for ext in ext2 ext3 ext4 ext4dev; do
+               ln -sf mke2fs ${D}${base_sbindir}/mkfs.${ext}
+               ln -sf e2fsck ${D}${base_sbindir}/fsck.${ext}
+       done
+       ln -sf tune2fs ${D}${base_sbindir}/e2label
 
        oe_multilib_header ext2fs/ext2_types.h
        install -d ${D}${base_bindir}
--

2.1.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#26 lore raw

Re: [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead

Quoted 72 lines · Martin Jansa

There is configure option for this, see my pending e2fsprogs patch from Friday.

Saw it now. Looks good does it cover e2label as well

Quoted 61 lines · On Sat, Apr 11, 2015 at 3:20 AM, Khem Raj <[email protected]…

Here is what build history tells now

e2fsprogs-tune2fs:

(quoted diff) +1 -1
-PKGSIZE = 144336
+PKGSIZE = 72175

e2fsprogs-e2fsck:

(quoted diff) +1 -1
-PKGSIZE = 1345500
+PKGSIZE = 269124

e2fsprogs-mke2fs:

(quoted diff) +1 -1
-PKGSIZE = 551316
+PKGSIZE = 111036
Change-Id I0902484ad506d892292c4bea6789467179b5ea8d

<javascript:_e(%7B%7D,'cvml','[email protected]');>>

---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb +8 -1
index 66065bc..e6ff5f9 100644
@@ -43,6 +43,9 @@ do_install () {
        rm -f ${D}${base_sbindir}/blkid
        rm -f ${D}${base_sbindir}/fsck
        rm -f ${D}${base_sbindir}/findfs
+       rm -f ${D}${base_sbindir}/mkfs.ext*
+       rm -f ${D}${base_sbindir}/fsck.ext*
+       rm -f ${D}${base_sbindir}/e2label
 
        # e2initrd_helper and the pkgconfig files belong in libdir
        if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
@@ -50,6 +53,11 @@ do_install () {
                mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
                mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
        fi
+       for ext in ext2 ext3 ext4 ext4dev; do
+               ln -sf mke2fs ${D}${base_sbindir}/mkfs.${ext}
+               ln -sf e2fsck ${D}${base_sbindir}/fsck.${ext}
+       done
+       ln -sf tune2fs ${D}${base_sbindir}/e2label
 
        oe_multilib_header ext2fs/ext2_types.h
        install -d ${D}${base_bindir}
--

2.1.4

--
_______________________________________________
Openembedded-core mailing list [email protected] <javascript:_e(%7B%7D,'cvml','[email protected]');>
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#27 lore raw

Re: [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead

Quoted 1 line

does it cover e2label as well

yes it does

Quoted 74 lines · Khem Raj
Quoted 69 lines · Martin Jansa

There is configure option for this, see my pending e2fsprogs patch from Friday.

Saw it now. Looks good does it cover e2label as well

Quoted 59 lines · Khem Raj

Here is what build history tells now

e2fsprogs-tune2fs:

(quoted diff) +1 -1
-PKGSIZE = 144336
+PKGSIZE = 72175

e2fsprogs-e2fsck:

(quoted diff) +1 -1
-PKGSIZE = 1345500
+PKGSIZE = 269124

e2fsprogs-mke2fs:

(quoted diff) +1 -1
-PKGSIZE = 551316
+PKGSIZE = 111036
Change-Id I0902484ad506d892292c4bea6789467179b5ea8d
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb +8 -1
index 66065bc..e6ff5f9 100644
@@ -43,6 +43,9 @@ do_install () {
        rm -f ${D}${base_sbindir}/blkid
        rm -f ${D}${base_sbindir}/fsck
        rm -f ${D}${base_sbindir}/findfs
+       rm -f ${D}${base_sbindir}/mkfs.ext*
+       rm -f ${D}${base_sbindir}/fsck.ext*
+       rm -f ${D}${base_sbindir}/e2label
 
        # e2initrd_helper and the pkgconfig files belong in libdir
        if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
@@ -50,6 +53,11 @@ do_install () {
                mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
                mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
        fi
+       for ext in ext2 ext3 ext4 ext4dev; do
+               ln -sf mke2fs ${D}${base_sbindir}/mkfs.${ext}
+               ln -sf e2fsck ${D}${base_sbindir}/fsck.${ext}
+       done
+       ln -sf tune2fs ${D}${base_sbindir}/e2label
 
        oe_multilib_header ext2fs/ext2_types.h
        install -d ${D}${base_bindir}
--

2.1.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#28 lore raw

Re: [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead

Quoted 4 lines · Martin Jansa
Quoted 1 line

does it cover e2label as well

yes it does

OK thx

Quoted 77 lines · Khem Raj
Quoted 74 lines · Martin Jansa
Quoted 4 lines

There is configure option for this, see my pending e2fsprogs patch from Friday.

Saw it now. Looks good does it cover e2label as well

Quoted 64 lines · Khem Raj
Quoted 59 lines

Here is what build history tells now

e2fsprogs-tune2fs:

(quoted diff) +1 -1
-PKGSIZE = 144336
+PKGSIZE = 72175

e2fsprogs-e2fsck:

(quoted diff) +1 -1
-PKGSIZE = 1345500
+PKGSIZE = 269124

e2fsprogs-mke2fs:

(quoted diff) +1 -1
-PKGSIZE = 551316
+PKGSIZE = 111036
Change-Id I0902484ad506d892292c4bea6789467179b5ea8d
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb +8 -1
index 66065bc..e6ff5f9 100644
@@ -43,6 +43,9 @@ do_install () {
        rm -f ${D}${base_sbindir}/blkid
        rm -f ${D}${base_sbindir}/fsck
        rm -f ${D}${base_sbindir}/findfs
+       rm -f ${D}${base_sbindir}/mkfs.ext*
+       rm -f ${D}${base_sbindir}/fsck.ext*
+       rm -f ${D}${base_sbindir}/e2label
 
        # e2initrd_helper and the pkgconfig files belong in libdir
        if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
@@ -50,6 +53,11 @@ do_install () {
                mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
                mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
        fi
+       for ext in ext2 ext3 ext4 ext4dev; do
+               ln -sf mke2fs ${D}${base_sbindir}/mkfs.${ext}
+               ln -sf e2fsck ${D}${base_sbindir}/fsck.${ext}
+       done
+       ln -sf tune2fs ${D}${base_sbindir}/e2label
 
        oe_multilib_header ext2fs/ext2_types.h
        install -d ${D}${base_bindir}
--

2.1.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#17 lore raw

Re: [PATCH 13/17] sudo: Disable hardening for musl

Quoted 5 lines · Bernhard Reutner-Fischer
Quoted 1 line · Khem Raj

musl does not yet enable ssp

What happened to distro feature ssp, BTW?

It was never used outside uclibc recipes.

Quoted 2 lines

Thanks,

#18 lore raw

Re: [PATCH 13/17] sudo: Disable hardening for musl

Quoted 10 lines · Khem Raj
Quoted 1 line · Bernhard Reutner-Fischer

On April 11, 2015 3:20:44 AM GMT+02:00, Khem Raj <[email protected]>

Quoted 4 lines · wrote:
Quoted 1 line

musl does not yet enable ssp

What happened to distro feature ssp, BTW?

It was never used outside uclibc recipes.

Oh indeed, apparently I never submitted it :(

Would you accept such a distro feature?
I don't want ssp per default in micro, for example.

author
#19 lore raw

Re: [PATCH 13/17] sudo: Disable hardening for musl

Quoted 2 lines · Bernhard Reutner-Fischer

On April 12, 2015 11:26:26 AM GMT+02:00, Khem Raj <[email protected]>

Quoted 9 lines · wrote:
Quoted 9 lines
Quoted 1 line · Bernhard Reutner-Fischer

On April 11, 2015 3:20:44 AM GMT+02:00, Khem Raj <[email protected]>

Quoted 4 lines · wrote:
Quoted 1 line

musl does not yet enable ssp

What happened to distro feature ssp, BTW?

Quoted 6 lines
Quoted 1 line

It was never used outside uclibc recipes.

Oh indeed, apparently I never submitted it :(

Would you accept such a distro feature?
I don't want ssp per default in micro, for example.

Sure yes

Quoted 2 lines
#9 lore raw

Re: [PATCH 08/17] connman: Fix builds to compile on musl

In reply to Khem Raj
Quoted 2 lines · Khem Raj

++#ifdef __GLIBC__

+ #include <execinfo.h>

Quoted 1 line

As you're checking for this header at configure time wouldn't it be best to use #ifdef HAVE_EXECINFO_H, just in case another C library adds it later?

+ /* from netinet/in.h */

Quoted 1 line

++#if 0

meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch line 78

Quoted 6 lines

+ struct in6_pktinfo {

meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch new file +4 -0
+       struct in6_addr ipi6_addr;  /* src/dst IPv6 address */
+       unsigned int ipi6_ifindex;  /* send/recv interface index */
+ };
++#endif

#if 0? Is this entirely redundant code (in which case, delete it), or is this disabling something?

Quoted 9 lines

++++ b/gweb/gresolv.c
+@@ -876,8 +876,6 @@ GResolv *g_resolv_new(int index)

meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch new file +6 -0
+       resolv->index = index;
+       resolv->nameserver_list = NULL;
+
+-      res_ninit(&resolv->res);
+-
+       return resolv;

meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch line 36

Quoted 10 lines
meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch new file +10 -0
+ }
+
+@@ -917,8 +915,6 @@ void g_resolv_unref(GResolv *resolv)
+
+       flush_nameservers(resolv);
+
+-      res_nclose(&resolv->res);
+-
+       g_free(resolv);
+ }

Surely these should be checked at configure time or wrapped in GLIBC tests, with the new codepath as a fallback. Ideally we can upstream most of this.

Ross

author
#10 lore raw

Re: [PATCH 08/17] connman: Fix builds to compile on musl

Quoted 6 lines · Ross

On 11 April 2015 at 02:20, Khem Raj <[email protected] <mailto:[email protected]>> wrote:
++#ifdef __GLIBC__
+ #include <execinfo.h>

yeah ideally, I could just use libunwind and get the backtrace API for musl too but I will do that when I need it.

Quoted 11 lines

As you're checking for this header at configure time wouldn't it be best to use #ifdef HAVE_EXECINFO_H, just in case another C library adds it later?

+ /* from netinet/in.h */
++#if 0
+ struct in6_pktinfo {

meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch new file +4 -0
+       struct in6_addr ipi6_addr;  /* src/dst IPv6 address */
+       unsigned int ipi6_ifindex;  /* send/recv interface index */
+ };
++#endif
Quoted 1 line

#if 0? Is this entirely redundant code (in which case, delete it), or is this disabling something?

it is redundant if you are including netinet/in.h

Quoted 23 lines

++++ b/gweb/gresolv.c
+@@ -876,8 +876,6 @@ GResolv *g_resolv_new(int index)

meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch new file +16 -0
+       resolv->index = index;
+       resolv->nameserver_list = NULL;
+
+-      res_ninit(&resolv->res);
+-
+       return resolv;
+ }
+
+@@ -917,8 +915,6 @@ void g_resolv_unref(GResolv *resolv)
+
+       flush_nameservers(resolv);
+
+-      res_nclose(&resolv->res);
+-
+       g_free(resolv);
+ }

Surely these should be checked at configure time or wrapped in GLIBC tests, with the new codepath as a fallback. Ideally we can upstream most of this.

Ross

#21 lore raw

Re: [PATCH 14/17] xserver-xf86-config: Preload graphics driver modules for musl

In reply to Khem Raj

Hi Khem,

Quoted 5 lines · Khem Raj

musl does not support BIND_LAZY intentionally, which means dlopen will always complain about missing symbols which is what X does when loading graphics drivers, here we preload the needed drivers for all emulator machines if libc is musl

musl also doesn't support dlclose() so if you're after reduced memory footprint using musl and X together isn't what you want, as X opens many drivers to auto-probe the hardware and then dlcloses() anything that isn't useful. On musl() dlclose() is no-op so you've just wasted a pile of memory.

Quoted 1 line

+do_install_append_libc-musl () {

This override should also be machine-specific as the list of modules you'll need to open varies per machine. ie you haven't included EXA or GLX, and some of the drivers you have included are probably not required for qemu images.

Ross