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 20A97A09E4; Thu, 28 Jan 2021 20:05:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B957E40682; Thu, 28 Jan 2021 20:05:26 +0100 (CET) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by mails.dpdk.org (Postfix) with ESMTP id 4FAA34067A for ; Thu, 28 Jan 2021 20:05:25 +0100 (CET) Received: by mail-lf1-f41.google.com with SMTP id h12so9031948lfp.9 for ; Thu, 28 Jan 2021 11:05:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JEPMCdHbzqc4LmDYaX/a98AGj1pJtFmD0D6iP7DMDWo=; b=Bgn06Yk6uA/OL65AF2mLgLjJv8n+TnBoj8SqMZBcEy0/BZY1cov4PjPZ6SH/hz33HF iLNgz3zltewYb1rZqUrMQrd3qH6S1686UFwCZhxXTgFNGr9CrVr4b9ES9f+8vShsZICH 8j5F1GsALKhkG9rYNdTbotMeVcxMc6fN0q7SAYLjBM/IZgZz+LnqQE5jjblDsWopR7nm uBac1l2C1l5dI1MZh8oB3qhWgrAfntfEZSLH6WDfjN3CN18Aa9n6JRmjWEoidNw63XD/ 9YDoqozUhrAUgtGE5mOKKlUE8suudjkpMpWExF8sKhgFXE56G9s0/dclNsaY7QWYmy7Z Cxpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JEPMCdHbzqc4LmDYaX/a98AGj1pJtFmD0D6iP7DMDWo=; b=bZcGb8Mcw7xQ4I+vne2yWP7uzlRXUKo2l9E0N6xwLtq8ppSYZqPJmHSYcPh3oHDHG2 1Dhs8NLVBTFDittux3aNwsT2VabPr/2j6+7GXN7RlpLOPi6zbJTLZ9twQytJooRGRGcz JKkrA7xAg4U55zBSWOjJpMw8zINrSerVWNJE5EMDp6ZO9wtInRHoiTP6Tzf/D6zJix3E zVJ5PCrtjjrzgKr2HgNwb7tLZ2o7vUr7mGWgZCuVPoX11zSL6OS5xneGO3aqgdU6uLRG wfcYftBb2DJLIcejuZfNzsaeNcRlvTTNmR5eFu/orBKi0HlBrs7QOYjakuN1PXoeKNil Y6cQ== X-Gm-Message-State: AOAM533VSiOW+fRGupToxyQ8MV6EEzclLvfnAvBMpMEskpRAah2p912b 6IAdoChUGXpBiF/Jf92M2AWLZDhe5AQ= X-Google-Smtp-Source: ABdhPJxuZa0ocTQLg4/QtbOHXgRnQCjHUEDok+5TEnkitCsDzivp+2eVlLeTo6fHHCPxOU+RUXXugA== X-Received: by 2002:ac2:4e4e:: with SMTP id f14mr234777lfr.7.1611860724446; Thu, 28 Jan 2021 11:05:24 -0800 (PST) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id p10sm1475471lji.137.2021.01.28.11.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 11:05:23 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , XuemingX Zhang , Neil Horman Date: Thu, 28 Jan 2021 22:05:15 +0300 Message-Id: <20210128190515.7786-1-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] buildtools: fix archive extraction for LLVM 8 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 Sender: "dev" "llvm-ar xv lib.a" from LLVM 8 doesn't print extracted object file names. The effect of "v" is not formally specified either. Use "llvm-ar t" to get archive member names. Reported-by: XuemingX Zhang Signed-off-by: Dmitry Kozlyuk --- buildtools/gen-pmdinfo-cfile.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/buildtools/gen-pmdinfo-cfile.py b/buildtools/gen-pmdinfo-cfile.py index a4e080199..58fe3ad15 100644 --- a/buildtools/gen-pmdinfo-cfile.py +++ b/buildtools/gen-pmdinfo-cfile.py @@ -9,11 +9,12 @@ _, tmp_root, ar, archive, output, *pmdinfogen = sys.argv with tempfile.TemporaryDirectory(dir=tmp_root) as temp: - proc = subprocess.run( - # Don't use "ar p", because its output is corrupted on Windows. - [ar, "xv", os.path.abspath(archive)], stdout=subprocess.PIPE, check=True, cwd=temp + run_ar = lambda command: subprocess.run( + [ar, command, os.path.abspath(archive)], + stdout=subprocess.PIPE, check=True, cwd=temp ) - lines = proc.stdout.decode().splitlines() - names = [line[len("x - ") :] for line in lines] + # Don't use "ar p", because its output is corrupted on Windows. + run_ar("x") + names = run_ar("t").stdout.decode().splitlines() paths = [os.path.join(temp, name) for name in names] subprocess.run(pmdinfogen + paths + [output], check=True) -- 2.29.2