Re: [OpenWrt-Devel] [PATCH 1/2] toolchain: The glorious return of glibc, ver 2.21

2015-03-15 Thread John Crispin
thanks for spotting this, r44766 should fix it


On 15/03/2015 01:32, Luiz Angelo Daros de Luca wrote:
 Hi Jeff and John,
 
 This patch removed the default line about the C Library
 implementation. Is it
 intentional? I guess this was the part that John modified.
 https://github.com/openwrt-mirror/openwrt/commit/60e0b4c321836f6523c25a1de1a6a79085a1bdc6#diff-8912cc62562db921fbbf1e444d6b4e3dL215
 
 As a probably side effect, buildbot for x86 is using glibc now:
 https://downloads.openwrt.org/snapshots/trunk/x86/generic/OpenWrt-Toolchain-x86-generic_gcc-4.8-linaro_glibc-2.19.Linux-x86_64.tar.bz2
 
 While in my local buildroot, I get uclibc, even defining target before
 defconfig.
 
 $ rm .config
 $ cat .config
 CONFIG_TARGET_x86=y
 CONFIG_TARGET_x86_generic=y
 $ make defconfig
 $ egrep USE_.*LIBC .config
 CONFIG_USE_UCLIBCXX=y
 CONFIG_USE_UCLIBC=y
 
 I though that buildbot config where only set target+defconfig+select
 all packages.
 
 This is the relevant patch part:
 
 diff --git a/toolchain/Config.in b/toolchain/Config.in
 index ecd9d20..0d03a28 100644
 --- a/toolchain/Config.in
 +++ b/toolchain/Config.in
 @@ -211,14 +211,13 @@ comment C Library
  
  choice
 prompt C Library implementation if TOOLCHAINOPTS
 -   default LIBC_USE_EGLIBC if (aarch64 || aarch64_be)
 -   default LIBC_USE_UCLIBC
 +   default LIBC_USE_GLIBC if (aarch64 || aarch64_be)
 help
   Select the C library implementation.
  
 -   config LIBC_USE_EGLIBC
 -   bool Use eglibc
 -   select USE_EGLIBC
 +   config LIBC_USE_GLIBC
 +   bool Use glibc
 +   select USE_GLIBC
 depends on !avr32
  
 config LIBC_USE_UCLIBC
 
 
 Em qui, 12 de mar de 2015 às 20:01, Jeff Waugh j...@bethesignal.org
 mailto:j...@bethesignal.org escreveu:
 
 On Fri, Mar 13, 2015 at 6:25 AM, John Crispin blo...@openwrt.org
 mailto:blo...@openwrt.org wrote:
  Please don't just compile test. Right now /usr/lib is not added as a
  searchable path for so-libs which renders it pretty much unusable.
  That was what the now missing patch 200-add-dl-search-paths.patch
 dealt
  with.
 
  already fixed :) i will push jeffs patch with a few minor fixes in the
  next hour or so
 
 Aha, had been trying to figure that one out. :-)
 
 Thanks,
 Jeff
 _
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.__org
 mailto:openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-__bin/mailman/listinfo/openwrt-__devel
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/2] toolchain: The glorious return of glibc, ver 2.21

2015-03-12 Thread John Crispin
Hi Jeff,

i am merging the whole lot now with a small change

On 11/03/2015 18:17, Jeff Waugh wrote:
   prompt Preferred standard C++ library
 - default USE_LIBSTDCXX if USE_EGLIBC
 + default USE_LIBSTDCXX if USE_GLIBC || USE_EGLIBC

i will make eglibc select USE_GLIBC and then change all USE_EGLIBC
instances to USE_GLIBC which will make it easier to drop eglibc later on.
John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/2] toolchain: The glorious return of glibc, ver 2.21

2015-03-12 Thread John Crispin


