All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/17] mtd-utils: update to latest and fix static inlining
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 02/17] var/volatile: Mount it if doing ro-rfs Khem Raj
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

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

Change-Id: I72e8c5f19dff656c18f719d1e9e2ca697c9a856f
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...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

diff --git a/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch b/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
new file mode 100644
index 0000000..2d36158
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
@@ -0,0 +1,64 @@
+From b856ff35c20124ceae40bbc4d32584df47618c96 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+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 */
+ 
diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 12daffe..f991ea1 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -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/"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston
@ 2015-04-11  1:20 Khem Raj
  2015-04-11  1:20 ` [PATCH 01/17] mtd-utils: update to latest and fix static inlining Khem Raj
                   ` (16 more replies)
  0 siblings, 17 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

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

-- 
2.1.4



^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 02/17] var/volatile: Mount it if doing ro-rfs
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
  2015-04-11  1:20 ` [PATCH 01/17] mtd-utils: update to latest and fix static inlining Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 03/17] libproxy: Include select.h for posix compliance Khem Raj
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

- 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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 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

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 03cbbf7..5ace087 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -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
diff --git a/meta/recipes-core/base-files/base-files/fstab b/meta/recipes-core/base-files/base-files/fstab
index 739b844..56b14d7 100644
--- a/meta/recipes-core/base-files/base-files/fstab
+++ b/meta/recipes-core/base-files/base-files/fstab
@@ -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
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh b/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
index 1a0328d..3ff39f4 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
@@ -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
diff --git a/meta/recipes-core/systemd/systemd/journald-volatile.conf b/meta/recipes-core/systemd/systemd/journald-volatile.conf
new file mode 100644
index 0000000..9356a4e
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/journald-volatile.conf
@@ -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
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 03/17] libproxy: Include select.h for posix compliance
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
  2015-04-11  1:20 ` [PATCH 01/17] mtd-utils: update to latest and fix static inlining Khem Raj
  2015-04-11  1:20 ` [PATCH 02/17] var/volatile: Mount it if doing ro-rfs Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 04/17] ppp: Add extra include dirs Khem Raj
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

unearthed with musl

Change-Id: I527139905785f253e41dd6a2f0cf555eee752a3a
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...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

diff --git a/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch b/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch
new file mode 100644
index 0000000..5ae52f2
--- /dev/null
+++ b/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch
@@ -0,0 +1,37 @@
+From f5f2c2289eb35eb804c1c35e46ca41b58e4cae01 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ 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
+
diff --git a/meta/recipes-support/libproxy/libproxy_0.4.11.bb b/meta/recipes-support/libproxy/libproxy_0.4.11.bb
index 3367c85..e709b52 100644
--- a/meta/recipes-support/libproxy/libproxy_0.4.11.bb
+++ b/meta/recipes-support/libproxy/libproxy_0.4.11.bb
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 04/17] ppp: Add extra include dirs
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (2 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 03/17] libproxy: Include select.h for posix compliance Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 05/17] musl: Enable NLS Khem Raj
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-connectivity/ppp/ppp_2.4.7.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
index 92ca0c9..4219d45 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
@@ -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
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 05/17] musl: Enable NLS
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (3 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 04/17] ppp: Add extra include dirs Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 06/17] vte: Pass _GNU_SOURCE via CFLAGS Khem Raj
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/conf/distro/include/tclibc-musl.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/distro/include/tclibc-musl.inc b/meta/conf/distro/include/tclibc-musl.inc
index 7c1c91b..1ddd58e 100644
--- a/meta/conf/distro/include/tclibc-musl.inc
+++ b/meta/conf/distro/include/tclibc-musl.inc
@@ -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"
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 06/17] vte: Pass _GNU_SOURCE via CFLAGS
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (4 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 05/17] musl: Enable NLS Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 07/17] libfm-extra: Add own nls.m4 Khem Raj
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

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

Change-Id: I5a06d08c56529a6b2cf3adf264656ae03b95c1d4
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-support/vte/vte_0.28.2.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-support/vte/vte_0.28.2.bb b/meta/recipes-support/vte/vte_0.28.2.bb
index 485187d..9dab390 100644
--- a/meta/recipes-support/vte/vte_0.28.2.bb
+++ b/meta/recipes-support/vte/vte_0.28.2.bb
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 07/17] libfm-extra: Add own nls.m4
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (5 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 06/17] vte: Pass _GNU_SOURCE via CFLAGS Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 08/17] connman: Fix builds to compile on musl Khem Raj
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

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

Change-Id: Ib6920629b5ab1a1938cc5dfa447078f6fca234c7
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../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

diff --git a/meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch b/meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch
new file mode 100644
index 0000000..69a51d5
--- /dev/null
+++ b/meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch
@@ -0,0 +1,54 @@
+From c320799c941d42a9b7e351805359694ea3b36d2d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+
+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 drepper@cygnus.com, 1995-2000.
++dnl Bruno Haible haible@clisp.cons.org, 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
+
diff --git a/meta/recipes-support/libfm/libfm-extra_1.2.3.bb b/meta/recipes-support/libfm/libfm-extra_1.2.3.bb
index 85bcc3c..46d2d62 100644
--- a/meta/recipes-support/libfm/libfm-extra_1.2.3.bb
+++ b/meta/recipes-support/libfm/libfm-extra_1.2.3.bb
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 08/17] connman: Fix builds to compile on musl
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (6 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 07/17] libfm-extra: Add own nls.m4 Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-13 13:50   ` Burton, Ross
  2015-04-11  1:20 ` [PATCH 09/17] perl: Fix build for musl Khem Raj
                   ` (8 subsequent siblings)
  16 siblings, 1 reply; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...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

