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 82B4FA054A for ; Fri, 19 Feb 2021 11:57:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56DFB40042; Fri, 19 Feb 2021 11:57:52 +0100 (CET) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by mails.dpdk.org (Postfix) with ESMTP id B686240042 for ; Fri, 19 Feb 2021 11:57:50 +0100 (CET) Received: by mail-ed1-f47.google.com with SMTP id q10so9103541edt.7 for ; Fri, 19 Feb 2021 02:57:50 -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=bJyoyzwV7Kzxk0jRRBBuOBX5yqIuEURfC3ZM8qsJ9a4=; b=g0ukmwb/qjunzBnItJiSs4F+72lLUf5AUlOsNbLEHT9D+UyyxBCy8SYO++Ic4f/AF0 NxMNcStfT4B8vvYaSMenM+Fj2jZ6Th9FMlLVpty+Kw3vIWcNA92GofYyZdu479PVSvqU 3RA+TROi9p7ZDzR/k0yXKRVRxl+c0oVPh7wuXFhOx7KG/MwGZvsGT2jaSq8CPRoEboH4 0sWNSGk/zLuJ5GcgvmQsTNAHUwoZuJWTcYd7tO8eSyEjRO2j+h5S5xJnr6kCDCt+MXOC O8giib/ONie0hdhCzffPpCcPyZ2uD/Czb1AzhffyMmVj5PfgCo+VW5XVp/o79TtqVC4N dmZg== 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=bJyoyzwV7Kzxk0jRRBBuOBX5yqIuEURfC3ZM8qsJ9a4=; b=ErKKljT83tsbyQvazR8W6m1eiNgOxoKCH0RpmWp3PqM1e7Wa7p+Bk+hrnY04WoY4dy 0cVHMKM5zQSsNnhMxOvoZ60lgCZrQeugQvWcKDN58mGzLJmjpqhnllNNbGHMcq2kH0nH wLKHAPMvexr49tFHjGOAuyIb3UHghowyvbjUekOiRXIoHphLKFyJuM5iRknuAXQ6ejAM oGjsWPLHm28OkehHh9GS47zkBoGddqQoeHIlAKmtj1Mmc92z76Nd7jGPt5sR9pO1Nxb/ pEfhewzC9pvqyKX3llgKJPdeFQO0T9Wyo5kEPL2O1sTPx1T42rdPcujO32p9bFQHeD+4 TrVg== X-Gm-Message-State: AOAM5313yekUUjNn6YwVxtEFuJcM/8mdujRex/IGKE6wqCUrbMMjxGL0 9cF/UqvTtxSfFYiVcu0U9j9/4xmYqzY= X-Google-Smtp-Source: ABdhPJz6bWTNfUAJcTFAFsvAK6Qsxhcesss+2BAXjt/bl78rEwD/1nFvD4hhSATO0w2TRi95NE1C2Q== X-Received: by 2002:a05:6402:33a:: with SMTP id q26mr3691328edw.150.1613732270187; Fri, 19 Feb 2021 02:57:50 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:7a8e:ed70:5c52:ea3]) by smtp.gmail.com with ESMTPSA id u15sm4204286ejy.48.2021.02.19.02.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Feb 2021 02:57:49 -0800 (PST) From: luca.boccassi@gmail.com To: stable@dpdk.org Cc: juraj.linkes@pantheon.tech, jerinj@marvell.com, ruifeng.wang@arm.com, david.marchand@redhat.com Date: Fri, 19 Feb 2021 10:57:40 +0000 Message-Id: <20210219105740.1567636-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 20.11] config/arm: replace native machine args X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Juraj Linkeš [ backported from upstream commit 9186e5a07f35ae74a1f7fa2d89671b5f77eae407 ] There are compiler issues when building with -mcpu=native with popular compilers, such as GCC-8.4: In file included from ../lib/librte_eal/arm/include/rte_vect.h:11, from ../lib/librte_net/net_crc_neon.c:10: ../lib/librte_net/net_crc_neon.c: In function ‘crcr32_folding_round’: /usr/lib/gcc/aarch64-linux-gnu/8/include/arm_neon.h:26094:1: error: inlining failed in call to always_inline ‘vmull_p64’: target specific option mismatch vmull_p64 (poly64_t a, poly64_t b) ../lib/librte_net/net_crc_neon.c:50:20: note: called from here uint64x2_t tmp1 = vreinterpretq_u64_p128(vmull_p64( vgetq_lane_p64(vreinterpretq_p64_u64(fold), 0), vgetq_lane_p64(vreinterpretq_p64_u64(precomp), 1))); and clang: gcc -E -dM -mcpu="native" - < /dev/null | grep __ARM_FEATURE_ATOMICS clang-9 -E -dM -mcpu="native" - < /dev/null | grep __ARM_FEATURE_ATOMICS # no clang support Fix this by always specifying the proper machine args and never using the native flags. Fixes: 78ac8eac7e8a ("config/arm: use native machine build arguments") Signed-off-by: Juraj Linkeš Signed-off-by: Luca Boccassi --- This is a crude backport, but it fixes the build for arm64. It's a release blocker for 20.11.1, so I would appreciate a quick review. Thanks! config/arm/meson.build | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 42b4e43c74..8beae4a3f9 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -5,7 +5,6 @@ # for checking defines we need to use the correct compiler flags march_opt = '-march=@0@'.format(machine) -arm_force_native_march = false arm_force_default_march = (machine == 'default') flags_common_default = [ @@ -92,7 +91,6 @@ flags_n1generic_extra = [ machine_args_generic = [ ['default', ['-march=armv8-a+crc', '-moutline-atomics']], - ['native', ['-march=native']], ['0xd03', ['-mcpu=cortex-a53']], ['0xd04', ['-mcpu=cortex-a35']], ['0xd07', ['-mcpu=cortex-a57']], @@ -104,7 +102,6 @@ machine_args_generic = [ machine_args_cavium = [ ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], @@ -112,8 +109,7 @@ machine_args_cavium = [ ['0xb2', ['-march=armv8.2-a+crc+crypto+lse','-mcpu=octeontx2'], flags_octeontx2_extra]] machine_args_emag = [ - ['default', ['-march=armv8-a+crc+crypto', '-mtune=emag']], - ['native', ['-march=native']]] + ['default', ['-march=armv8-a+crc+crypto', '-mtune=emag']]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic] @@ -167,9 +163,6 @@ else cmd_output = cmd_generic endif impl_pn = cmd_output[3] - if arm_force_native_march == true - impl_pn = 'native' - endif else impl_id = meson.get_cross_property('implementor_id', 'generic') impl_pn = meson.get_cross_property('implementor_pn', 'default') -- 2.29.2