Re: [OpenWrt-Devel] [PATCH] toolchain/uClibc: Add uClibc snapshot as selectable version

2015-03-17 Thread Jeff Waugh
On Tue, Mar 17, 2015 at 7:51 PM, Felix Fietkau  wrote:

> Did you see any real improvements with the snapshot that you used in
> your patch?
>

The main thing for me was presence of get/set/makecontext support.
Definitely agree about the moving target problem.


> FWIW, I consider uClibc a dead end for OpenWrt. After the CC release is
> done, I want to push for switching to musl by default and fix the
> remaining issues with that.
>

Alrighty, that makes sense. Thanks for your feedback.

I'll probably leave further work on musl vs. gccgo/libc to someone else,
and focus on making sure it's nicely integrated at least with glibc.

Thanks,
Jeff
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] toolchain/uClibc: Add uClibc snapshot as selectable version

2015-03-17 Thread Felix Fietkau
On 2015-03-05 03:19, Jeff Waugh wrote:
> On Thu, Mar 5, 2015 at 7:04 AM, Dirk Neukirchen  > wrote:
> 
> adding uclibc snapshots maybe other (patched) variants
> might improve  well some things (quality ? pressure to release
> new stable version?)
> 
> 
> So we have some options:
> 
> 1) use uclibc-snapshot.tar.bz2 instead of a dated, known working version
> (though we can't check the md5sum)
> 2) use uclibc git at a specific revision
> 3) use uclibc git at head
> 4) anything I don't know about? uclibc-ng?
> 
> I'm leaning towards (2) at this point, and will send through a patch for
> that.
Option 1) may seem easy in the short term, but it gets messed up so
easily. We also have a policy to not have any moving-target packages in
the same way, so I'm even less inclined to accept it for a libc.
Same issue with 3).
Integrating a uclibc fork like -ng is probably also a waste of time.

Did you see any real improvements with the snapshot that you used in
your patch?

FWIW, I consider uClibc a dead end for OpenWrt. After the CC release is
done, I want to push for switching to musl by default and fix the
remaining issues with that.
Unlike uclibc, musl has decent code and an active maintainer and
developer community.
Unlike glibc, musl is quite small - actually comparable in size to uClibc.

In terms of performance, I expect musl to beat both glibc and uClibc.

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] toolchain/uClibc: Add uClibc snapshot as selectable version

2015-03-04 Thread Jeff Waugh
Hi all,

Here's an alternative version of my uClibc snapshot change.

This one just uses uClibc-snapshot.tar.bz2, which is super-easy but has some
drawbacks:

- You won't get a like-for-like build from a fresh OpenWrt checkout (though
  once you've cached the download, you'll have like-for-like builds from it)

- The LIBC_SO_VERSION may change upstream, which will break the build until
  someone fixes it in toolchain/uClibc/common.mk

We can work around both by just fetching a known-good git revision, but I'm
struggling to get it to fetch from git at all thus far (I think it's a problem
with my ifdef checks). Will keep trying.

Anyway, just popping this here for more feedback if warranted.

Thanks,
Jeff


Signed-off-by: Jeff Waugh 
---
 Config.in |4 
 Config.version|4 
 common.mk |   10 +
 config-snapshot/arm   |7 +
 config-snapshot/armeb |7 +
 config-snapshot/avr32 |   12 ++
 config-snapshot/common|  214 ++
 config-snapshot/cris  |8 +
 config-snapshot/debug |6 +
 config-snapshot/i386  |   21 
 config-snapshot/i686  |   21 
 config-snapshot/m68k  |6 +
 config-snapshot/mips  |   17 +++
 config-snapshot/mips64|   17 +++
 config-snapshot/mips64.32 |   18 +++
 config-snapshot/mips64.64 |   18 +++
 config-snapshot/mips64.n32|   18 +++
 config-snapshot/mips64el  |   17 +++
 config-snapshot/mips64el.32   |   18 +++
 config-snapshot/mips64el.64   |   18 +++
 config-snapshot/mips64el.n32  |   18 +++
 config-snapshot/mipsel|   17 +++
 config-snapshot/mipsel.cobalt |   17 +++
 config-snapshot/powerpc   |6 +
 config-snapshot/powerpc.e500  |6 +
 config-snapshot/sparc |8 +
 config-snapshot/sparc.leon|8 +
 config-snapshot/x86_64|6 +
 28 files changed, 547 insertions(+)

