musl fixes to run core-image-sato and core-image-weston
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.patchSignature · 1 line
2.1.4
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
--- ...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
@@ -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
@@ -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
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.
--- 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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 3/17 libproxy: Include select.h for posix compliance
In reply to Khem Rajunearthed with musl
--- ...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
@@ -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
@@ -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
PATCH 4/17 ppp: Add extra include dirs
In reply to Khem RajJust 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
--- 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
@@ -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
PATCH 5/17 musl: Enable NLS
In reply to Khem RajIt 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
--- meta/conf/distro/include/tclibc-musl.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/distro/include/tclibc-musl.inc +1 -1
@@ -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
PATCH 6/17 vte: Pass _GNU_SOURCE via CFLAGS
In reply to Khem RajIt uses function extentions like ptsname_r()
so we need to let build know about it
--- 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
@@ -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
PATCH 7/17 libfm-extra: Add own nls.m4
In reply to Khem RajIt helps to build when NLS is disabled distro-wide otherwise it has dependency on gettext to provide it
--- .../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
@@ -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
@@ -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
PATCH 8/17 connman: Fix builds to compile on musl
In reply to Khem RajAdd explicit includes for headers which are indirectly included on glibc Dont use backtrace APIs on non-glibc C libsres_nimit is a glibc specific API in resolvers so we avoid it
--- ...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
@@ -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
@@ -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
Re: [PATCH 08/17] connman: Fix builds to compile on musl
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
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
+ structin6_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
PATCH 9/17 perl: Fix build for musl
In reply to Khem RajThe changes are covered under "${TARGET_OS}" = "linux-musl"
--- 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
@@ -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
PATCH 10/17 iptables: Fix build on musl
In reply to Khem RajAdded needed headers and resuffled existing ones to get it portable Added defined for missing TCOPTS*
--- .../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
@@ -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
@@ -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
PATCH 11/17 xserver-xorg: Use __GLIBC__ instread of __linux__ to denote glibc dependent code
In reply to Khem Raj--- ...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
@@ -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
@@ -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
PATCH 12/17 pulseaudio: Fix build with musl
In reply to Khem RajIt reimplements some of standard C library functions but then it assumed glibc so we need to break that assumption into conditional defines
--- .../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
@@ -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
@@ -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
PATCH 13/17 sudo: Disable hardening for musl
In reply to Khem Rajmusl does not yet enable ssp
--- meta/recipes-extended/sudo/sudo.inc | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-extended/sudo/sudo.inc +2 -0
@@ -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
Re: [PATCH 13/17] sudo: Disable hardening for musl
Quoted 1 line · Khem Raj
musl does not yet enable ssp
What happened to distro feature ssp, BTW?
Thanks,
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,
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.
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
PATCH 14/17 xserver-xf86-config: Preload graphics driver modules for musl
In reply to Khem Rajmusl 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
--- .../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
@@ -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
@@ -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
Re: [PATCH 14/17] xserver-xf86-config: Preload graphics driver modules for musl
Hi Khem,
Quoted 5 lines · Khem Raj
musl does not support
BIND_LAZYintentionally, 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
PATCH 15/17 kbd: Mark glibc headers under __GLIBC__
In reply to Khem Raj--- ...-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
@@ -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
@@ -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
PATCH 16/17 gdb: Refresh patches against git
In reply to Khem RajDrop dead patches sim-install.patch, uclibc.patch
---
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.patchmeta/recipes-devtools/gdb/gdb-cross_7.9.bb +1 -1
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 17/17 e2fsprogs: Delete identical binaries and create symlinks instead
In reply to Khem RajHere is what build history tells now
e2fsprogs-tune2fs:
-PKGSIZE = 144336
+PKGSIZE = 72175
e2fsprogs-e2fsck:
-PKGSIZE = 1345500
+PKGSIZE = 269124
e2fsprogs-mke2fs:
-PKGSIZE = 551316
+PKGSIZE = 111036
--- 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
@@ -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
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 = 72175e2fsprogs-e2fsck:
(quoted diff) +1
-1-PKGSIZE = 1345500 +PKGSIZE = 269124e2fsprogs-mke2fs:
(quoted diff) +1
-1-PKGSIZE = 551316 +PKGSIZE = 111036Change-Id I0902484ad506d892292c4bea6789467179b5ea8dSigned-off-by Khem Raj <[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@@ -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
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 = 72175e2fsprogs-e2fsck:
(quoted diff) +1
-1-PKGSIZE = 1345500 +PKGSIZE = 269124e2fsprogs-mke2fs:
(quoted diff) +1
-1-PKGSIZE = 551316 +PKGSIZE = 111036Change-Id I0902484ad506d892292c4bea6789467179b5ea8dSigned-off-by Khem Raj <[email protected]<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@@ -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
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 = 72175e2fsprogs-e2fsck:
(quoted diff) +1
-1-PKGSIZE = 1345500 +PKGSIZE = 269124e2fsprogs-mke2fs:
(quoted diff) +1
-1-PKGSIZE = 551316 +PKGSIZE = 111036Change-Id I0902484ad506d892292c4bea6789467179b5ea8dSigned-off-by Khem Raj <[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@@ -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
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 = 72175e2fsprogs-e2fsck:
(quoted diff) +1
-1-PKGSIZE = 1345500 +PKGSIZE = 269124e2fsprogs-mke2fs:
(quoted diff) +1
-1-PKGSIZE = 551316 +PKGSIZE = 111036Change-Id I0902484ad506d892292c4bea6789467179b5ea8dSigned-off-by Khem Raj <[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@@ -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