Re: [OpenWrt-Devel] [PATCH] kernel: Support kernel options required by systemd
On Mon, Mar 16, 2015 at 5:09 PM, Jeff Waugh j...@bethesignal.org wrote: On Mon, Mar 16, 2015 at 4:56 PM, Rafał Miłecki zaj...@gmail.com wrote: If you want to put some comments in your patch, place them below the ---. This way they won't be visible after applying patch with git am. Thanks -- will do. 8) Should I resubmit, John? Thanks, Jeff ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] kernel: Support kernel options required by systemd
These kernel options are all likely to be widely useful in this modern age, but are immediately useful for systemd support. c.f. http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-.ebuild?view=markup#l118 Adapted from a patch by Adam Porter. Signed-off-by: Jeff Waugh j...@bethesignal.org --- config/Config-kernel.in | 34 -- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 34e07bd..ae5b3d5 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -115,6 +115,18 @@ config KERNEL_DIRECT_IO bool Compile the kernel with direct IO support default n +config KERNEL_FHANDLE + bool Compile the kernel with support for fhandle syscalls + default n + +config KERNEL_FANOTIFY + bool Compile the kernel with modern file notification support + default n + +config KERNEL_BLK_DEV_BSG + bool Compile the kernel with SCSI generic v4 support for any block device + default n + config KERNEL_MAGIC_SYSRQ bool Compile the kernel with SysRq support default y @@ -164,6 +176,22 @@ config USE_SPARSE bool Enable sparse check during kernel build default n +config KERNEL_DEVTMPFS + bool Compile the kernel with device tmpfs enabled + default n + help + devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates + devices nodes for all registered devices ti simplify boot, but leaves more + complex tasks to userspace (e.g. udev). + +if KERNEL_DEVTMPFS + + config KERNEL_DEVTMPFS_MOUNT + bool Automatically mount devtmpfs after root filesystem is mounted + default n + +endif + # # CGROUP support symbols # @@ -481,9 +509,3 @@ config KERNEL_SECCOMP_FILTER default n help Build kernel with support for seccomp BPF programs. - -config KERNEL_FHANDLE - bool Enable open by fhandle syscalls - default n - help - Build kernel with support for open by fhandle syscalls -- 1.9.1 ___ 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
On Tue, Mar 17, 2015 at 7:51 PM, Felix Fietkau n...@openwrt.org 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
[OpenWrt-Devel] [PATCH] kernel: Support kernel options required by systemd
(John: This patch takes into account r44765, but moves the FHANDLE config stanza to a more understandable position in the file.) These are all likely to be widely useful in this modern age, but my interest is primarily in systemd support. :-) c.f. http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-.ebuild?view=markup#l118 Adapted from a patch by Adam Porter. Signed-off-by: Jeff Waugh j...@bethesignal.org --- config/Config-kernel.in | 34 -- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 34e07bd..ae5b3d5 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -115,6 +115,18 @@ config KERNEL_DIRECT_IO bool Compile the kernel with direct IO support default n +config KERNEL_FHANDLE + bool Compile the kernel with support for fhandle syscalls + default n + +config KERNEL_FANOTIFY + bool Compile the kernel with modern file notification support + default n + +config KERNEL_BLK_DEV_BSG + bool Compile the kernel with SCSI generic v4 support for any block device + default n + config KERNEL_MAGIC_SYSRQ bool Compile the kernel with SysRq support default y @@ -164,6 +176,22 @@ config USE_SPARSE bool Enable sparse check during kernel build default n +config KERNEL_DEVTMPFS + bool Compile the kernel with device tmpfs enabled + default n + help + devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates + devices nodes for all registered devices ti simplify boot, but leaves more + complex tasks to userspace (e.g. udev). + +if KERNEL_DEVTMPFS + + config KERNEL_DEVTMPFS_MOUNT + bool Automatically mount devtmpfs after root filesystem is mounted + default n + +endif + # # CGROUP support symbols # @@ -481,9 +509,3 @@ config KERNEL_SECCOMP_FILTER default n help Build kernel with support for seccomp BPF programs. - -config KERNEL_FHANDLE - bool Enable open by fhandle syscalls - default n - help - Build kernel with support for open by fhandle syscalls -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] kernel: Support kernel options required by systemd
These are all likely to be widely useful in this modern age, but my interest is primarily in systemd support. :-) c.f. http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-.ebuild?view=markup#l118 Adapted from a patch by Adam Porter. Signed-off-by: Jeff Waugh j...@bethesignal.org --- config/Config-kernel.in | 28 1 file changed, 28 insertions(+) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index a0bd13e..ae5b3d5 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -115,6 +115,18 @@ config KERNEL_DIRECT_IO bool Compile the kernel with direct IO support default n +config KERNEL_FHANDLE + bool Compile the kernel with support for fhandle syscalls + default n + +config KERNEL_FANOTIFY + bool Compile the kernel with modern file notification support + default n + +config KERNEL_BLK_DEV_BSG + bool Compile the kernel with SCSI generic v4 support for any block device + default n + config KERNEL_MAGIC_SYSRQ bool Compile the kernel with SysRq support default y @@ -164,6 +176,22 @@ config USE_SPARSE bool Enable sparse check during kernel build default n +config KERNEL_DEVTMPFS + bool Compile the kernel with device tmpfs enabled + default n + help + devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates + devices nodes for all registered devices ti simplify boot, but leaves more + complex tasks to userspace (e.g. udev). + +if KERNEL_DEVTMPFS + + config KERNEL_DEVTMPFS_MOUNT + bool Automatically mount devtmpfs after root filesystem is mounted + default n + +endif + # # CGROUP support symbols # -- 1.9.1 ___ 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
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 2/2] busybox: Minor fix for glibc 2.21 compatibility
busybox: Minor fix for glibc 2.21 compatibility Signed-off-by: Jeff Waugh j...@bethesignal.org --- package/utils/busybox/patches/250-date-k-flag.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/utils/busybox/patches/250-date-k-flag.patch b/package/utils/busybox/patches/250-date-k-flag.patch index d17d61f..f0dab26 100644 --- a/package/utils/busybox/patches/250-date-k-flag.patch +++ b/package/utils/busybox/patches/250-date-k-flag.patch @@ -67,7 +67,7 @@ + settimeofday(NULL, tz); + + memset(tz, 0, sizeof(tz)); -+#ifdef __USE_BSD ++#ifdef __USE_MISC + tz.tz_minuteswest = -(tm_time.tm_gmtoff / 60); +#else + tz.tz_minuteswest = -(tm_time.__tm_gmtoff / 60); -- 1.9.1 ___ 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
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
Re: [OpenWrt-Devel] [RFC] glibc 2.21 for OpenWrt
On Wed, Mar 11, 2015 at 3:56 AM, Jeff Waugh j...@bethesignal.org wrote: Not content with adding support for uClibc snapshots, I've also tackled glibc 2.21, as eglibc is no longer an actively maintained project. Here's the branch I've been working on (which isn't tidied up for merge btw): https://github.com/jdub/openwrt/commits/glibc I've sent patches for procd and fstools to John and Jo-Philipp. With those applied, a default (VoCore, mipsel) build completes successfully. I'll tidy up the branch and send a patch. Thanks, Jeff ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [RFC] glibc 2.21 for OpenWrt
Hi all, Not content with adding support for uClibc snapshots, I've also tackled glibc 2.21, as eglibc is no longer an actively maintained project. Here's the branch I've been working on (which isn't tidied up for merge btw): https://github.com/jdub/openwrt/commits/glibc There is one OpenWrt-wide issue that will need to be addressed for glibc 2.21 compatibility: The widespread use of _BSD_SOURCE, which was deprecated in glibc 2.20. It's a simple fix though: Use _DEFAULT_SOURCE instead. Plus, my initial inspection suggests _BSD_SOURCE mostly occurs in OpenWrt-controlled code, such as procd, etc., which makes life simpler. 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 1/2] gccgo/libgo toolchain support for OpenWrt
On Thu, Mar 5, 2015 at 8:42 PM, Steven Barth cy...@openwrt.org wrote: It's a bit of a shame it doesn't work with the current default uclibc, however have you checked if it works with musl out of the box? That being the other more embedded-friendly solution here. Looks like libgo in gcc 4.8 has some fresh redefinition problems with musl. In this case, ethhdr and sysinfo structs included from both musl and linux headers. I'll try with gcc 4.9, and add some exclusions to kconfig if it makes sense. By the way, I realised the gcc 4.8 patch was a copy of the 4.9 patch in my last submission, so I've fixed that in my repo. Should I submit again to the list, or will it be merged from git anyway?) Thanks, Jeff ___ 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
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 j...@bethesignal.org --- 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
[OpenWrt-Devel] [PATCH 1/2] gccgo/libgo toolchain support for OpenWrt
Hi all, I'm sure there are style weirdnesses with this. Commentary much appreciated! - Jeff - It won't work with uClibc 0.99.33.x because it requires make/get/setcontext - It DOES work with a recent uClibc snapshot (with UCLIBC_HAS_CONTEXT_FUNCS), as well as eglibc - It works with gcc 4.8, and 4.9 with an additional fix submitted separately Only very slightly adapted from Geert-Johan Riemer's work, plus fixes on top. - https://github.com/GeertJohan/openwrt-go/tree/add-gccgo-and-libgo - https://lists.openwrt.org/pipermail/openwrt-devel/2014-January/023214.html Signed-off-by: Jeff Waugh j...@bethesignal.org --- package/libs/toolchain/Makefile| 42 ++ toolchain/gcc/Config.in| 7 toolchain/gcc/common.mk| 2 +- .../400-libgo-do-not-redefine-CPU_COUNT.patch | 15 .../patches/4.8-linaro/401-go1-needs-libm.patch| 11 ++ .../patches/4.9-linaro/401-go1-needs-libm.patch| 11 ++ 6 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 toolchain/gcc/patches/4.8-linaro/400-libgo-do-not-redefine-CPU_COUNT.patch create mode 100644 toolchain/gcc/patches/4.8-linaro/401-go1-needs-libm.patch create mode 100644 toolchain/gcc/patches/4.9-linaro/401-go1-needs-libm.patch diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile index 42b9935..2666d5a 100644 --- a/package/libs/toolchain/Makefile +++ b/package/libs/toolchain/Makefile @@ -254,6 +254,34 @@ define Package/libgfortran/config endmenu endef + +define Package/libgo +$(call Package/gcc/Default) + TITLE:=Go support library + DEPENDS+=@INSTALL_GCCGO +endef + +define Package/libgo/config + menu Configuration + depends on EXTERNAL_TOOLCHAIN PACKAGE_libgo + + config LIBGO_ROOT_DIR + string + prompt libgo shared library base directory + depends on EXTERNAL_TOOLCHAIN PACKAGE_libgo + default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN + default / if NATIVE_TOOLCHAIN + + config LIBGO_FILE_SPEC + string + prompt libgo shared library files (use wildcards) + depends on EXTERNAL_TOOLCHAIN PACKAGE_libgo + default ./usr/lib/libgo.so.* + + endmenu +endef + + define Package/ldd $(call Package/libc/Default) DEPENDS:=@!USE_MUSL @@ -410,6 +438,11 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) $(if $(CONFIG_TARGET_avr32)$(CONFIG_TARGET_coldfire),,$(CP) $(TOOLCHAIN_DIR)/lib/libgfortran.so.* $(1)/usr/lib/) endef + define Package/libgo/install + $(INSTALL_DIR) $(1)/usr/lib + $(if $(CONFIG_GCC_VERSION_4_6)$(CONFIG_TARGET_avr32)$(CONFIG_TARGET_coldfire),,$(CP) $(TOOLCHAIN_DIR)/lib/libgo.so.* $(1)/usr/lib/) + endef + define Package/libssp/install $(INSTALL_DIR) $(1)/lib $(CP) $(TOOLCHAIN_DIR)/lib/libssp.so.* $(1)/lib/ @@ -559,6 +592,14 @@ else done endef + define Package/libgo/install + for file in $(call qstrip,$(CONFIG_LIBGO_FILE_SPEC)); do \ + dir=`dirname file` ; \ + $(INSTALL_DIR) $(1)/dir ; \ + $(CP) $(call qstrip,$(CONFIG_LIBGO_ROOT_DIR))/file $(1)/dir/ ; \ + done + endef + define Package/libssp/install for file in $(call qstrip,$(CONFIG_LIBSSP_FILE_SPEC)); do \ dir=`dirname file` ; \ @@ -642,5 +683,6 @@ $(eval $(call BuildPackage,libpthread)) $(eval $(call BuildPackage,libthread-db)) $(eval $(call BuildPackage,librt)) $(eval $(call BuildPackage,libgfortran)) +$(eval $(call BuildPackage,libgo)) $(eval $(call BuildPackage,ldd)) $(eval $(call BuildPackage,ldconfig)) diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index ecd7c26..ec87d32 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -74,3 +74,10 @@ config INSTALL_GFORTRAN default n help Build/install GNU fortran compiler ? + +config INSTALL_GCCGO + bool + prompt Build/install gccgo compiler? if TOOLCHAINOPTS !(GCC_VERSION_4_4_7 || GCC_VERSION_4_6 || GCC_VERSION_4_6_LINARO) !UCLIBC_VERSION_0_9_33 + default n + help + Build/install GNU gccgo compiler ? diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 925964e..9c01bbd 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -99,7 +99,7 @@ HOST_STAMP_CONFIGURED:=$(GCC_BUILD_DIR)/.configured HOST_STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.gcc_$(GCC_VARIANT)_installed SEP:=, -TARGET_LANGUAGES:=c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran) +TARGET_LANGUAGES:=c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)$(if $(CONFIG_INSTALL_GCCGO),$(SEP)go) export libgcc_cv_fixed_point=no ifdef CONFIG_USE_UCLIBC diff --git a/toolchain/gcc/patches/4.8-linaro/400-libgo
[OpenWrt-Devel] [PATCH 2/2] toolchain/gcc/final: Add --disable-werror
Hi all, This was the least dirty way I could find to stop the build blowing up with a maybe-uninitialized error. The code in question hadn't changed upstream, either... at least until it was removed. Thanks, Jeff I'm not convinced this is the right thing to do, but it's required for libgo to build from gcc 4.9. Thus, separate commit / patch. Signed-off-by: Jeff Waugh j...@bethesignal.org --- toolchain/gcc/final/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolchain/gcc/final/Makefile b/toolchain/gcc/final/Makefile index 3fb5ccf..955c92b 100644 --- a/toolchain/gcc/final/Makefile +++ b/toolchain/gcc/final/Makefile @@ -8,7 +8,8 @@ GCC_CONFIGURE += \ --enable-languages=$(TARGET_LANGUAGES) \ --enable-shared \ --enable-threads \ - --with-slibdir=$(TOOLCHAIN_DIR)/lib + --with-slibdir=$(TOOLCHAIN_DIR)/lib \ + --disable-werror ifneq ($(CONFIG_GCC_VERSION_4_5)$(CONFIG_GCC_VERSION_4_6),) GCC_CONFIGURE += \ -- 1.9.1 ___ 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
On Thu, Mar 5, 2015 at 7:04 AM, Dirk Neukirchen dirkneukirc...@web.de 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
On Thu, Mar 5, 2015 at 7:04 AM, Dirk Neukirchen dirkneukirc...@web.de 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
[OpenWrt-Devel] [PATCH] toolchain/uClibc: Add uClibc snapshot as selectable version
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 j...@bethesignal.org --- 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
Re: [OpenWrt-Devel] [PATCH] toolchain/uClibc: Add uClibc snapshot as selectable version
On Thu, Mar 5, 2015 at 1:19 PM, Jeff Waugh j...@bethesignal.org 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