From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140052.outbound.protection.outlook.com [40.107.14.52]) by dpdk.org (Postfix) with ESMTP id 36E2D2BE5; Tue, 15 Jan 2019 18:42:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6jv4vd5JwwMP61SqJZ37z3VAqr4ASuR+6CHZgRClveQ=; b=lofZkynyOvWiIIe+NvO6uX+Sr9Z82dx1FdijTvgPIKIw905ebyaqrbZnYOvVSw1A9L+4PQktF2mOqcuHYNPXIOJjNQvjBmpNmtA2/2dxOZGlww11QMrgIh5vjsJoqRQHEx1dcIg+bv8wjojVFrSMawhDPgV+3ikskvSxiF/5Q4E= Received: from AM6PR08MB3672.eurprd08.prod.outlook.com (20.177.115.76) by AM6PR08MB3830.eurprd08.prod.outlook.com (20.178.90.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.14; Tue, 15 Jan 2019 17:42:07 +0000 Received: from AM6PR08MB3672.eurprd08.prod.outlook.com ([fe80::25ec:2db7:d268:2b7b]) by AM6PR08MB3672.eurprd08.prod.outlook.com ([fe80::25ec:2db7:d268:2b7b%2]) with mapi id 15.20.1516.019; Tue, 15 Jan 2019 17:42:07 +0000 From: Honnappa Nagarahalli To: "Gavin Hu (Arm Technology China)" , "dev@dpdk.org" CC: nd , "thomas@monjalon.net" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "Gavin Hu (Arm Technology China)" , "olivier.matz@6wind.com" , "bruce.richardson@intel.com" , "stable@dpdk.org" , nd Thread-Topic: [PATCH v5 1/4] eal: fix clang compilation error on x86 Thread-Index: AQHUrL2vPYH5I8Aujkq7dBNtCWdnp6WwmXUQ Date: Tue, 15 Jan 2019 17:42:07 +0000 Message-ID: References: <20181220104246.5590-1-gavin.hu@arm.com> <1547548354-44671-2-git-send-email-gavin.hu@arm.com> In-Reply-To: <1547548354-44671-2-git-send-email-gavin.hu@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR08MB3830; 6:arVxLURWdTbsGbXQzvqFJ1qY0nGegZ4JTjnoIifqv9nj+PQkIOIDAEl5mgAko8RFlgnEZYgoPYKV3HXxr5vDhO8R8AGMaUIDcrlyh0wkApG4UqbHZB/rFoy/bkw+59rqVGhhcrLwYjsj6V2eEeQ1CMXOdoC1FYpqVtmcoiREEFF4REh1y0T1dnsf7ur3BihAmiHpdvWmHgIyqs8l3lIyUn8p0Y9ib3G9OeCircw1hXohwJs7KoTxtSoyKMfBQ32BP3LTdC3LCPxUIZAsZzIan9lgJB8OYcP9Zci+3AYJiYx5bm4NkbF52fCOdng1UxBs/FhziETJJJ2a5hgcOFt9/61sMqXonJrdjzZcDGWffVkB9j7xSdm6FQuVvL3g+ReKEZIs5g1J4avcSMIV7X3iRRshJhkrUzyuFR0RKWKb3b6r5qWnP4WRM7UXRpaCJ6J2K6E9rUqLo6o8RbhpcHA4+A==; 5:rzs6Ir8fFiL+jv2d2pmDOqLp9lCgLfHANF+UDMC2N4ClrLYC2+KMMVbb77u31exjZ54WsFXT6J13o6hNbM6qYuqdROB3ldu7/gpIFiYE92071qXJgo15i/c9tRSuldSxGLewXJbiFQOUJs17aJOYriS8sk06MZtQ4X0bcGFaKvnW5qxywW7xQf72BrMTO6qjbvkKel4zsfbfuYDo8KdbEQ==; 7:Ra7YyjClIuFthRxsKTFyDX+oYKEn4cyKlmRGyXdUXis4m1L58hAOyuqnDw1MdZFx+hswSxm8qkyD/FyEZHh8/+nFd/yXDi5c/xEOXJvjV9QSvKkE2fbvjDpNJPSEXyUR3/uOW2WZyvmvH9VTqtsJOA== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 2318a089-0e8e-4e9c-3d8c-08d67b10c549 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR08MB3830; x-ms-traffictypediagnostic: AM6PR08MB3830: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-antispam-prvs: x-forefront-prvs: 0918748D70 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(136003)(366004)(376002)(396003)(199004)(189003)(72206003)(14454004)(478600001)(966005)(7736002)(97736004)(66066001)(55016002)(99286004)(3846002)(6116002)(4326008)(316002)(74316002)(6306002)(305945005)(8676002)(86362001)(53936002)(81156014)(5660300001)(6246003)(81166006)(110136005)(54906003)(8936002)(9686003)(2501003)(33656002)(2906002)(446003)(11346002)(476003)(26005)(102836004)(106356001)(105586002)(6506007)(229853002)(68736007)(71200400001)(71190400001)(25786009)(76176011)(6436002)(256004)(7696005)(486006)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB3830; H:AM6PR08MB3672.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 9JF614+vASObL33zkWAoD0E+RDafhV1ZnvVAeB98FJYtpLIWrwGdjAbsjzxsKmK8ewOkgRF3FI9XQ4sjNWLB4Td1+petQSZinbLpWh0Wok1vIJhEtq3LlQjZRyWh909XFFWbuVCNraSN2cpbYvQzpjUJBHEHjjhzN11FZpis62Bjmb5afNAXBRRZakmapj1YOq7ewZxRIgLGWUlN6HlgkPsuDQTvI+mQ2FlhJPAZ+T7A/X4fzbUFixzPL9pMpFlAoL6E5Z0I15yS4AeKiGMop99PRzAxQw9p2K8rkqmKwgRQtU7MZkjYxnjTpr+KVZwzeS4hlWSh9zRZb6q2qaL9btfuXiR859m6WqKGI5YAaRpihKEa0aKvIGn5xjkOlkeNdVZRxoHajqPAUTwj1ZsK9gHBUVwKgzz8UXro9UK3dxo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2318a089-0e8e-4e9c-3d8c-08d67b10c549 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2019 17:42:07.8217 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3830 Subject: Re: [dpdk-dev] [PATCH v5 1/4] eal: fix clang compilation error on x86 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 17:42:09 -0000 >=20 > From: Gavin Hu >=20 > When CONFIG_RTE_FORCE_INTRINSICS is enabled for x86, the clang > compilation error was: > include/generic/rte_atomic.h:215:9: error: > implicit declaration of function '__atomic_exchange_2' > is invalid in C99 > include/generic/rte_atomic.h:494:9: error: > implicit declaration of function '__atomic_exchange_4' > is invalid in C99 > include/generic/rte_atomic.h:772:9: error: > implicit declaration of function '__atomic_exchange_8' > is invalid in C99 >=20 > Use __atomic_exchange_n instead of __atomic_exchange_(2/4/8). > For more information, please refer to: > http://mails.dpdk.org/archives/dev/2018-April/096776.html >=20 > Fixes: 7bdccb93078e ("eal: fix ARM build with clang") > Cc: stable@dpdk.org >=20 > Signed-off-by: Gavin Hu > Acked-by: Jerin Jacob > --- > lib/librte_eal/common/include/generic/rte_atomic.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/lib/librte_eal/common/include/generic/rte_atomic.h > b/lib/librte_eal/common/include/generic/rte_atomic.h > index b99ba46..ed5b125 100644 > --- a/lib/librte_eal/common/include/generic/rte_atomic.h > +++ b/lib/librte_eal/common/include/generic/rte_atomic.h > @@ -212,7 +212,7 @@ rte_atomic16_exchange(volatile uint16_t *dst, > uint16_t val); static inline uint16_t rte_atomic16_exchange(volatile > uint16_t *dst, uint16_t val) { -#if defined(RTE_ARCH_ARM64) && > defined(RTE_TOOLCHAIN_CLANG) > +#if defined(RTE_TOOLCHAIN_CLANG) Please check http://mails.dpdk.org/archives/dev/2019-January/123331.html This needs to be changed to (__clang__). This applies for other similar cha= nges here. > return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST); #else > return __atomic_exchange_2(dst, val, __ATOMIC_SEQ_CST); @@ - > 495,7 +495,7 @@ rte_atomic32_exchange(volatile uint32_t *dst, uint32_t > val); static inline uint32_t rte_atomic32_exchange(volatile uint32_t *d= st, > uint32_t val) { -#if defined(RTE_ARCH_ARM64) && > defined(RTE_TOOLCHAIN_CLANG) > +#if defined(RTE_TOOLCHAIN_CLANG) > return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST); #else > return __atomic_exchange_4(dst, val, __ATOMIC_SEQ_CST); @@ - > 777,7 +777,7 @@ rte_atomic64_exchange(volatile uint64_t *dst, uint64_t > val); static inline uint64_t rte_atomic64_exchange(volatile uint64_t *d= st, > uint64_t val) { -#if defined(RTE_ARCH_ARM64) && > defined(RTE_TOOLCHAIN_CLANG) > +#if defined(RTE_TOOLCHAIN_CLANG) > return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST); #else > return __atomic_exchange_8(dst, val, __ATOMIC_SEQ_CST); > -- > 2.7.4