From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: 16.07-rc2 issue with rte_rtm_init(void) constructor Date: Thu, 14 Jul 2016 10:20:31 +0200 Message-ID: <2746154.p2WhExbrR9@xps13> References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: "Damjan Marion (damarion)" Return-path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 3C4433237 for ; Thu, 14 Jul 2016 10:20:34 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id r190so3150895wmr.0 for ; Thu, 14 Jul 2016 01:20:34 -0700 (PDT) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-07-13 22:58, Damjan Marion: > I have issues with linking application to 16.07-rc2. >=20 > Looks like reason is constructor function in include file, > so our unit test apps are failing to link as they are not linked with= dpdk libs. > (and they should not be as they are not calling any dpdk function). I don't understand: Why are you linking DPDK if you do not use any DPDK function? > static inline void __attribute__((constructor)) > rte_rtm_init(void) > { > rtm_supported =3D rte_cpu_get_flag_enabled(RTE_CPUFLAG_RTM); > } >=20 > linking fails with: > dpdk/include/rte_spinlock.h:103: undefined reference to `rte_cpu_get_= flag_enabled=E2=80=99 >=20 > Is there any chance that this one is moved to some .c file, so it is = loaded > only when it is really needed? Yes it could be moved to lib/librte_eal/common/arch/x86/.