On 12/03/2015 20:22, Mirko Vogt wrote:
 On 03/11/2015 06:17 PM, Jeff Waugh wrote:
 It's the eglibc packaging with a bit of spit-polishing. And testing. :-)

 Signed-off-by: Jeff Waugh j...@bethesignal.org
 [..]
 
 On 03/11/2015 06:02 PM, Jeff Waugh wrote:
 With
 those applied, a default (VoCore, mipsel) build completes
 successfully.
 
 Please don't just compile test. Right now /usr/lib is not added as a
 searchable path for so-libs which renders it pretty much unusable.
 That was what the now missing patch 200-add-dl-search-paths.patch dealt
 with.
 
   mirko

already fixed :) i will push jeffs patch with a few minor fixes in the
next hour or so

John

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


Re: [OpenWrt-Devel] [PATCH 1/2] toolchain: The glorious return of glibc, ver 2.21

2015-03-12 Thread Mirko Vogt
On 03/11/2015 06:17 PM, Jeff Waugh wrote:
 It's the eglibc packaging with a bit of spit-polishing. And testing. :-)
 
 Signed-off-by: Jeff Waugh j...@bethesignal.org
 [..]

On 03/11/2015 06:02 PM, Jeff Waugh wrote:
 With
 those applied, a default (VoCore, mipsel) build completes
 successfully.

Please don't just compile test. Right now /usr/lib is not added as a
searchable path for so-libs which renders it pretty much unusable.
That was what the now missing patch 200-add-dl-search-paths.patch dealt
with.

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


Re: [OpenWrt-Devel] [PATCH 1/2] toolchain: The glorious return of glibc, ver 2.21

2015-03-12 Thread Jeff Waugh
On Fri, Mar 13, 2015 at 6:25 AM, John Crispin blo...@openwrt.org wrote:
 Please don't just compile test. Right now /usr/lib is not added as a
 searchable path for so-libs which renders it pretty much unusable.
 That was what the now missing patch 200-add-dl-search-paths.patch dealt
 with.

 already fixed :) i will push jeffs patch with a few minor fixes in the
 next hour or so

Aha, had been trying to figure that one out. :-)

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


[OpenWrt-Devel] [PATCH 1/2] toolchain: The glorious return of glibc, ver 2.21

2015-03-11 Thread Jeff Waugh
It's the eglibc packaging with a bit of spit-polishing. And testing. :-)

Signed-off-by: Jeff Waugh j...@bethesignal.org
---
 config/Config-build.in |  2 +-
 include/package-defaults.mk|  2 +-
 include/version.mk |  1 +
 package/libs/toolchain/Makefile| 18 +
 .../libs/toolchain/glibc-files/etc/nsswitch.conf   | 13 +++
 toolchain/Config.in| 16 +++-
 toolchain/glibc/Config.in  | 12 +++
 toolchain/glibc/Config.version | 21 +
 toolchain/glibc/Makefile   | 31 
 toolchain/glibc/common.mk  | 93 ++
 toolchain/glibc/headers/Makefile   | 27 +++
 toolchain/glibc/include/libintl.h  |  6 ++
 12 files changed, 238 insertions(+), 4 deletions(-)
 create mode 100644 package/libs/toolchain/glibc-files/etc/nsswitch.conf
 create mode 100644 toolchain/glibc/Config.in
 create mode 100644 toolchain/glibc/Config.version
 create mode 100644 toolchain/glibc/Makefile
 create mode 100644 toolchain/glibc/common.mk
 create mode 100644 toolchain/glibc/headers/Makefile
 create mode 100644 toolchain/glibc/include/libintl.h

diff --git a/config/Config-build.in b/config/Config-build.in
index d184d1f..e4afe28 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -187,7 +187,7 @@ menu Global build settings
 
choice
prompt Preferred standard C++ library
-   default USE_LIBSTDCXX if USE_EGLIBC
+   default USE_LIBSTDCXX if USE_GLIBC || USE_EGLIBC
default USE_UCLIBCXX
help
  Select the preferred standard C++ library for all packages 