diff --git a/meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch b/meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch
new file mode 100644
index 0000000..873843b
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch
@@ -0,0 +1,41 @@
+From b736e90681e135e0cccb143a9ce8b7049e1ec0f0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ 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
+
diff --git a/meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch b/meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch
new file mode 100644
index 0000000..058f1dc
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch
@@ -0,0 +1,235 @@
+From b6ff3a5989e72307cd54a840179ea072c4e0213e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Apr 2015 22:59:55 -0700
+Subject: [PATCH 2/4] musl header fixes
+
+ported from
+http://git.alpinelinux.org/cgit/aports/plain/testing/connman/musl-fixes.patch
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac                 | 1 +
+ gdhcp/common.c               | 6 +++++-
+ gweb/gresolv.c               | 1 +
+ plugins/wifi.c               | 3 +--
+ src/ippool.c                 | 2 +-
+ src/iptables.c               | 2 +-
+ src/log.c                    | 2 ++
+ src/ntp.c                    | 2 +-
+ src/tethering.c              | 2 --
+ tools/dhcp-test.c            | 1 -
+ tools/dnsproxy-test.c        | 1 +
+ tools/private-network-test.c | 2 +-
+ tools/tap-test.c             | 2 +-
+ 13 files changed, 16 insertions(+), 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6fa01ba..493a5f1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -165,6 +165,7 @@ fi
+ AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
+ AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
+ 
++AC_CHECK_HEADERS(execinfo.h)
+ AC_CHECK_HEADERS(resolv.h, dummy=yes,
+ 	AC_MSG_ERROR(resolver header files are required))
+ AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
+diff --git a/gdhcp/common.c b/gdhcp/common.c
+index 48fcdef..40ade87 100644
+--- a/gdhcp/common.c
++++ b/gdhcp/common.c
+@@ -22,6 +22,7 @@
+ #include <config.h>
+ #endif
+ 
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <errno.h>
+@@ -31,7 +32,6 @@
+ #include <string.h>
+ #include <endian.h>
+ #include <net/if_arp.h>
+-#include <linux/if.h>
+ #include <netpacket/packet.h>
+ #include <net/ethernet.h>
+ #include <arpa/inet.h>
+@@ -40,6 +40,8 @@
+ #include "gdhcp.h"
+ #include "common.h"
+ 
++#include <linux/if.h>
++
+ static const DHCPOption client_options[] = {
+ 	{ OPTION_IP,			0x01 }, /* subnet-mask */
+ 	{ OPTION_IP | OPTION_LIST,	0x03 }, /* routers */
+@@ -474,10 +476,12 @@ static const struct in6_addr in6addr_all_dhcp_relay_agents_and_servers_mc =
+ 	IN6ADDR_ALL_DHCP_RELAY_AGENTS_AND_SERVERS_MC_INIT;
+ 
+ /* from netinet/in.h */
++#if 0
+ struct in6_pktinfo {
+ 	struct in6_addr ipi6_addr;  /* src/dst IPv6 address */
+ 	unsigned int ipi6_ifindex;  /* send/recv interface index */
+ };
++#endif
+ 
+ int dhcpv6_send_packet(int index, struct dhcpv6_packet *dhcp_pkt, int len)
+ {
+diff --git a/gweb/gresolv.c b/gweb/gresolv.c
+index 5cf7a9a..c11a1d9 100644
+--- a/gweb/gresolv.c
++++ b/gweb/gresolv.c
+@@ -24,6 +24,7 @@
+ #endif
+ 
+ #include <errno.h>
++#include <stdio.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <string.h>
+diff --git a/plugins/wifi.c b/plugins/wifi.c
+index 1f90a31..427c552 100644
+--- a/plugins/wifi.c
++++ b/plugins/wifi.c
+@@ -30,9 +30,8 @@
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+-#include <linux/if_arp.h>
+-#include <linux/wireless.h>
+ #include <net/ethernet.h>
++#include <linux/wireless.h>
+ 
+ #ifndef IFF_LOWER_UP
+ #define IFF_LOWER_UP	0x10000
+diff --git a/src/ippool.c b/src/ippool.c
+index bb8568d..f1eb1f3 100644
+--- a/src/ippool.c
++++ b/src/ippool.c
+@@ -28,7 +28,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+-#include <sys/errno.h>
++#include <errno.h>
+ #include <sys/socket.h>
+ 
+ #include "connman.h"
+diff --git a/src/iptables.c b/src/iptables.c
+index 8d583ea..a91a451 100644
+--- a/src/iptables.c
++++ b/src/iptables.c
+@@ -28,7 +28,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+-#include <sys/errno.h>
++#include <errno.h>
+ #include <sys/socket.h>
+ #include <xtables.h>
+ 
+diff --git a/src/log.c b/src/log.c
+index 3bf9fcc..3b9843f 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -114,6 +114,7 @@ void connman_debug(const char *format, ...)
+ 
+ static void print_backtrace(unsigned int offset)
+ {
++#ifdef HAVE_EXECINFO_H
+ 	void *frames[99];
+ 	size_t n_ptrs;
+ 	unsigned int i;
+@@ -212,6 +213,7 @@ static void print_backtrace(unsigned int offset)
+ 
+ 	close(outfd[1]);
+ 	close(infd[0]);
++#endif /* HAVE_EXECINFO_H */
+ }
+ 
+ static void signal_handler(int signo)
+diff --git a/src/ntp.c b/src/ntp.c
+index abb2caa..dd50532 100644
+--- a/src/ntp.c
++++ b/src/ntp.c
+@@ -180,7 +180,7 @@ static void send_packet(int fd, const char *server, uint32_t timeout)
+ 	msg.xmttime.fraction = htonl(transmit_timeval.tv_usec * 1000);
+ 
+ 	len = sendto(fd, &msg, sizeof(msg), MSG_DONTWAIT,
+-						&addr, sizeof(addr));
++						(struct sockaddr *) &addr, sizeof(addr));
+ 	if (len < 0) {
+ 		connman_error("Time request for server %s failed (%d/%s)",
+ 			server, errno, strerror(errno));
+diff --git a/src/tethering.c b/src/tethering.c
+index ceeec74..c44cb36 100644
+--- a/src/tethering.c
++++ b/src/tethering.c
+@@ -31,10 +31,8 @@
+ #include <stdio.h>
+ #include <sys/ioctl.h>
+ #include <net/if.h>
+-#include <linux/sockios.h>
+ #include <string.h>
+ #include <fcntl.h>
+-#include <linux/if_tun.h>
+ #include <netinet/in.h>
+ #include <linux/if_bridge.h>
+ 
+diff --git a/tools/dhcp-test.c b/tools/dhcp-test.c
+index c34e10a..eae66fc 100644
+--- a/tools/dhcp-test.c
++++ b/tools/dhcp-test.c
+@@ -33,7 +33,6 @@
+ #include <arpa/inet.h>
+ #include <net/route.h>
+ #include <net/ethernet.h>
+-#include <linux/if_arp.h>
+ 
+ #include <gdhcp/gdhcp.h>
+ 
+diff --git a/tools/dnsproxy-test.c b/tools/dnsproxy-test.c
+index 551cae9..371e2e2 100644
+--- a/tools/dnsproxy-test.c
++++ b/tools/dnsproxy-test.c
+@@ -24,6 +24,7 @@
+ #endif
+ 
+ #include <errno.h>
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+diff --git a/tools/private-network-test.c b/tools/private-network-test.c
+index 3dd115b..2828bb3 100644
+--- a/tools/private-network-test.c
++++ b/tools/private-network-test.c
+@@ -32,7 +32,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <signal.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/signalfd.h>
+ #include <unistd.h>
+ 
+diff --git a/tools/tap-test.c b/tools/tap-test.c
+index fdc098a..ea9a567 100644
+--- a/tools/tap-test.c
++++ b/tools/tap-test.c
+@@ -29,7 +29,7 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <string.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/ioctl.h>
+ 
+ #include <netinet/in.h>
+-- 
+2.1.4
+
diff --git a/meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch b/meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch
new file mode 100644
index 0000000..28931c1
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch
@@ -0,0 +1,77 @@
+From 93bb904cc4e1e97152e6408077ba136fc883b6bb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Apr 2015 23:02:21 -0700
+Subject: [PATCH 3/4] resolve: musl does not implement res_ninit
+
+ported from
+http://git.alpinelinux.org/cgit/aports/plain/testing/connman/libresolv.patch
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gweb/gresolv.c | 33 ++++++++++++---------------------
+ 1 file changed, 12 insertions(+), 21 deletions(-)
+
+diff --git a/gweb/gresolv.c b/gweb/gresolv.c
+index c11a1d9..991b14c 100644
+--- a/gweb/gresolv.c
++++ b/gweb/gresolv.c
+@@ -876,8 +876,6 @@ GResolv *g_resolv_new(int index)
+ 	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);
+ }
+ 
+@@ -1021,24 +1017,19 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname,
+ 	debug(resolv, "hostname %s", hostname);
+ 
+ 	if (!resolv->nameserver_list) {
+-		int i;
+-
+-		for (i = 0; i < resolv->res.nscount; i++) {
+-			char buf[100];
+-			int family = resolv->res.nsaddr_list[i].sin_family;
+-			void *sa_addr = &resolv->res.nsaddr_list[i].sin_addr;
+-
+-			if (family != AF_INET &&
+-					resolv->res._u._ext.nsaddrs[i]) {
+-				family = AF_INET6;
+-				sa_addr = &resolv->res._u._ext.nsaddrs[i]->sin6_addr;
++		FILE *f = fopen("/etc/resolv.conf", "r");
++		if (f) {
++			char line[256], *s;
++			int i;
++			while (fgets(line, sizeof(line), f)) {
++				if (strncmp(line, "nameserver", 10) || !isspace(line[10]))
++					continue;
++				for (s = &line[11]; isspace(s[0]); s++);
++				for (i = 0; s[i] && !isspace(s[i]); i++);
++				s[i] = 0;
++				g_resolv_add_nameserver(resolv, s, 53, 0);
+ 			}
+-
+-			if (family != AF_INET && family != AF_INET6)
+-				continue;
+-
+-			if (inet_ntop(family, sa_addr, buf, sizeof(buf)))
+-				g_resolv_add_nameserver(resolv, buf, 53, 0);
++			fclose(f);
+ 		}
+ 
+ 		if (!resolv->nameserver_list)
+-- 
+2.1.4
+
diff --git a/meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch b/meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch
new file mode 100644
index 0000000..80a4831
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch
@@ -0,0 +1,43 @@
+From 6c1854401b4888fbf420ceb7b1e18097b91fb488 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Apr 2015 23:48:23 -0700
+Subject: [PATCH 4/4] tethering: Fix duplicate definitions issue with musl
+
+We just need this one define BRCTL_GET_VERSION
+from linux/if_bridge.h
+So lets define it if not defined already and remove
+including linux/if_bridge.h because it include's linux/in6.h
+which then conflicts with musl's netinet/in.h
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/tethering.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/tethering.c b/src/tethering.c
+index c44cb36..62fce36 100644
+--- a/src/tethering.c
++++ b/src/tethering.c
+@@ -34,14 +34,15 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <netinet/in.h>
+-#include <linux/if_bridge.h>
+ 
+ #include "connman.h"
+ 
+ #include <gdhcp/gdhcp.h>
+ 
+ #include <gdbus.h>
+-
++#ifndef BRCTL_GET_VERSION
++#define BRCTL_GET_VERSION 0
++#endif
+ #ifndef DBUS_TYPE_UNIX_FD
+ #define DBUS_TYPE_UNIX_FD -1
+ #endif
+-- 
+2.1.4
+
diff --git a/meta/recipes-connectivity/connman/connman_1.28.bb b/meta/recipes-connectivity/connman/connman_1.28.bb
index 53e71fa..a395d63 100644
--- a/meta/recipes-connectivity/connman/connman_1.28.bb
+++ b/meta/recipes-connectivity/connman/connman_1.28.bb
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 09/17] perl: Fix build for musl
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (7 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 08/17] connman: Fix builds to compile on musl Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 10/17] iptables: Fix build on musl Khem Raj
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

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

Change-Id: I24a1a8e07abb35c7e3d64b372addfb3bd6f7731c
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/perl/perl_5.20.0.bb | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/meta/recipes-devtools/perl/perl_5.20.0.bb b/meta/recipes-devtools/perl/perl_5.20.0.bb
index db65202..d100ff9 100644
--- a/meta/recipes-devtools/perl/perl_5.20.0.bb
+++ b/meta/recipes-devtools/perl/perl_5.20.0.bb
@@ -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)}
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 10/17] iptables: Fix build on musl
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (8 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 09/17] perl: Fix build for musl Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 11/17] xserver-xorg: Use __GLIBC__ instread of __linux__ to denote glibc dependent code Khem Raj
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

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

Change-Id: I74977dd052c5569b00631379d7f4bacfb86cf381
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../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

diff --git a/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch b/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
new file mode 100644
index 0000000..7a003d9
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
@@ -0,0 +1,89 @@
+From 7c07b7fd4fdd7844dd032af822306f08e4422c34 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ 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
+
diff --git a/meta/recipes-extended/iptables/iptables_1.4.21.bb b/meta/recipes-extended/iptables/iptables_1.4.21.bb
index dc17d57..31c017b 100644
--- a/meta/recipes-extended/iptables/iptables_1.4.21.bb
+++ b/meta/recipes-extended/iptables/iptables_1.4.21.bb
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 11/17] xserver-xorg: Use __GLIBC__ instread of __linux__ to denote glibc dependent code
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (9 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 10/17] iptables: Fix build on musl Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 12/17] pulseaudio: Fix build with musl Khem Raj
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

Change-Id: Ia899520181feb1c601a76e04a176f4387a331c00
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...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

diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-use-__GLIBC__-guard-for-glibc-specific-code.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-use-__GLIBC__-guard-for-glibc-specific-code.patch
new file mode 100644
index 0000000..21e4ed4
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-use-__GLIBC__-guard-for-glibc-specific-code.patch
@@ -0,0 +1,31 @@
+From f242740f6488a25e6ca84968b0e2319a9a3975b4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ 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
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.3.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.3.bb
index cfbc491..7eeadd1 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.3.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.3.bb
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 12/17] pulseaudio: Fix build with musl
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (10 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 11/17] xserver-xorg: Use __GLIBC__ instread of __linux__ to denote glibc dependent code Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 13/17] sudo: Disable hardening for musl Khem Raj
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../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

diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch
new file mode 100644
index 0000000..8555995
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch
@@ -0,0 +1,70 @@
+From f6ab3c3aa7a1841c8add04828029356d2a8c88e7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ 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
+
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb
index 91027bf..fb33c7c 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 13/17] sudo: Disable hardening for musl
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (11 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 12/17] pulseaudio: Fix build with musl Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-12  8:30   ` Bernhard Reutner-Fischer
  2015-04-11  1:20 ` [PATCH 14/17] xserver-xf86-config: Preload graphics driver modules " Khem Raj
                   ` (3 subsequent siblings)
  16 siblings, 1 reply; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

musl does not yet enable ssp

Change-Id: If40ab0a54b17d5528676b1268182b6c7e7ef5761
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-extended/sudo/sudo.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc
index 2d411f3..cdee6bb 100644
--- a/meta/recipes-extended/sudo/sudo.inc
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -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
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 14/17] xserver-xf86-config: Preload graphics driver modules for musl
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (12 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 13/17] sudo: Disable hardening for musl Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-20 11:20   ` Burton, Ross
  2015-04-11  1:20 ` [PATCH 15/17] kbd: Mark glibc headers under __GLIBC__ Khem Raj
                   ` (2 subsequent siblings)
  16 siblings, 1 reply; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../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

diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf
new file mode 100644
index 0000000..7ceb6fd
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf
@@ -0,0 +1,9 @@
+Section "Module"
+    Load "fbdevhw"
+    Load "fb"
+    Load "shadow"
+    Load "shadowfb"
+    Load "vbe"
+    Load "vgahw"
+EndSection
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
index 5420b7d..e07c204 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
@@ -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
+}
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 15/17] kbd: Mark glibc headers under __GLIBC__
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (13 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 14/17] xserver-xf86-config: Preload graphics driver modules " Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 16/17] gdb: Refresh patches against git Khem Raj
  2015-04-11  1:20 ` [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead Khem Raj
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

Change-Id: I4e91038ea8b05defbb9d574c61eea96ccc064e51
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-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

diff --git a/meta/recipes-core/kbd/kbd/0003-Only-inluclude-kernel-headers-with-glibc.patch b/meta/recipes-core/kbd/kbd/0003-Only-inluclude-kernel-headers-with-glibc.patch
new file mode 100644
index 0000000..8bfcb0c
--- /dev/null
+++ b/meta/recipes-core/kbd/kbd/0003-Only-inluclude-kernel-headers-with-glibc.patch
@@ -0,0 +1,29 @@
+From 3c5c7acc7ef874b919b26583d3892e21b907833f Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+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 <ncopa@alpinelinux.org>
+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
+
diff --git a/meta/recipes-core/kbd/kbd_2.0.2.bb b/meta/recipes-core/kbd/kbd_2.0.2.bb
index 0aa976a..136dc7a 100644
--- a/meta/recipes-core/kbd/kbd_2.0.2.bb
+++ b/meta/recipes-core/kbd/kbd_2.0.2.bb
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 16/17] gdb: Refresh patches against git
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (14 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 15/17] kbd: Mark glibc headers under __GLIBC__ Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  1:20 ` [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead Khem Raj
  16 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core

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

Change-Id: I5bd160d0959154896096ebc93a8a450d04979c73
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 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

diff --git a/meta/recipes-devtools/gdb/gdb-cross_7.9.bb b/meta/recipes-devtools/gdb/gdb-cross_7.9.bb
index f9da486..3a95cfb 100644
--- a/meta/recipes-devtools/gdb/gdb-cross_7.9.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross_7.9.bb
@@ -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"
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
index 2c95e03..e65af4b 100644
--- a/meta/recipes-devtools/gdb/gdb.inc
+++ b/meta/recipes-devtools/gdb/gdb.inc
@@ -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}"
diff --git a/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch b/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
new file mode 100644
index 0000000..e0221af
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
@@ -0,0 +1,28 @@
+From d3ec939b82be23e7c9534cdc7502645f6c5856d1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ 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
+
diff --git a/meta/recipes-devtools/gdb/gdb/gdbserver-cflags-last.diff b/meta/recipes-devtools/gdb/gdb/0002-Change-order-of-CFLAGS.patch
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
--- a/meta/recipes-devtools/gdb/gdb/gdbserver-cflags-last.diff
+++ b/meta/recipes-devtools/gdb/gdb/0002-Change-order-of-CFLAGS.patch
@@ -1,13 +1,21 @@
-Upstream-Status: Pending
+From 0dcb0a8b139b44ae84e8fd8ff8130cbbb52e444d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
 ---
- 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
+
diff --git a/meta/recipes-devtools/gdb/gdb/renesas-sh-native-support.patch b/meta/recipes-devtools/gdb/gdb/0003-Add-support-for-Renesas-SH-sh4-architecture.patch
similarity index 60%
rename from meta/recipes-devtools/gdb/gdb/renesas-sh-native-support.patch
rename to meta/recipes-devtools/gdb/gdb/0003-Add-support-for-Renesas-SH-sh4-architecture.patch
index 2259c6f..d82d269 100644
--- a/meta/recipes-devtools/gdb/gdb/renesas-sh-native-support.patch
+++ b/meta/recipes-devtools/gdb/gdb/0003-Add-support-for-Renesas-SH-sh4-architecture.patch
@@ -1,41 +1,35 @@
-Description: Add Renesas SH (sh4) support
- Add support for Renesas SH (sh4) architecture.
- .
- gdb (7.4-1~cvs20111117.2) experimental; urgency=low
+From 4e5507488068b3ea2ebf9c84c6c192c7bfd3be82 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 2 Mar 2015 02:31:12 +0000
+Subject: [PATCH 3/3] Add support for Renesas SH (sh4) architecture.
+
+gdb (7.4-1~cvs20111117.2) experimental; urgency=low
  .
    * Add Renesas SH (sh4) support (Closes: #576242)
      - Thanks Nobuhiro Iwamatsu, Takashi Yoshii.
 Author: Hector Oron <zumbi@debian.org>
 Bug-Debian: http://bugs.debian.org/576242
 
----
-The information above should follow the Patch Tagging Guidelines, please
-checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
-are templates for supplementary fields that you might want to add:
-
-Forwarded: <no|not-needed|url proving that it has been forwarded>
-Last-Update: <2011-11-17>
-
-
 Upstream-Status: Pending
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gdb/Makefile.in                      |   1 +
+ gdb/configure.host                   |   1 +
+ gdb/sh-linux-tdep.c                  | 519 +++++++++++++++++++++++++++++++++++
+ gdb/sh-tdep.c                        |  54 ++--
+ gdb/sh-tdep.h                        |  49 ++++
+ gdb/testsuite/gdb.asm/asm-source.exp |   5 +
+ gdb/testsuite/gdb.asm/sh.inc         |   3 +-
+ gdb/testsuite/gdb.base/annota1.c     |   3 +
+ gdb/testsuite/gdb.base/annota3.c     |   4 +
+ gdb/testsuite/gdb.base/sigall.c      |   3 +
+ gdb/testsuite/gdb.base/signals.c     |   4 +
+ 11 files changed, 617 insertions(+), 29 deletions(-)
 
-Index: gdb-7.9/gdb/configure.host
-===================================================================
---- gdb-7.9.orig/gdb/configure.host
-+++ gdb-7.9/gdb/configure.host
-@@ -150,6 +150,7 @@ powerpc*-*-linux*)	gdb_host=linux ;;
- 
- s390*-*-linux*)		gdb_host=linux ;;
- 
-+sh*-*-linux*)		gdb_host=linux ;;
- sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
- 			gdb_host=nbsd ;;
- sh*-*-openbsd*)		gdb_host=nbsd ;;
-Index: gdb-7.9/gdb/Makefile.in
-===================================================================
---- gdb-7.9.orig/gdb/Makefile.in
-+++ gdb-7.9/gdb/Makefile.in
+diff --git a/gdb/Makefile.in b/gdb/Makefile.in
+index 7937801..63baf81 100644
+--- a/gdb/Makefile.in
++++ b/gdb/Makefile.in
 @@ -1707,6 +1707,7 @@ ALLDEPFILES = \
  	score-tdep.c \
  	ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \
@@ -44,10 +38,22 @@ Index: gdb-7.9/gdb/Makefile.in
  	sol2-tdep.c \
  	solib-svr4.c \
  	sparc-linux-nat.c sparc-linux-tdep.c \
-Index: gdb-7.9/gdb/sh-linux-tdep.c
-===================================================================
---- gdb-7.9.orig/gdb/sh-linux-tdep.c
-+++ gdb-7.9/gdb/sh-linux-tdep.c
+diff --git a/gdb/configure.host b/gdb/configure.host
+index d07be4b..b6391c5 100644
+--- a/gdb/configure.host
++++ b/gdb/configure.host
+@@ -150,6 +150,7 @@ powerpc*-*-linux*)	gdb_host=linux ;;
+ 
+ s390*-*-linux*)		gdb_host=linux ;;
+ 
++sh*-*-linux*)		gdb_host=linux ;;
+ sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
+ 			gdb_host=nbsd ;;
+ sh*-*-openbsd*)		gdb_host=nbsd ;;
+diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c
+index 2ff2ee8..1a11262 100644
+--- a/gdb/sh-linux-tdep.c
++++ b/gdb/sh-linux-tdep.c
 @@ -18,14 +18,37 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
  
@@ -86,7 +92,7 @@ Index: gdb-7.9/gdb/sh-linux-tdep.c
  #include "glibc-tdep.h"
  #include "sh-tdep.h"
  #include "linux-tdep.h"
-@@ -180,9 +203,505 @@ static struct tramp_frame sh_linux_rt_si
+@@ -180,9 +203,505 @@ static struct tramp_frame sh_linux_rt_sigreturn_tramp_frame = {
    sh_linux_rt_sigreturn_init
  };
  
@@ -592,367 +598,10 @@ Index: gdb-7.9/gdb/sh-linux-tdep.c
    linux_init_abi (info, gdbarch);
  
    /* GNU/Linux uses SVR4-style shared libraries.  */
