From patchwork Thu Dec 15 18:33:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2570 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AB52B3F0FB for ; Thu, 15 Dec 2022 19:33:51 +0100 (CET) Received: by mail-ed1-f69.google.com with SMTP id t4-20020a056402524400b004620845ba7bsf181008edd.4 for ; Thu, 15 Dec 2022 10:33:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1671129231; cv=pass; d=google.com; s=arc-20160816; b=YoefiumE62hQhqKZQc7dwyfA0G19cx4zrXo6H5/B+Vl5JMA3LckGLsIu9rl/H2hKv5 uYEtv98t9DzYqESfIs+t4ipl/JTKc7YNBrriOxwVD3iWJYiV5Iwd6P2wxbsY8YQp0pHW g/kxvcgkllY6gsr/ckV1nWIB95lxOPZo4Y30YgfxmV/6bNiP+n/T4GDkTzNitEA0fzH5 QIIXMiZDVFDFIKnL7Lixz45klKZ51R6joE7asLSil6dDI85XzW1tgafy79zcf2R3+EIN u42JrwYdLhKPlHc6aubM8mJoyYm3MVzL1FOJ7wLi6BZteO6vSbxnkC9+Aktt0RTcu1mj uSlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/FjxkS3UDfIVJJ3d5aPQlPhDQB4UDlnoPVwU+mQlJ8U=; b=vs/AGczzrvotwJMfUBOb2+z2UtZFecCP79JXxDF9gW/CqAwqShMQITSErZ67nxKBNU k2sIUmCa2EhY+to5Jv7Y1qdPfoPoXvTzbGYMNZInAgYOXqE29MFMddImMlJqJDv+jSKk BQjN2m9KcAdSuxzlkFYOU1ZvZi6vaiEZla21eB1IHiDd2LsElZ4sKjuLm5Bdc8Ag+BGo G1wUD8Qd/HHYWn68mzi7lbEKgHtvUY6MHO8m49779sjuUa46HLLZbV89Mfoq10T3rMgn b+63qRpy0sPA6Cb/qjVM7dpzGEzyf0Rxg4q/F+qtlb/R5SoPIXaFMcM+yDPttm2XN98g HXcA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QEsOP4F2; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=/FjxkS3UDfIVJJ3d5aPQlPhDQB4UDlnoPVwU+mQlJ8U=; b=ZLfKUbDObPxPahvhVBvvbKVV/lBnA2zCE7fAwL6l4SgJGgeBg6nCLMQ4weckZlSbZ/ kGpNfxrlOyk6E0daGg9nactJuyIXRs1XCqPpylOaAmKFerPLTT9Yt/gLMkfeGdMUILM6 +ZM1CsqfRDVnprklOU2fkbXfvB5k83GZHWZac= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/FjxkS3UDfIVJJ3d5aPQlPhDQB4UDlnoPVwU+mQlJ8U=; b=klv2gcqLvcdnYs9i1Des/mYewjmsuQKjRC9Q9KnhG0vS4L1kVJGTXTYk72C6D3+I/e 0NApsJKIx+TmNR+dKwMQBZqS2w0WDEysvsaoo46XHH1XT62PBWin6HtSFg/UskXRDh9/ I2rj7bYEkOGFbvZFscHBmYuyjn4JVC7fOZiEcGMqyhG0yTn80QqUKvV1GT36dtCGQ2s3 Gxx0Vqqv7eXRVyhsy5XUSZ1dUe9hcVseeT1XoqdvIxdaYf1/O5hTPoOleO66cQNLFPys It+phiumMjVWQMXs3OgcQTdPQv1cLBNzTs1WCSwi8EZpEGNPhQWITrU4YDiwWM36Gunz s6QQ== X-Gm-Message-State: ANoB5pkBEluAPPmPqvf0hrIjYRumMNzfXiF7u1bsxHc2mZJp/kdBtXmQ K0qhVfsfRYObe7G+DGg4fcKhZejN X-Google-Smtp-Source: AA0mqf6vlmACxiv0UPm3gxm0SpBOexh8veFfkqsWLAGJaHI6w1rZXf0WX7jNP6Q7UTAcq4igBC2E1Q== X-Received: by 2002:a05:6402:ea2:b0:46f:fe46:df81 with SMTP id h34-20020a0564020ea200b0046ffe46df81mr2006935eda.56.1671129231480; Thu, 15 Dec 2022 10:33:51 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:4413:b0:46d:d0c2:969c with SMTP id y19-20020a056402441300b0046dd0c2969cls194262eda.1.-pod-prod-gmail; Thu, 15 Dec 2022 10:33:50 -0800 (PST) X-Received: by 2002:a05:6402:4147:b0:45c:835c:3686 with SMTP id x7-20020a056402414700b0045c835c3686mr26278346eda.15.1671129230244; Thu, 15 Dec 2022 10:33:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671129230; cv=none; d=google.com; s=arc-20160816; b=Xl7FwEfopV8i+aD7vlMF0hGMCUwiTRTLL0ipIpiRebVHJol7KkYnuye4/pDJifPVIB lMhRqvvKT/TkWZlGHw1i9bj2nM+8oH1IQd8q1rOltuGuXuhYelHJX+g4oM5OtmvLYroP Sj3CrALV9d8l/sfDBGd4cl7ZGrJwoJf+wQ3ZAqquB/fcPxY+TDood8geteeJ8W0S9lpp 2nA8m+SXHoWGMeE32ryRG3J/9bcSSWTBWTGC7MlZE44lVZJppahfLMPqL+ADkG89dd3W wfyLAfxygpGc84fQfiE61k9YDFAA9nDJ8jnUsuwO/aqRMzvppiWsl7VZShHnAjp4Zfcu hn6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=i1e2ZEGhmykZA3YTP0XoZZhVBNw9Is7kY/M2P8r7o34=; b=EJqOXvO1Nx0iNLtZoaWQhFp0DPZvpnrF4SsotXFTGugOC84KG142XvpPXFfnJBeWy5 G/xMY+5xRtaVmsuVwlFn67IaNHmnifilibG2ViAM6i4cD0TIDDEYHbIDhqDZzeRMYYM5 Cc5YOcjAaxXqVkQveSFKHvj1aaWKbV/ar8u5w/V1wbRQnw+KyoPdd71RrIs+vVbCmOG3 nAJc8EDYVOl+fY2ajoL3oNMg1iRCnrPfGd6qmQT6yQw0DNmitlz3pEgEE1/n/0MGN39B 7jW9IhQNNKMLucE0ivOnptYjT2zndJeFzP3uxrsR8zjkHYg7ZQqjk0JelHzzE5WXjLQV QoEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QEsOP4F2; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id k25-20020a50ce59000000b0046270ee466esor6676011edj.43.2022.12.15.10.33.50 for (Google Transport Security); Thu, 15 Dec 2022 10:33:50 -0800 (PST) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a50:ed0a:0:b0:46b:19ab:68d8 with SMTP id j10-20020a50ed0a000000b0046b19ab68d8mr26784570eds.40.1671129230035; Thu, 15 Dec 2022 10:33:50 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com (host-82-54-95-136.retail.telecomitalia.it. [82.54.95.136]) by smtp.gmail.com with ESMTPSA id j2-20020aa7de82000000b004585eba4baesm7709643edv.80.2022.12.15.10.33.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 10:33:49 -0800 (PST) From: Dario Binacchi To: buildroot@buildroot.org Cc: Dario Binacchi , linux-amarula@amarulasolutions.com, thomas.petazzoni@bootlin.com Subject: [PATCH v2 1/1] package/sscep: fix linking error Date: Thu, 15 Dec 2022 19:33:39 +0100 Message-Id: <20221215183339.3771397-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QEsOP4F2; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Apply the patch to fix the following build failure raised since the addition of the package in commit 72fa60dc102679f51b228336ec38f5af78ff7646: uclibc/sysroot/usr/lib/libc.a(getopt.os): in function `__GI_getopt': getopt.c:(.text+0x598): multiple definition of `getopt'; src/getopt.o:getopt.c:(.text+0x0): first defined here The patch has been submitted and accepted upstream to address this issue. Fixes: - http://autobuild.buildroot.net/results/844c7dd79f69ef2ea8f293bb73a2d4b7533aa97c Signed-off-by: Dario Binacchi --- Changes in v2: - Add autobuild reference to commit message. - The applied patch has ben accepted, so update the commit message. .../sscep/0001-Fix-getopt-linking-error.patch | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 package/sscep/0001-Fix-getopt-linking-error.patch diff --git a/package/sscep/0001-Fix-getopt-linking-error.patch b/package/sscep/0001-Fix-getopt-linking-error.patch new file mode 100644 index 000000000000..b32613b3cc18 --- /dev/null +++ b/package/sscep/0001-Fix-getopt-linking-error.patch @@ -0,0 +1,55 @@ +From c4fc8d9e282e05fcfa0cee9362c60742b26f4b33 Mon Sep 17 00:00:00 2001 +From: Dario Binacchi +Date: Fri, 9 Dec 2022 18:18:27 +0100 +Subject: [PATCH] Fix getopt linking error + +The buildroot project, to which the sscep application was added, has +configurations that raise the following linking error: +buildroot/output/host/lib/gcc/arc-buildroot-linux-uclibc/11.3.0/../../../../arc-buildroot-linux-uclibc/bin/ld: buildroot/output/host/bin/../arc-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(getopt.os):(.data+0x8): multiple definition of `optind'; src/getopt.o:(.data+0x0): first defined here +buildroot/output/host/lib/gcc/arc-buildroot-linux-uclibc/11.3.0/../../../../arc-buildroot-linux-uclibc/bin/ld: buildroot/output/host/bin/../arc-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(getopt.os): in function `__GI_getopt': +getopt.c:(.text+0x5a4): multiple definition of `getopt'; src/getopt.o:getopt.c:(.text+0x0): first defined here +buildroot/output/host/lib/gcc/arc-buildroot-linux-uclibc/11.3.0/../../../../arc-buildroot-linux-uclibc/bin/ld: buildroot/output/host/bin/../arc-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(getopt.os): in function `getopt_long': +getopt.c:(.text+0x5b0): multiple definition of `getopt_long'; src/getopt.o:getopt.c:(.text+0x128): first defined here +collect2: error: ld returned 1 exit status +make[2]: *** [Makefile:507: sscep] Error 1 +make[1]: *** [package/pkg-generic.mk:293: buildroot/output/build/sscep-0.10.0/.stamp_built] Error 2 + +The patch re-added a check that commit +81f56f635259b9 ("Replaced GNU getopt by a BSD licensed alternative") +removed. + +Signed-off-by: Dario Binacchi +--- + src/getopt.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/getopt.c b/src/getopt.c +index eae36a64afff..0109406ba4ac 100644 +--- a/src/getopt.c ++++ b/src/getopt.c +@@ -31,6 +31,16 @@ + #include + #include + ++#define GETOPT_INTERFACE_VERSION 2 ++#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 ++# include ++# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION ++# define ELIDE_CODE ++# endif ++#endif ++ ++#ifndef ELIDE_CODE ++ + char* optarg; + int optopt; + /* The variable optind [...] shall be initialized to 1 by the system. */ +@@ -226,3 +236,5 @@ int getopt_long(int argc, char* const argv[], const char* optstring, + ++optind; + return retval; + } ++ ++#endif /* Not ELIDE_CODE. */ +-- +2.32.0 +