that support this.
diff --git a/include/package-defaults.mk b/include/package-defaults.mk
index 6a345b6..a34252c 100644
--- a/include/package-defaults.mk
+++ b/include/package-defaults.mk
@@ -5,7 +5,7 @@
 # See /LICENSE for more information.
 #
 
-PKG_DEFAULT_DEPENDS = +libc +USE_EGLIBC:librt +USE_EGLIBC:libpthread
+PKG_DEFAULT_DEPENDS = +libc +USE_EGLIBC:librt +USE_EGLIBC:libpthread 
+USE_GLIBC:librt +USE_GLIBC:libpthread
 
 ifneq ($(PKG_NAME),toolchain)
   PKG_FIXUP_DEPENDS = $(if $(filter kmod-%,$(1)),$(2),$(PKG_DEFAULT_DEPENDS) 
$(filter-out $(PKG_DEFAULT_DEPENDS),$(2)))
diff --git a/include/version.mk b/include/version.mk
index 99af96e..b23fd12 100644
--- a/include/version.mk
+++ b/include/version.mk
@@ -55,6 +55,7 @@ endef
 VERSION_TAINT_SPECS := \
-ALL:no-all \
-IPV6:no-ipv6 \
+   +USE_GLIBC:glibc \
+USE_EGLIBC:eglibc \
+USE_MKLIBS:mklibs \
+BUSYBOX_CUSTOM:busybox \
diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile
index 42b9935..d3a4da6 100644
--- a/package/libs/toolchain/Makefile
+++ b/package/libs/toolchain/Makefile
@@ -420,6 +420,24 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
$(CP) $(TOOLCHAIN_DIR)/lib/libstdc++.so.* $(1)/usr/lib/
   endef
 
+  define Package/glibc/install
+   $(CP) ./glibc-files/* $(1)/
+   rm -f $(1)/etc/localtime
+   $(LN) /tmp/localtime $(1)/etc/localtime
+   $(INSTALL_DIR) $(1)/lib
+   $(CP) \
+   $(TOOLCHAIN_DIR)/lib/ld*.so.* \
+   $(TOOLCHAIN_DIR)/lib/ld-$(LIBC_SO_VERSION).so \
+   $(1)/lib/
+   for file in libanl libc libcidn libcrypt libdl libm libnsl libnss_dns 
libnss_files libresolv libutil; do \
+   for file in $(TOOLCHAIN_DIR)/lib/file.so.* 
$(TOOLCHAIN_DIR)/lib/file-$(LIBC_SO_VERSION).so; do \
+   if [ -e file ]; then \
+   $(CP) file $(1)/lib/; \
+   fi; \
+   done; \
+   done
+  endef
+
   use_libutil=$(if $(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),libutil)
   use_libnsl=$(if $(CONFIG_EGLIBC_OPTION_EGLIBC_NIS),libnsl)
   use_nsswitch=$(if $(CONFIG_EGLIBC_OPTION_EGLIBC_NSSWITCH),libnss_dns 
libnss_files)
diff --git a/package/libs/toolchain/glibc-files/etc/nsswitch.conf 
b/package/libs/toolchain/glibc-files/etc/nsswitch.conf
new file mode 100644
index 000..981c425
--- /dev/null
+++ b/package/libs/toolchain/glibc-files/etc/nsswitch.conf
@@ -0,0 +1,13 @@
+passwd:files
+shadow:files
+group:files
+hosts:dns files
+bootparams:files
+ethers:files
+netmasks:files
+networks:files
+protocols:files
+rpc:files
+services:files
+automount:files
+aliases:files
diff --git a/toolchain/Config.in b/toolchain/Config.in
index ecd9d20..307343f 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -216,6 +216,11 @@ choice
help
  Select the C library implementation.
 
+   config LIBC_USE_GLIBC
+   bool Use glibc
+   select USE_GLIBC
+   depends on !avr32
+
config LIBC_USE_EGLIBC
bool Use eglibc
select USE_EGLIBC
@@ -233,6 +238,7 @@ choice
 
 endchoice