-Index: gdb-7.9/gdb/sh-tdep.h
-===================================================================
---- gdb-7.9.orig/gdb/sh-tdep.h
-+++ gdb-7.9/gdb/sh-tdep.h
-@@ -21,6 +21,12 @@
- 
- /* Contributed by Steve Chamberlain sac@cygnus.com.  */
- 
-+struct frame_info;
-+struct gdbarch;
-+struct reggroup;
-+struct regset;
-+struct regcache;
-+
- /* Registers for all SH variants.  Used also by sh3-rom.c.  */
- enum
-   {
-@@ -29,6 +35,7 @@ enum
-     ARG0_REGNUM = 4,
-     ARGLAST_REGNUM = 7,
-     FP_REGNUM = 14,
-+    SP_REGNUM = 15,
-     PC_REGNUM = 16,
-     PR_REGNUM = 17,
-     GBR_REGNUM = 18,
-@@ -81,6 +88,24 @@ enum
-     FV0_REGNUM = 76,
-     FV_LAST_REGNUM = 79
-   };
-+#define SH_NUM_REGS 67
-+
-+struct sh_frame_cache
-+{
-+  /* Base address.  */
-+  CORE_ADDR base;
-+  LONGEST sp_offset;
-+  CORE_ADDR pc;
-+
-+  /* Flag showing that a frame has been created in the prologue code. */
-+  int uses_fp;
-+
-+  /* Saved registers.  */
-+  CORE_ADDR saved_regs[SH_NUM_REGS];
-+  CORE_ADDR saved_sp;
-+};
-+
-+extern struct sh_frame_cache *sh_frame_cache (struct frame_info *next_frame, void **this_cache);
- 
- /* This structure describes a register in a core-file.  */
- struct sh_corefile_regmap
-@@ -89,8 +114,32 @@ struct sh_corefile_regmap
-   unsigned int offset;
- };
- 
-+/* sh architecture specific information.  */
- struct gdbarch_tdep
- {
-+  /* General-purpose registers.  */
-+  struct regset *gregset;
-+  int *gregset_reg_offset;
-+  int gregset_num_regs;
-+  size_t sizeof_gregset;
-+
-+  /* Floating-point registers.  */
-+  struct regset *fpregset;
-+  size_t sizeof_fpregset;
-+
-+  /* Offset of saved PC in jmp_buf.  */
-+  int jb_pc_offset;
-+
-+  /* Detect sigtramp.  */
-+  int (*sigtramp_p) (struct frame_info *);
-+
-+  /* Get address of sigcontext for sigtramp.  */
-+  CORE_ADDR (*sigcontext_addr) (struct frame_info *);
-+
-+  /* Offset of registers in `struct sigcontext'.  */
-+  int *sc_reg_offset;
-+  int sc_num_regs;
-+
-   /* Non-NULL when debugging from a core file.  Provides the offset
-      where each general-purpose register is stored inside the associated
-      core file section.  */
-Index: gdb-7.9/gdb/sh-linux-nat.c
-===================================================================
---- /dev/null
-+++ gdb-7.9/gdb/sh-linux-nat.c
-@@ -0,0 +1,269 @@
-+/* Low level SH interface to ptrace, for GDB when running native.
-+   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
-+
-+This file is part of GDB.
-+
-+This program is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 2 of the License, or
-+(at your option) any later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; if not, write to the Free Software
-+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-+
-+#include "defs.h"
-+#include "inferior.h"
-+#include "gdbcore.h"
-+#include "regcache.h"
-+#include "linux-nat.h"
-+#include "target.h"
-+#include "arch-utils.h"
-+
-+#include "gdb_assert.h"
-+#include "gdb_string.h"
-+#include <sys/ptrace.h>
-+#include <sys/user.h>
-+#include <sys/procfs.h>
-+#include <asm/ptrace.h>
-+
-+/* Prototypes for supply_gregset etc. */
-+#include "gregset.h"
-+#include "sh-tdep.h"
-+
-+/* Defines ps_err_e, struct ps_prochandle.  */
-+#include "gdb_proc_service.h"
-+
-+//#include <asm/elf.h>
-+
-+#define SH_LINUX_NUM_REGS	40
-+/* This table must line up with REGISTER_NAME in "sh-tdep.c".  */
-+static const int regmap[] =
-+{
-+  /* general registers 0-15 */
-+  REG_REG0   , REG_REG0+1 , REG_REG0+2 , REG_REG0+3,
-+  REG_REG0+4 , REG_REG0+5 , REG_REG0+6 , REG_REG0+7,
-+  REG_REG0+8 , REG_REG0+9 , REG_REG0+10, REG_REG0+11,
-+  REG_REG0+12, REG_REG0+13, REG_REG0+14, REG_REG0+15,
-+  /* 16 - 22 */
-+  REG_PC, REG_PR, REG_GBR, -1, REG_MACH, REG_MACL, REG_SR,
-+  /* 23, 24 */
-+  REG_FPUL, REG_FPSCR,
-+  /* floating point registers 25 - 40 */
-+  REG_FPREG0   , REG_FPREG0+1 , REG_FPREG0+2 , REG_FPREG0+3 ,
-+  REG_FPREG0+4 , REG_FPREG0+5 , REG_FPREG0+6 , REG_FPREG0+7 ,
-+  REG_FPREG0+8 , REG_FPREG0+9 , REG_FPREG0+10, REG_FPREG0+11,
-+  REG_FPREG0+12, REG_FPREG0+13, REG_FPREG0+14, REG_FPREG0+15,
-+};
-+
-+CORE_ADDR
-+register_u_addr (CORE_ADDR blockend, int regnum)
-+{
-+  if (regnum < 0 || regnum >= sizeof regmap/sizeof regmap[0])
-+    return (CORE_ADDR)-1;
-+  return (blockend + 4 * regmap[regnum]);
-+}
-+
-+\f
-+/* Return the address in the core dump or inferior of register REGNO.
-+   BLOCKEND is the address of the end of the user structure.  */
-+
-+CORE_ADDR
-+register_addr (int regno, CORE_ADDR blockend)
-+{
-+  CORE_ADDR addr;
-+
-+  if (regno < 0 || regno >= SH_LINUX_NUM_REGS) {
-+    internal_error (__FILE__, __LINE__,
-+		  _("Got request for bad register number %d."), regno);
-+  }
-+
-+  REGISTER_U_ADDR (addr, blockend, regno);
-+
-+  return addr;
-+}
-+
-+/* Fetch one register.  */
-+
-+static void
-+fetch_register (struct regcache *regcache, int tid, int regno)
-+{
-+  int val;
-+
-+  if (cannot_fetch_register (regno))
-+    {
-+      regcache_raw_supply (regcache, regno, NULL);
-+      return;
-+    }
-+
-+  errno = 0;
-+  val = ptrace (PTRACE_PEEKUSER, tid, register_addr (regno, 0), 0);
-+  if (errno != 0)
-+    perror_with_name (_("Couldn't get registers"));
-+
-+  regcache_raw_supply (regcache, regno, &val);
-+}
-+
-+/* Store one register. */
-+
-+static void
-+store_register (struct regcache *regcache, int tid, int regno)
-+{
-+  int val;
-+
-+  if (cannot_store_register (regno))
-+    return;
-+
-+  errno = 0;
-+  regcache_raw_collect (regcache, regno, &val);
-+  ptrace (PTRACE_POKEUSER, tid, register_addr (regno, 0), val);
-+  if (errno != 0)
-+    perror_with_name (_("Couldn't write registers"));
-+}
-+
-+/* Transfering the general-purpose registers between GDB, inferiors
-+   and core files.  */
-+
-+/* Fill GDB's register array with the general-purpose register values
-+   in *GREGSETP.  */
-+
-+void
-+supply_gregset (struct regcache *regcache, const elf_gregset_t *gregsetp)
-+{
-+  elf_greg_t *regp = (elf_greg_t *) gregsetp;
-+  int i;
-+
-+  for (i = 0; i < 23; i++)
-+    if (regmap[i] == -1)
-+      regcache_raw_supply (regcache, i, NULL);
-+    else
-+      regcache_raw_supply (regcache, i, (char *) (regp + regmap[i]));
-+}
-+
-+/* Fill register REGNO (if it is a general-purpose register) in
-+   *GREGSETPS with the value in GDB's register array.  If REGNO is -1,
-+   do this for all registers.  */
-+
-+void
-+fill_gregset (const struct regcache *regcache, elf_gregset_t *gregsetp, int regno)
-+{
-+  elf_greg_t *regp = (elf_greg_t *) gregsetp;
-+  int i;
-+
-+  for (i = 0; i < 23; i++)
-+    if (regmap[i] != -1 && (regno == -1 || regno == i))
-+      regcache_raw_collect (regcache, i, (char *) (regp + regmap[i]));
-+}
-+
-+/* Transfering floating-point registers between GDB, inferiors and cores.  */
-+
-+/* Fill GDB's register array with the floating-point register values in
-+   *FPREGSETP.  */
-+
-+void
-+supply_fpregset (struct regcache *regcache, const elf_fpregset_t *fpregsetp)
-+{
-+  int i;
-+  long *regp = (long *)fpregsetp;
-+
-+  for (i = 0; i < 16; i++)
-+    regcache_raw_supply (regcache, 25 + i, (char *) (regp + i));
-+  regcache_raw_supply (regcache, FPUL_REGNUM, (char *) (regp + REG_FPUL - REG_FPREG0));
-+  regcache_raw_supply (regcache, FPSCR_REGNUM, (char *) (regp + REG_FPSCR - REG_FPREG0));
-+}
-+
-+/* Fill register REGNO (if it is a floating-point register) in
-+   *FPREGSETP with the value in GDB's register array.  If REGNO is -1,
-+   do this for all registers.  */
-+
-+void
-+fill_fpregset (const struct regcache *regcache, elf_fpregset_t *fpregsetp, int regno)
-+{
-+  int i;
-+  long *regp = (long *)fpregsetp;
-+
-+  for (i = 0; i < 16; i++)
-+    if ((regno == -1) || (regno == i))
-+      regcache_raw_collect (regcache, 25 + i, (char *) (regp + i));
-+  if ((regno == -1) || regno == FPSCR_REGNUM)
-+    regcache_raw_collect (regcache, FPSCR_REGNUM, (char *) (regp + REG_FPSCR - REG_FPREG0));
-+  if ((regno == -1) || regno == FPUL_REGNUM)
-+    regcache_raw_collect (regcache, FPUL_REGNUM, (char *) (regp + REG_FPUL - REG_FPREG0));
-+}
-+
-+/* Transferring arbitrary registers between GDB and inferior.  */
-+
-+/* Check if register REGNO in the child process is accessible.
-+   If we are accessing registers directly via the U area, only the
-+   general-purpose registers are available.
-+   All registers should be accessible if we have GETREGS support.  */
-+
-+int
-+cannot_fetch_register (int regno)
-+{
-+  return (regno < 0 || regno >= sizeof regmap / sizeof regmap[0] || regmap[regno] == -1);
-+}
-+
-+int
-+cannot_store_register (int regno)
-+{
-+  return (regno < 0 || regno >= sizeof regmap / sizeof regmap[0] || regmap[regno] == -1);
-+}
-+
-+/* Fetch register values from the inferior.
-+   If REGNO is negative, do this for all registers.
-+   Otherwise, REGNO specifies which register (so we can save time). */
-+
-+static void
-+sh_linux_fetch_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regno)
-+{
-+  int i;
-+  int tid;
-+
-+  /* GNU/Linux LWP ID's are process ID's.  */
-+  if ((tid = TIDGET (inferior_ptid)) == 0)
-+    tid = PIDGET (inferior_ptid);	/* Not a threaded program.  */
-+
-+  for (i = 0; i < SH_LINUX_NUM_REGS; i++)
-+    if (regno == -1 || regno == i)
-+      fetch_register (regcache, tid, i);
-+}
-+/* Store our register values back into the inferior.
-+   If REGNO is negative, do this for all registers.
-+   Otherwise, REGNO specifies which register (so we can save time).  */
-+
-+static void
-+sh_linux_store_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regno)
-+{
-+  int i;
-+  int tid;
-+
-+  /* GNU/Linux LWP ID's are process ID's.  */
-+  if ((tid = TIDGET (inferior_ptid)) == 0)
-+    tid = PIDGET (inferior_ptid);	/* Not a threaded program.  */
-+
-+  for (i = 0; i < SH_LINUX_NUM_REGS; i++)
-+    if (regno == -1 || regno == i)
-+      store_register (regcache, tid, i);
-+}
-+
-+void
-+_initialize_sh_linux_nat (void)
-+{
-+  struct target_ops *t;
-+
-+  /* Fill in the generic GNU/Linux methods.  */
-+  t = linux_target ();
-+
-+  /* Add our register access methods.  */
-+  t->to_fetch_registers = sh_linux_fetch_inferior_registers;
-+  t->to_store_registers = sh_linux_store_inferior_registers;
-+
-+  /* Register the target.  */
-+  linux_nat_add_target (t);
-+}
-Index: gdb-7.9/gdb/sh-tdep.c
-===================================================================
---- gdb-7.9.orig/gdb/sh-tdep.c
-+++ gdb-7.9/gdb/sh-tdep.c
+diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
+index 82cf2f4..b443e46 100644
+--- a/gdb/sh-tdep.c
++++ b/gdb/sh-tdep.c
 @@ -21,6 +21,9 @@
     sac@cygnus.com.  */
  
