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 EB72A4320B; Thu, 26 Oct 2023 20:13:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B6D65402CF; Thu, 26 Oct 2023 20:13:44 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2044.outbound.protection.outlook.com [40.107.95.44]) by mails.dpdk.org (Postfix) with ESMTP id 68B1F40261 for ; Thu, 26 Oct 2023 20:13:43 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V6SczWzYjEsQq5BZEdzQjsl8j4SS37uW+qXGTQEiGu3hbdG4M+PvwgDhoTtka7g5dW2sNDiW7rOCO5qPA7ZgW9CHDoS4mJzSuUm+lXlZ1t6aO9vCU7RwucHXIGrjphB4UTRlr0vrlHF0i1o9aYxjlvkEVFneBL2Jfd1af103LO2cqR9qz/vGtfdb4Vlo9m+W0csHdXPghVV1GZF9K5BDqoFvp+NxPu4XAy7rammU1y0OoCpi/5C2ZM8D1JHlyb0WV3ohwihP3qv/dpX6kuBdT++5Jn3L5I/5xMB37zWA9PdiTjzHUKezwrAD4CiuQaTgQd1tcS87/yYqiwBD7td37Q== 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=te0bQjdFfknPWn7nzlMoYx1+0ps+HMKmar5POmoFRik=; b=GvF/coiSd2jB6FxE+jSYN3GlDyXGjE9fHn1O4X79AtcnYqsf573Zxk4dOzlNSIsSO9DwD+xlzE5SlWD3jE0b3+DTdT+a02UZSXz74kWPEeYhiuuNkXBdika8MOZnSmv9P32pJBOl5obnOxOmwYUHwZERnSKUD9U9p4H7GNjOb5vUf+DgovT13M1R1cf0sdwdSY22/YiEPqRhf1McFDe5C8U/VrAsO6bKKkXvCQLdICv3smvBwkrumtHkCwvwzS60rusGAg7NrgjY7nehbg5eD73YlqFX/sVrtoMLLWAMX6XZk+SWSQ4rjNXONrxuZ46wOeCrw3jXtxt8IVQ7yymYSA== 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 (0) 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=te0bQjdFfknPWn7nzlMoYx1+0ps+HMKmar5POmoFRik=; b=mzi5a/N+6+yTaK+0TGOXrdbzDvy+J0YvjCHzLfqhm9Z77eGrUmqHnJR4U41SOhlr0b5CowD25/ZvrEeUDAhoePZdN7oEM/Ft9x1xjnK1/huBvkRf0hyhSE7SJ2+Z0TFDnkD57SwF1a7VXIFYJBfPMtH5VoTsymPPhuXC7eHW2w4= Received: from DS7PR05CA0032.namprd05.prod.outlook.com (2603:10b6:8:2f::31) by CH2PR12MB4857.namprd12.prod.outlook.com (2603:10b6:610:64::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Thu, 26 Oct 2023 18:13:41 +0000 Received: from DS2PEPF00003441.namprd04.prod.outlook.com (2603:10b6:8:2f:cafe::c4) by DS7PR05CA0032.outlook.office365.com (2603:10b6:8:2f::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.8 via Frontend Transport; Thu, 26 Oct 2023 18:13:40 +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 DS2PEPF00003441.mail.protection.outlook.com (10.167.17.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6933.15 via Frontend Transport; Thu, 26 Oct 2023 18:13:40 +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.32; Thu, 26 Oct 2023 13:13:39 -0500 From: Sivaprasad Tummala To: CC: , , , , Subject: [PATCH v2] config: verify machine arch flag Date: Thu, 26 Oct 2023 11:13:18 -0700 Message-ID: <20231026181318.1463398-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025141709.1448007-1-sivaprasad.tummala@amd.com> References: <20231025141709.1448007-1-sivaprasad.tummala@amd.com> 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: DS2PEPF00003441:EE_|CH2PR12MB4857:EE_ X-MS-Office365-Filtering-Correlation-Id: c45b57eb-78fd-4003-7a1b-08dbd64f4856 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mI9RnN3G6dOz8j1YILUVAySWLTuMMdxsWXmTApWDttdr4B4vtr05GQDDzbSnTL/FIxCgH7xO/OsbZcELjiq5NKaKBv6IYEvXpuqER4L8tRjIcUQVS3sDjzBg6fagniN4RBxT4p0F0N1ZyK6J8x+9CUpYNLiKbThzTkwaN2cOd6ng4BxtZUTva5B6GHjN413FIQwf8iOBl5BdmISNGicvYWLkSHtc5Zi5Vw2yIhwFCpwRWZE4tnHiKIfrLvw0lvetm4i9Or3UF8zsbK/pEE9IAFnrS06mtHKLfgu1xyNW19/3yNL1Nhd1H7cUTjUJZMMXsDDa90C/R0qcM6aNf7/LrNFhyJn8GjLNm6dJata2s+cCTL6C46uhCFJ95XespYApHiJu8+jqYJyjj0RMNF1/nGkdrEpskE1db2dzkUnciUsJQAnddnvGo+QIJLzum85zprx7PYuCD0VDkwS4yWFwUnyDz7YYqGw3TVxMrEHAJyoAH5WUo3wocpJydJlpaVIB77KwHKD4SzCb3qkKn0uNqB93nBqw7C1K2VM8PkrbZaFZR62dmQuwlfB6h8ER6M9Z6k0tr9zZn8sKlRCRFUM2VJZm5e6dJFbC6LfVRo6VnJgL0H7APyztyCxewcyK3VXTCEsq/GS28Sh8a4Dw7rro5n7BUnm3Wto0bMKAl3ken7M+hBUlpLzw+6J8rXNZ4UVmOwD9oBGkHJwA4d2/semq1mVy7+MBOVMh7HAENvlfvDL31CvtczjVJbXCT7UxpNcShoSDQbf0GKUCEzkk0YJlew== 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)(376002)(39860400002)(136003)(346002)(396003)(230922051799003)(64100799003)(186009)(1800799009)(451199024)(82310400011)(46966006)(36840700001)(40470700004)(356005)(47076005)(36756003)(2906002)(81166007)(336012)(36860700001)(26005)(1076003)(2616005)(16526019)(426003)(4326008)(8676002)(44832011)(70586007)(54906003)(40460700003)(41300700001)(6666004)(7696005)(86362001)(8936002)(82740400003)(5660300002)(70206006)(478600001)(6916009)(40480700001)(316002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2023 18:13:40.6506 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c45b57eb-78fd-4003-7a1b-08dbd64f4856 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: DS2PEPF00003441.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4857 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 Acked-by: Bruce Richardson --- v2: - fix build issues on arm platforms --- config/meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/meson.build b/config/meson.build index d56b0f9bce..bd0918bb62 100644 --- a/config/meson.build +++ b/config/meson.build @@ -159,8 +159,18 @@ 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 + # arm manages generic/auto config in config/arm/meson.build + if cpu_instruction_set != 'generic' and cpu_instruction_set != 'auto' + compiler_arch_support = cc.has_argument('-march=' + cpu_instruction_set) + else + compiler_arch_support = true + endif + endif + if not compiler_arch_support + error('Compiler does not support "@0@" arch flag.'.format(cpu_instruction_set)) endif endif -- 2.34.1