From patchwork Mon Feb 28 15:54:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: aisha X-Patchwork-Id: 108408 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3238FA0350; Mon, 28 Feb 2022 16:54:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 979194068C; Mon, 28 Feb 2022 16:54:33 +0100 (CET) Received: from mail.bsd.ac (mail.bsd.ac [108.61.81.40]) by mails.dpdk.org (Postfix) with ESMTP id AE90740140 for ; Mon, 28 Feb 2022 16:54:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.ac; s=excisionRSA; t=1646063670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=kAxuWEM3V+XNoLylTcq9CHL3LCFuf9IF6iyZXO3Bd1c=; b=uiZZDnDp9L3QxT5keJ9yUIe1uPExQfitg/sgmqbcliZOIodiSg/8ro4LRdAi/vWPE7eQlC e6Xzplgp0EZ6n9oTRpOekny1v7U/g0LNIKnNZd+EFZ+p76qntvYywxkhNzdht7ZkzGxTvI ad91K0eljfl1rHGiWymMPp/b/VqlcUV35x62ZDyhWGQTg0SHCr+5hpm2MFY3xmXWhkxQAB QyCuYeg4yMvde9OnwnaxNY8cFN1q4F6nN209zurWd8U1F0pyZ/7HCF2vbrhTGzMJ/H581u JB8GmS2EOJEv/I57MSjBNzOcwqLvwfQtWH9cFopy0wu0QIkBY7coH44Xdt88CQ== Received: from [192.168.1.135] (pool-71-187-246-76.nwrknj.fios.verizon.net [71.187.246.76]) by mail.bsd.ac (OpenSMTPD) with ESMTPSA id 8a5de3c9 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) auth=yes user=aisha@bsd.ac for ; Mon, 28 Feb 2022 10:54:30 -0500 (EST) Message-ID: Date: Mon, 28 Feb 2022 10:54:28 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: en-US To: dev@dpdk.org From: aisha Subject: [patch] allow using standard ar from the build ini files instead of 'ar' string 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 Hi, I've attached a patch, from Gentoo, which uses the *ar* binary passed to meson when available, instead of 'ar', which may not be available, for instance when cross compiling, or having multiple gcc versions present, like in Gentoo. This should not have any regressions, as when the binary is not available it uses the same logic as the original. Aisha diff --git a/buildtools/meson.build b/buildtools/meson.build index 400b88f251..d886bfb1dc 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -24,15 +24,20 @@ binutils_avx512_check = (py3 + files('binutils-avx512-check.py') + # select library and object file format pmdinfo = py3 + files('gen-pmdinfo-cfile.py') + [meson.current_build_dir()] pmdinfogen = py3 + files('pmdinfogen.py') +ar = '' +if cc.get_id() == 'gcc' or host_machine.system() != 'windows' + ar = 'ar' +else + ar = 'llvm-ar' +endif +ar_bin = find_program('ar', required: false) +if ar_bin.found() + ar = ar_bin.full_path() +endif +pmdinfo += ar if host_machine.system() == 'windows' - if cc.get_id() == 'gcc' - pmdinfo += 'ar' - else - pmdinfo += 'llvm-ar' - endif pmdinfogen += 'coff' else - pmdinfo += 'ar' pmdinfogen += 'elf' endif diff --git a/meson.build b/meson.build index 937f6110c0..35650ab20d 100644 --- a/meson.build +++ b/meson.build @@ -12,7 +12,7 @@ project('DPDK', 'C', 'default_library=static', 'warning_level=2', ], - meson_version: '>= 0.49.2' + meson_version: '>= 0.55.0' ) # check for developer mode