@@ -971,7 +620,7 @@ Index: gdb-7.9/gdb/sh-tdep.c
  #include "doublest.h"
  #include "osabi.h"
  #include "reggroups.h"
-@@ -67,23 +71,6 @@ static const char *const sh_cc_enum[] =
+@@ -67,23 +71,6 @@ static const char *const sh_cc_enum[] = {
  
  static const char *sh_active_calling_convention = sh_cc_gcc;
  
@@ -1004,7 +653,7 @@ Index: gdb-7.9/gdb/sh-tdep.c
      return 1;
    /* Otherwise it's not treated as float.  */
    return 0;
-@@ -1093,7 +1080,7 @@ sh_push_dummy_call_fpu (struct gdbarch *
+@@ -1093,7 +1080,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
       in four registers available.  Loop thru args from first to last.  */
    for (argnum = 0; argnum < nargs; argnum++)
      {
@@ -1013,7 +662,7 @@ Index: gdb-7.9/gdb/sh-tdep.c
        len = TYPE_LENGTH (type);
        val = sh_justify_value_in_reg (gdbarch, args[argnum], len);
  
-@@ -1821,7 +1808,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch
+@@ -1821,7 +1808,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
      reg->how = DWARF2_FRAME_REG_UNDEFINED;
  }
  
@@ -1031,7 +680,7 @@ Index: gdb-7.9/gdb/sh-tdep.c
  sh_frame_cache (struct frame_info *this_frame, void **this_cache)
  {
    struct gdbarch *gdbarch = get_frame_arch (this_frame);
-@@ -1915,9 +1902,9 @@ sh_frame_cache (struct frame_info *this_
+@@ -1915,9 +1902,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
    return cache;
  }
  
@@ -1044,7 +693,7 @@ Index: gdb-7.9/gdb/sh-tdep.c
  {
    struct gdbarch *gdbarch = get_frame_arch (this_frame);
    struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache);
-@@ -1931,7 +1918,7 @@ sh_frame_prev_register (struct frame_inf
+@@ -1931,7 +1918,7 @@ sh_frame_prev_register (struct frame_info *this_frame,
       the current frame.  Frob regnum so that we pull the value from
       the correct place.  */
    if (regnum == gdbarch_pc_regnum (gdbarch))
@@ -1053,7 +702,7 @@ Index: gdb-7.9/gdb/sh-tdep.c
  
    if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1)
      return frame_unwind_got_memory (this_frame, regnum,
-@@ -2237,8 +2224,8 @@ sh_return_in_first_hidden_param_p (struc
+@@ -2237,8 +2224,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
  static struct gdbarch *
  sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
  {
@@ -1063,7 +712,7 @@ Index: gdb-7.9/gdb/sh-tdep.c
  
    /* SH5 is handled entirely in sh64-tdep.c.  */
    if (info.bfd_arch_info->mach == bfd_mach_sh5)
-@@ -2254,6 +2241,18 @@ sh_gdbarch_init (struct gdbarch_info inf
+@@ -2254,6 +2241,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
    tdep = XCNEW (struct gdbarch_tdep);
    gdbarch = gdbarch_alloc (&info, tdep);
  
@@ -1082,7 +731,7 @@ Index: gdb-7.9/gdb/sh-tdep.c
    set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
    set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
    set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
-@@ -2404,10 +2403,11 @@ sh_gdbarch_init (struct gdbarch_info inf
+@@ -2404,10 +2403,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
        break;
      }
  
@@ -1095,108 +744,93 @@ Index: gdb-7.9/gdb/sh-tdep.c
    frame_unwind_append_unwinder (gdbarch, &sh_stub_unwind);
    frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind);
  
-Index: gdb-7.9/gdb/testsuite/gdb.asm/sh-linux.inc
-===================================================================
---- /dev/null
-+++ gdb-7.9/gdb/testsuite/gdb.asm/sh-linux.inc
-@@ -0,0 +1,78 @@
-+# You'll find a bunch of nop opcodes in the below macros.  They are
-+# there to keep the code correctly aligned.  Be careful to maintain
-+# them when changing the code.
-+
-+	comment "subroutine declare"
-+	.purgem gdbasm_declare
-+	.macro gdbasm_declare name
-+	.align	1
-+	.global	\name
-+\name:
-+	.endm
-+
-+	comment "subroutine prologue"
-+	.macro gdbasm_enter
-+	mov.l   r14,@-r15
-+	sts.l   pr,@-r15
-+	mov     r15,r14
-+	nop
-+	.endm
-+
-+	comment "subroutine epilogue"
-+	.macro gdbasm_leave
-+	mov     r14,r15
-+	lds.l   @r15+,pr
-+	mov.l   @r15+,r14
-+	rts
-+	nop
-+	nop
-+	.endm
-+
-+	comment "subroutine end"
-+	.purgem gdbasm_end
-+	.macro gdbasm_end name
-+	.size   \name, .-_foo1
-+	.align	1
-+	.endm
-+
-+	comment "subroutine call"
-+	.macro gdbasm_call subr
-+	mov.l   .Lconst\@,r1
-+	bra	.Lafterconst\@
-+	nop
-+	.align	2
-+.Lconst\@:
-+	.long	\subr
-+.Lafterconst\@:
-+	jsr	@r1
-+	nop
-+	.endm
-+
-+	.macro gdbasm_several_nops
-+	nop
-+	nop
-+	nop
-+	nop
-+	.endm
-+
-+	comment "exit (0)"
-+	.macro gdbasm_exit0
-+	sleep
-+	nop
-+	.endm
-+
-+	comment "crt0 startup"
-+	.macro gdbasm_startup
-+	mov	#0,r14
-+	.endm
-+
-+	comment "Declare a data variable"
-+	.purgem gdbasm_datavar
-+	.macro gdbasm_datavar name value
-+	.data
-+	.align 2
-+	.type	\name, @object
-+	.size	\name, 4
-+\name:
-+	.long	\value
-+	.endm
-Index: gdb-7.9/gdb/testsuite/gdb.asm/sh.inc
-===================================================================
---- gdb-7.9.orig/gdb/testsuite/gdb.asm/sh.inc
-+++ gdb-7.9/gdb/testsuite/gdb.asm/sh.inc
-@@ -40,9 +40,8 @@
- 	mov.l   .Lconst\@,r1
- 	bra	.Lafterconst\@
- 	nop
--	nop
--.Lconst\@:
- 	.align	2
-+.Lconst\@:
- 	.long	\subr
- 	.align	1
- .Lafterconst\@:
-Index: gdb-7.9/gdb/testsuite/gdb.asm/asm-source.exp
-===================================================================
---- gdb-7.9.orig/gdb/testsuite/gdb.asm/asm-source.exp
-+++ gdb-7.9/gdb/testsuite/gdb.asm/asm-source.exp
+diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h
+index fc671a5..699f59f 100644
+--- a/gdb/sh-tdep.h
++++ b/gdb/sh-tdep.h
+@@ -21,6 +21,12 @@
+ 
+ /* Contributed by Steve Chamberlain sac@cygnus.com.  */
+ 
++struct frame_info;
++struct gdbarch;
++struct reggroup;
++struct regset;
++struct regcache;
++
+ /* Registers for all SH variants.  Used also by sh3-rom.c.  */
+ enum
+   {
+@@ -29,6 +35,7 @@ enum
+     ARG0_REGNUM = 4,
+     ARGLAST_REGNUM = 7,
+     FP_REGNUM = 14,
++    SP_REGNUM = 15,
+     PC_REGNUM = 16,
+     PR_REGNUM = 17,
+     GBR_REGNUM = 18,
+@@ -81,6 +88,24 @@ enum
+     FV0_REGNUM = 76,
+     FV_LAST_REGNUM = 79
+   };
++#define SH_NUM_REGS 67
++
++struct sh_frame_cache
++{
++  /* Base address.  */
++  CORE_ADDR base;
++  LONGEST sp_offset;
++  CORE_ADDR pc;
++
++  /* Flag showing that a frame has been created in the prologue code. */
++  int uses_fp;
++
++  /* Saved registers.  */
++  CORE_ADDR saved_regs[SH_NUM_REGS];
++  CORE_ADDR saved_sp;
++};
++
++extern struct sh_frame_cache *sh_frame_cache (struct frame_info *next_frame, void **this_cache);
+ 
+ /* This structure describes a register in a core-file.  */
+ struct sh_corefile_regmap
+@@ -89,8 +114,32 @@ struct sh_corefile_regmap
+   unsigned int offset;
+ };
+ 
++/* sh architecture specific information.  */
+ struct gdbarch_tdep
+ {
++  /* General-purpose registers.  */
++  struct regset *gregset;
++  int *gregset_reg_offset;
++  int gregset_num_regs;
++  size_t sizeof_gregset;
++
++  /* Floating-point registers.  */
++  struct regset *fpregset;
++  size_t sizeof_fpregset;
++
++  /* Offset of saved PC in jmp_buf.  */
++  int jb_pc_offset;
++
++  /* Detect sigtramp.  */
++  int (*sigtramp_p) (struct frame_info *);
++
++  /* Get address of sigcontext for sigtramp.  */
++  CORE_ADDR (*sigcontext_addr) (struct frame_info *);
++
++  /* Offset of registers in `struct sigcontext'.  */
++  int *sc_reg_offset;
++  int sc_num_regs;
++
+   /* Non-NULL when debugging from a core file.  Provides the offset
+      where each general-purpose register is stored inside the associated
+      core file section.  */
+diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
+index 8854af0..ef44682 100644
+--- a/gdb/testsuite/gdb.asm/asm-source.exp
++++ b/gdb/testsuite/gdb.asm/asm-source.exp
 @@ -113,6 +113,11 @@ switch -glob -- [istarget] {
              append link-flags " -m elf32ppc"
          }
@@ -1209,170 +843,79 @@ Index: gdb-7.9/gdb/testsuite/gdb.asm/asm-source.exp
      "sh*-*-*" {
          set asm-arch sh
  	set debug-flags "-gdwarf-2"
-Index: gdb-7.9/gdb/testsuite/gdb.base/sigall.c
-===================================================================
---- gdb-7.9.orig/gdb/testsuite/gdb.base/sigall.c
-+++ gdb-7.9/gdb/testsuite/gdb.base/sigall.c
+diff --git a/gdb/testsuite/gdb.asm/sh.inc b/gdb/testsuite/gdb.asm/sh.inc
+index a4a5fc5..89efed7 100644
+--- a/gdb/testsuite/gdb.asm/sh.inc
++++ b/gdb/testsuite/gdb.asm/sh.inc
+@@ -40,9 +40,8 @@
+ 	mov.l   .Lconst\@,r1
+ 	bra	.Lafterconst\@
+ 	nop
+-	nop
+-.Lconst\@:
+ 	.align	2
++.Lconst\@:
+ 	.long	\subr
+ 	.align	1
+ .Lafterconst\@:
+diff --git a/gdb/testsuite/gdb.base/annota1.c b/gdb/testsuite/gdb.base/annota1.c
+index 424e1b8..0de2e7b 100644
+--- a/gdb/testsuite/gdb.base/annota1.c
++++ b/gdb/testsuite/gdb.base/annota1.c
 @@ -1,6 +1,9 @@
+ #include <stdio.h>
  #include <signal.h>
- #include <unistd.h>
  
 +#ifdef __sh__
 +#define signal(a,b)    /* Signals not supported on this target - make them go away */
 +#endif
  
- /* Signal handlers, we set breakpoints in them to make sure that the
-    signals really get delivered.  */
-Index: gdb-7.9/gdb/testsuite/gdb.base/signals.c
-===================================================================
---- gdb-7.9.orig/gdb/testsuite/gdb.base/signals.c
-+++ gdb-7.9/gdb/testsuite/gdb.base/signals.c
-@@ -3,6 +3,10 @@
+ void
+ handle_USR1 (int sig)
+diff --git a/gdb/testsuite/gdb.base/annota3.c b/gdb/testsuite/gdb.base/annota3.c
+index 424e1b8..952aaf2 100644
+--- a/gdb/testsuite/gdb.base/annota3.c
++++ b/gdb/testsuite/gdb.base/annota3.c
+@@ -1,6 +1,10 @@
+ #include <stdio.h>
  #include <signal.h>
- #include <unistd.h>
  
 +#ifdef __sh__
 +#define signal(a,b)    /* Signals not supported on this target - make them go away */
-+#define alarm(a)       /* Ditto for alarm() */
 +#endif
++
  
- static int count = 0;
- 
-Index: gdb-7.9/gdb/testsuite/gdb.base/annota1.c
-===================================================================
---- gdb-7.9.orig/gdb/testsuite/gdb.base/annota1.c
-+++ gdb-7.9/gdb/testsuite/gdb.base/annota1.c
+ void
+ handle_USR1 (int sig)
+diff --git a/gdb/testsuite/gdb.base/sigall.c b/gdb/testsuite/gdb.base/sigall.c
+index 81f3b08..1574b2d 100644
+--- a/gdb/testsuite/gdb.base/sigall.c
++++ b/gdb/testsuite/gdb.base/sigall.c
 @@ -1,6 +1,9 @@
- #include <stdio.h>
  #include <signal.h>
+ #include <unistd.h>
  
 +#ifdef __sh__
 +#define signal(a,b)    /* Signals not supported on this target - make them go away */
 +#endif
  
- void
- handle_USR1 (int sig)
-Index: gdb-7.9/gdb/testsuite/gdb.base/annota3.c
-===================================================================
---- gdb-7.9.orig/gdb/testsuite/gdb.base/annota3.c
-+++ gdb-7.9/gdb/testsuite/gdb.base/annota3.c
-@@ -1,6 +1,10 @@
- #include <stdio.h>
+ /* Signal handlers, we set breakpoints in them to make sure that the
+    signals really get delivered.  */
+diff --git a/gdb/testsuite/gdb.base/signals.c b/gdb/testsuite/gdb.base/signals.c
+index 7566068..1205a9b 100644
+--- a/gdb/testsuite/gdb.base/signals.c
++++ b/gdb/testsuite/gdb.base/signals.c
+@@ -3,6 +3,10 @@
  #include <signal.h>
+ #include <unistd.h>
  
 +#ifdef __sh__
 +#define signal(a,b)    /* Signals not supported on this target - make them go away */
++#define alarm(a)       /* Ditto for alarm() */
 +#endif
-+
  
- void
- handle_USR1 (int sig)
-Index: gdb-7.9/gdb/config/sh/xm-linux.h
-===================================================================
---- /dev/null
-+++ gdb-7.9/gdb/config/sh/xm-linux.h
-@@ -0,0 +1,32 @@
-+/* Native support for GNU/Linux, for GDB, the GNU debugger.
-+   Copyright (C) 2000 Free Software Foundation, Inc.
-+
-+This file is part of GDB.
-+
-+This program is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 2 of the License, or
-+(at your option) any later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; if not, write to the Free Software
-+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-+
-+#ifndef XM_LINUX_H
-+#define XM_LINUX_H
-+
-+#define HOST_BYTE_ORDER LITTLE_ENDIAN
-+
-+#define HAVE_TERMIOS
-+
-+#define NEED_POSIX_SETPGID
-+
-+/* Need R_OK etc, but USG isn't defined.  */
-+#include <unistd.h>
-+
-+#endif	/* #ifndef XM_LINUX_H */
-Index: gdb-7.9/gdb/config/sh/nm-linux.h
-===================================================================
---- /dev/null
-+++ gdb-7.9/gdb/config/sh/nm-linux.h
-@@ -0,0 +1,54 @@
-+/* Native-dependent definitions for SuperH running Linux, for GDB.
-+   Copyright 2004 Free Software Foundation, Inc.
-+
-+   This file is part of GDB.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 2 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   You should have received a copy of the GNU General Public License
-+   along with this program; if not, write to the Free Software
-+   Foundation, Inc., 59 Temple Place - Suite 330,
-+   Boston, MA 02111-1307, USA.  */
-+
-+#ifndef NM_LINUX_H
-+#define NM_LINUX_H
-+
-+/* Get generic Linux native definitions.  */
-+#include "config/nm-linux.h"
-+/* Support for the user area.  */
-+
-+/* Return the size of the user struct.  */
-+extern int kernel_u_size (void);
-+#define KERNEL_U_SIZE kernel_u_size()
-+
-+/* This is the amount to substract from u.u_ar0 to get the offset in
-+   the core file of the register values.  */
-+#define KERNEL_U_ADDR 0
-+
-+#define U_REGS_OFFSET 0
-+
-+extern CORE_ADDR register_u_addr (CORE_ADDR blockend, int regnum);
-+#define REGISTER_U_ADDR(addr, blockend, regnum) \
-+  (addr) = register_u_addr (blockend, regnum)
-+
-+/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'.  */
-+#define FETCH_INFERIOR_REGISTERS
-+
-+/* Nevertheless, define CANNOT_{FETCH,STORE}_REGISTER, because we
-+   might fall back on the code `infptrace.c' (well a copy of that code
-+   in `sh-linux-nat.c' for now) and we can access only the
-+   general-purpose registers in that way.  */
-+extern int cannot_fetch_register (int regno);
-+extern int cannot_store_register (int regno);
-+#define CANNOT_FETCH_REGISTER(regno) cannot_fetch_register (regno)
-+#define CANNOT_STORE_REGISTER(regno) cannot_store_register (regno)
-+
-+#endif /* NM_LINUX_H */
-Index: gdb-7.9/gdb/config/sh/linux.mh
-===================================================================
---- /dev/null
-+++ gdb-7.9/gdb/config/sh/linux.mh
-@@ -0,0 +1,8 @@
-+# Host: Renesas Super-H running GNU/Linux
-+NAT_FILE= config/sh/nm-linux.h
-+NATDEPFILES= inf-ptrace.o fork-child.o corelow.o sh-linux-nat.o \
-+	proc-service.o linux-thread-db.o gcore.o \
-+	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o
-+
-+NAT_CDEPS = $(srcdir)/proc-service.list
-+LOADLIBES= -ldl $(RDYNAMIC)
+ static int count = 0;
+ 
+-- 
+2.1.4
+
diff --git a/meta/recipes-devtools/gdb/gdb/0004-Change-comment-in-gdb-compile.patch b/meta/recipes-devtools/gdb/gdb/0004-Change-comment-in-gdb-compile.patch
new file mode 100644
index 0000000..4df552c
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/0004-Change-comment-in-gdb-compile.patch
@@ -0,0 +1,48 @@
+Upstream-Status: Backport
+
+From 09de64b93c2402e068daf0bce1c4a1dda833b646 Mon Sep 17 00:00:00 2001
+From: Jan Kratochvil <jan.kratochvil@redhat.com>
+Date: Thu, 26 Feb 2015 11:52:28 +0100
+Subject: [PATCH] Change // comment in gdb/compile/
+
+gdb/ChangeLog
+2015-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	PR build/18033
+	* compile/compile-c-support.c (c_compute_program): Change // comment.
+	* compile/compile-object-load.c (setup_sections): Change // comment.
+---
+ gdb/ChangeLog                     | 6 ++++++
+ gdb/compile/compile-c-support.c   | 2 +-
+ gdb/compile/compile-object-load.c | 2 +-
+ 3 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c
+index 8f1f45d..1711cda 100644
+--- a/gdb/compile/compile-c-support.c
++++ b/gdb/compile/compile-c-support.c
+@@ -351,7 +351,7 @@ c_compute_program (struct compile_instance *inst,
+ 			" __gdb_intptr;\n",
+ 			buf);
+ 
+-      // Iterate all log2 sizes in bytes supported by c_get_mode_for_size.
++      /* Iterate all log2 sizes in bytes supported by c_get_mode_for_size.  */
+       for (i = 0; i < 4; ++i)
+ 	{
+ 	  const char *mode = c_get_mode_for_size (1 << i);
+diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
+index 5903f18..e187970 100644
+--- a/gdb/compile/compile-object-load.c
++++ b/gdb/compile/compile-object-load.c
+@@ -67,7 +67,7 @@ setup_sections (bfd *abfd, asection *sect, void *data_voidp)
+       if ((bfd_get_section_flags (abfd, sect) & SEC_ALLOC) == 0)
+ 	return;
+ 
+-      // Make the memory always readable.
++      /* Make the memory always readable.  */
+       prot = GDB_MMAP_PROT_READ;
+       if ((bfd_get_section_flags (abfd, sect) & SEC_READONLY) == 0)
+ 	prot |= GDB_MMAP_PROT_WRITE;
+-- 
+2.1.4
+
diff --git a/meta/recipes-devtools/gdb/gdb/sim-install-6.6.patch b/meta/recipes-devtools/gdb/gdb/sim-install-6.6.patch
deleted file mode 100644
index f67c25d..0000000
--- a/meta/recipes-devtools/gdb/gdb/sim-install-6.6.patch
+++ /dev/null
@@ -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@
- 
-
diff --git a/meta/recipes-devtools/gdb/gdb/sim-install.patch b/meta/recipes-devtools/gdb/gdb/sim-install.patch
deleted file mode 100644
index a663ba7..0000000
--- a/meta/recipes-devtools/gdb/gdb/sim-install.patch
+++ /dev/null
@@ -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)"
diff --git a/meta/recipes-devtools/gdb/gdb/uclibc.patch b/meta/recipes-devtools/gdb/gdb/uclibc.patch
deleted file mode 100644
index f5fd518..0000000
--- a/meta/recipes-devtools/gdb/gdb/uclibc.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-Upstream-Status: Pending
-
---- binutils-2.15.91.0.1/bfd/config.bfd~binutils-2.15.90.0.3-uclibc-100-conf
-+++ binutils-2.15.91.0.1/bfd/config.bfd
-@@ -128,7 +128,7 @@
-     targ_defvec=ecoffalpha_little_vec
-     targ_selvecs=bfd_elf64_alpha_vec
-     ;;
--  alpha*-*-linux-gnu* | alpha*-*-elf*)
-+  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
-     targ_defvec=bfd_elf64_alpha_vec
-     targ_selvecs=ecoffalpha_little_vec
-     ;;
-@@ -138,7 +138,7 @@
-   alpha*-*-*)
-     targ_defvec=ecoffalpha_little_vec
-     ;;
--  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
-+  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-linux-uclibc* | ia64*-*-kfreebsd*-gnu)
-     targ_defvec=bfd_elf64_ia64_little_vec
-     targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
-     ;;
-@@ -215,7 +215,7 @@
-     targ_defvec=bfd_elf32_littlearm_vec
-     targ_selvecs=bfd_elf32_bigarm_vec
-     ;;
--  armeb-*-elf | arm*b-*-linux-gnu*)
-+  armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
-     targ_defvec=bfd_elf32_bigarm_vec
-     targ_selvecs=bfd_elf32_littlearm_vec
-     ;;
-@@ -223,8 +223,8 @@
-     targ_defvec=bfd_elf32_littlearm_vec
-     targ_selvecs=bfd_elf32_bigarm_vec
-     ;;
--  arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
--  arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
-+  arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \
-+  arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
-     targ_defvec=bfd_elf32_littlearm_vec
-     targ_selvecs=bfd_elf32_bigarm_vec
-     ;;
-@@ -367,7 +367,7 @@
-     ;;
- 
- #ifdef BFD64
--  hppa*64*-*-linux-gnu*)
-+  hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
-     targ_defvec=bfd_elf64_hppa_linux_vec
-     targ_selvecs=bfd_elf64_hppa_vec
-     ;;
-@@ -378,7 +378,7 @@
-     ;;
- #endif
- 
--  hppa*-*-linux-gnu* | hppa*-*-netbsd*)
-+  hppa*-*-linux-gnu* | hppa*-*-netbsd* | hppa*-*-linux-uclibc*)
-     targ_defvec=bfd_elf32_hppa_linux_vec
-     targ_selvecs=bfd_elf32_hppa_vec
-     ;;
-@@ -501,7 +501,7 @@
-     targ_selvecs=bfd_elf32_i386_vec
-     targ_underscore=yes
-     ;;
--  i[3-7]86-*-linux-gnu*)
-+  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
-     targ_defvec=bfd_elf32_i386_vec
-     targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
-     targ64_selvecs=bfd_elf64_x86_64_vec
-@@ -515,7 +515,7 @@
-     targ_defvec=bfd_elf64_x86_64_vec
-     targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
-     ;;
--  x86_64-*-linux-gnu*)
-+  x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
-     targ_defvec=bfd_elf64_x86_64_vec
-     targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
-     ;;
-@@ -690,7 +690,7 @@
-     targ_selvecs=bfd_elf32_m68k_vec
-     targ_underscore=yes
-     ;;
--  m68*-*-linux-gnu*)
-+  m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
-     targ_defvec=bfd_elf32_m68k_vec
-     targ_selvecs=m68klinux_vec
-     ;;
-@@ -966,7 +966,8 @@
-     ;;
- #endif
-   powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
--  powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
-+  powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
-+  powerpc-*-rtems* | \
-   powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
-     targ_defvec=bfd_elf32_powerpc_vec
-     targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
-@@ -1003,8 +1004,8 @@
-     targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
-     ;;
-   powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
--  powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
--  powerpcle-*-rtems*)
-+  powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\
-+  powerpcle-*-vxworks* | powerpcle-*-rtems*)
-     targ_defvec=bfd_elf32_powerpcle_vec
-     targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
-     targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
-@@ -1165,7 +1166,7 @@
-     targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
-     targ_underscore=yes
-     ;;
--  sparc-*-linux-gnu*)
-+  sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
-     targ_defvec=bfd_elf32_sparc_vec
-     targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
-     ;;
-@@ -1212,7 +1213,7 @@
-     targ_defvec=sunos_big_vec
-     targ_underscore=yes
-     ;;
--  sparc64-*-linux-gnu*)
-+  sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
-     targ_defvec=bfd_elf64_sparc_vec
-     targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
-     ;;
---- binutils-2.15.91.0.1/bfd/configure~binutils-2.15.90.0.3-uclibc-100-conf
-+++ binutils-2.15.91.0.1/bfd/configure
-@@ -1687,6 +1687,11 @@
-   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
-   ;;
- 
-+linux-uclibc*)
-+  lt_cv_deplibs_check_method=pass_all
-+  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
-+  ;;
-+
- netbsd*)
-   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
-@@ -5266,7 +5271,7 @@
-   alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
- 	COREFILE=''
- 	;;
--  alpha*-*-linux-gnu*)
-+  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
- 	COREFILE=trad-core.lo
- 	TRAD_HEADER='"hosts/alphalinux.h"'
- 	;;
-@@ -5326,7 +5331,7 @@
- 	COREFILE=trad-core.lo
- 	TRAD_HEADER='"hosts/i386mach3.h"'
- 	;;
--  i[3-7]86-*-linux-gnu*)
-+  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
- 	COREFILE=trad-core.lo
- 	TRAD_HEADER='"hosts/i386linux.h"'
- 	;;
-@@ -5364,7 +5369,7 @@
- 	COREFILE=trad-core.lo
- 	TRAD_HEADER='"hosts/hp300bsd.h"'
- 	;;
--  m68*-*-linux-gnu*)
-+  m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
- 	COREFILE=trad-core.lo
- 	TRAD_HEADER='"hosts/m68klinux.h"'
- 	;;
---- binutils-2.15.91.0.1/bfd/configure.in~binutils-2.15.90.0.3-uclibc-100-conf
-+++ binutils-2.15.91.0.1/bfd/configure.in
-@@ -164,7 +164,7 @@
-   alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
- 	COREFILE=''
- 	;;
--  alpha*-*-linux-gnu*)
-+  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
- 	COREFILE=trad-core.lo
- 	TRAD_HEADER='"hosts/alphalinux.h"'
- 	;;
-@@ -245,7 +245,7 @@
- 	TRAD_HEADER='"hosts/i386mach3.h"'
- 	;;
- changequote(,)dnl
--  i[3-7]86-*-linux-gnu*)
-+  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
- changequote([,])dnl
- 	COREFILE=trad-core.lo
- 	TRAD_HEADER='"hosts/i386linux.h"'
-@@ -286,7 +286,7 @@
- 	COREFILE=trad-core.lo
- 	TRAD_HEADER='"hosts/hp300bsd.h"'
- 	;;
--  m68*-*-linux-gnu*)
-+  m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
- 	COREFILE=trad-core.lo
- 	TRAD_HEADER='"hosts/m68klinux.h"'
- 	;;
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead
  2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
                   ` (15 preceding siblings ...)
  2015-04-11  1:20 ` [PATCH 16/17] gdb: Refresh patches against git Khem Raj
