* [Buildroot] [PATCH 0/2] uclibc: fix getsubopt issues @ 2015-03-16 23:30 Max Filippov 2015-03-16 23:30 ` [Buildroot] [PATCH 1/2] uclibc: Fix getopt implementations conditional compilation Max Filippov 2015-03-16 23:30 ` [Buildroot] [PATCH 2/2] uclibc: enable UCLIBC_HAS_GNU_GETSUBOPT in all configs Max Filippov 0 siblings, 2 replies; 4+ messages in thread From: Max Filippov @ 2015-03-16 23:30 UTC (permalink / raw) To: buildroot Hi, this series fixes UCLIBC_HAS_GNU_GETSUBOPT handling in uClibc-0.9.33.2, bringing it in sync with uClibc and uClibc-ng tips and enables UCLIBC_HAS_GNU_GETSUBOPT in all uClibc configs, which fixes build of packages that use getsubopt unconoditionally. Max Filippov (2): uclibc: Fix getopt implementations conditional compilation uclibc: enable UCLIBC_HAS_GNU_GETSUBOPT in all configs ...t-implementations-conditional-compilation.patch | 58 ++++++++++++++++++++ package/uclibc/uClibc-0.9.33.config | 2 +- package/uclibc/uClibc-ng.config | 2 +- package/uclibc/uClibc-snapshot.config | 2 +- 4 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 package/uclibc/0.9.33.2/0068-Fix-getopt-implementations-conditional-compilation.patch -- 1.7.7.6 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] uclibc: Fix getopt implementations conditional compilation 2015-03-16 23:30 [Buildroot] [PATCH 0/2] uclibc: fix getsubopt issues Max Filippov @ 2015-03-16 23:30 ` Max Filippov 2015-03-20 22:44 ` Thomas Petazzoni 2015-03-16 23:30 ` [Buildroot] [PATCH 2/2] uclibc: enable UCLIBC_HAS_GNU_GETSUBOPT in all configs Max Filippov 1 sibling, 1 reply; 4+ messages in thread From: Max Filippov @ 2015-03-16 23:30 UTC (permalink / raw) To: buildroot There's no way to disable getsubopt in uClibc 0.9.33.2: either GNU or SUSv3 getsubopt is always built. Properly exclude SUSv3 getsubopt implementation when GNU getopt is selected. Exclude GNU getsubopt when SUSv3 getopt is selected. Honor getopt_long configuration. This brings UCLIBC_HAS_GNU_GETOPT, UCLIBC_HAS_GNU_GETSUBOPT and UCLIBC_HAS_GETOPT_LONG handling in sync with uClibc and uClibc-ng tips. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- ...t-implementations-conditional-compilation.patch | 58 ++++++++++++++++++++ 1 files changed, 58 insertions(+), 0 deletions(-) create mode 100644 package/uclibc/0.9.33.2/0068-Fix-getopt-implementations-conditional-compilation.patch diff --git a/package/uclibc/0.9.33.2/0068-Fix-getopt-implementations-conditional-compilation.patch b/package/uclibc/0.9.33.2/0068-Fix-getopt-implementations-conditional-compilation.patch new file mode 100644 index 0000000..18f6a9f --- /dev/null +++ b/package/uclibc/0.9.33.2/0068-Fix-getopt-implementations-conditional-compilation.patch @@ -0,0 +1,58 @@ +From 5184289b9f453b1e160fbfd2f0922e5ed586d910 Mon Sep 17 00:00:00 2001 +From: Max Filippov <jcmvbkbc@gmail.com> +Date: Tue, 17 Mar 2015 02:06:52 +0300 +Subject: [PATCH] Fix getopt implementations conditional compilation + +Currently there's no way to disable getsubopt: either GNU or SUSv3 +getsubopt is always built. + +Properly exclude SUSv3 getsubopt implementation when GNU getopt is +selected. +Exclude GNU getsubopt when SUSv3 getopt is selected. Honor getopt_long +configuration. + +This brings UCLIBC_HAS_GNU_GETOPT, UCLIBC_HAS_GNU_GETSUBOPT and +UCLIBC_HAS_GETOPT_LONG handling in sync with uClibc and uClibc-ng tips. + +Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> +--- + libc/unistd/Makefile.in | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/libc/unistd/Makefile.in b/libc/unistd/Makefile.in +index 2704177..ec51631 100644 +--- a/libc/unistd/Makefile.in ++++ b/libc/unistd/Makefile.in +@@ -19,18 +19,18 @@ CSRC := $(filter-out __exec_alloc.c,$(CSRC)) + endif + + ifeq ($(UCLIBC_HAS_GNU_GETOPT),y) +-CSRC := $(filter-out getopt-susv3.c getopt_long-simple.c,$(CSRC)) ++ CSRC := $(filter-out getopt-susv3.c getsubopt-susv3.c getopt_long-simple.c,$(CSRC)) ++ ifneq ($(UCLIBC_HAS_GNU_GETSUBOPT),y) ++ CSRC := $(filter-out getsubopt.c,$(CSRC)) ++ endif + else +-CSRC := $(filter-out getopt.c,$(CSRC)) +-ifneq ($(UCLIBC_HAS_GETOPT_LONG),y) +-CSRC := $(filter-out getopt_long-simple.c,$(CSRC)) +-endif +-endif +- +-ifeq ($(UCLIBC_HAS_GNU_GETSUBOPT),y) +-CSRC := $(filter-out getsubopt-susv3.c,$(CSRC)) +-else +-CSRC := $(filter-out getsubopt.c,$(CSRC)) ++ CSRC := $(filter-out getopt.c getsubopt.c,$(CSRC)) ++ ifneq ($(UCLIBC_HAS_GETOPT_LONG),y) ++ CSRC := $(filter-out getopt_long-simple.c,$(CSRC)) ++ endif ++ ifneq ($(UCLIBC_HAS_GNU_GETSUBOPT),y) ++ CSRC := $(filter-out getsubopt-susv3.c,$(CSRC)) ++ endif + endif + + ifneq ($(UCLIBC_SUSV3_LEGACY),y) +-- +1.8.1.4 + -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] uclibc: Fix getopt implementations conditional compilation 2015-03-16 23:30 ` [Buildroot] [PATCH 1/2] uclibc: Fix getopt implementations conditional compilation Max Filippov @ 2015-03-20 22:44 ` Thomas Petazzoni 0 siblings, 0 replies; 4+ messages in thread From: Thomas Petazzoni @ 2015-03-20 22:44 UTC (permalink / raw) To: buildroot Dear Max Filippov, On Tue, 17 Mar 2015 02:30:27 +0300, Max Filippov wrote: > There's no way to disable getsubopt in uClibc 0.9.33.2: either GNU or > SUSv3 getsubopt is always built. > > Properly exclude SUSv3 getsubopt implementation when GNU getopt is > selected. > Exclude GNU getsubopt when SUSv3 getopt is selected. Honor getopt_long > configuration. > > This brings UCLIBC_HAS_GNU_GETOPT, UCLIBC_HAS_GNU_GETSUBOPT and > UCLIBC_HAS_GETOPT_LONG handling in sync with uClibc and uClibc-ng tips. > > Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Both patches applied, thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] uclibc: enable UCLIBC_HAS_GNU_GETSUBOPT in all configs 2015-03-16 23:30 [Buildroot] [PATCH 0/2] uclibc: fix getsubopt issues Max Filippov 2015-03-16 23:30 ` [Buildroot] [PATCH 1/2] uclibc: Fix getopt implementations conditional compilation Max Filippov @ 2015-03-16 23:30 ` Max Filippov 1 sibling, 0 replies; 4+ messages in thread From: Max Filippov @ 2015-03-16 23:30 UTC (permalink / raw) To: buildroot This fixes build for applications that use getsubopt unconditionally. Code addition to getopt is negligible. Fixes: http://autobuild.buildroot.net/results/90c318e3a9ef5e626d0a80e36695d34eda21f97e/ http://autobuild.buildroot.net/results/cd8e9d9a5f454c321071c21192958aeee9c39e73/ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- package/uclibc/uClibc-0.9.33.config | 2 +- package/uclibc/uClibc-ng.config | 2 +- package/uclibc/uClibc-snapshot.config | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/uclibc/uClibc-0.9.33.config b/package/uclibc/uClibc-0.9.33.config index 88dc7fa..afee4fd 100644 --- a/package/uclibc/uClibc-0.9.33.config +++ b/package/uclibc/uClibc-0.9.33.config @@ -217,7 +217,7 @@ UCLIBC_HAS_ERRNO_MESSAGES=y UCLIBC_HAS_SIGNUM_MESSAGES=y # UCLIBC_HAS_SYS_SIGLIST is not set UCLIBC_HAS_GNU_GETOPT=y -# UCLIBC_HAS_GNU_GETSUBOPT is not set +UCLIBC_HAS_GNU_GETSUBOPT=y # # Big and Tall diff --git a/package/uclibc/uClibc-ng.config b/package/uclibc/uClibc-ng.config index 9b348d6..2885af6 100644 --- a/package/uclibc/uClibc-ng.config +++ b/package/uclibc/uClibc-ng.config @@ -221,7 +221,7 @@ UCLIBC_HAS_ERRNO_MESSAGES=y UCLIBC_HAS_SIGNUM_MESSAGES=y # UCLIBC_HAS_SYS_SIGLIST is not set UCLIBC_HAS_GNU_GETOPT=y -# UCLIBC_HAS_GNU_GETSUBOPT is not set +UCLIBC_HAS_GNU_GETSUBOPT=y # # Big and Tall diff --git a/package/uclibc/uClibc-snapshot.config b/package/uclibc/uClibc-snapshot.config index 1f04561..6f5ebfa 100644 --- a/package/uclibc/uClibc-snapshot.config +++ b/package/uclibc/uClibc-snapshot.config @@ -222,7 +222,7 @@ UCLIBC_HAS_ERRNO_MESSAGES=y UCLIBC_HAS_SIGNUM_MESSAGES=y # UCLIBC_HAS_SYS_SIGLIST is not set UCLIBC_HAS_GNU_GETOPT=y -# UCLIBC_HAS_GNU_GETSUBOPT is not set +UCLIBC_HAS_GNU_GETSUBOPT=y # # Big and Tall -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-20 22:44 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-03-16 23:30 [Buildroot] [PATCH 0/2] uclibc: fix getsubopt issues Max Filippov 2015-03-16 23:30 ` [Buildroot] [PATCH 1/2] uclibc: Fix getopt implementations conditional compilation Max Filippov 2015-03-20 22:44 ` Thomas Petazzoni 2015-03-16 23:30 ` [Buildroot] [PATCH 2/2] uclibc: enable UCLIBC_HAS_GNU_GETSUBOPT in all configs Max Filippov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox