From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C77CA0093; Tue, 8 Mar 2022 19:53:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD78440395; Tue, 8 Mar 2022 19:53:01 +0100 (CET) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mails.dpdk.org (Postfix) with ESMTP id 3C4D440141 for ; Tue, 8 Mar 2022 19:53:00 +0100 (CET) Received: by mail-wm1-f54.google.com with SMTP id q20so39007wmq.1 for ; Tue, 08 Mar 2022 10:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3wGtuYacpdE0Y5PbObvaMO1lUcDcBHYVQ+Y9+0xT4y0=; b=hN7nQNgp+5+QX6qXFRd3u50xKwygosRic0f3qbisO5fDGPHO16ZLv4WbU+F/Fr7c+g Q6hpKz+LyNM8a7M7Z2lzItEbq8B9KmeyWVhLeUzhf4DJMa2kOCwYuY8bayud3UKG5azv Zr6WshDGYQzbE50/Y+nKZBSMWbLLM5io7q8aDkJJyL4J9mYKvM3K29zUxE+8RtaXBGBn V2dIk31SmCA6hCAzqedjZlnirpZvDQ8Yevrir1GlsOGpgfZJ7zAA/CziB2k07JdbRdak aoIXQvuAe88skZU38FCuL3JjmsP3awvbTQ/KkP/M3CpDtNsdkWbjpOAYsI+/mdpELmdc lGLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3wGtuYacpdE0Y5PbObvaMO1lUcDcBHYVQ+Y9+0xT4y0=; b=11aDeUh7uSFWZMHfE61LB6UCh2cPVVh99DTQ7PJ+BVn9pMt7zk9+X6KM8WUHEoDkTH uwupTdqf2Y68TRVlgZ2j9RvW3MLjwvKOSIbdMFN2VPxplLnX+D+19QFVVr/1CArRE4wn eyq5fs3rDckgJsS4cWJ4TN8IWJeCgEa8x1a8wuwXhvXLWxvfykZVNwuhi+YsfpzP9Rj4 Y501VE88n1gjAQGdmmBCrALCneprOkD2BYHFZS6jM0TIpEgj4xD/Cwy365QieWSTSVcu 1xBDBfGzlp2aE+lMuf1y7KAhnEfBBCxYNEVzlOxizvafOX5Kf7J7qBN3rHhva5+Kggu9 PHXA== X-Gm-Message-State: AOAM533ldfOX7NUUh96oWKPirQ9qb+pACK0pvVvbFADcMLF7cTCO0UV1 /B5HaxiHan4HoYlv+iAZNmQE12K+QKSWliab X-Google-Smtp-Source: ABdhPJyKqKauKDB2zn303KbJ6BQPRJ47WBqJebcXHbf0+r+cMTpjBJQv2w+DqodcHgtYvyPUBMlXVA== X-Received: by 2002:a7b:ce02:0:b0:381:2007:f75c with SMTP id m2-20020a7bce02000000b003812007f75cmr4718184wmc.6.1646765579741; Tue, 08 Mar 2022 10:52:59 -0800 (PST) Received: from usaari01.cust.communityfibre.co.uk ([2a02:6b6a:b497:0:56cc:e50e:f065:6a0c]) by smtp.gmail.com with ESMTPSA id t9-20020a05600c198900b0037bd5fabd10sm3418474wmq.48.2022.03.08.10.52.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 10:52:59 -0800 (PST) From: Usama Arif To: dev@dpdk.org, david.marchand@redhat.com, thomas@monjalon.net Cc: fam.zheng@bytedance.com, liangma@bytedance.com, Usama Arif , stable@dpdk.org Subject: [PATCH] build: encapsulate grep for local_miss_maps in a function Date: Tue, 8 Mar 2022 18:52:43 +0000 Message-Id: <20220308185243.3629626-1-usama.arif@bytedance.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org check-symbols-maps.sh runs with the -e option to exit as soon as there is an error. Currently the build is failing as the search of grep -L is empty (which is the case for all version.map files as they have the local symbol) which causes the script to return with an error. This patch encapsulates the grep call in a function, so that only the function errors out and the build is successful. Fixes: b403498e14 ("build: hide local symbols in shared libraries") Cc: stable@dpdk.org Signed-off-by: Usama Arif --- devtools/check-symbol-maps.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh index 8266fdf9ea..96c479138f 100755 --- a/devtools/check-symbol-maps.sh +++ b/devtools/check-symbol-maps.sh @@ -53,7 +53,14 @@ if [ -n "$duplicate_symbols" ] ; then ret=1 fi -local_miss_maps=$(grep -L 'local: \*;' $@) +find_local_miss_maps () +{ + local local_miss_maps=$(grep -L 'local: \*;' $@) + echo "$local_miss_maps" + +} + +local_miss_maps=$(find_local_miss_maps $@) if [ -n "$local_miss_maps" ] ; then echo "Found maps without local catch-all:" echo "$local_miss_maps" -- 2.25.1