@ 2015-04-11  1:20 ` Khem Raj
  2015-04-11  9:02   ` Martin Jansa
  16 siblings, 1 reply; 29+ messages in thread
From: Khem Raj @ 2015-04-11  1:20 UTC (permalink / raw)
  To: openembedded-core; +Cc: 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
Signed-off-by: Khem Raj <khem_raj@cable.comcast.com>
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
index 66065bc..e6ff5f9 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
@@ -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



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead
  2015-04-11  1:20 ` [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead Khem Raj
@ 2015-04-11  9:02   ` Martin Jansa
  2015-04-11 15:01     ` Khem Raj
  0 siblings, 1 reply; 29+ messages in thread
From: Martin Jansa @ 2015-04-11  9:02 UTC (permalink / raw)
  To: Khem Raj; +Cc: Khem Raj, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2111 bytes --]

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

On Sat, Apr 11, 2015 at 3:20 AM, Khem Raj <raj.khem@gmail.com> wrote:

> 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
> Signed-off-by: Khem Raj <khem_raj@cable.comcast.com>
> ---
>  meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
> b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
> index 66065bc..e6ff5f9 100644
> --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
> +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
> @@ -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
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 3161 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead
  2015-04-11  9:02   ` Martin Jansa
@ 2015-04-11 15:01     ` Khem Raj
  2015-04-11 15:28       ` Martin Jansa
  0 siblings, 1 reply; 29+ messages in thread
