The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / uclibc / 0.9.33.2 / 0068-Fix-getopt-implementations-conditional-compilation.patch
1 From 5184289b9f453b1e160fbfd2f0922e5ed586d910 Mon Sep 17 00:00:00 2001
2 From: Max Filippov <jcmvbkbc@gmail.com>
3 Date: Tue, 17 Mar 2015 02:06:52 +0300
4 Subject: [PATCH] Fix getopt implementations conditional compilation
5
6 Currently there's no way to disable getsubopt: either GNU or SUSv3
7 getsubopt is always built.
8
9 Properly exclude SUSv3 getsubopt implementation when GNU getopt is
10 selected.
11 Exclude GNU getsubopt when SUSv3 getopt is selected. Honor getopt_long
12 configuration.
13
14 This brings UCLIBC_HAS_GNU_GETOPT, UCLIBC_HAS_GNU_GETSUBOPT and
15 UCLIBC_HAS_GETOPT_LONG handling in sync with uClibc and uClibc-ng tips.
16
17 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
18 ---
19  libc/unistd/Makefile.in | 22 +++++++++++-----------
20  1 file changed, 11 insertions(+), 11 deletions(-)
21
22 diff --git a/libc/unistd/Makefile.in b/libc/unistd/Makefile.in
23 index 2704177..ec51631 100644
24 --- a/libc/unistd/Makefile.in
25 +++ b/libc/unistd/Makefile.in
26 @@ -19,18 +19,18 @@ CSRC := $(filter-out __exec_alloc.c,$(CSRC))
27  endif
28  
29  ifeq ($(UCLIBC_HAS_GNU_GETOPT),y)
30 -CSRC := $(filter-out getopt-susv3.c getopt_long-simple.c,$(CSRC))
31 +  CSRC := $(filter-out getopt-susv3.c getsubopt-susv3.c getopt_long-simple.c,$(CSRC))
32 +  ifneq ($(UCLIBC_HAS_GNU_GETSUBOPT),y)
33 +    CSRC := $(filter-out getsubopt.c,$(CSRC))
34 +  endif
35  else
36 -CSRC := $(filter-out getopt.c,$(CSRC))
37 -ifneq ($(UCLIBC_HAS_GETOPT_LONG),y)
38 -CSRC := $(filter-out getopt_long-simple.c,$(CSRC))
39 -endif
40 -endif
41 -
42 -ifeq ($(UCLIBC_HAS_GNU_GETSUBOPT),y)
43 -CSRC := $(filter-out getsubopt-susv3.c,$(CSRC))
44 -else
45 -CSRC := $(filter-out getsubopt.c,$(CSRC))
46 +  CSRC := $(filter-out getopt.c getsubopt.c,$(CSRC))
47 +  ifneq ($(UCLIBC_HAS_GETOPT_LONG),y)
48 +    CSRC := $(filter-out getopt_long-simple.c,$(CSRC))
49 +  endif
50 +  ifneq ($(UCLIBC_HAS_GNU_GETSUBOPT),y)
51 +    CSRC := $(filter-out getsubopt-susv3.c,$(CSRC))
52 +  endif
53  endif
54  
55  ifneq ($(UCLIBC_SUSV3_LEGACY),y)
56 -- 
57 1.8.1.4
58