diff --git a/toolchain/uClibc/Config.in b/toolchain/uClibc/Config.in
index 08ea00a..43447d1 100644
--- a/toolchain/uClibc/Config.in
+++ b/toolchain/uClibc/Config.in
@@ -11,6 +11,10 @@ choice
select UCLIBC_VERSION_0_9_33
bool "uClibc 0.9.33.2"
 
+   config UCLIBC_USE_VERSION_SNAPSHOT
+   select UCLIBC_VERSION_SNAPSHOT
+   bool "uClibc snapshot"
+
 endchoice
 
 # Debug version.
diff --git a/toolchain/uClibc/Config.version b/toolchain/uClibc/Config.version
index dd302f2..955ef8f 100644
--- a/toolchain/uClibc/Config.version
+++ b/toolchain/uClibc/Config.version
@@ -1,9 +1,13 @@
 config UCLIBC_VERSION
string
depends on USE_UCLIBC
+   default "snapshot"   if UCLIBC_VERSION_SNAPSHOT
default "0.9.33.2"   if UCLIBC_VERSION_0_9_33
default "0.9.33.2"
 
 config UCLIBC_VERSION_0_9_33
default y if !TOOLCHAINOPTS && USE_UCLIBC
bool
+
+config UCLIBC_VERSION_SNAPSHOT
+   bool
diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk
index 435e4c2..b866d9a 100644
--- a/toolchain/uClibc/common.mk
+++ b/toolchain/uClibc/common.mk
@@ -15,6 +15,12 @@ LIBC_SO_VERSION:=$(PKG_VERSION)
 PATCH_DIR:=$(PATH_PREFIX)/patches-$(PKG_VERSION)
 CONFIG_DIR:=$(PATH_PREFIX)/config-$(PKG_VERSION)
 
+PKG_SNAPSHOT:=$(if $(findstring .,$(PKG_VERSION)),,y)
+ifdef $(PKG_SNAPSHOT)
+PKG_SOURCE_URL:=http://www.uclibc.org/downloads/snapshots/
+LIBC_SO_VERSION:=0.9.34-git
+endif
+
 PKG_MD5SUM_0.9.33.2 = a338aaffc56f0f5040e6d9fa8a12eda1
 PKG_MD5SUM=$(PKG_MD5SUM_$(PKG_VERSION))
 
@@ -69,6 +75,10 @@ define Host/Prepare
$(QUILT_CMD) push -a; \
fi
)
+   $(if $(PKG_SNAPSHOT), \
+   rm -d $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION); \
+   mv $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) 
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION)
+   )
ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
 endef
 
diff --git a/toolchain/uClibc/config-snapshot/arm 
b/toolchain/uClibc/config-snapshot/arm
new file mode 100644
index 000..b68617b
--- /dev/null
+++ b/toolchain/uClibc/config-snapshot/arm
@@ -0,0 +1,7 @@
+ARCH_ANY_ENDIAN=y
+ARCH_LITTLE_ENDIAN=y
+ARCH_WANTS_LITTLE_ENDIAN=y
+# COMPILE_IN_THUMB_MODE is not set
+TARGET_ARCH="arm"
+TARGET_arm=y
+# USE_BX is not set
diff --git a/toolchain/uClibc/config-snapshot/armeb 
b/toolchain/uClibc/config-snapshot/armeb
new file mode 100644
index 000..d4932e8
--- /dev/null
+++ b/toolchain/uClibc/config-snapshot/armeb
@@ -0,0 +1,7 @@
+ARCH_ANY_ENDIAN=y
+ARCH_BIG_ENDIAN=y
+ARCH_WANTS_BIG_ENDIAN=y
+# COMPILE_IN_THUMB_MODE is not set
+TARGET_ARCH="arm"
+TARGET_arm=y
+# USE_BX is not set
diff --git a/toolchain/uClibc/config-snapshot/avr32 
b/toolchain/uClibc/config-snapshot/avr32
new file mode 100644
index 000..729fbc9
--- /dev/null
+++ b/toolchain/uClibc/config-snapshot/avr32
@@ -0,0 +1,12 @@
+ARCH_BIG_ENDIAN=y
+CONFIG_AVR32_AP7=y
+FORCE_SHAREABLE_TEXT_SEGMEN

Re: [OpenWrt-Devel] [PATCH] toolchain/uClibc: Add uClibc snapshot as selectable version

2015-03-04 Thread Jeff Waugh
On Thu, Mar 5, 2015 at 1:19 PM, Jeff Waugh  wrote:

> 1) use uclibc-snapshot.tar.bz2 instead of a dated, known working version
> (though we can't check the md5sum)
> 2) use uclibc git at a specific revision
> 3) use uclibc git at head
> 4) anything I don't know about? uclibc-ng?
>
> I'm leaning towards (2) at this point, and will send through a patch for
> that.
>

It's a pity that (1) is just *so* easy. And although it won't produce
like-for-like builds from a fresh checkout of OpenWrt, if you've already
downloaded the snapshot tarballs then your own builds will be
like-for-like. At least in that context.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] toolchain/uClibc: Add uClibc snapshot as selectable version

2015-03-04 Thread Jeff Waugh
On Thu, Mar 5, 2015 at 7:04 AM, Dirk Neukirchen 
wrote:

> adding uclibc snapshots maybe other (patched) variants
> might improve  well some things (quality ? pressure to release new
> stable version?)
>

So we have some options:

1) use uclibc-snapshot.tar.bz2 instead of a dated, known working version
(though we can't check the md5sum)
2) use uclibc git at a specific revision
3) use uclibc git at head
4) anything I don't know about? uclibc-ng?

I'm leaning towards (2) at this point, and will send through a patch for
that.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] toolchain/uClibc: Add uClibc snapshot as selectable version

2015-03-04 Thread Jeff Waugh
On Thu, Mar 5, 2015 at 7:04 AM, Dirk Neukirchen 
wrote:

> Its probably a good thing to get easier access to a uclibc variant than
> using
> - "abandoned" eglibc = bad ("EGLIBC is no longer developed and such goals
>   are now being addressed directly in GLIBC. ")
>

By the way, I've also been working on a patch to re-introduce glibc. I'll
send that through soon. :-)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] toolchain/uClibc: Add uClibc snapshot as selectable version

2015-03-04 Thread Dirk Neukirchen
On 04.03.2015 20:13, Jeff Waugh wrote:
> There hasn't been a uClibc release since May 2012, but some useful things have
> landed in git since then... for example, make/get/setcontext are necessary for
> uClibc + gccgo/libgo (c.f. my last patch set).
> 
> This adds a non-default option for a known-good nightly snapshot. I'm sure you
> will have comments on some of the... hmm... odd things I've done. Let me know!

adding uclibc snapshots maybe other (patched) variants 
might improve  well some things (quality ? pressure to release new stable 
version?)

uclibc version "problems" affect other uclibc users too [0],[1],[2]
and this came up regularly in the past and its a little bit messy
to have potentially slightly different uclibc versions between projects
[3][4] (hoping that these are the correct uclibc patch/variants links for 
buildroot
and yocto project)

Its probably a good thing to get easier access to a uclibc variant than using 
- "abandoned" eglibc = bad ("EGLIBC is no longer developed and such goals 
  are now being addressed directly in GLIBC. ")
- musl ("experimental")

[0] http://lists.uclibc.org/pipermail/uclibc/2014-February/048252.html
[1] http://lists.uclibc.org/pipermail/uclibc/2015-February/048769.html
[2] http://lists.uclibc.org/pipermail/uclibc/2014-July/048399.html

[3] http://git.buildroot.net/buildroot/tree/package/uclibc
[4] 
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/uclibc/uclibc-git
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] toolchain/uClibc: Add uClibc snapshot as selectable version

2015-03-04 Thread Jeff Waugh
Hi all,

One for discussion, I'm sure. :-)

There hasn't been a uClibc release since May 2012, but some useful things have
landed in git since then... for example, make/get/setcontext are necessary for
uClibc + gccgo/libgo (c.f. my last patch set).

This adds a non-default option for a known-good nightly snapshot. I'm sure you
will have comments on some of the... hmm... odd things I've done. Let me know!

I suspect the nightly snapshot tarballs will disappear (it looks like they're
rolled over after a couple of weeks), so it might be best to change this to a
git checkout. But I did it this way to get it ready for feedback.

Thanks,
Jeff


Signed-off-by: Jeff Waugh 
---
 toolchain/uClibc/Config.in |   4 +
 toolchain/uClibc/Config.version|   4 +
 toolchain/uClibc/common.mk |  11 ++
 toolchain/uClibc/config-20150304/arm   |   7 +
 toolchain/uClibc/config-20150304/armeb |   7 +
 toolchain/uClibc/config-20150304/avr32 |  12 ++
 toolchain/uClibc/config-20150304/common| 214 +
 toolchain/uClibc/config-20150304/cris  |   8 +
 toolchain/uClibc/config-20150304/debug |   6 +
 toolchain/uClibc/config-20150304/i386  |  21 +++
 toolchain/uClibc/config-20150304/i686  |  21 +++
 toolchain/uClibc/config-20150304/m68k  |   6 +
 toolchain/uClibc/config-20150304/mips  |  17 ++
 toolchain/uClibc/config-20150304/mips64|  17 ++
 toolchain/uClibc/config-20150304/mips64.32 |  18 +++
 toolchain/uClibc/config-20150304/mips64.64 |  18 +++
 toolchain/uClibc/config-20150304/mips64.n32|  18 +++
 toolchain/uClibc/config-20150304/mips64el  |  17 ++
 toolchain/uClibc/config-20150304/mips64el.32   |  18 +++
 toolchain/uClibc/config-20150304/mips64el.64   |  18 +++
 toolchain/uClibc/config-20150304/mips64el.n32  |  18 +++
 toolchain/uClibc/config-20150304/mipsel|  17 ++
 toolchain/uClibc/config-20150304/mipsel.cobalt |  17 ++
 toolchain/uClibc/config-20150304/powerpc   |   6 +
 toolchain/uClibc/config-20150304/powerpc.e500  |   6 +
 toolchain/uClibc/config-20150304/sparc |   8 +
 toolchain/uClibc/config-20150304/sparc.leon|   8 +
 toolchain/uClibc/config-20150304/x86_64|   6 +
 28 files changed, 548 insertions(+)
 create mode 100644 toolchain/uClibc/config-20150304/arm
 create mode 100644 toolchain/uClibc/config-20150304/armeb
 create mode 100644 toolchain/uClibc/config-20150304/avr32
 create mode 100644 toolchain/uClibc/config-20150304/common
 create mode 100644 toolchain/uClibc/config-20150304/cris
 create mode 100644 toolchain/uClibc/config-20150304/debug
 create mode 100644 toolchain/uClibc/config-20150304/i386
 create mode 100644 toolchain/uClibc/config-20150304/i686
 create mode 100644 toolchain/uClibc/config-20150304/m68k
 create mode 100644 toolchain/uClibc/config-20150304/mips
 create mode 100644 toolchain/uClibc/config-20150304/mips64
 create mode 100644 toolchain/uClibc/config-20150304/mips64.32
 create mode 100644 toolchain/uClibc/config-20150304/mips64.64
 create mode 100644 toolchain/uClibc/config-20150304/mips64.n32
 create mode 100644 toolchain/uClibc/config-20150304/mips64el
 create mode 100644 toolchain/uClibc/config-20150304/mips64el.32
 create mode 100644 toolchain/uClibc/config-20150304/mips64el.64
 create mode 100644 toolchain/uClibc/config-20150304/mips64el.n32
 create mode 100644 toolchain/uClibc/config-20150304/mipsel
 create mode 100644 toolchain/uClibc/config-20150304/mipsel.cobalt
 create mode 100644 toolchain/uClibc/config-20150304/powerpc
 create mode 100644 toolchain/uClibc/config-20150304/powerpc.e500
 create mode 100644 toolchain/uClibc/config-20150304/sparc
 create mode 100644 toolchain/uClibc/config-20150304/sparc.leon
 create mode 100644 toolchain/uClibc/config-20150304/x86_64

diff --git a/toolchain/uClibc/Config.in b/toolchain/uClibc/Config.in
index 08ea00a..3bd14bd 100644
--- a/toolchain/uClibc/Config.in
+++ b/toolchain/uClibc/Config.in
@@ -11,6 +11,10 @@ choice
select UCLIBC_VERSION_0_9_33
bool "uClibc 0.9.33.2"
 
+   config UCLIBC_USE_VERSION_20150304
+   select UCLIBC_VERSION_20150304
+   bool "uClibc snapshot (2015-03-14)"
+
 endchoice
 
 # Debug version.
diff --git a/toolchain/uClibc/Config.version b/toolchain/uClibc/Config.version
index dd302f2..56af6b4 100644
--- a/toolchain/uClibc/Config.version
+++ b/toolchain/uClibc/Config.version
@@ -1,9 +1,13 @@
 config UCLIBC_VERSION
string
depends on USE_UCLIBC
+   default "20150304"   if UCLIBC_VERSION_20150304
default "0.9.33.2"   if UCLIBC_VERSION_0_9_33
default "0.9.33.2"
 
 config UCLIBC_VERSION_0_9_33
default y if !TOOLCHAINOPTS && USE_UCLIBC
bool
+
+config UCLIBC_VERSION_20150304
+   bool
diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk
index 435e4c2..0d9bec3 100644
--- a/toolchain/uClibc/common.m