From: Khem Raj @ 2015-04-11 15:01 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Khem Raj, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2523 bytes --]

On Saturday, April 11, 2015, Martin Jansa <martin.jansa@gmail.com> wrote:

> There is configure option for this, see my pending e2fsprogs patch from
> Friday.
>
> Saw it now. Looks good  does it cover e2label as well

>
> On Sat, Apr 11, 2015 at 3:20 AM, Khem Raj <raj.khem@gmail.com
> <javascript:_e(%7B%7D,'cvml','raj.khem@gmail.com');>> wrote:
>
>> 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
>> Signed-off-by: Khem Raj <khem_raj@cable.comcast.com
>> <javascript:_e(%7B%7D,'cvml','khem_raj@cable.comcast.com');>>
>> ---
>>  meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
>> b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
>> index 66065bc..e6ff5f9 100644
>> --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
>> +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
>> @@ -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
>> Openembedded-core@lists.openembedded.org
>> <javascript:_e(%7B%7D,'cvml','Openembedded-core@lists.openembedded.org');>
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>
>

[-- Attachment #2: Type: text/html, Size: 3780 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead
  2015-04-11 15:01     ` Khem Raj
@ 2015-04-11 15:28       ` Martin Jansa
  2015-04-11 16:14         ` Khem Raj
  0 siblings, 1 reply; 29+ messages in thread
From: Martin Jansa @ 2015-04-11 15:28 UTC (permalink / raw)
  To: Khem Raj; +Cc: Khem Raj, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2527 bytes --]

> does it cover e2label as well

yes it does

On Sat, Apr 11, 2015 at 5:01 PM, Khem Raj <raj.khem@gmail.com> wrote:

>
>
> On Saturday, April 11, 2015, Martin Jansa <martin.jansa@gmail.com> wrote:
>
>> There is configure option for this, see my pending e2fsprogs patch from
>> Friday.
>>
>> Saw it now. Looks good  does it cover e2label as well
>
>>
>> On Sat, Apr 11, 2015 at 3:20 AM, Khem Raj <raj.khem@gmail.com> wrote:
>>
>>> 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
>>> Signed-off-by: Khem Raj <khem_raj@cable.comcast.com>
>>> ---
>>>  meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 8 ++++++++
>>>  1 file changed, 8 insertions(+)
>>>
>>> diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
>>> b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
>>> index 66065bc..e6ff5f9 100644
>>> --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
>>> +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
>>> @@ -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
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>>
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 4154 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead
  2015-04-11 15:28       ` Martin Jansa
@ 2015-04-11 16:14         ` Khem Raj
  0 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-11 16:14 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Khem Raj, Patches and discussions about the oe-core layer

On Sat, Apr 11, 2015 at 8:28 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
>> does it cover e2label as well
>
> yes it does
>

OK thx

> On Sat, Apr 11, 2015 at 5:01 PM, Khem Raj <raj.khem@gmail.com> wrote:
>>
>>
>>
>> On Saturday, April 11, 2015, Martin Jansa <martin.jansa@gmail.com> wrote:
>>>
>>> There is configure option for this, see my pending e2fsprogs patch from
>>> Friday.
>>>
>> Saw it now. Looks good  does it cover e2label as well
>>>
>>>
>>> On Sat, Apr 11, 2015 at 3:20 AM, Khem Raj <raj.khem@gmail.com> wrote:
>>>>
>>>> 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
>>>> Signed-off-by: Khem Raj <khem_raj@cable.comcast.com>
>>>> ---
>>>>  meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 8 ++++++++
>>>>  1 file changed, 8 insertions(+)
>>>>
>>>> diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
>>>> b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
>>>> index 66065bc..e6ff5f9 100644
>>>> --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
>>>> +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
>>>> @@ -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
>>>> Openembedded-core@lists.openembedded.org
>>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>>
>>>
>>
>
>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 13/17] sudo: Disable hardening for musl
  2015-04-11  1:20 ` [PATCH 13/17] sudo: Disable hardening for musl Khem Raj
@ 2015-04-12  8:30   ` Bernhard Reutner-Fischer
  2015-04-12  9:26     ` Khem Raj
  0 siblings, 1 reply; 29+ messages in thread
From: Bernhard Reutner-Fischer @ 2015-04-12  8:30 UTC (permalink / raw)
  To: Khem Raj, openembedded-core

On April 11, 2015 3:20:44 AM GMT+02:00, Khem Raj <raj.khem@gmail.com> wrote:
>musl does not yet enable ssp

What happened to distro feature ssp, BTW?

Thanks,



^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 13/17] sudo: Disable hardening for musl
  2015-04-12  8:30   ` Bernhard Reutner-Fischer
@ 2015-04-12  9:26     ` Khem Raj
  2015-04-12 10:56       ` Bernhard Reutner-Fischer
  0 siblings, 1 reply; 29+ messages in thread
From: Khem Raj @ 2015-04-12  9:26 UTC (permalink / raw)
  To: Bernhard Reutner-Fischer; +Cc: Patches and discussions about the oe-core layer

On Sun, Apr 12, 2015 at 1:30 AM, Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com> wrote:
> On April 11, 2015 3:20:44 AM GMT+02:00, Khem Raj <raj.khem@gmail.com> wrote:
>>musl does not yet enable ssp
>
> What happened to distro feature ssp, BTW?
>

It was never used outside uclibc recipes.

> Thanks,
>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 13/17] sudo: Disable hardening for musl
  2015-04-12  9:26     ` Khem Raj
