From patchwork Mon Mar 16 23:30:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 450807 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 2C2A41400A0 for ; Tue, 17 Mar 2015 10:30:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=xe8IOtod; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7042F915E9; Mon, 16 Mar 2015 23:30:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QNtoSXuKIVdS; Mon, 16 Mar 2015 23:30:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 437A6915C2; Mon, 16 Mar 2015 23:30:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 506711C107B for ; Mon, 16 Mar 2015 23:30:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4D850A28B8 for ; Mon, 16 Mar 2015 23:30:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MeKACPDfSy1M for ; Mon, 16 Mar 2015 23:30:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 4A8FEA27E2 for ; Mon, 16 Mar 2015 23:30:40 +0000 (UTC) Received: by lamx15 with SMTP id x15so53486837lam.3 for ; Mon, 16 Mar 2015 16:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Uq57dMpb6EiCJb32AJIHzUIckm5dXqkbI5VVp8R6Sgs=; b=xe8IOtodd6l2Cw4EdjVzLxz1qoneBqC82GFetLorjCq7xH8rNrZA8M6ds09/U671n3 Dn/w9Xvv74spwJs2kZK6luwAwDNKzWLTvGhvAV0iZv6hlpRSXvZDIrGENDU1KHYn/i1G K4l9Ub/CPx95eyR8O40f59NYdwZwyaBIAa6+LMoAGUm4cJTaMouObBhZgSpcmDADZxUv mTvPxN7y6LixhNPbUjr0BVSz0+1kRJ0IBJ9cXRaryeVCqrQvRJETZaS5qw8Ot/qELPve x8iSWGX/0G5DE1GDw6gEmGBsyO9puHRfk+NXL1Fp+5Id56BglN2PqGs0goYyqG0bos7n cLbg== X-Received: by 10.152.6.34 with SMTP id x2mr51265752lax.47.1426548638577; Mon, 16 Mar 2015 16:30:38 -0700 (PDT) Received: from grizzly.metropolis ([5.19.183.212]) by mx.google.com with ESMTPSA id dk5sm2471485lad.41.2015.03.16.16.30.37 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 16 Mar 2015 16:30:37 -0700 (PDT) From: Max Filippov To: buildroot@uclibc.org Date: Tue, 17 Mar 2015 02:30:27 +0300 Message-Id: <1426548628-29644-2-git-send-email-jcmvbkbc@gmail.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1426548628-29644-1-git-send-email-jcmvbkbc@gmail.com> References: <1426548628-29644-1-git-send-email-jcmvbkbc@gmail.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH 1/2] uclibc: Fix getopt implementations conditional compilation X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "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 --- ...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 +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 +--- + 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 +