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 E78F8431A1; Wed, 25 Oct 2023 16:17:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7F154067B; Wed, 25 Oct 2023 16:17:28 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2087.outbound.protection.outlook.com [40.107.220.87]) by mails.dpdk.org (Postfix) with ESMTP id B4C1240273 for ; Wed, 25 Oct 2023 16:17:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ROz6ZnunyQBp5eEQO9Wj1+ajsHZeqNkmYEjoXk1rMcklT4gucjtLFn1Mh563eKVxX5DSxDke9Mq2aUT/5nX2aimU6SJ/XosxsTQIrE5J4HnRQEFIM1SNiEhfHO/dLf4NsH5F51VImsWVyyJqYVxu0oNxONgpbMnkqaAd9fv6DDnABy22J1Nz5WQY/DpbeD/gBX65hq/m9WTVwXarFdoyFaD0yQSri3m3lZBXHtIXrDSlr/E0pRxOGto+WqqlOh9kXAOf+TMBZ1g03oBmojYC39J18QEvk7L55sbH9CChin58TnETFPvevel6RaNsvaNk0+BW1XAd2UAdii2oyrANTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WIRT/7F/tRYgUWnMBM3495ImCT5UYHAlu+yweD2Jy7k=; b=Jvl5gDC2jlBmx1EqPVmE4k2Nu7mA2rNaUBv4b2tZ2gkTD8j1MzHQlDFYYqhHxfKd/2kxdLIksiyvjQ0pCTUMV8dckzvE5aKFzNKIFr8bRBNjM+AJt1h4+0MGou3ZgwSQa8Fn0mgk0/90GamhmLsfzAq2CLEkFIJ7kxFzrUdFYs6BaGA+GgGCRkjgstfB2/Ma92VjfTOKij9xZIdQIrMaXufdZtidiAU4157LcyHn0dkMvuqsKHbFS+uhlHLGF9vN2iKbqgx5zD2g4ov5veYJRCbMrQPaRIqnKx2zJ2nzb0fkcRudms0PQVQYQZthZIMauDBWX6nZG4L000l/aDeHdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WIRT/7F/tRYgUWnMBM3495ImCT5UYHAlu+yweD2Jy7k=; b=tCdTQZqzHYuSLqNcYlCKAw8tDhJDivKtmnusApifaqlEbrVHOwFhbLe0jOUMggGGfBFHnnIcCWuqyz5se62IdKGROsmhY8dmI7NSm+mr3j2udB4sMxBUVosiwohDMaunzuiaIsHl5oNV/xOYnbflFi3abaqOGuUAhCjnYtASekk= Received: from BL1PR13CA0233.namprd13.prod.outlook.com (2603:10b6:208:2bf::28) by CYYPR12MB8731.namprd12.prod.outlook.com (2603:10b6:930:ba::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.31; Wed, 25 Oct 2023 14:17:25 +0000 Received: from BL6PEPF0001AB75.namprd02.prod.outlook.com (2603:10b6:208:2bf:cafe::37) by BL1PR13CA0233.outlook.office365.com (2603:10b6:208:2bf::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19 via Frontend Transport; Wed, 25 Oct 2023 14:17:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BL6PEPF0001AB75.mail.protection.outlook.com (10.167.242.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6933.15 via Frontend Transport; Wed, 25 Oct 2023 14:17:25 +0000 Received: from telco-siena.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 25 Oct 2023 09:17:24 -0500 From: Sivaprasad Tummala To: CC: , , , , Subject: [PATCH] config: compiler support check for machine arch flags Date: Wed, 25 Oct 2023 07:17:09 -0700 Message-ID: <20231025141709.1448007-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB75:EE_|CYYPR12MB8731:EE_ X-MS-Office365-Filtering-Correlation-Id: 81195f92-f682-4cea-685c-08dbd5651c99 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D5hO2my/znGLCtnR3b+4ivsKy586dEoAitEL6fVX1B2ueBB8dA2SAdgkshHRshhkHbnAXoa8h9S1W4hpZqEphoZh5vGwVrfFVOWbAM+MbmdvbzW4dfbNexY5pgkCWZ8CnVX/SKyXYRberyVN4fGOe6aZawtnYma417/no1kI9T/hsT1wdzss/tksYrYuPBqrr8WvK2AuWa9cxmLNUrIL3Ji+APofkQrYuHDl/wddQus/+hfxWnc74atGvqS3qWzkP6YSwPTj376TAVWeQTTCSXOSrsv9YJKJtkg7iHKYy/uQnN/0rrQJVGJVdjg0G0GGzKeBPxlxB5Vt0YAdtJWGt7v6L2w6d1nBiDj19H9Jad+L98p5k9Xa0W8aoXWChyXmyDHqXE60SPF/cC1KkxuHzPNkVqyMO1b1TJpE0R+IBNAOf+kAuJV3GbD/sKxadMh8PCutBuX4Xw5LMRDJM74S9VYjni43j/Yc3hEuAWYJDhGsNp+sMYXbsD/g0xOTySYtPpr9MYW0kr3TexNqietPG44XBQT62bieDOzIoM47qPCF3vTYxKgK0oi4kCPp/v1gSM0KT0WvyY6dN+LPxf63ae8q3JWKE0WuYvew7k9bRImODkA/402Qk4a8lGpBez1Pn3zDfg0lkSwhukQEZpOnqyuQ61o1JDfdN7HLyIl5bVLPTA+ns0YtQu0T2Rd9U+72p0yu4npSLi7T2ciZi6qpoErtt0BEFiouuKusdSWa6LSuShe7m5+NI84tLXdaOIpsCu2KtYYkXDrShO2OOSTjNg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(136003)(39860400002)(376002)(346002)(396003)(230922051799003)(451199024)(64100799003)(82310400011)(186009)(1800799009)(40470700004)(46966006)(36840700001)(54906003)(70206006)(40460700003)(41300700001)(2906002)(70586007)(81166007)(7696005)(82740400003)(478600001)(6916009)(16526019)(2616005)(1076003)(316002)(356005)(47076005)(40480700001)(336012)(426003)(6666004)(4326008)(86362001)(36756003)(5660300002)(36860700001)(8676002)(44832011)(8936002)(26005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2023 14:17:25.0817 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 81195f92-f682-4cea-685c-08dbd5651c99 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB75.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8731 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 Added additional checks for compiler support of specific cpu arch flags to fix incorrect error reporting. Without this patch, meson build reports '__SSE4_2__' not defined error for x86 builds when the compiler does not support the specified cpu_instruction_set (or) machine argument. Signed-off-by: Sivaprasad Tummala --- config/meson.build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/meson.build b/config/meson.build index d56b0f9bce..e776870def 100644 --- a/config/meson.build +++ b/config/meson.build @@ -159,8 +159,13 @@ if not is_ms_compiler if host_machine.cpu_family().startswith('ppc') machine_args += '-mcpu=' + cpu_instruction_set machine_args += '-mtune=' + cpu_instruction_set + compiler_arch_support = cc.has_argument('-mcpu=' + cpu_instruction_set) else machine_args += '-march=' + cpu_instruction_set + compiler_arch_support = cc.has_argument('-march=' + cpu_instruction_set) + endif + if not compiler_arch_support + error('Compiler does not support "@0@" arch flag.'.format(cpu_instruction_set)) endif endif -- 2.34.1