@ 2015-04-12 10:56       ` Bernhard Reutner-Fischer
  2015-04-12 15:43         ` Khem Raj
  0 siblings, 1 reply; 29+ messages in thread
From: Bernhard Reutner-Fischer @ 2015-04-12 10:56 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On April 12, 2015 11:26:26 AM GMT+02:00, Khem Raj <raj.khem@gmail.com> wrote:
>On Sun, Apr 12, 2015 at 1:30 AM, Bernhard Reutner-Fischer
><rep.dot.nop@gmail.com> wrote:
>> On April 11, 2015 3:20:44 AM GMT+02:00, Khem Raj <raj.khem@gmail.com>
>wrote:
>>>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.




^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 13/17] sudo: Disable hardening for musl
  2015-04-12 10:56       ` Bernhard Reutner-Fischer
@ 2015-04-12 15:43         ` Khem Raj
  0 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-12 15:43 UTC (permalink / raw)
  To: Bernhard Reutner-Fischer; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 671 bytes --]

On Apr 12, 2015 3:56 AM, "Bernhard Reutner-Fischer" <rep.dot.nop@gmail.com>
wrote:
>
> On April 12, 2015 11:26:26 AM GMT+02:00, Khem Raj <raj.khem@gmail.com>
wrote:
> >On Sun, Apr 12, 2015 at 1:30 AM, Bernhard Reutner-Fischer
> ><rep.dot.nop@gmail.com> wrote:
> >> On April 11, 2015 3:20:44 AM GMT+02:00, Khem Raj <raj.khem@gmail.com>
> >wrote:
> >>>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.

Sure yes
>
>

[-- Attachment #2: Type: text/html, Size: 1098 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 08/17] connman: Fix builds to compile on musl
  2015-04-11  1:20 ` [PATCH 08/17] connman: Fix builds to compile on musl Khem Raj
@ 2015-04-13 13:50   ` Burton, Ross
  2015-04-14  3:45     ` Khem Raj
  0 siblings, 1 reply; 29+ messages in thread
From: Burton, Ross @ 2015-04-13 13:50 UTC (permalink / raw)
  To: Khem Raj; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 1206 bytes --]

On 11 April 2015 at 02:20, Khem Raj <raj.khem@gmail.com> wrote:

> ++#ifdef __GLIBC__
>
+ #include <execinfo.h>
>

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 {
> +       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?


> ++++ b/gweb/gresolv.c
> +@@ -876,8 +876,6 @@ GResolv *g_resolv_new(int index)
> +       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

[-- Attachment #2: Type: text/html, Size: 2490 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 08/17] connman: Fix builds to compile on musl
  2015-04-13 13:50   ` Burton, Ross
@ 2015-04-14  3:45     ` Khem Raj
  0 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2015-04-14  3:45 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]


> On Apr 13, 2015, at 9:50 AM, Burton, Ross <ross.burton@intel.com> wrote:
> 
> On 11 April 2015 at 02:20, Khem Raj <raj.khem@gmail.com <mailto:raj.khem@gmail.com>> 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.

> 
> 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 {
> +       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?

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

>  
> ++++ b/gweb/gresolv.c
> +@@ -876,8 +876,6 @@ GResolv *g_resolv_new(int index)
> +       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 


[-- Attachment #2: Type: text/html, Size: 4302 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 14/17] xserver-xf86-config: Preload graphics driver modules for musl
  2015-04-11  1:20 ` [PATCH 14/17] xserver-xf86-config: Preload graphics driver modules " Khem Raj
@ 2015-04-20 11:20   ` Burton, Ross
  0 siblings, 0 replies; 29+ messages in thread
From: Burton, Ross @ 2015-04-20 11:20 UTC (permalink / raw)
  To: Khem Raj; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

Hi Khem,

On 11 April 2015 at 02:20, Khem Raj <raj.khem@gmail.com> wrote:

> 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.

> +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

[-- Attachment #2: Type: text/html, Size: 2021 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2015-04-20 11:20 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-11  1:20 [PATCH 00/17] musl fixes to run core-image-sato and core-image-weston Khem Raj
2015-04-11  1:20 ` [PATCH 01/17] mtd-utils: update to latest and fix static inlining Khem Raj
2015-04-11  1:20 ` [PATCH 02/17] var/volatile: Mount it if doing ro-rfs Khem Raj
2015-04-11  1:20 ` [PATCH 03/17] libproxy: Include select.h for posix compliance Khem Raj
2015-04-11  1:20 ` [PATCH 04/17] ppp: Add extra include dirs Khem Raj
2015-04-11  1:20 ` [PATCH 05/17] musl: Enable NLS Khem Raj
2015-04-11  1:20 ` [PATCH 06/17] vte: Pass _GNU_SOURCE via CFLAGS Khem Raj
2015-04-11  1:20 ` [PATCH 07/17] libfm-extra: Add own nls.m4 Khem Raj
2015-04-11  1:20 ` [PATCH 08/17] connman: Fix builds to compile on musl Khem Raj
2015-04-13 13:50   ` Burton, Ross
2015-04-14  3:45     ` Khem Raj
2015-04-11  1:20 ` [PATCH 09/17] perl: Fix build for musl Khem Raj
2015-04-11  1:20 ` [PATCH 10/17] iptables: Fix build on musl Khem Raj
2015-04-11  1:20 ` [PATCH 11/17] xserver-xorg: Use __GLIBC__ instread of __linux__ to denote glibc dependent code Khem Raj
2015-04-11  1:20 ` [PATCH 12/17] pulseaudio: Fix build with musl Khem Raj
2015-04-11  1:20 ` [PATCH 13/17] sudo: Disable hardening for musl Khem Raj
2015-04-12  8:30   ` Bernhard Reutner-Fischer
2015-04-12  9:26     ` Khem Raj
2015-04-12 10:56       ` Bernhard Reutner-Fischer
2015-04-12 15:43         ` Khem Raj
2015-04-11  1:20 ` [PATCH 14/17] xserver-xf86-config: Preload graphics driver modules " Khem Raj
2015-04-20 11:20   ` Burton, Ross
2015-04-11  1:20 ` [PATCH 15/17] kbd: Mark glibc headers under __GLIBC__ Khem Raj
2015-04-11  1:20 ` [PATCH 16/17] gdb: Refresh patches against git Khem Raj
2015-04-11  1:20 ` [PATCH 17/17] e2fsprogs: Delete identical binaries and create symlinks instead Khem Raj
2015-04-11  9:02   ` Martin Jansa
2015-04-11 15:01     ` Khem Raj
2015-04-11 15:28       ` Martin Jansa
2015-04-11 16:14         ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.